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')
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)
Beispiel #3
0
from htbac import Runner, Protocol, Simulation, System, AbFile
from htbac.analysis import GradientBoostClassifier

# Step 0: load system files.

coord = AbFile('systems/nilotinib-e255k-complex.inpcrd', tag='coordinate')
top = AbFile('systems/nilotinib-e255k-complex.top', tag='topology')
system = System(name='nilotinib-e255k', files=[top, coord])

# Step 1: create a Simulation

sim = Simulation()

sim.engine = 'openmm'
sim.system = system
sim.processes = 1
sim.threads_per_process = 32

sim.numsteps = 1000

sim.add_input_file('inputs/benchmark.py', is_executable_argument=True)

# Step 2: Hyperparameter optimization using HyperSpace Gradient Boost Classifier

# analysis = GradientBoostClassifier()
# analysis.hyperparameters = 4
# analysis.data_path  = '/pylon5/mc3bggp/dakka/hyperspace_data/constellation/constellation/data/fashion'
# analysis.optimization_file = '/home/jdakka/hyperspace/constellation/constellation/gbm/space4/optimize.py'
# analysis.results_dir = '/pylon5/mc3bggp/dakka/hyperspace_data/results_space_4'

ht = Runner('xsede.bridges_gpu',
cons = AbFile('systems/54353507-54150798/54353507-54150798-cons.pdb',
              tag='constraint')
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)
Beispiel #5
0
# define system
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])

# 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