g_sas (gromacs 3.3.3) do not take PBC into account
I generated a trajcetory file containing two atoms in a cubic box of 4nm having same x and y coordinates and varied the z coordinates of one of the atoms. one atom is fixed at z coordinate of 3.9.
If total sasa is plotted along with the z coordinates of the second atom (in file dist.out), it can be seen that PBC is not taken into account.
I have attached the gzipped folder containing following files:
topol333.tpr : topology file
test.xtc: 100 step xtc file
area.xvg: g_sas output
dist.out: z coordinates of the second atom
test.gro: gro file containing two atoms
#2 Updated by Erik Lindahl about 11 years ago
Hm. This is not entirely trivial to fix; one problem is that I'd like to replace the current algorithms with more accurate (exact) analytical ones based on triangulation in the future, and doing a regular triangulation of a periodic system is mathematics on a pretty high level.
David, do you have any simple fix for this, or does it have to wait for post-4.0?
#3 Updated by David van der Spoel about 11 years ago
Created an attachment (id=287)
Results with new fixes
Here are results for your trajectory with fixes in the algorithm in place. It seems that pbc is now taken into account properly. These patches are on track for the 4.0 release but I'm not 100% sure yet that this fixes everything.
#5 Updated by Andrea Carotti about 10 years ago
Created an attachment (id=399)
Zipped files to reproduce the bug
Hi all, I've already simulated 27 organic molecules in a cubic solvent box.I've a tpr and a trr with only the molecules inside (without water).
I'm using gromacs 4.0.5. I've added the box dimension infos to the trr using the command:
trjconv -f ../../original_multi3000.pdb -o new.trr -s reference.pdb -box
7.3973 7.3973 7.3973
In the test.pdb I've also the CRYST informations.
I've modified the gmx_sas.c to bypass the check that turn off automatically the PBC if solvent molecules are not present. Unfortunately I've seen that the results with and without taking into account the PBC are identical.
In the zip file you'll find also the tpr file.
#6 Updated by David van der Spoel over 9 years ago
Created an attachment (id=456)
Area for 27 molecules with and without pbc
I would like to finally squash this bug. The simple two atom case is working correct now. There is an issue when two atoms sit on top of each other, but that doesn't occur in normal simulations. This problem is down in the nsc algorithm.
For the system with 27 organic molecules the tpr file does not match the trajectory as the molecules are scrambled in ngmx (which shows the bonds in the topology). The area with and without pbc seems consistent with what one would expect, in other words when pbc is taken into account the total area is slightly smaller than without. Not a proof that it is correct of course.
A further problem is that the algorithm is very slow for large systems.