Esempio n. 1
0

##########################################################################################
###################################  RUN no_constraints  #################################
# rename first frame set by default to '0'
ENGINE.rename_frame('0', 'no_constraints')
ACN_CONSTRAINT.set_used(False)
EMD_CONSTRAINT.set_used(False)
run_normal(nsteps=1000000, saveFrequency=1000, engineFilePath=engineFilePath)
run_swap(nsteps=100000, saveFrequency=1000, engineFilePath=engineFilePath)
run_normal(nsteps=10000, saveFrequency=1000, engineFilePath=engineFilePath)

##########################################################################################
######################################  RUN with_vdw  ####################################
ENGINE.add_frames('with_vdw')
ENGINE.set_used_frame('with_vdw')
ENGINE.reinit_frame('with_vdw')
ACN_CONSTRAINT.set_used(False)
EMD_CONSTRAINT.set_used(True)
run_normal(nsteps=1000000, saveFrequency=1000, engineFilePath=engineFilePath)
run_swap(nsteps=100000, saveFrequency=1000, engineFilePath=engineFilePath)
run_normal(nsteps=10000, saveFrequency=1000, engineFilePath=engineFilePath)

##########################################################################################
###################################  RUN all_constraints  ################################
ENGINE.add_frames('all_constraints')
ENGINE.set_used_frame('all_constraints')
ENGINE.reinit_frame('all_constraints')
ACN_CONSTRAINT.set_used(True)
EMD_CONSTRAINT.set_used(True)
ACN_CONSTRAINT.set_coordination_number_definition([
Esempio n. 2
0
    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)
    swaps_run(numberOfSteps=50000, saveFrequency=10000)
Esempio n. 3
0
    # 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)


################################################################################
###################### CREATE SOFTGRID WORKERS MANAGEMENT ######################
WM = MultiframeUtils.WorkersManagement()
WM.start(engine=ENGINE, multiframe='size_distribution', orchestrator=None)