Merge release-4-5-patches into release-4-6
authorBerk Hess <hess@kth.se>
Thu, 26 Apr 2012 15:40:34 +0000 (17:40 +0200)
committerBerk Hess <hess@kth.se>
Thu, 26 Apr 2012 18:23:02 +0000 (20:23 +0200)
Change-Id: Id1c62a482c6c3467704cc9b657b53f7df493b7ba

26 files changed:
CMakeLists.txt
include/checkpoint.h
include/mdrun.h
include/thread_mpi/numa_malloc.h
share/html/online/mdp_opt.html
src/config.h.cmakein
src/gmxlib/atomprop.c
src/gmxlib/checkpoint.c
src/gmxlib/futil.c
src/gmxlib/mshift.c
src/gmxlib/rmpbc.c
src/gmxlib/shift_util.c
src/gmxlib/tpxio.c
src/kernel/md.c
src/kernel/mdrun.c
src/kernel/runner.c
src/mdlib/domdec_setup.c
src/mdlib/md_support.c
src/mdlib/shellfc.c
src/mdlib/sim_util.c
src/mdlib/stat.c
src/tools/gmx_editconf.c
src/tools/gmx_membed.c
src/tools/gmx_select.c
src/tools/gmx_vanhove.c
src/tools/hxprops.c

index 0218f6d73bdbdd37e40abb77e40f6ee5674bef61..b4af587c314fe96b63f0be9fbc8c67d1cb9ee54b 100644 (file)
@@ -305,6 +305,7 @@ check_function_exists(fsync             HAVE_FSYNC)
 check_function_exists(_fileno           HAVE__FILENO)
 check_function_exists(fileno            HAVE_FILENO)
 check_function_exists(_commit           HAVE__COMMIT)
+check_function_exists(lstat             HAVE_LSTAT)
 check_function_exists(sigaction         HAVE_SIGACTION)
 
 include(CheckLibraryExists)
index 9dcac9461b509eaec2713b5da9a02fec231dd9d9..d1f1ce48dc25d410cce6517e37c3f0db33f11cc9 100644 (file)
@@ -62,12 +62,16 @@ void write_checkpoint(const char *fn,gmx_bool bNumberAndKeep,
  * The master node reads the file
  * and communicates all the modified number of steps and the parallel setup,
  * but not the state itself.
+ * When bAppend is set, lock the log file and truncate the existing output
+ * files so they can be appended.
+ * With bAppend and bForceAppend: truncate anyhow if the system does not
+ * support file locking.
  */
 void load_checkpoint(const char *fn,FILE **fplog,
                            t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc,
                            t_inputrec *ir,t_state *state,gmx_bool *bReadRNG, 
                            gmx_bool *bReadEkin,
-                           gmx_bool bTruncateOutputFiles);
+                    gmx_bool bAppend,gmx_bool bForceAppend);
 
 /* Read the state from checkpoint file.
  * Arrays in state that are NULL are allocated.
index 33136be92090bb3c5c13b39bac0a00dab38bc429..a3de0379bd99efd4909b5c25326714c3df8116d0 100644 (file)
@@ -68,6 +68,7 @@ extern "C" {
 #define MD_REPRODUCIBLE   (1<<13)
 #define MD_READ_RNG       (1<<14)
 #define MD_APPENDFILES    (1<<15)
+#define MD_APPENDFILESSET (1<<21)
 #define MD_KEEPANDNUMCPT  (1<<16)
 #define MD_READ_EKIN      (1<<17)
 #define MD_STARTFROMCPT   (1<<18)
index 7b0edc13f66f9cab3841777995a3b20f2fa6a959..29a0a167d845f4d5355d1b6324b6c081b12eab04 100644 (file)
@@ -67,7 +67,7 @@ extern "C"
 #endif
 
 
-#if (defined(WIN32) || defined( _WIN32 ) || defined(WIN64) || defined( _WIN64 ) || defined (__CYGWIN__))
+#if (defined(WIN32) || defined( _WIN32 ) || defined(WIN64) || defined( _WIN64 )) && !defined (__CYGWIN__) && !defined (__CYGWIN32__)
 
 #define TMPI_NUMA_MALLOC
 
index 3dcad45bd49c811647813895c08a3b66d402ab9b..bf9057abd752b8279fe8e2f7bb6c62908d676d88 100644 (file)
@@ -96,7 +96,7 @@ that are already available by default are:
 topology, this can be useful for normal mode analysis.</dd>
 <dt>-DPOSRES</dt>
 <dd>Will tell <tt>grompp</tt> to include posre.itp into your topology, used for
-<!--Idx-->position restraints<!--EIdx-->.</dd>
+<!--Idx-->position restraint<!--EIdx-->s.</dd>
 </dl>
 </dl>
 
@@ -108,8 +108,8 @@ topology, this can be useful for normal mode analysis.</dd>
 <dt><b>integrator:</b> (Despite the name, this list includes algorithms that are not actually integrators. <tt>steep</tt> and all entries following it are in this category)</dt>
 <dd><dl compact>
 <dt><b>md</b></dt>
-<dd>A <!--Idx-->leap-frog<!--EIdx--> algorithm for integrating Newton's
-equations of motion.</dd>
+<dd>A leap-frog algorithm<!--QuietIdx-->leap-frog integrator<!--EQuietIdx-->
+for integrating Newton's equations of motion.</dd>
 <dt><b>md-vv</b></dt>
 <dd>A velocity Verlet algorithm for integrating Newton's equations of motion.
 For constant NVE simulations started from corresponding points in the same trajectory, the trajectories 
@@ -186,7 +186,7 @@ In practice this seems to converge faster than Conjugate Gradients, but due
 to the correction steps necessary it is not (yet) parallelized.
 </dd>
 <dt><b>nm</b></dt>
-<dd><!--Idx-->Normal mode analysis<!--EIdx--> is performed
+<dd>Normal mode analysis<!--QuietIdx-->normal-mode analysis<!--EQuietIdx--> is performed
 on the structure in the <tt>tpr</tt> file. GROMACS should be
 compiled in double precision.</dd>
 <dt><b>tpi</b></dt>
@@ -283,7 +283,7 @@ to <b>ld-seed</b> plus the processor number.</dd>
 
 <A NAME="em"><br>
 <hr>
-<h3><!--Idx-->Energy minimization<!--EIdx--></h3>
+<h3>Energy minimization<!--QuietIdx-->energy minimization<!--EQuietIdx--></h3>
 <dl>
 <dt><b>emtol: (10.0) [kJ mol<sup>-1</sup> nm<sup>-1</sup>]</b></dt>
 <dd>the minimization is converged when the maximum force is smaller than 
@@ -300,7 +300,8 @@ number is (at least theoretically) more accurate, but slower.</dd>
 
 <A NAME="xmdrun"><br>
 <hr>
-<h3><!--Idx-->Shell Molecular Dynamics<!--EIdx--></h3> When shells or
+<h3>Shell Molecular Dynamics<!--QuietIdx-->shell molecular dynamics<!--EQuietIdx--></h3>
+When shells or
 flexible constraints are present in the system the positions of the shells
 and the lengths of the flexible constraints are optimized at
 every time step until either the RMS force on the shells and constraints
@@ -382,7 +383,7 @@ energy averages and fluctuations also when <b>nstenergy</b><tt>&gt;1</tt></dd>
 
 <A NAME="nl"><br>
 <hr>
-<h3><!--Idx-->Neighbor searching<!--EIdx--></h3>
+<h3>Neighbor searching<!--QuietIdx-->neighbor searching<!--EQuietIdx--></h3>
 <dl>
 <dt><b>nstlist: (10) [steps]</b></dt>
 <dd><dl compact>
@@ -470,7 +471,7 @@ is automatically set to the longest cut-off distance.</dd>
 
 <A NAME="el"><br>
 <hr>
-<h3><!--Idx-->Electrostatics<!--EIdx--></h3>
+<h3>Electrostatics<!--QuietIdx-->electrostatics<!--EQuietIdx--></h3>
 <dl>
 <dt><b>coulombtype:</b></dt>
 <dd><dl compact>
@@ -509,7 +510,7 @@ for for long range electrostatic interactions. The method and code
 is identical to SPME, except that the influence function is optimized
 for the grid. This gives a slight increase in accuracy.</dd>
 
-<dt><b><!--Idx-->Reaction-Field<!--EIdx--></b></dt>
+<dt><b>Reaction-Field electrostatics<!--QuietIdx-->reaction-field electrostatics<!--EQuietIdx--></b></dt>
 <dd>Reaction field with Coulomb cut-off <b>rcoulomb</b>,
 where <b>rcoulomb</b> &ge; <b>rlist</b>.
 The dielectric constant beyond the cut-off is <b>epsilon-rf</b>.
@@ -721,13 +722,14 @@ energy group pairs.
 <h3>Ewald</h3>
 <dl>
 <dt><b>fourierspacing: (0.12) [nm]</b></dt>
-<dd>The maximum grid spacing for the FFT grid when using PME or P3M.
-For ordinary Ewald the spacing times the box dimensions determines the
-highest magnitude to use in each direction. In all cases
-each direction can be overridden by entering a non-zero value for
-<b>fourier-n[xyz]</b>.
+<dd>For ordinary Ewald, the ratio of the box dimensions and the spacing
+determines a lower bound for the number of wave vectors to use in each
+(signed) direction. For PME and P3M, that ratio determines a lower bound
+for the number of Fourier-space grid points that will be used along that
+axis. In all cases, the number for each direction can be overridden by
+entering a non-zero value for <b>fourier_n[xyz]</b>.
 For optimizing the relative load of the particle-particle interactions
-and the mesh part of PME it is useful to know that
+and the mesh part of PME, it is useful to know that
 the accuracy of the electrostatics remains nearly constant
 when the Coulomb cut-off and the PME grid spacing are scaled
 by the same factor.</dd>
@@ -784,7 +786,7 @@ at start.</dd>
 
 <A NAME="tc"><br>
 <hr>
-<h3><!--Idx-->Temperature coupling<!--EIdx--></h3>
+<h3>Temperature coupling<!--QuietIdx-->temperature coupling<!--EQuietIdx--></h3>
 
 <dl>
 <dt><b>tcoupl:</b></dt>
@@ -834,7 +836,7 @@ For velocity Verlet integrators <b>nsttcouple</b> is set to 1.</dd>
 
 <A NAME="pc"><br>
 <hr>
-<h3><!--Idx-->Pressure coupling<!--EIdx--></h3>
+<h3>Pressure coupling<!--QuietIdx-->pressure coupling<!--EQuietIdx--></h3>
 
 <dl>
 <dt><b>pcoupl:</b></dt>
@@ -935,7 +937,7 @@ positions of the reference coordinates.</dd>
 
 <A NAME="sa"><br>
 <hr>
-<h3><!--Idx-->Simulated annealing<!--EIdx--></h3>
+<h3>Simulated annealing<!--QuietIdx-->simulated annealing<!--EQuietIdx--></h3>
 
 Simulated annealing is controlled separately for each temperature group in GROMACS. The reference temperature is a piecewise linear function, but you can use an arbitrary number of points for each group, and choose either a single sequence or a periodic behaviour for each group. The actual annealing is performed by dynamically changing the reference temperature used in the thermostat algorithm selected, so remember that the system will usually not instantaneously reach the reference temperature!
 <dl>
@@ -993,7 +995,7 @@ the process ID number.
 <h3>Bonds</h3>
 
 <dl>
-<dt><b><!--Idx-->constraints<!--EIdx-->:</b></dt>
+<dt><b>constraints<!--QuietIdx-->constraint algorithms<!--QuietEIdx-->:</b></dt>
 <dd><dl compact>
 <dt><b>none</b></dt>
 <dd>No constraints except for those defined explicitly in the topology,
@@ -1099,7 +1101,7 @@ solvent. This is especially useful for speeding up energy calculations with
 
 <A NAME="walls"><br>
 <hr>
-<h3><!--Idx-->Walls<!--EIdx--></h3>
+<h3>Walls<!--QuietIdx-->walls<!--EQuietIdx--></h3>
 <dl>
 <dt><b>nwall: 0</b></dt>
 <dd>When set to <b>1</b> there is a wall at <tt>z=0</tt>, when set to <b>2</b>
@@ -1287,76 +1289,81 @@ The force constant is then (1 - lambda)*<b>pull-k1</b> + lambda*<b>pull-kB1</b>.
 <dt><b>disre:</b></dt>
 <dd><dl compact>
 <dt><b>no</b></dt>
-<dd>no <!--Idx-->distance restraints<!--EIdx--> (ignore distance
-restraint information in topology file)</dd>
+<dd>ignore <!--Idx-->distance restraint<!--EIdx--> information in topology file</dd>
 <dt><b>simple</b></dt>
-<dd>simple (per-molecule) distance restraints,
-ensemble averaging can be performed with <tt>mdrun -multi</tt>
-where the environment variable <tt>GMX_DISRE_ENSEMBLE_SIZE</tt> sets the number
-of systems within each ensemble (usually equal to the <tt>mdrun -multi</tt> value)</dd>
+<dd>simple (per-molecule) distance restraints.
 <dt><b>ensemble</b></dt>
-<dd>distance restraints over an ensemble of molecules in one simulation box,
-should only be used for special cases, such as dimers
-(this option is not fuctional in the current version of GROMACS)</dd>
+<dd>distance restraints over an ensemble of molecules in one
+simulation box. Normally, one would perform ensemble averaging over
+multiple subsystems, each in a separate box, using <tt>mdrun -multi</tt>;s
+upply <tt>topol0.tpr</tt>, <tt>topol1.tpr</tt>, ... with different
+coordinates and/or velocities.
+The environment variable <tt>GMX_DISRE_ENSEMBLE_SIZE</tt> sets the number
+of systems within each ensemble (usually equal to the <tt>mdrun -multi</tt> value).</dd>
+</dd>
 </dl></dd>
 <dt><b>disre-weighting:</b></dt>
 <dd><dl compact>
+<dt><b>equal</b> (default)</dt>
+<dd>divide the restraint force equally over all atom pairs in the restraint</dd>
 <dt><b>conservative</b></dt>
 <dd>the forces are the derivative of the restraint potential,
-this results in an r<sup>-7</sup> weighting of the atom pairs</dd>
-<dt><b>equal</b></dt>
-<dd>divide the restraint force equally over all atom pairs in the restraint</dd>
+this results in an r<sup>-7</sup> weighting of the atom pairs.
+The forces are conservative when <tt>disre-tau</tt> is zero.</dd>
 </dl></dd>
 <dt><b>disre-mixed:</b></dt>
 <dd><dl compact>
 <dt><b>no</b></dt>
 <dd>the violation used in the calculation of the restraint force is the
-time averaged violation </dd>
+time-averaged violation </dd>
 <dt><b>yes</b></dt>
 <dd>the violation used in the calculation of the restraint force is the
-square root of the time averaged violation times the instantaneous violation </dd>
+square root of the product of the time-averaged violation and the instantaneous violation</dd>
 </dl></dd>
 
 <dt><b>disre-fc: (1000) [kJ mol<sup>-1</sup> nm<sup>-2</sup>]</b></dt>
 <dd>force constant for distance restraints, which is multiplied by a
-(possibly) different factor for each restraint</dd>
+(possibly) different factor for each restraint given in the <tt>fac</tt>
+column of the interaction in the topology file.</dd>
 
 <dt><b>disre-tau: (0) [ps]</b></dt>
-<dd>time constant for distance restraints running average</dd>
+<dd>time constant for distance restraints running average. A value of zero turns off time averaging.</dd>
 
 <dt><b>nstdisreout: (100) [steps]</b></dt>
-<dd>frequency to write the running time averaged and instantaneous distances
-of all atom pairs involved in restraints to the energy file
+<dd>period between steps when the running time-averaged and instantaneous distances
+of all atom pairs involved in restraints are written to the energy file
 (can make the energy file very large)</dd>
 
 <A NAME="nmr2">
 <dt><b>orire:</b></dt>
 <dd><dl compact>
 <dt><b>no</b></dt>
-<dd>no <!--Idx-->orientation restraints<!--EIdx--> (ignore orientation
-restraint information in topology file)</dd>
+<dd>ignore <!--Idx-->orientation restraint<!--EIdx--> information in topology file</dd>
 <dt><b>yes</b></dt>
 <dd>use orientation restraints, ensemble averaging can be performed
 with <tt>mdrun -multi</tt></dd>
 </dl>
 <dt><b>orire-fc: (0) [kJ mol]</b></dt>
 <dd>force constant for orientation restraints, which is multiplied by a
-(possibly) different factor for each restraint, can be set to zero to
+(possibly) different weight factor for each restraint, can be set to zero to
 obtain the orientations from a free simulation</dd>
 <dt><b>orire-tau: (0) [ps]</b></dt>
-<dd>time constant for orientation restraints running average</dd>
+<dd>time constant for orientation restraints running average. A value of zero turns off time averaging.</dd>
 <dt><b>orire-fitgrp: </b></dt>
-<dd>fit group for orientation restraining, for a protein backbone is a good
+<dd>fit group for orientation restraining. This group of atoms is used
+to determine the rotation <b>R</b> of the system with respect to the
+reference orientation. The reference orientation is the starting
+conformation of the first subsystem. For a protein, backbone is a reasonable
 choice</dd>
 <dt><b>nstorireout: (100) [steps]</b></dt>
-<dd>frequency to write the running time averaged and instantaneous orientations
-for all restraints and the molecular order tensor to the energy file
+<dd>period between steps when the running time-averaged and instantaneous orientations
+for all restraints, and the molecular order tensor are written to the energy file
 (can make the energy file very large)</dd>
 </dl>
 
 <A NAME="free"><br>
 <hr>
-<h3><!--Idx-->Free energy calculations<!--EIdx--></h3>
+<h3>Free energy calculations<!--QuietIdx-->free energy calculations<!--EQuietIdx--></h3>
 
 <dl>
 <dt><b>free-energy:</b></dt>
@@ -1442,7 +1449,7 @@ the molecule definition in the topology.</dd>
 
 <A NAME="neq"><br>
 <hr>
-<h3><!--Idx-->Non-equilibrium MD<!--EIdx--></h3>
+<h3>Non-equilibrium MD<!--QuietIdx-->non-equilibrium MD<!--EQuietIdx--></h3>
 
 <dl>
 <dt><b>acc-grps: </b></dt>
@@ -1494,7 +1501,7 @@ or a liquid.</dd>
 
 <A NAME="ef"><br>
 <hr>
-<h3><!--Idx-->Electric field<!--EIdx-->s</h3>
+<h3>Electric fields<!--QuietIdx-->electric field<!--EQuietIdx--></h3>
 
 <dl>
 <dt><b>E-x ; E-y ; E-z:</b></dt>
@@ -1512,7 +1519,7 @@ since a cosine of frequency zero has no phase.</dd>
 
 <hr>
 <A NAME="qmmm"><br>
-<h3><!--Idx-->Mixed quantum/classical molecular dynamics<!--EIdx--></h3>
+<h3>Mixed quantum/classical molecular dynamics<!--QuietIdx>QM/MM<!--EQuietIdx--></h3>
 
 <dl>
 <dt><b>QMMM:</b></dt>
index ac5afc2ddaff933faa4e99ac4b04764ce99b0c05..dc02217adb9e6ddc359de3d5c92a73f68f7a506f 100644 (file)
 /* Define to 1 if you have the _fileno() function. */
 #cmakedefine HAVE__FILENO
 
+/* Define to 1 if you have the lstat() function. */
+#cmakedefine HAVE_LSTAT
+
 /* Define to 1 if you have the <string.h> header file. */
 #cmakedefine HAVE_STRING_H
 
index d765a614dc0c2d1b2b5722d4ca35890c48f07643..a2bc622e11992ae3712cbae583846bf27b585b30 100644 (file)
@@ -230,11 +230,13 @@ static void set_prop(gmx_atomprop_t aps,int eprop)
       fprintf(debug,"Entries in %s: %d\n",ap->db,ap->nprop);
 
     if ( ( (!aps->bWarned) && (eprop == epropMass) ) || (eprop == epropVDW)) {
-      printf("\n");
-      printf("WARNING: masses and atomic (Van der Waals) radii will be determined\n");
-      printf("         based on residue and atom names. These numbers can deviate\n");
-      printf("         from the correct mass and radius of the atom type.\n");
-      printf("\n");
+      printf("\n"
+             "WARNING: Masses and atomic (Van der Waals) radii will be guessed\n"
+             "         based on residue and atom names, since they could not be\n"
+             "         definitively assigned from the information in your input\n"
+             "         files. These guessed numbers might deviate from the mass\n"
+             "         and radius of the atom type. Please check the output\n"
+             "         files if necessary.\n\n");
       aps->bWarned = TRUE;
     }
   }
index 718a2ab03cc73ea6d431b25f90d59ec8802e7e8a..a22263dac04f4023abc4865bee59e1eea614f806 100644 (file)
@@ -1470,7 +1470,8 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
                             t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc,
                             int eIntegrator,gmx_large_int_t *step,double *t,
                             t_state *state,gmx_bool *bReadRNG,gmx_bool *bReadEkin,
-                            int *simulation_part,gmx_bool bAppendOutputFiles)
+                            int *simulation_part,
+                            gmx_bool bAppendOutputFiles,gmx_bool bForceAppend)
 {
     t_fileio *fp;
     int  i,j,rc;
@@ -1753,7 +1754,7 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
              * locking
              */
             gmx_fatal(FARGS,"The first output file should always be the log "
-                      "file but instead is: %s", outputfiles[0].filename);
+                      "file but instead is: %s. Cannot do appending because of this condition.", outputfiles[0].filename);
         }
         for(i=0;i<nfiles;i++)
         {
@@ -1773,6 +1774,10 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
             /* lock log file */                
             if (i==0)
             {
+                /* Note that there are systems where the lock operation
+                 * will succeed, but a second process can also lock the file.
+                 * We should probably try to detect this.
+                 */
 #ifndef GMX_NATIVE_WINDOWS
                 if (fcntl(fileno(gmx_fio_getfp(chksum_file)), F_SETLK, &fl)
                     ==-1)
@@ -1780,16 +1785,31 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
                 if (_locking(fileno(gmx_fio_getfp(chksum_file)), _LK_NBLCK, LONG_MAX)==-1)
 #endif
                 {
-                    if (errno!=EACCES && errno!=EAGAIN)
+                    if (errno == ENOSYS)
                     {
-                        gmx_fatal(FARGS,"Failed to lock: %s. %s.",
-                                  outputfiles[i].filename, strerror(errno));
+                        if (!bForceAppend)
+                        {
+                            gmx_fatal(FARGS,"File locking is not supported on this system. Use -noappend or specify -append explicitly to append anyhow.");
+                        }
+                        else
+                        {
+                            fprintf(stderr,"\nNOTE: File locking is not supported on this system, will not lock %s\n\n",outputfiles[i].filename);
+                            if (fplog)
+                            {
+                                fprintf(fplog,"\nNOTE: File locking not supported on this system, will not lock %s\n\n",outputfiles[i].filename);
+                            }
+                        }
                     }
-                    else 
+                    else if (errno == EACCES || errno == EAGAIN)
                     {
                         gmx_fatal(FARGS,"Failed to lock: %s. Already running "
                                   "simulation?", outputfiles[i].filename);
                     }
+                    else
+                    {
+                        gmx_fatal(FARGS,"Failed to lock: %s. %s.",
+                                  outputfiles[i].filename, strerror(errno));
+                    }
                 }
             }
             
@@ -1799,7 +1819,7 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
                 if (gmx_fio_get_file_md5(chksum_file,outputfiles[i].offset,
                                      digest) != outputfiles[i].chksum_size)  /*at the end of the call the file position is at the end of the file*/
                 {
-                    gmx_fatal(FARGS,"Can't read %d bytes of '%s' to compute checksum. The file has been replaced or its contents has been modified.",
+                    gmx_fatal(FARGS,"Can't read %d bytes of '%s' to compute checksum. The file has been replaced or its contents have been modified. Cannot do appending because of this condition.",
                               outputfiles[i].chksum_size, 
                               outputfiles[i].filename);
                 }
@@ -1836,7 +1856,7 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
                     }
                     fprintf(debug,"\n");
                 }
-                gmx_fatal(FARGS,"Checksum wrong for '%s'. The file has been replaced or its contents has been modified.",
+                gmx_fatal(FARGS,"Checksum wrong for '%s'. The file has been replaced or its contents have been modified. Cannot do appending because of this condition.",
                           outputfiles[i].filename);
             }
 #endif        
@@ -1851,7 +1871,7 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
 #endif
                 if(rc!=0)
                 {
-                    gmx_fatal(FARGS,"Truncation of file %s failed.",outputfiles[i].filename);
+                    gmx_fatal(FARGS,"Truncation of file %s failed. Cannot do appending because of this failure.",outputfiles[i].filename);
                 }
             }
         }
@@ -1864,7 +1884,8 @@ static void read_checkpoint(const char *fn,FILE **pfplog,
 void load_checkpoint(const char *fn,FILE **fplog,
                      t_commrec *cr,gmx_bool bPartDecomp,ivec dd_nc,
                      t_inputrec *ir,t_state *state,
-                     gmx_bool *bReadRNG,gmx_bool *bReadEkin,gmx_bool bAppend)
+                     gmx_bool *bReadRNG,gmx_bool *bReadEkin,
+                     gmx_bool bAppend,gmx_bool bForceAppend)
 {
     gmx_large_int_t step;
     double t;
@@ -1874,7 +1895,7 @@ void load_checkpoint(const char *fn,FILE **fplog,
       read_checkpoint(fn,fplog,
                       cr,bPartDecomp,dd_nc,
                       ir->eI,&step,&t,state,bReadRNG,bReadEkin,
-                      &ir->simulation_part,bAppend);
+                      &ir->simulation_part,bAppend,bForceAppend);
     }
     if (PAR(cr)) {
       gmx_bcast(sizeof(cr->npmenodes),&cr->npmenodes,cr);
index 98620b8ecf245acca255ea2a0797405a0da657c7..c5eefe531d94eee9c9e0834c1db569614d75881b 100644 (file)
@@ -316,6 +316,40 @@ gmx_bool gmx_fexist(const char *fname)
     }
 }
 
+static gmx_bool gmx_is_file(const char *fname)
+{
+    FILE *test;
+
+    if (fname == NULL)
+        return FALSE;
+    test=fopen(fname,"r");
+    if (test == NULL)
+    {
+        return FALSE;
+    }
+    else
+    {
+        fclose(test);
+        /*Windows doesn't allow fopen of directory - so we don't need to check this seperately */
+        #if (!((defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64) && !defined __CYGWIN__ && !defined __CYGWIN32__))
+        {
+            int status;
+            struct stat st_buf;
+            #ifdef HAVE_LSTAT
+                status = lstat (fname, &st_buf);
+            #else
+                status = stat (fname, &st_buf);
+            #endif
+            if (status != 0 || !S_ISREG(st_buf.st_mode))
+            {
+                return FALSE;
+            }
+        }
+        #endif
+        return TRUE;
+    }
+}
+
 
 gmx_bool gmx_fexist_master(const char *fname, t_commrec *cr)
 {
@@ -779,7 +813,7 @@ gmx_bool get_libdir(char *libdir)
             pdum=getcwd(system_path,sizeof(system_path)-1);
 #endif
             sprintf(full_path,"%s%c%s",system_path,DIR_SEPARATOR,bin_name);
-            found = gmx_fexist(full_path);
+            found = gmx_is_file(full_path);
             if (!found && (s=getenv("PATH")) != NULL)
             {
                 char *dupped;
@@ -789,7 +823,7 @@ gmx_bool get_libdir(char *libdir)
                 while(!found && (dir=gmx_strsep(&s, PATH_SEPARATOR)) != NULL)
                 {
                     sprintf(full_path,"%s%c%s",dir,DIR_SEPARATOR,bin_name);
-                    found = gmx_fexist(full_path);
+                    found = gmx_is_file(full_path);
                 }
                 sfree(dupped);
             }
index 17f057418c21fecd0d24b4891d35e18523af1531..0aae993a3275e6e38e26f3434223c93e6f1ff150 100644 (file)
@@ -98,7 +98,7 @@ static void mk_igraph(t_graph *g,int ftype,t_ilist *il,
     np = interaction_function[ftype].nratoms;
     
     if (ia[1] >= at_start && ia[1] < at_end) {
-      if (ia[np] >= at_end)
+      if (ia[np] >= at_end || (ftype == F_SETTLE && ia[1]+2 >= at_end))
        gmx_fatal(FARGS,
                  "Molecule in topology has atom numbers below and "
                  "above natoms (%d).\n"
index 86b713968cc2cf39373cb1daec6e46ea3cafb260..fb2843f02125666e3dcaf5530bd617aede479a69 100644 (file)
@@ -120,8 +120,10 @@ gmx_rmpbc_t gmx_rmpbc_init(t_idef *idef,int ePBC,int natoms,
     {
         fprintf(stderr,
                 "\n"
-                "WARNING: if there are broken molecules in the trajectory file,\n"
-                "         they can not be made whole without a run input file\n\n");
+                "WARNING: If there are molecules in the input trajectory file\n"
+                "         that are broken across periodic boundaries, they\n"
+                "         cannot be made whole (or treated as whole) without\n"
+                "         you providing a run input file.\n\n");
     }
 
     return gpbc;
index c4cee2257c988deca87d816842b51054dd7839b9..449e4d6fcff5bdacfba5acfc070fb478978eda47 100644 (file)
@@ -51,7 +51,9 @@
 #include "xvgr.h"
 #include "gmxfio.h"
 
+#ifdef GMX_THREADS
 #include "thread_mpi.h"
+#endif
 
 #define p2(x) ((x)*(x))
 #define p3(x) ((x)*(x)*(x)) 
index 8d7d3f953da1e822dd2b4be9111681ed606c92f8..c640bb5dac989eefa2a9ec9c00a2396ce6aaae40 100644 (file)
@@ -2538,7 +2538,7 @@ gmx_bool read_tps_conf(const char *infile,char *title,t_topology *top,int *ePBC,
   }
   else {
     get_stx_coordnum(infile,&natoms);
-    init_t_atoms(&top->atoms,natoms,FALSE);
+    init_t_atoms(&top->atoms,natoms,(fn2ftp(infile) == efPDB));
     if (x == NULL)
     {
         snew(x,1);
index 1022231573f91902ff86939130ecb3d827479fdb..92792d1fbb13b97c5ab6ed963283c7dae9372cad 100644 (file)
@@ -463,6 +463,7 @@ double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[],
   
     /* I'm assuming we need global communication the first time! MRS */
     cglo_flags = (CGLO_TEMPERATURE | CGLO_GSTAT
+                  | ((ir->comm_mode != ecmNO) ? CGLO_STOPCM:0)
                   | (bVV ? CGLO_PRESSURE:0)
                   | (bVV ? CGLO_CONSTRAINT:0)
                   | (bRerunMD ? CGLO_RERUNMD:0)
@@ -484,7 +485,7 @@ double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[],
                         NULL,enerd,force_vir,shake_vir,total_vir,pres,mu_tot,
                         constr,NULL,FALSE,state->box,
                         top_global,&pcurr,top_global->natoms,&bSumEkinhOld,
-                        cglo_flags &~ CGLO_PRESSURE);
+                        cglo_flags &~ (CGLO_STOPCM | CGLO_PRESSURE));
     }
     
     /* Calculate the initial half step temperature, and save the ekinh_old */
@@ -968,7 +969,6 @@ double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[],
         
         /* these CGLO_ options remain the same throughout the iteration */
         cglo_flags = ((bRerunMD ? CGLO_RERUNMD : 0) |
-                      (bStopCM ? CGLO_STOPCM : 0) |
                       (bGStat ? CGLO_GSTAT : 0)
             );
         
@@ -1129,6 +1129,7 @@ double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[],
                                 top_global,&pcurr,top_global->natoms,&bSumEkinhOld,
                                 cglo_flags 
                                 | CGLO_ENERGY 
+                                | (bStopCM ? CGLO_STOPCM : 0)
                                 | (bTemp ? CGLO_TEMPERATURE:0) 
                                 | (bPres ? CGLO_PRESSURE : 0) 
                                 | (bPres ? CGLO_CONSTRAINT : 0)
@@ -1570,6 +1571,7 @@ double do_md(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[],
                             top_global,&pcurr,top_global->natoms,&bSumEkinhOld,
                             cglo_flags 
                             | (!EI_VV(ir->eI) ? CGLO_ENERGY : 0) 
+                            | (!EI_VV(ir->eI) && bStopCM ? CGLO_STOPCM : 0)
                             | (!EI_VV(ir->eI) ? CGLO_TEMPERATURE : 0) 
                             | (!EI_VV(ir->eI) || bRerunMD ? CGLO_PRESSURE : 0) 
                             | (bIterations && iterate.bIterate ? CGLO_ITERATE : 0) 
index 81b8a4ee3f48930654b42f62d0bb8b9130799293..7b1c3927cc292f70d3bc106df387a52c313884e2 100644 (file)
@@ -637,6 +637,7 @@ int main(int argc,char *argv[])
   Flags = Flags | (bRerunVSite   ? MD_RERUN_VSITE  : 0);
   Flags = Flags | (bReproducible ? MD_REPRODUCIBLE : 0);
   Flags = Flags | (bAppendFiles  ? MD_APPENDFILES  : 0); 
+  Flags = Flags | (opt2parg_bSet("-append", asize(pa),pa) ? MD_APPENDFILESSET : 0); 
   Flags = Flags | (bKeepAndNumCPT ? MD_KEEPANDNUMCPT : 0); 
   Flags = Flags | (sim_part>1    ? MD_STARTFROMCPT : 0); 
   Flags = Flags | (bResetCountersHalfWay ? MD_RESETCOUNTERSHALFWAY : 0);
index fe17bf069f4882d07a87841a153c19c1c94ef35b..6b11b214056641ad7c7da1ef1e7069d4ab1e6ff3 100644 (file)
@@ -549,7 +549,8 @@ int mdrunner(int nthreads_requested, FILE *fplog,t_commrec *cr,int nfile,
             load_checkpoint(opt2fn_master("-cpi",nfile,fnm,cr),&fplog,
                             cr,Flags & MD_PARTDEC,ddxyz,
                             inputrec,state,&bReadRNG,&bReadEkin,
-                            (Flags & MD_APPENDFILES));
+                            (Flags & MD_APPENDFILES),
+                            (Flags & MD_APPENDFILESSET));
             
             if (bReadRNG)
             {
index c8894d43614ec141f86008c7e20217bb3f79adf9..04c2aafc6269cdb09e7b556e376307eef32a5549 100644 (file)
@@ -661,7 +661,7 @@ real dd_choose_grid(FILE *fplog,
                     real cellsize_limit,real cutoff_dd,
                     gmx_bool bInterCGBondeds,gmx_bool bInterCGMultiBody)
 {
-    int  nnodes_div,ldiv;
+    gmx_large_int_t nnodes_div,ldiv;
     real limit;
     
     if (MASTER(cr))
index 77b04beb2e7332572e6b7748942c0f1d024e7af9..c50f1036d2b34cd715b3123afa97b2e8d4f7f7d2 100644 (file)
@@ -337,16 +337,16 @@ void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inpu
         }
         
         debug_gmx();
-        
-        /* Calculate center of mass velocity if necessary, also parallellized */
-        if (bStopCM && !bRerunMD && bEner) 
-        {
-            calc_vcm_grp(fplog,mdatoms->start,mdatoms->homenr,mdatoms,
-                         state->x,state->v,vcm);
-        }
     }
 
-    if (bTemp || bPres || bEner || bConstrain) 
+    /* Calculate center of mass velocity if necessary, also parallellized */
+    if (bStopCM)
+    {
+        calc_vcm_grp(fplog,mdatoms->start,mdatoms->homenr,mdatoms,
+                     state->x,state->v,vcm);
+    }
+
+    if (bTemp || bStopCM || bPres || bEner || bConstrain)
     {
         if (!bGStat)
         {
@@ -370,7 +370,7 @@ void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inpu
                 wallcycle_start(wcycle,ewcMoveE);
                 GMX_MPE_LOG(ev_global_stat_start);
                 global_stat(fplog,gstat,cr,enerd,force_vir,shake_vir,mu_tot,
-                            ir,ekind,constr,vcm,
+                            ir,ekind,constr,bStopCM ? vcm : NULL,
                             gs != NULL ? eglsNR : 0,gs_buf,
                             top_global,state,
                             *bSumEkinhOld,flags);
@@ -420,16 +420,17 @@ void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inpu
                      mdatoms->massT,mdatoms->tmass,ekind->ekin);
     }
     
-    if (bEner) {
-        /* Do center of mass motion removal */
-        if (bStopCM && !bRerunMD) /* is this correct?  Does it get called too often with this logic? */
-        {
-            check_cm_grp(fplog,vcm,ir,1);
-            do_stopcm_grp(fplog,mdatoms->start,mdatoms->homenr,mdatoms->cVCM,
-                          state->x,state->v,vcm);
-            inc_nrnb(nrnb,eNR_STOPCM,mdatoms->homenr);
-        }
+    /* Do center of mass motion removal */
+    if (bStopCM)
+    {
+        check_cm_grp(fplog,vcm,ir,1);
+        do_stopcm_grp(fplog,mdatoms->start,mdatoms->homenr,mdatoms->cVCM,
+                      state->x,state->v,vcm);
+        inc_nrnb(nrnb,eNR_STOPCM,mdatoms->homenr);
+    }
 
+    if (bEner)
+    {
         /* Calculate the amplitude of the cosine velocity profile */
         ekind->cosacc.vcos = ekind->cosacc.mvcos/mdatoms->tmass;
     }
index 3295cffbf0cc555a9054c72a14bae7089d72610b..5b6fa615b44815a0ebb718503bbf243814aec087 100644 (file)
@@ -363,14 +363,14 @@ gmx_shellfc_t init_shell_flexcon(FILE *fplog,
              break;
            case F_POLARIZATION:
            case F_ANHARM_POL:
-             if (qS != atom[aS].qB)
-               gmx_fatal(FARGS,"polarize can not be used with qA != qB");
+             if (!gmx_within_tol(qS, atom[aS].qB, GMX_REAL_EPS*10))
+               gmx_fatal(FARGS,"polarize can not be used with qA(%e) != qB(%e) for atom %d of molecule block %d", qS, atom[aS].qB, aS+1, mb+1);
              shell[nsi].k    += sqr(qS)*ONE_4PI_EPS0/
                ffparams->iparams[type].polarize.alpha;
              break;
            case F_WATER_POL:
-             if (qS != atom[aS].qB)
-               gmx_fatal(FARGS,"water_pol can not be used with qA != qB");
+             if (!gmx_within_tol(qS, atom[aS].qB, GMX_REAL_EPS*10))
+               gmx_fatal(FARGS,"water_pol can not be used with qA(%e) != qB(%e) for atom %d of molecule block %d", qS, atom[aS].qB, aS+1, mb+1);
              alpha          = (ffparams->iparams[type].wpol.al_x+
                                ffparams->iparams[type].wpol.al_y+
                                ffparams->iparams[type].wpol.al_z)/3.0;
@@ -538,6 +538,10 @@ static void directional_sd(FILE *log,rvec xold[],rvec xnew[],rvec acc_dir[],
 static void shell_pos_sd(FILE *log,rvec xcur[],rvec xnew[],rvec f[],
                         int ns,t_shell s[],int count)
 {
+    const real step_scale_min = 0.8,
+        step_scale_increment = 0.2,
+        step_scale_max = 1.2,
+        step_scale_multiple = (step_scale_max - step_scale_min) / step_scale_increment;
   int  i,shell,d;
   real dx,df,k_est;
 #ifdef PRINT_STEP  
@@ -560,18 +564,33 @@ static void shell_pos_sd(FILE *log,rvec xcur[],rvec xnew[],rvec f[],
       for(d=0; d<DIM; d++) {
        dx = xcur[shell][d] - s[i].xold[d];
        df =    f[shell][d] - s[i].fold[d];
-       if (dx != 0 && df != 0) {
-         k_est = -dx/df;
-         if (k_est >= 2*s[i].step[d]) {
-           s[i].step[d] *= 1.2;
-         } else if (k_est <= 0) {
-           s[i].step[d] *= 0.8;
-         } else {
-           s[i].step[d] = 0.8*s[i].step[d] + 0.2*k_est;
-         }
-       } else if (dx != 0) {
-         s[i].step[d] *= 1.2;
-       }
+    /* -dx/df gets used to generate an interpolated value, but would
+     * cause a NaN if df were binary-equal to zero. Values close to
+     * zero won't cause problems (because of the min() and max()), so
+     * just testing for binary inequality is OK. */
+    if (0.0 != df)
+    {
+        k_est = -dx/df;
+        /* Scale the step size by a factor interpolated from
+         * step_scale_min to step_scale_max, as k_est goes from 0 to
+         * step_scale_multiple * s[i].step[d] */
+        s[i].step[d] =
+            step_scale_min * s[i].step[d] +
+            step_scale_increment * min(step_scale_multiple * s[i].step[d], max(k_est, 0));
+    }
+    else
+    {
+        /* Here 0 == df */
+        if (gmx_numzero(dx)) /* 0 == dx */
+        {
+            /* Likely this will never happen, but if it does just
+             * don't scale the step. */
+        }
+        else /* 0 != dx */
+        {
+            s[i].step[d] *= step_scale_max;
+        }
+    }
 #ifdef PRINT_STEP
        step_min = min(step_min,s[i].step[d]);
        step_max = max(step_max,s[i].step[d]);
index eb0fb8408e9ad5a3f68b57078126055b9e9120d1..26307dac5a6ff02a22ba48047a83a8da5555bf82 100644 (file)
@@ -980,7 +980,6 @@ void do_constrain_first(FILE *fplog,gmx_constr_t constr,
 {
     int    i,m,start,end;
     gmx_large_int_t step;
-    double mass,tmass,vcm[4];
     real   dt=ir->delta_t;
     real   dvdlambda;
     rvec   *savex;
@@ -1057,38 +1056,6 @@ void do_constrain_first(FILE *fplog,gmx_constr_t constr,
         }
     }
     
-    for(m=0; (m<4); m++)
-        vcm[m] = 0;
-    for(i=start; i<end; i++) {
-        mass = md->massT[i];
-        for(m=0; m<DIM; m++) {
-            vcm[m] += state->v[i][m]*mass;
-        }
-        vcm[3] += mass;
-    }
-    
-    if (ir->nstcomm != 0 || debug) {
-        /* Compute the global sum of vcm */
-        if (debug)
-            fprintf(debug,"vcm: %8.3f  %8.3f  %8.3f,"
-                    " total mass = %12.5e\n",vcm[XX],vcm[YY],vcm[ZZ],vcm[3]);
-        if (PAR(cr))
-            gmx_sumd(4,vcm,cr);
-        tmass = vcm[3];
-        for(m=0; (m<DIM); m++)
-            vcm[m] /= tmass;
-        if (debug) 
-            fprintf(debug,"vcm: %8.3f  %8.3f  %8.3f,"
-                    " total mass = %12.5e\n",vcm[XX],vcm[YY],vcm[ZZ],tmass);
-        if (ir->nstcomm != 0) {
-            /* Now we have the velocity of center of mass, let's remove it */
-            for(i=start; (i<end); i++) {
-                for(m=0; (m<DIM); m++)
-                    state->v[i][m] -= vcm[m];
-            }
-
-        }
-    }
     sfree(savex);
 }
 
index 185b15cb6b81d7c62436c9d34f39df985d347229..d84ab3f2b61a1fee3171b269700d07ee840edfb6 100644 (file)
@@ -273,24 +273,25 @@ void global_stat(FILE *fplog,gmx_global_stat_t gs,
               }
           }
       }
+  }
 
-      if (vcm) 
+  if (vcm)
+  {
+      icm   = add_binr(rb,DIM*vcm->nr,vcm->group_p[0]);
+      where();
+      imass = add_binr(rb,vcm->nr,vcm->group_mass);
+      where();
+      if (vcm->mode == ecmANGULAR)
       {
-          icm   = add_binr(rb,DIM*vcm->nr,vcm->group_p[0]);
+          icj   = add_binr(rb,DIM*vcm->nr,vcm->group_j[0]);
           where();
-          imass = add_binr(rb,vcm->nr,vcm->group_mass);
+          icx   = add_binr(rb,DIM*vcm->nr,vcm->group_x[0]);
+          where();
+          ici   = add_binr(rb,DIM*DIM*vcm->nr,vcm->group_i[0][0]);
           where();
-          if (vcm->mode == ecmANGULAR) 
-          {
-              icj   = add_binr(rb,DIM*vcm->nr,vcm->group_j[0]);
-              where();
-              icx   = add_binr(rb,DIM*vcm->nr,vcm->group_x[0]);
-              where();
-              ici   = add_binr(rb,DIM*DIM*vcm->nr,vcm->group_i[0][0]);
-              where();
-          }
       }
   }
+
   if (DOMAINDECOMP(cr)) 
   {
       nb = cr->dd->nbonded_local;
@@ -373,23 +374,6 @@ void global_stat(FILE *fplog,gmx_global_stat_t gs,
                   extract_bind(rb,iepl,enerd->n_lambda,enerd->enerpart_lambda);
               }
           }
-          /* should this be here, or with ekin?*/
-          if (vcm) 
-          {
-              extract_binr(rb,icm,DIM*vcm->nr,vcm->group_p[0]);
-              where();
-              extract_binr(rb,imass,vcm->nr,vcm->group_mass);
-              where();
-              if (vcm->mode == ecmANGULAR) 
-              {
-                  extract_binr(rb,icj,DIM*vcm->nr,vcm->group_j[0]);
-                  where();
-                  extract_binr(rb,icx,DIM*vcm->nr,vcm->group_x[0]);
-                  where();
-                  extract_binr(rb,ici,DIM*DIM*vcm->nr,vcm->group_i[0][0]);
-                  where();
-              }
-          }
           if (DOMAINDECOMP(cr)) 
           {
               extract_bind(rb,inb,1,&nb);
@@ -406,6 +390,23 @@ void global_stat(FILE *fplog,gmx_global_stat_t gs,
       }
   }
 
+  if (vcm)
+  {
+      extract_binr(rb,icm,DIM*vcm->nr,vcm->group_p[0]);
+      where();
+      extract_binr(rb,imass,vcm->nr,vcm->group_mass);
+      where();
+      if (vcm->mode == ecmANGULAR)
+      {
+          extract_binr(rb,icj,DIM*vcm->nr,vcm->group_j[0]);
+          where();
+          extract_binr(rb,icx,DIM*vcm->nr,vcm->group_x[0]);
+          where();
+          extract_binr(rb,ici,DIM*DIM*vcm->nr,vcm->group_i[0][0]);
+          where();
+      }
+  }
+
   if (nsig > 0) 
   {
       extract_binr(rb,isig,nsig,sig);
index 5557f7ed72896b29f2644054e83e9e3a2a522e8e..ec8b918b570e95dadee7355bb092956e95deea85 100644 (file)
@@ -553,7 +553,7 @@ int gmx_editconf(int argc, char *argv[])
                 "To convert a truncated octrahedron file produced by a package which uses",
                 "a cubic box with the corners cut off (such as GROMOS), use:[BR]",
                 "[TT]editconf -f in -rotate 0 45 35.264 -bt o -box veclen -o out[tt][BR]",
-                "where [TT]veclen[tt] is the size of the cubic box times sqrt(3)/2." };
+                "where [TT]veclen[tt] is the size of the cubic box times [SQRT]3[sqrt]/2." };
     const char *bugs[] =
         {
             "For complex molecules, the periodicity removal routine may break down, "
@@ -1034,7 +1034,10 @@ int gmx_editconf(int argc, char *argv[])
     }  
 
     if (check_box(epbcXYZ,box))
-        printf("\nWARNING: %s\n",check_box(epbcXYZ,box));
+        printf("\nWARNING: %s\n"
+               "See the GROMACS manual for a description of the requirements that\n"
+               "must be satisfied by descriptions of simulation cells.\n",
+               check_box(epbcXYZ,box));
 
     if (bDist && btype[0][0]=='t')
     {
index e9d35b7e7614f7538bc37fb2f148172f6811ecfd..cb73909dc4df5d4c1d4a309a138d340887ae12b9 100644 (file)
@@ -3058,7 +3058,8 @@ int mdrunner_membed(FILE *fplog,t_commrec *cr,int nfile,const t_filenm fnm[],
             load_checkpoint(opt2fn_master("-cpi",nfile,fnm,cr),&fplog,
                             cr,Flags & MD_PARTDEC,ddxyz,
                             inputrec,state,&bReadRNG,&bReadEkin,
-                            (Flags & MD_APPENDFILES));
+                            (Flags & MD_APPENDFILES),
+                           (Flags & MD_APPENDFILESSET));
 
             if (bReadRNG)
             {
@@ -3766,6 +3767,7 @@ int gmx_membed(int argc,char *argv[])
        Flags = Flags | (bRerunVSite   ? MD_RERUN_VSITE  : 0);
        Flags = Flags | (bReproducible ? MD_REPRODUCIBLE : 0);
        Flags = Flags | (bAppendFiles  ? MD_APPENDFILES  : 0);
+       Flags = Flags | (opt2parg_bSet("-append", asize(pa),pa) ? MD_APPENDFILESSET : 0); 
        Flags = Flags | (sim_part>1    ? MD_STARTFROMCPT : 0);
        Flags = Flags | (bResetCountersHalfWay ? MD_RESETCOUNTERSHALFWAY : 0);
 
index 33e3f05a3f98bb04ccbff5acadf3c50660bb3fa7..d1fcbb51b5ca4930a40d8949a92c7349cb08be22 100644 (file)
@@ -180,7 +180,8 @@ gmx_select(int argc, char *argv[])
         "be combined with output from other programs and/or external",
         "analysis programs to calculate more complex things.",
         "Any combination of the output options is possible, but note",
-        "that [TT]-om[tt] only operates on the first selection.[PAR]",
+        "that [TT]-om[tt] only operates on the first selection.",
+        "[TT]-os[tt] is the default output option if none is selected.[PAR]",
         "With [TT]-os[tt], calculates the number of positions in each",
         "selection for each frame. With [TT]-norm[tt], the output is",
         "between 0 and 1 and describes the fraction from the maximum",
index 35fd356ccd0c0c38bc4bd3bda2d872d8e81f4b1d..aa458cddb18e20407f9c45d8d1aca1d0a7a58c0a 100644 (file)
@@ -94,7 +94,7 @@ int gmx_vanhove(int argc,char *argv[])
   static real sbin=0,rmax=2,rbin=0.01,mmax=0,rint=0;
   t_pargs pa[] = {
     { "-sqrt",    FALSE, etREAL,{&sbin},
-      "Use [SQRT]t[sqrt] on the matrix axis which binspacing # in sqrt(ps)" },
+      "Use [SQRT]t[sqrt] on the matrix axis which binspacing # in [SQRT]ps[sqrt]" },
     { "-fm",      FALSE, etINT, {&fmmax},
       "Number of frames in the matrix, 0 is plot all" },
     { "-rmax",    FALSE, etREAL, {&rmax},
index bb5958d529a15f87c246b54d4aa105df3bc12899..1975a89c88d3cd5a485798fb396b8098d810e51f 100644 (file)
@@ -296,7 +296,7 @@ t_bb *mkbbind(const char *fn,int *nres,int *nbb,int res0,
              char ***atomname,t_atom atom[],
              t_resinfo *resinfo)
 {
-  static const char * bb_nm[] = { "N", "H", "CA", "C", "O" };
+  static const char * bb_nm[] = { "N", "H", "CA", "C", "O", "HN" };
 #define NBB asize(bb_nm)
   t_bb    *bb;
   char    *grpname;
@@ -334,6 +334,8 @@ t_bb *mkbbind(const char *fn,int *nres,int *nbb,int res0,
       bb[ri].N=ai;
       break;
     case 1:
+    case 5:
+      /* No attempt to address the case where some weird input has both H and HN atoms in the group */
       bb[ri].H=ai;
       break;
     case 2: