I've got stuck at the `simulation` creation stage, but only when using `platform = Platform.getPlatformByName('CUDA')`, which causes the following Exception:
Code: Select all
integrator = LangevinIntegrator(310*kelvin, 1/picosecond, 0.002*picoseconds)
#platform = Platform.getPlatformByName('CPU')
platform = Platform.getPlatformByName('CUDA')
simulation = Simulation(complex_structure.topology, complex_system, integrator, platform)
>>> Exception: All Forces must agree on whether to use a cutoff
So, question is: which forces use a cutoff? And how can I ensure they all agree?
Maybe overkill but here are some details that might be relevant:
Code: Select all
for i in complex_system.getForces():
print(i.usesPeriodicBoundaryConditions(), i)
>>> False <simtk.openmm.openmm.HarmonicBondForce; proxy of <Swig Object of type 'OpenMM::HarmonicBondForce *' at 0x7f78bd04f270> >
>>> False <simtk.openmm.openmm.HarmonicAngleForce; proxy of <Swig Object of type 'OpenMM::HarmonicAngleForce *' at 0x7f78bd04f930> >
>>> False <simtk.openmm.openmm.PeriodicTorsionForce; proxy of <Swig Object of type 'OpenMM::PeriodicTorsionForce *' at 0x7f78bd04f390> >
>>> True <simtk.openmm.openmm.NonbondedForce; proxy of <Swig Object of type 'OpenMM::NonbondedForce *' at 0x7f78bd04f1e0> >
>>> False <simtk.openmm.openmm.CMMotionRemover; proxy of <Swig Object of type 'OpenMM::CMMotionRemover *' at 0x7f78bd04f660> >
>>> False <simtk.openmm.openmm.CustomNonbondedForce; proxy of <Swig Object of type 'OpenMM::CustomNonbondedForce *' at 0x7f78bd04f570> >
>>> False <simtk.openmm.openmm.MonteCarloMembraneBarostat; proxy of <Swig Object of type 'OpenMM::MonteCarloMembraneBarostat *' at 0x7f78bd04f360> >
>>> True <simtk.openmm.openmm.CustomExternalForce; proxy of <Swig Object of type 'OpenMM::CustomExternalForce *' at 0x7f78bd04f300> >
Code: Select all
print([i for i in complex_system.getForces()][3].getCutoffDistance())
print([i for i in complex_system.getForces()][5].getCutoffDistance())
>>> 0.9 nm
>>> 0.9 nm
lewis