Merge release-4-5-patches into release-4-6
[alexxy/gromacs.git] / src / kernel / grompp.c
index 7f96d8719abde4a0f2465eb1cd757544cb599bde..779f594c27929280fe2c86fb63ed5029c55b9e2e 100644 (file)
@@ -1279,7 +1279,8 @@ int main (int argc, char *argv[])
     { efTOP, "-pp", "processed", ffOPTWR },
     { efTPX, "-o",  NULL,        ffWRITE },
     { efTRN, "-t",  NULL,        ffOPTRD },
-    { efEDR, "-e",  NULL,        ffOPTRD }
+    { efEDR, "-e",  NULL,        ffOPTRD },
+    { efTRN, "-ref","rotref",    ffOPTRW }
   };
 #define NFILE asize(fnm)
 
@@ -1382,6 +1383,13 @@ int main (int argc, char *argv[])
                     "NB: United atoms have the same atom numbers as normal ones.\n\n"); 
   }
 
+  if (ir->bAdress) {
+    if ((ir->adress->const_wf>1) || (ir->adress->const_wf<0)) {
+      warning_error(wi,"AdResS contant weighting function should be between 0 and 1\n\n");
+    }
+    /** \TODO check size of ex+hy width against box size */
+  }
   /* Check for errors in the input now, since they might cause problems
    * during processing further down.
    */
@@ -1566,6 +1574,13 @@ int main (int argc, char *argv[])
 
   if (ir->ePull != epullNO)
     set_pull_init(ir,sys,state.x,state.box,oenv,opts->pull_start);
+  
+  if (ir->bRot)
+  {
+      set_reference_positions(ir->rot,sys,state.x,state.box,
+                              opt2fn("-ref",NFILE,fnm),opt2bSet("-ref",NFILE,fnm),
+                              wi);
+  }
 
   /*  reset_multinr(sys); */