RCo.moveGenerator.set_atoms_list(meIndexes) ## set groups to engine ENGINE.set_groups([RO, RLi, RCo]) ## run engine ENGINE.run(numberOfSteps=numberOfSteps, saveFrequency=saveFrequency) # #################################################################################### # # ################################## RUN SIMULATION ################################## # ## run normal normal_run(numberOfSteps=100000, saveFrequency=50000) PDF_CONSTRAINT.set_adjust_scale_factor((10, 0.7, 1.3)) normal_run(numberOfSteps=250000, saveFrequency=50000) ## add first swapping frame if not ENGINE.is_frame('swap_1'): ENGINE.add_frame('swap_1') ## use swap_1 frame and run swapping ENGINE.set_used_frame('swap_1') swaps_run(numberOfSteps=200000, saveFrequency=50000) normal_run(numberOfSteps=250000, saveFrequency=50000) ## add first removing frame if not ENGINE.is_frame('removes_2'): ENGINE.add_frame('removes_2') ## use removes_2 frame and run some removes ENGINE.set_used_frame('removes_2') for _ in range(20): # remove as little as possible then try to refine removes_run(numberOfSteps=100, saveFrequency=100) normal_run(numberOfSteps=100000, saveFrequency=10000)
ACNC_CONSTRAINT.set_coordination_number_definition( coordNumDef=[('Si','Si',1.8,2.8,3,6), ]) # initialize constraints _ = ENGINE.initialize_used_constraints() # set number density ENGINE.set_number_density(.0125) # save engine ENGINE.save() else: ENGINE = ENGINE.load(engineFilePath) # get constraints PDF_CONSTRAINT, EMD_CONSTRAINT, ACNC_CONSTRAINT = ENGINE.constraints # add multiframe if not ENGINE.is_frame(multiframe): ENGINE.add_frame({'name':multiframe, 'frames_name':numberOfFrames}) for sf in ENGINE.frames[multiframe]['frames_name']: ENGINE.set_used_frame(os.path.join(multiframe, sf)) ENGINE.set_pdb(os.path.join(DIR_PATH, 'multiframe_structure_%s.pdb'%sf)) _usedConstraints, _constraints, _rigidConstraints = ENGINE.initialize_used_constraints(sortConstraints=True) if not len(_usedConstraints): LOGGER.warn("@%s No constraints are used. Configuration will be randomized"%ENGINE.usedFrame) # runtime initialize group selector ENGINE._Engine__groupSelector._runtime_initialize() # runtime initialize constraints _=[c._runtime_initialize() for c in _usedConstraints] LOGGER.info("@%s Stochastic engine files are created"%ENGINE.usedFrame) ################################################################################