Reducing the long-range cutoff properly
See original GitHub issueI have a pretty small system (48. 20. 34. A as the box dimensions). So the error that I am getting is:
File "/root/anaconda2/envs/rezayank/lib/python2.7/site-packages/simtk/openmm/openmm.py", line 4066, in __init__
this = _openmm.new_Context(*args)
Exception: NonbondedForce: The cutoff distance cannot be greater than half the periodic box size.
I cannot make my system bigger, since I need to maintain the crystal periodicity. So one way would be to reduce the cut-off for long range interactions in the yaml file:
solvents:
pme:
nonbonded_method: PME # Main definition of the nonbonded method
nonbonded_cutoff: 9*angstroms # Cutoff between short- and long-range interactions
clearance: 16*angstroms
positive_ion: Na+
negative_ion: Cl-
# Define the systems: What is the ligand, receptor, and solvent we put them in
systems:
# We can call our system anything we want, this example just uses a short name for the receptor hyphenated with the ligand
model03nowat:
# These names all use the names we defined previously
phase1_path: [complex1.prmtop, complex1.inpcrd]
phase2_path: [solvent.prmtop, solvent.inpcrd]
ligand_dsl: resid 218 to 224
# solvent_dsl: resname WAT # optional
solvent: pme
But it doesn’t seem to affect anything at all. I set the size of the box using leap manually so the clearance is irrelevant here. But even though the cut-off is less than half of the box size, still I get the same error message. I even tried reducing it to a lesser value (like 5) to see whether it runs fine and I still got the same error. I am not sure if there is something wrong with my script, or is it because I prepare the files manually (even though I think I got the same issue by using the automated pipeline before), or Yank just disregards the cut-off value for some reason. I would appreciate your feedback!
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (12 by maintainers)
Top GitHub Comments
That was the idea I was thinking of as well, but I wanted a second opinion. Almost have it ready, a few other small details I want to work out first.
The PR I am working on has the following additional
options
in the yaml file with the default values shown.anisotropic_dispersion_correction : yes
anisotropic_dispersion_cutoff: 16 *angstrom
If the user does not set these, the defaults are accepted and the simulation will “do the right thing”. The user can disable this feature by setting the first option to
no
.I think its a bit redundant but because
anisotropic_dispersion_correction
could easily be aQuantity
orNone
and do the same thing, but the option has been available in the YAML settings for a while, I just did not have it documented. Since changing the boolean behavior to a None/Quantity behavior would be an YAML API change, we should not do this behavior change until YAML 2.0