Beispiel #1
0
    })
    BA_CONSTRAINT.create_angles_by_definition(
        anglesDefinition={"CO2": [('C', 'O1', 'O2', 170, 180)]})
    # initialize constraints data
    ENGINE.initialize_used_constraints()
    # save engine
    ENGINE.save()
else:
    ENGINE = ENGINE.load(enginePath)
    # unpack constraints before fitting in case tweaking is needed
    PDF_CONSTRAINT, IMD_CONSTRAINT, B_CONSTRAINT, BA_CONSTRAINT = ENGINE.constraints

# set all constraints as used. Used value is True by default!
# Now you know you can deactivate any constraint at any time though.
PDF_CONSTRAINT.set_used(True)
IMD_CONSTRAINT.set_used(True)
B_CONSTRAINT.set_used(True)
BA_CONSTRAINT.set_used(True)


##########################################################################################
#####################################  DIFFERENT RUNS  ###################################
def run_atoms(ENGINE, rang=None, recur=None, xyzFrequency=500):
    ENGINE.set_groups(None)
    # set selector
    if recur is None: recur = 10
    ENGINE.set_group_selector(RandomSelector(ENGINE))
    # number of steps
    nsteps = recur * len(ENGINE.groups)
    if rang is None: rang = 20
    for stepIdx in range(rang):
Beispiel #2
0
        if allElements[g.indexes[0]] == 'ni':
            g.set_move_generator(toTiSG)
        elif allElements[g.indexes[0]] == 'ti':
            g.set_move_generator(toNiSG)
    # run
    ENGINE.run(numberOfSteps=nsteps,
               saveFrequency=saveFrequency,
               restartPdb=None)


##########################################################################################
###################################  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)