[gmx-users] Skewed box using Parrinello-Rahman pressure coupling

Berk Hess gmx3 at hotmail.com
Fri Mar 7 10:22:26 CET 2008





From: gmx3 at hotmail.com
To: gmx-users at gromacs.org
Subject: RE: [gmx-users] Skewed box using Parrinello-Rahman pressure coupling
Date: Fri, 7 Mar 2008 10:14:00 +0100











> Date: Thu, 6 Mar 2008 13:57:31 +0100
> From: stephane.teletchea at jouy.inra.fr
> To: gmx-users at gromacs.org
> Subject: Re: [gmx-users] Skewed box using Parrinello-Rahman pressure coupling
> 
> Berk Hess a écrit :
> > Hi,
> > 
> > I now realized that my fix what completely incorrect.
> > I wanted to multiply the margin of 0.0001 by 2, not the factor 0.5.
> > But my mistake means that is now given an error when the off diagonal
> > element is relatively more than 1 instead of more than 0.5.
> > This is a far too weak check.
> > So I would not expect any fatal errors any more with this incorrect check.
> > Therefore I don't understand why you still get errors.
> > 
> > Could you try changing BOX_MARGIN to 0.5005, as it currently is in 
> > version 4.0?
> > 
> > Berk. 
> 
> We thus need a hot fix for 3.3.3?

A too weak check does, by itself, not cause problems.
It does mean that the check is useless, but Gromacs
by itself never generates incorrect boxes.

The problem with the check is still there, but it only
seem to occur very rarely.
I'll fix it properly in the CVS 3.3 patches branch.

Hi Luther,

To be sure that this time I really fix the problem,
could you apply the following changes and check if the problem is gone?

Thanks,

Berk.

diff -r1.34.2.3 pbc.h
51,52c51,53
< #define BOX_MARGIN 0.5001
<   /* margin factor for checking if the box is too skewed */
---
> /* Margin factor for error message and correction if the box is too skewed */
> #define BOX_MARGIN         0.5010
> #define BOX_MARGIN_CORRECT 0.5005

diff -r1.57.2.9 pbc.c
100,102c100,102
<   else if ((fabs(box[YY][XX]) > 2*BOX_MARGIN*box[XX][XX]) ||
<          (fabs(box[ZZ][XX]) > 2*BOX_MARGIN*box[XX][XX]) ||
<          (fabs(box[ZZ][YY]) > 2*BOX_MARGIN*box[YY][YY]))
---
>   else if ((fabs(box[YY][XX]) > BOX_MARGIN*box[XX][XX]) ||
>          (fabs(box[ZZ][XX]) > BOX_MARGIN*box[XX][XX]) ||
>          (fabs(box[ZZ][YY]) > BOX_MARGIN*box[YY][YY]))


retrieving revision 1.84.2.8
diff -r1.84.2.8 ns.c
251c251
<   while (box[v][d] > BOX_MARGIN*box[d][d]) {
---
>   while (box[v][d] > BOX_MARGIN_CORRECT*box[d][d]) {
261c261
<   while (-box[v][d] > BOX_MARGIN*box[d][d]) {
---
>   while (-box[v][d] > BOX_MARGIN_CORRECT*box[d][d]) {


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20080307/d8ea6927/attachment.html>


More information about the gromacs.org_gmx-users mailing list