# Create test system from collections import namedtuple LocalTestSystem = namedtuple('LocalTestSystem', ['name', 'system', 'topology', 'positions']) testsystem = LocalTestSystem(name='CB7:B2', system=system, topology=topology, positions=positions) # Generate an OpenPathSampling template. print('Creating template...') template = engine.snapshot_from_testsystem(testsystem) print('Creating an integrator...') integrator = VVVRIntegrator(temperature, collision_rate, timestep) integrator.setConstraintTolerance(1.0e-6) print("Selecting a platform...") platform_name = 'CUDA' platform = openmm.Platform.getPlatformByName(platform_name) openmm_properties = {'OpenCLPrecision': 'mixed'} # Create an engine print('Creating engine...') engine_options = { 'n_frames_max': 1000, 'platform': platform_name, 'n_steps_per_frame': 50 } engine = engine.Engine(template.topology, system,
del context, integrator, system_with_barostat else: print('System does not use periodic boundary conditions; skipping equilibration.') # Create test system from collections import namedtuple LocalTestSystem = namedtuple('LocalTestSystem', ['name', 'system', 'topology', 'positions']) testsystem = LocalTestSystem(name='CB7:B2', system=system, topology=topology, positions=positions) # Generate an OpenPathSampling template. print('Creating template...') template = engine.snapshot_from_testsystem(testsystem) print('Creating an integrator...') integrator = VVVRIntegrator(temperature, collision_rate, timestep) integrator.setConstraintTolerance(1.0e-6) print("Selecting a platform...") platform_name = 'CUDA' platform = openmm.Platform.getPlatformByName(platform_name) openmm_properties = {'OpenCLPrecision': 'mixed'} # Create an engine print('Creating engine...') engine_options = { 'n_frames_max': 1000, 'platform': platform_name, 'n_steps_per_frame': 50 } engine = engine.Engine( template.topology,
# this cell is all OpenMM specific forcefield = app.ForceField('amber96.xml', 'tip3p.xml') pdb = app.PDBFile("AD_initial_frame.pdb") system = forcefield.createSystem( pdb.topology, nonbondedMethod=app.PME, nonbondedCutoff=1.0*unit.nanometers, constraints=app.HBonds, rigidWater=True, ewaldErrorTolerance=0.0005 ) hi_T_integrator = VVVRIntegrator( 500*unit.kelvin, 1.0/unit.picoseconds, 2.0*unit.femtoseconds) hi_T_integrator.setConstraintTolerance(0.00001) # The storage file will need a template snapshot. In addition, the OPS OpenMM-based `Engine` has a few properties and options that are set by these dictionaries. # In[3]: template = omm.snapshot_from_pdb("AD_initial_frame.pdb") openmm_properties = {'OpenCLPrecision': 'mixed'} engine_options = { 'n_steps_per_frame': 10, 'n_frames_max': 2000 }