def test_simulation_component():

    s0 = Simulation(name='minimizer')
    s0.engine = 'titan_orte'
    s0.processes = 1
    s0.threads_per_process = 16
    s0.add_ensemble('replica', range(5))
    pdb = AbFile('systems/ptp1b-l1-l2-complex.pdb', tag='pdb')
    top = AbFile('systems/ptp1b-l1-l2-complex.top', tag='topology')
    tag = AbFile('systems/ptp1b-l1-l2-tags.pdb', tag='alchemicaltags')
    cor = AbFile('systems/ptp1b-l1-l2-complex.inpcrd', tag='coordinate')
    system = System(name='ptp1b-l1-l2', files=[pdb, top, tag, cor])
    s0.system = system

    assert s0.name == 'minimizer'
    assert s0.engine == 'titan_orte'

    assert s0.system.name == 'ptp1b-l1-l2'
    assert s0._processes == 1
    assert s0._threads_per_process == 16
    len_ensemble = reduce(mul, (len(v) for v in s0._ensembles.itervalues()), 1)
    assert s0.cpus == s0.threads_per_process * s0._processes * len_ensemble
    assert s0.shared_data == [
        'systems/ptp1b-l1-l2-complex.pdb', 'systems/ptp1b-l1-l2-complex.top',
        'systems/ptp1b-l1-l2-tags.pdb', 'systems/ptp1b-l1-l2-complex.inpcrd'
    ]
    s1 = Simulation(name='equilibrate')
Пример #2
0
def run_rfe():
    pdb = AbFile('systems/ptp1b-l1-l2-complex.pdb', tag='pdb')
    top = AbFile('systems/ptp1b-l1-l2-complex.top', tag='topology')
    tag = AbFile('systems/ptp1b-l1-l2-tags.pdb', tag='alchemicaltags')
    cor = AbFile('systems/ptp1b-l1-l2-complex.inpcrd', tag='coordinate')
    system = System(name='ptp1b-l1-l2', files=[pdb, top, tag, cor])

    p = Protocol(clone_settings=False)

    for step, numsteps in zip(Rfe.steps, [5000, 50000]):

        rfe = Simulation()
        rfe.system = system
        rfe.engine = 'namd_mpi'
        rfe.cores = 32

        rfe.cutoff = 12.0
        rfe.switchdist = 10.0
        rfe.pairlistdist = 13.5
        rfe.numminsteps = 5000
        rfe.numsteps = numsteps

        rfe.add_input_file(step, is_executable_argument=True)
        
        rfe.add_ensemble('replica', range(1))
        # to increase the number of EnTK tasks: change the lambdawindow parameter
        rfe.add_ensemble('lambdawindow', [1.]) 

        p.append(rfe)

    ht = Runner('bw_aprun', comm_server=('two.radical-project.org', 33158))
    ht.add_protocol(p)
    ht.run(walltime=480, queue='high')
Пример #3
0
def run_afe():
    system = System(prefix='systems/dov-wt')

    afe = Simulation()
    afe.system = system
    afe.engine = 'namd'
    afe.cores = 2

    afe.numminsteps = 10
    afe.numsteps = 10

    afe.add_input_file(Afe.step0, is_executable_argument=True)
    afe.add_input_file('inputs/restraint.in', is_executable_argument=False)

    afe.add_ensemble('replica', range(2))
    afe.add_ensemble('lambdawindow', [0.0, 1.0])

    afe.cutoff = 12.0
    afe.switchdist = 10.0
    afe.pairlistdist = 13.5

    afe.k1 = 10
    afe.k2 = 500

    ht = Runner(comm_server=('two.radical-project.org', 33146))
    ht.add_protocol(afe)
    ht.run(walltime=1000)
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)
fep = AbFile('systems/54353507-54150798/54353507-54150798-fep.tcl',
             tag='source')
system = System(name='54353507-54150798',
                files=[pdb, top, tag, cor, cons, fep])

# Create simulation steps for relative free energy protocol

# define protocol:
p0 = Protocol()

# define step 0:
s0 = Simulation(name='minimizer')
s0.engine = 'namd'
s0.processes = 32
s0.threads_per_process = 1
s0.add_ensemble('replica', range(5))
s0.add_ensemble('lambdawindow', [1.00, 0.50, 0.00])
s0.add_input_file("default_configs/rfe/54353507-54150798/eq0.conf",
                  is_executable_argument=True)
s0.system = system

s0.cutoff = 12.0
s0.switchdist = 10.0
s0.pairlistdist = 13.5
s0.numsteps = 1000

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

# define step 1:
s1 = Simulation(name='equilibrate1')
Пример #6
0
for step, numsteps in zip(Esmacs.steps, Esmacs.numsteps):

    sim = Simulation()
    sim.engine = 'namd_openmp_cuda'

    sim.cutoff = 10.0
    sim.switchingdist = 8.0
    sim.pairlistdist = 11.5
    sim.water_model = 'tip4'

    # This is present in step 3 only.
    sim.numsmallsteps = 20000
    sim.numsteps = numsteps

    sim.add_input_file(step, is_executable_argument=True)

    sim.add_ensemble('replica', range(25))
    sim.add_ensemble('system', systems)

    esm.append(sim)

# Create runner and assign protocol to it

ht = Runner(resource='titan_orte',
            comm_server=('csc190specfem.marble.ccs.ornl.gov', 30672))
ht.add_protocol(esm)

# Run
ht.run(walltime=60)
Пример #7
0
                      tag='restraint',
                      needs_copying=True).with_prefix(name)
        tags = AbFile(folder + "tags.pdb",
                      tag='alchemicaltags').with_prefix(name).with_prefix(name)

        systems.append(System(name, files=[pdb, top, coord, rest, tags]))

sim = Simulation()
sim.engine = 'dummy'  # This *forces* the core count to 1, non mpi.

sim.cutoff = 12.0
sim.pairlistdist = 13.5
sim.switchdist = 10.0
sim.numsteps = Afe.numsteps[0]

sim.add_ensemble('replica', values=range(5))
sim.add_ensemble('system', values=systems)
sim.add_ensemble(
    'lambdawindow',
    values=[0.0, 0.01, 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0])

sim.add_input_file(Afe.step0, is_executable_argument=True)

sim.add_variable(name='k1', value=10, in_file='*restraint_1.0.in')
sim.add_variable(name='k2', value=500, in_file='*restraint_1.0.in')

runner = Runner(resource='local',
                comm_server=('two.radical-project.org', 33166))
runner.add_protocol(sim)

# Customize resource to the type of python installed locally.
Пример #8
0
top = AbFile('systems/ptp1b-l1-l2-complex.top', tag='topology')
tag = AbFile('systems/ptp1b-l1-l2-tags.pdb', tag='alchemicaltags')
cor = AbFile('systems/ptp1b-l1-l2-complex.inpcrd', tag='coordinate')
system = System(name='ptp1b-l1-l2', files=[pdb, top, tag, cor])

# Create simulation steps for relative free energy protocol

# define protocol:
p = Protocol()

# 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]
             tag='coordinate')
fep = AbFile('systems/esmacs-pde2-4d08-l1/esmacs-pde2-4d08-l1-fep.tcl',
             tag='source')
system = System(name='esmacs-pde2-4d08-l1', files=[pdb, top, cons, cor, fep])

# Create simulation steps for relative free energy protocol

# define protocol:
p = Protocol()

# define step 0:
s0 = Simulation(name='stage-0')
s0.engine = 'namd'
s0.processes = 32
s0.threads_per_process = 1
s0.add_ensemble('replica', range(25))
s0.add_input_file(
    "default_configs/esmacs/esmacs-pde2-4d08-l1/esmacs-stage-0.conf",
    is_executable_argument=True)
s0.system = system

s0.cutoff = 12.0
s0.switchdist = 10.0
s0.pairlistdist = 13.5
s0.numsteps = 1000
s0.numsmallsteps = 100
s0.constraint_column = "B"

# append step 0 to protocol:
p.append(s0)
Пример #10
0
                      needs_copying=True).with_prefix(name)
        systems.append(System(name, files=[pdb, top, coord, rest]))

step = Afe.step1
numsteps = Afe.numsteps[0]

sim = Simulation()
sim.engine = 'namd_mpi'
sim.cores = 32

sim.cutoff = 12.0
sim.pairlistdist = 13.5
sim.switchdist = 10.0
sim.numsteps = numsteps

sim.add_ensemble('replica', values=range(2))
sim.add_ensemble('system', values=systems[:2])
sim.add_ensemble('lambdawindow',
                 values=[
                     1.0, 0.75, 0.5, 0.3, 0.2, 0.15, 0.1, 0.075, 0.05, 0.025,
                     0.01, 0.0
                 ][:2])

sim.add_input_file(step, is_executable_argument=True)

sim.add_variable(name='k1',
                 value=property(lambda: 10 * sim.lambdawindow),
                 in_file='*restraint_1.0.in')
sim.add_variable(name='k2',
                 value=property(lambda: 500 * sim.lambdawindow),
                 in_file='*restraint_1.0.in')
Пример #11
0
fep = AbFile('systems/54353507-54150798/54353507-54150798-fep.tcl',
             tag='source')
system = System(name='54353507-54150798',
                files=[pdb, top, tag, cor, cons, fep])

# Create simulation steps for relative free energy protocol

# define protocol:
p = Protocol()

# define step 0:
s0 = Simulation(name='minimizer')
s0.engine = 'namd'
s0.processes = 32
s0.threads_per_process = 1
s0.add_ensemble('replica', range(5))
s0.add_ensemble('lambdawindow', [
    1.00, 0.95, 0.90, 0.80, 0.70, 0.60, 0.50, 0.40, 0.30, 0.20, 0.10, 0.05,
    0.00
])
s0.add_input_file("default_configs/rfe/54353507-54150798/eq0.conf",
                  is_executable_argument=True)
s0.system = system

s0.cutoff = 12.0
s0.switchdist = 10.0
s0.pairlistdist = 13.5
s0.numsteps = 1000

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