Fixes #961 - Shake reports wrong error
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Thu, 21 Jun 2012 16:14:33 +0000 (18:14 +0200)
committerDavid van der Spoel <spoel@xray.bmc.uu.se>
Thu, 21 Jun 2012 16:14:33 +0000 (18:14 +0200)
The constraint index reported by shake was off by 1.

Change-Id: I6f4d0c013b30f5963fb312b41fb87e90e6314619

src/mdlib/shakef.c

index f6fd555c4ead46f2c4d9b0665462c46f67bfa916..7f003fe670973bc10d0704008fe898334425aa1a 100644 (file)
@@ -150,7 +150,7 @@ void cshake(atom_id iatom[],int ncon,int *nnit,int maxnit,
           rrpr    = rijx*tx+rijy*ty+rijz*tz;
        
           if (rrpr < toler*mytol) 
-              error=ll;
+              error=ll+1;
           else {
               acor      = omega*diff*m2[ll]/rrpr;
               lagr[ll] += acor;