-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimum image code in NAMD/VMD is not robust to strongly tilted PBCs #160
Comments
To elaborate (also following private chat), the NAMD function uses the |
In-person conversation JH & GF: need to bring this up with NAMD developers. |
Here is a minimalist example. Pathological behavior happens around the half box size. Here, a distance that is exactly half the box length in y becomes 0. |
Comment from Jim Phillips:
|
That function adds a loop over the 26 nearest unit cells, so it may work for tilt factors a bit over 1/2 (60°), but probably not much higher. @jhenin How much tilt factor were you worried about here? Note that the additional loop will add a bit of overhead, so a variant will be more useful than the general function (probably a template, with a flag indicating triclinic PBCs as one of its arguments). |
I suppose the question is: how much tilt factor should Colvars support? The case that initially brought the issue to my attention was a truncated octahedral box. I think it is reasonable to support any case that is covered by a search over neighboring unit cells. |
Agreed. There should be an error thrown if the tilt factor exceeds 1 in absolute value. |
The minimum image code found in
position_distance()
assumes angles close to 90°. In one example, it fails with an angle at 72° and a distance a little smaller that the half box size, but works if the angle is set to 73°.This could be handled as an error condition, or with more sophisticated PBC code.
The text was updated successfully, but these errors were encountered: