question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reducing the long-range cutoff properly

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:13 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Lnadencommented, Feb 24, 2017

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.

0reactions
Lnadencommented, Feb 24, 2017

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 a Quantity or None 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Evaluating the Effects of Cutoffs and Treatment of Long-range ...
A common approach to reduce the cost of this computation is to ignore any interaction between atoms separated by more than some cutoff...
Read more >
The effect of different cutoff schemes in molecular simulations ...
While group-based cutoff schemes show increased cutoff noise in the potential energy, applying an atomistic cutoff leads to artificial structure ...
Read more >
Long Range Van der Waals interactions
We assume that the cut-off is so long that the repulsion term can safely be neglected, and therefore only the dispersion term is...
Read more >
Full article: Improved cutoff functions for short-range potentials ...
In this paper, cutoff functions with beneficial properties are proposed. The cutoff functions are designed to take a value of unity up to....
Read more >
Critical test of isotropic periodic sum techniques with group ...
Importantly, these defects were clearly reduced when using atom-based cut-off. Thus we reason that group-based cut-off is more prone to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found