[gmx-users] dx2_pbc() function and BOX_MARGIN

Elton Carvalho eltonfc at gmail.com
Tue Jun 30 02:28:56 CEST 2015


Hello, fellow GROMACS users (specially devs),

I'm writing a python script for an in-house topology generator and
currently implementing the dx2_pbc() function of pbc.c in python
instead of developing the whole PBC stuff again. This script is
intended to be run only on 3d triclicic boxes (think
graphene/graphite) so I'm removing all PBC guesses and switch/case
tests.

To search for triclinic shifts, the code (line 528 of gromacs 5.0.5)
tests if (BOX_MARGIN*d2new < d2old), where d2old is a certain distance
and d2new is the distance after the shift being tested.

My question is: why test BOX_MARGIN*d2new instead of simply d2new? The
comment where BOX_MARGIN is #defined mentions only testing for far too
skewed boxes.

Thanks,
-- 
Elton Carvalho


More information about the gromacs.org_gmx-users mailing list