Removing (inaccurate) virial temperature calc.
authorMichael Shirts <michael.shirts@virginia.edu>
Sat, 1 Dec 2012 20:23:47 +0000 (15:23 -0500)
committerMark Abraham <mark.j.abraham@gmail.com>
Thu, 6 Dec 2012 15:39:42 +0000 (16:39 +0100)
Removing the virial temperature, which is not a reliable measure.
Earlier, I had put in a calculation of temperature via the virial
to try to validate the potential energy distribution. It turns out
this is not a good way of doing things, as the virial temperature
differs from the true temperature by a factor proportional to the
pressure, which is not very useful for sentitive calculations.  It's
better to use the ensemble validation relationships I developed.
So in the spirit of simplifying the code (which we all agree needs
to be done), I'm removing this calculation.

Change-Id: Ic942b9af294d928d1675de4f45436dc43aff9649

include/types/idef.h
src/gmxlib/ifunc.c
src/gmxlib/tpxio.c
src/mdlib/ebin.c
src/mdlib/md_support.c
src/mdlib/mdebin.c
src/mdlib/stat.c

index b591e7f00ca8de54b0f17c6d60da2eceba2822dd..b06b5f67e721d83aae01cf1f5c629650a1823f86 100644 (file)
@@ -133,7 +133,7 @@ enum {
   F_ETOT,
   F_ECONSERVED,
   F_TEMP,
-  F_VTEMP,
+  F_VTEMP_NOLONGERUSED,
   F_PDISPCORR,
   F_PRES,
   F_DHDL_CON,
index 7192984d18272b34ee132c2adebff6aa1deb9284..79ac2e206411baadc62810bb625832f05ac39438 100644 (file)
@@ -165,7 +165,7 @@ const t_interaction_function interaction_function[F_NRE]=
   def_nofc    ("ETOT",     "Total Energy"     ),
   def_nofc    ("ECONS",    "Conserved En."    ),
   def_nofc    ("TEMP",     "Temperature"      ),
-  def_nofc    ("VTEMP",    "Vir. Temp.      ),
+  def_nofc    ("VTEMP",    "Vir. Temp. (not used)"      ),
   /* Note that pressure names can not be more than 8 char's,
    * because " (bar)" is appended to them.
    */
index b9a76ad5efabca753dd41437e65f573cb1483df8..fac4d0af17e31e85f385fdf8c2004d05b043a51e 100644 (file)
@@ -172,7 +172,7 @@ static const t_ftupd ftupd[] = {
   { 46, F_COM_PULL          },
   { 20, F_EQM               },
   { 46, F_ECONSERVED        },
-  { 69, F_VTEMP             },
+  { 69, F_VTEMP_NOLONGERUSED},
   { 66, F_PDISPCORR         },
   { 54, F_DHDL_CON          },
   { 76, F_ANHARM_POL        },
index 4ee99c084126797132b1f8683f3b8917c229706d..f370f602eb140a96a3185199e13f8cd99249955f 100644 (file)
@@ -105,7 +105,6 @@ int get_ebin_space(t_ebin *eb,int nener,const char *enm[],const char *unit)
                     case F_DISRESVIOL: u = unit_length;   break;
                     case F_ORIRESDEV:  u = "obs";         break;
                     case F_TEMP:       u = unit_temp_K;   break;
-                    case F_VTEMP:       u = unit_temp_K;   break;
                     case F_PDISPCORR:
                     case F_PRES:       u = unit_pres_bar; break;
                     }
index 7d27271232f37618cade05df59b9ba294717a826..7b19fe13c89c75af05860d3bf31df0c55882ba90 100644 (file)
@@ -493,9 +493,6 @@ void compute_globals(FILE *fplog, gmx_global_stat_t gstat, t_commrec *cr, t_inpu
         enerd->term[F_PDISPCORR] = prescorr;
         enerd->term[F_PRES] += prescorr;
         *pcurr = enerd->term[F_PRES];
-        /* calculate temperature using virial */
-        enerd->term[F_VTEMP] = calc_temp(trace(total_vir),ir->opts.nrdf[0]);
-
     }    
 }
 
index 835b85a14d5559cc65cecf1c79ec5c51e7ff5376..fa95936b0564c45dcffa81f01b119e14c3a526d4 100644 (file)
@@ -227,8 +227,6 @@ t_mdebin *init_mdebin(ener_file_t fp_ene,
             md->bEner[i] = FALSE;
         else if ((i == F_ETOT) || (i == F_EKIN) || (i == F_TEMP))
             md->bEner[i] = EI_DYNAMICS(ir->eI);
-        else if (i==F_VTEMP)
-            md->bEner[i] =  (EI_DYNAMICS(ir->eI) && getenv("GMX_VIRIAL_TEMPERATURE"));
         else if (i == F_DISPCORR || i == F_PDISPCORR)
             md->bEner[i] = (ir->eDispCorr != edispcNO);
         else if (i == F_DISRESVIOL)
index aa4a5a7f0496995f0b90ff15a4be0b526e02f332..be5c6869b607f102afa4dea6669f2b10182a2222 100644 (file)
@@ -127,7 +127,6 @@ static int filter_enerdterm(real *afrom, gmx_bool bToBuffer, real *ato,
             break;
         case F_PRES:    
         case F_PDISPCORR:
-        case F_VTEMP:
             if (bPres)
             {
                 ato[to++] = afrom[from++];