Clean up cshake() and resolve old issues
[alexxy/gromacs.git] / src / gromacs / mdlib / constr.c
index 7b9addc389e06f2ba2280bef92059f0a2e17fee2..07866e190109f82f8fe21d9a59c6379ad53f93d0 100644 (file)
  */
 #include "gmxpre.h"
 
+#include "gromacs/legacyheaders/constr.h"
+
 #include <assert.h>
 #include <stdlib.h>
 
+#include "gromacs/essentialdynamics/edsam.h"
 #include "gromacs/fileio/confio.h"
-#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/constr.h"
+#include "gromacs/fileio/gmxfio.h"
+#include "gromacs/fileio/pdbio.h"
 #include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/domdec.h"
+#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
+#include "gromacs/legacyheaders/macros.h"
 #include "gromacs/legacyheaders/mdrun.h"
-#include "gromacs/legacyheaders/nrnb.h"
-#include "gromacs/math/vec.h"
 #include "gromacs/legacyheaders/names.h"
-#include "gromacs/legacyheaders/txtdump.h"
-#include "gromacs/legacyheaders/domdec.h"
-#include "gromacs/fileio/pdbio.h"
+#include "gromacs/legacyheaders/nrnb.h"
 #include "gromacs/legacyheaders/splitter.h"
-#include "gromacs/topology/mtop_util.h"
-#include "gromacs/fileio/gmxfio.h"
-#include "gromacs/legacyheaders/macros.h"
-#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
-#include "gromacs/essentialdynamics/edsam.h"
-#include "gromacs/pulling/pull.h"
-
+#include "gromacs/legacyheaders/txtdump.h"
+#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/math/vec.h"
 #include "gromacs/pbcutil/pbc.h"
+#include "gromacs/pulling/pull.h"
 #include "gromacs/topology/block.h"
 #include "gromacs/topology/invblock.h"
+#include "gromacs/topology/mtop_util.h"
 #include "gromacs/utility/fatalerror.h"
 #include "gromacs/utility/smalloc.h"
 
@@ -78,7 +78,7 @@ typedef struct gmx_constr {
     int                nblocks;        /* The number of SHAKE blocks         */
     int               *sblock;         /* The SHAKE blocks                   */
     int                sblock_nalloc;  /* The allocation size of sblock      */
-    real              *lagr;           /* Lagrange multipliers for SHAKE     */
+    real              *lagr;           /* -2 times the Lagrange multipliers for SHAKE */
     int                lagr_nalloc;    /* The allocation size of lagr        */
     int                maxwarn;        /* The maximum number of warnings     */
     int                warncount_lincs;