<div dir='auto'>Hi,<div dir="auto"><br></div><div dir="auto">GROMACS first shifts the distance by box vectors to make the Cartesian distance components within half the box diagonals and then tries the max 14 different PBC shifts that could potentially make the distance shorter.</div><div dir="auto">But I can assure you that this code is correct, it has been tested for decades.</div><div dir="auto">Only using an inverted cell matrix will not work.</div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto"><br></div><div dir="auto">Berk</div><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Apr 21, 2017 08:05, Jicun LI <JicunLi@whu.edu.cn> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Berk,<div><br></div><div>Thanks for your comments. Do you know the method GMX used to apply PBC for triclinic box? There are different approaches for this problem, but I think only the method using inverted cell matrix will be correct for any cases. Please look at https://scicomp.stackexchange.com/questions/3107/minimum-image-convention-for-triclinic-unit-cell. For my case, I did not put bonds in my topology, otherwise the angle will not change dramatically and GMX may not encounter the problems.</div><div><br></div><div>Regards,</div><div>Jicun</div></div><div><br><div class="elided-text">2017-04-20 14:51 GMT-05:00 Berk Hess <span dir="ltr"><<a href="mailto:hess@kth.se">hess@kth.se</a>></span>:<br><blockquote style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div>Hi,<br>
<br>
I think GROMACS is correct. The distances between your atoms are
longer than half of two of the box vector lengths, so it's very
difficult to see what the closest periodic image is.<br>
It looks like the real issue is that you forgot to put bonds in
your topology.<br>
<br>
Cheers,<br>
<br>
Berk<div><div><br>
<br>
On 04/20/2017 09:00 PM, Jicun LI wrote:<br>
</div></div></div><div><div>
<blockquote>
<div dir="ltr">Hi,<br>
<br>
It seems to me there is a bug in GMX 5.1.4 when calculating the angles in
a triclinic
box. For some special cases GMX does not apply the PBC well. For example, the
HOH angle of
the following configuration is about 2 degree, but both `mdrun` and `gangle` will give
about 89 degree.<br>
<br>
<font face="monospace, monospace">Generated by trjconv : SOL t=
0.00900<br>
3<br>
1SOL H 1 0.063 0.448 0.045 9.3129-17.0644
4.3188<br>
1SOL O 2 0.746 0.604 0.203-23.5642 10.7484
10.1804<br>
1SOL H 3 0.059 0.435 0.056 14.2513
6.3160-14.4992<br>
1.04000 0.60975 0.52565 0.00000 0.00000 -0.28175
0.00000 -0.28063 -0.01980</font><br>
<br>
Any advice or suggestions will be appreciated. If anyone wants
to repeat the results, please use the following input files:<br>
<br>
- `conf.gro`<br>
<br>
<font face="monospace, monospace">Ang<br>
3<br>
SOL H 1 0.270 -0.034 0.016<br>
SOL O 2 0.175 -0.092 0.123<br>
SOL H 3 0.229 -0.217 0.165<br>
1.04000 0.60975 0.52565 0.00000 0.00000 -0.28175
0.00000 -0.28063 -0.01980</font><br>
<br>
- `topol.top`<br>
<br>
<font face="monospace, monospace">[ defaults ]<br>
; nbfunc
comb-rule gen-pairs fudgeLJ fudgeQQ<br>
1 2 yes 1 1<br>
<br>
[ atomtypes
]<br>
;name bond_type mass charge ptype sigma
epsilon<br>
O O 0.00000 0.00000 A 0 0<br>
H H 0.00000 0.00000 A 0 0<br>
<br>
[ moleculetype
]<br>
;name nrexcl<br>
SOL 3<br>
<br>
[ atoms ]<br>
; nr
type resi
res atom cgnr
charge mass<br>
1 H 1 SOL H 1 0 1<br>
2 O 1 SOL O 2 0 1<br>
3 H 1 SOL H 3 0 1<br>
<br>
[ angles ]<br>
; ai
aj ak funct theta
cth<br>
1 2 3 1 1.0750e+01 5.8576e+02<br>
[ system ]<br>
SOL<br>
<br>
[ molecules ]<br>
; Compound nmols<br>
SOL 1<br>
</font><br>
- `grompp.mdp`<br>
<br>
<font face="monospace, monospace">integrator = md<br>
dt
= 0.001<br>
tinit
= 0<br>
nsteps
= 10<br>
nstcomm
= 1<br>
<br>
nstxout
= 1<br>
nstvout
= 1<br>
nstfout
= 1<br>
nstxtcout
= 1<br>
nstenergy
= 1<br>
nstlog
= 1<br>
<br>
nstlist
= 1<br>
ns_type
= grid<br>
pbc
= xyz<br>
<br>
rlist =
.2<br>
rcoulomb =
.2<br>
<br>
coulombtype
= PME<br>
fourier-nx
= 80<br>
fourier-ny
= 80<br>
fourier-nz
= 80<br>
pme-order
= 12<br>
ewald_rtol
= 1E-9<br>
<br>
rvdw=0.2<br>
vdw-type
= Cut-off<br>
<br>
tcoupl
= nose-hoover<br>
tc-grps
= system<br>
tau_t = 2<br>
ref_t = 298.15<br>
<br>
gen_vel
= no<br>
gen_temp = 298.15</font><br>
<br>
- `index.ndx`<br>
<br>
<font face="monospace, monospace">[ System ]<br>
1 2 3<br>
[ SOL ]<br>
1 2 3<br>
[ ang ]<br>
1 2 3</font><br>
<br>
For a 10 steps running, the output of `gangle` I got is<br>
<br>
<font face="monospace, monospace"># Command line:<br>
# gmx gangle -f -n -oall<br>
# gmx gangle is part
of G R O M A C S:<br>
#<br>
# Good gRace!
Old Maple Actually Chews Slate<br>
#<br>
@ title "Angle"<br>
@ xaxis
label "Time (ps)"<br>
@ yaxis
label "Angle (degrees)"<br>
@TYPE xy<br>
0.000 107.495<br>
0.001 96.084<br>
0.002 78.024<br>
0.003 59.745<br>
0.004 43.710<br>
0.005 30.884<br>
0.006 20.977<br>
0.007 13.337<br>
0.008 7.200<br>
0.009 89.133<br>
0.010 0.907</font><br>
<br>
The angle of 0.009 ps
is not correct, in my opinion.<br>
<br>
Regards,<br>
Jicun</div>
<br>
<fieldset></fieldset>
<br>
</blockquote>
<br>
</div></div></div>
<br>--<br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List">http://www.gromacs.org/<wbr>Support/Mailing_Lists/GMX-<wbr>developers_List</a> before posting!<br>
<br>
* Can't post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists">http://www.gromacs.org/<wbr>Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers">https://maillist.sys.kth.se/<wbr>mailman/listinfo/gromacs.org_<wbr>gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org">gmx-developers-request@<wbr>gromacs.org</a>.<br></blockquote></div><br></div>
</blockquote></div><br></div></div>