def load_waterbox(constrained=True): """Load WaterBox test system""" testsystem = WaterBox(constrained=constrained) (topology, system, positions) = testsystem.topology, testsystem.system, testsystem.positions add_barostat(system) return topology, system, positions
def load_solvated_alanine(constrained=True): """Load AlanineDipeptide in explicit solvent, optionally with rigid water + hydrogen bonds constrained.""" if constrained: testsystem = AlanineDipeptideExplicit(constraints=app.HBonds, rigid_water=True) else: testsystem = AlanineDipeptideExplicit(constraints=None, rigid_water=False) topology, system, positions = testsystem.topology, testsystem.system, testsystem.positions add_barostat(system) return topology, system, positions
def load_src_explicit(constrained=True): if constrained: constraints = app.HBonds rigid_water = True else: constraints = None rigid_water = False testsystem = SrcExplicit(constraints=constraints, rigid_water=rigid_water) topology, system, positions = testsystem.topology, testsystem.system, testsystem.positions keep_only_some_forces(system) add_barostat(system) return topology, system, positions
def load_dhfr_reaction_field(constrained=True): """DHFR in explicit solvent, but using reaction field instead of PME for nonbonded""" if constrained: constraints = app.HBonds rigid_water = True else: constraints = None rigid_water = False testsystem = DHFRExplicit(nonbondedCutoff=15 * unit.angstrom, nonbondedMethod=app.CutoffPeriodic, constraints=constraints, rigid_water=rigid_water) topology, system, positions = testsystem.topology, testsystem.system, testsystem.positions keep_only_some_forces(system) system = replace_reaction_field(system, shifted=True) add_barostat(system) return topology, system, positions
topology=top, system=sys, positions=pos, temperature=temperature, timestep=0.5 * unit.femtosecond, burn_in_length=200000, n_samples=1000, thinning_interval=20000, name="flexible_waterbox") # add a smaller waterbox, for the purposes of comparison of the inefficient nested estimator # against the efficient near-equilibrium estimator small_box_edge = 15 * unit.angstrom testsystem = WaterBox( box_edge=small_box_edge, cutoff=small_box_edge / 2.5, # box_edge must be > (2 * cutoff) ) (top, sys, pos) = testsystem.topology, testsystem.system, testsystem.positions add_barostat(sys) tiny_waterbox = EquilibriumSimulator(platform=configure_platform("CUDA"), topology=top, system=sys, positions=pos, temperature=temperature, timestep=1.0 * unit.femtosecond, burn_in_length=100000, n_samples=1000, thinning_interval=10000, name="tiny_waterbox_constrained")