From 3b218ec2d3d9ba4a56cee2259cf1763bccebe41a Mon Sep 17 00:00:00 2001 From: David van der Spoel Date: Thu, 16 Aug 2012 09:45:41 +0200 Subject: [PATCH] Optional computation of fluct. props in g_energy. Fixes #954 Added a command line option -fluct_props to turn on the computation of heat capacity etc. in g_energy. This prevents a warning message from appearing on the screen each time the program is run. Change-Id: I0cac44494ec5a366762d4d0a915146298d2ce1e0 --- src/tools/gmx_energy.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tools/gmx_energy.c b/src/tools/gmx_energy.c index 42204e3b16..7931b80883 100644 --- a/src/tools/gmx_energy.c +++ b/src/tools/gmx_energy.c @@ -1660,7 +1660,8 @@ int gmx_energy(int argc,char *argv[]) "The term fluctuation gives the RMSD around the least-squares fit.[PAR]", "Some fluctuation-dependent properties can be calculated provided", - "the correct energy terms are selected. The following properties", + "the correct energy terms are selected, and that the command line option", + "[TT]-fluct_props[tt] is given. The following properties", "will be computed:[BR]", "Property Energy terms needed[BR]", "---------------------------------------------------[BR]", @@ -1724,7 +1725,7 @@ int gmx_energy(int argc,char *argv[]) }; static gmx_bool bSum=FALSE,bFee=FALSE,bPrAll=FALSE,bFluct=FALSE,bDriftCorr=FALSE; - static gmx_bool bDp=FALSE,bMutot=FALSE,bOrinst=FALSE,bOvec=FALSE; + static gmx_bool bDp=FALSE,bMutot=FALSE,bOrinst=FALSE,bOvec=FALSE,bFluctProps=FALSE; static int skip=0,nmol=1,nbmin=5,nbmax=5; static real reftemp=300.0,ezero=0; t_pargs pa[] = { @@ -1750,6 +1751,8 @@ int gmx_energy(int argc,char *argv[]) "Also print the exact average and rmsd stored in the energy frames (only when 1 term is requested)" }, { "-nmol", FALSE, etINT, {&nmol}, "Number of molecules in your sample: the energies are divided by this number" }, + { "-fluct_props", FALSE, etBOOL, {&bFluctProps}, + "Compute properties based on energy fluctuations, like heat capacity" }, { "-driftcorr", FALSE, etBOOL, {&bDriftCorr}, "Useful only for calculations of fluctuation properties. The drift in the observables will be subtracted before computing the fluctuation properties."}, { "-fluc", FALSE, etBOOL, {&bFluct}, @@ -2484,8 +2487,9 @@ int gmx_energy(int argc,char *argv[]) time,reftemp,&edat, nset,set,bIsEner,leg,enm,Vaver,ezero,nbmin,nbmax, oenv); - calc_fluctuation_props(stdout,bDriftCorr,dt,nset,set,nmol,leg,&edat, - nbmin,nbmax); + if (bFluctProps) + calc_fluctuation_props(stdout,bDriftCorr,dt,nset,set,nmol,leg,&edat, + nbmin,nbmax); } if (opt2bSet("-f2",NFILE,fnm)) { fec(opt2fn("-f2",NFILE,fnm), opt2fn("-ravg",NFILE,fnm), -- 2.22.0