def run_rfe():
    pdb = AbFile('complex.pdb', tag='pdb')
    top = AbFile('complex.prmtop', tag='topology')
    tag = AbFile('tags.pdb', tag='alchemicaltags')
    cor = AbFile('complex.inpcrd', tag='coordinate')
    system = System(name='1z3f-l08-l11', files=[pdb, top, tag, cor])

    p = Protocol(clone_settings=False)

    min, run = Rfe.steps

    for step, numsteps in zip([min, run, run, run, run, run],
                              [100, 500, 1000, 1000, 1000, 10000, 8000000]):

        rfe = Simulation()
        rfe.system = system
        rfe.engine = 'namd'
        rfe.processes = 8
        rfe.threads_per_process = 16

        rfe.cutoff = 10.0
        rfe.switchdist = 8.0
        rfe.pairlistdist = 11.5
        rfe.numsteps = numsteps
        rfe.watermodel = 'tip4'

        rfe.add_input_file(step, is_executable_argument=True)

        rfe.add_ensemble('replica', range(3))
        # to increase the number of EnTK tasks: change the lambdawindow parameter
        rfe.add_ensemble('lambdawindow', np.linspace(0, 1, 13))

        p.append(rfe)

    ht = Runner('titan_aprun')
    ht.add_protocol(p)
    ht.run(walltime=720)
Exemplo n.º 2
0
# define step 0:
s0 = Simulation(name='minimizer')
s0.engine = 'namd'
s0.processes = 1
s0.threads_per_process = 16
s0.add_ensemble('replica', range(5))
s0.add_ensemble('lambdawindow', [1.0, 0.5, 0.0])
s0.add_input_file("default_configs/rfe/ties-0.conf",
                  is_executable_argument=True)
s0.system = system

s0.cutoff = 12.0
s0.switchdist = 10.0
s0.pairlistdist = 13.5
s0.numsteps = 5000
s0.watermodel = "tip3"

# set all values that have <placeholder> in the *.conf file
# import pdb
# pdb.set_trace()
# print [k for k, vs in s0._variables.items() for v in vs if s0.get_variable(v) is None]

# append step 0 to protocol:
p.append(s0)

# define step 1:
s1 = Simulation(name='equilibrate')
s1.engine = 'namd'
s1.processes = 1
s1.threads_per_process = 16
s1.add_ensemble('replica', range(5))