Clean up cshake() and resolve old issues
[alexxy/gromacs.git] / src / gromacs / legacyheaders / constr.h
index 12c476df74c1200926f564665eaf5efab8e8e8c5..79ac3a7bf028af4cf6c26ab75ba33d217be3dbcf 100644 (file)
@@ -38,7 +38,7 @@
 #ifndef _constr_h
 #define _constr_h
 
-#include "typedefs.h"
+#include "gromacs/legacyheaders/typedefs.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -125,9 +125,9 @@ void settle_proj(gmx_settledata_t settled, int econq,
  * of coordinates working on settle type constraint.
  */
 
-void cshake(atom_id iatom[], int ncon, int *nnit, int maxnit,
-            real dist2[], real xp[], real rij[], real m2[], real omega,
-            real invmass[], real tt[], real lagr[], int *nerror);
+void cshake(const atom_id iatom[], int ncon, int *nnit, int maxnit,
+            const real dist2[], real xp[], const real rij[], const real m2[], real omega,
+            const real invmass[], const real tt[], real lagr[], int *nerror);
 /* Regular iterative shake */
 
 void crattle(atom_id iatom[], int ncon, int *nnit, int maxnit,
@@ -141,6 +141,7 @@ gmx_bool constrain(FILE *log, gmx_bool bLog, gmx_bool bEner,
                    gmx_ekindata_t *ekind,
                    t_commrec *cr,
                    gmx_int64_t step, int delta_step,
+                   real step_scaling,
                    t_mdatoms *md,
                    rvec *x, rvec *xprime, rvec *min_proj,
                    gmx_bool bMolPBC, matrix box,
@@ -165,6 +166,11 @@ gmx_bool constrain(FILE *log, gmx_bool bLog, gmx_bool bEner,
  * step + delta_step is the step at which the final configuration
  * is meant to be; for update delta_step = 1.
  *
+ * step_scaling can be used to update coordinates based on the time
+ * step multiplied by this factor. Thus, normally 1.0 is passed. The
+ * SD1 integrator uses 0.5 in one of its calls, to correct positions
+ * for half a step of changed velocities.
+ *
  * If v!=NULL also constrain v by adding the constraint corrections / dt.
  *
  * If vir!=NULL calculate the constraint virial.