The error in pressure of the nvt simulation (about -1.4 bar) is not explained by the error in pressure of the npt simulation. I wonder if the error in pressure of the NVT simulation is caused by that in the NPT simulation I used a berendsen barostat with a very low coupling time of 0.2 ps?
I guess the worse case is that I get the NPT frames with volumes around (but not equal to) the average volume I get from g_energy, and then run NVT simulations starting from each of these NPT frames. And hopefully I get a NVT simulation with the correct pressure... I don't know what went wrong. I did convert the cpt file to pdb file, and then look at them in vmd to check for vacuum bubbles (and i don't see such bubbles in the water molecules). Below is my estimation of the errors: Somehow, the pressure of the nvt14d simulation is about -1.4 bar, instead of 1 bar. This error in pressure is not explained by the err in volume from the g_energy of npt13c, and the isothermal compressibility of water. [= g_energy of npt13c =] Statistics over 214381681 steps [ 0.0000 through 428763.3600 ps ], 5 data sets All statistics are over 17108015 points Energy Average Err.Est. RMSD Tot-Drift ------------------------------------------------------------------------------- Total Energy -307350 6.1 nan -15.4944 (kJ/mol) Temperature 299.851 0.0018 nan -0.00756116 (K) Pressure 1.01127 5.7e-05 nan 0.000126851 (bar) Volume 298.385 0.0043 nan 0.00672558 (nm^3) Density 1015.42 0.015 nan -0.0229017 (kg/m^3) [= g_energy of nvt14d =] Last energy frame read 4715311 time 94306.219 Statistics over 22153111 steps [ 50000.0000 through 94306.2200 ps ], 1 data sets All statistics are over 2215312 points Energy Average Err.Est. RMSD Tot-Drift ------------------------------------------------------------------------------- Pressure -1.40405 0.39 146.262 3.11836 (bar) gcq#98: "Jesus Can't Save You, Though It's Nice to Think He Tried" (Black Crowes) [= Approximate Maximal Error in Pressure (95% confidence, or two standard deviation) =] Assume the error estimation in averaged volume of npt13c is correct. 4.5e-5 = - (dV/dP)_T / V (Delta P)= - (Delta V)/ V / 4.5e-5 (Delta P)= - (0.0043*2)/ (298.385 - 0.0043*2) / 4.5e-5 = -0.6 bar Thus, there is 5% chance that the NPT simulation has a pressure as low as 1.0 - 0.6 = 0.4 bar. Yet, the actual pressure of the NVT simulation is -1.40405 +- 0.39, and 0.4 bar is not within two standard deviations of this value. On Wed, Dec 3, 2014 at 1:08 PM, Johnny Lu <johnny.lu...@gmail.com> wrote: > yes. > > I get an xvg file from the edr file with g_energy. Then from the xvg file, > i selected the observable (volume) corresponding to the timestep at which > the .cpt file is written. > Then I compared this value of volume, with the value of volume calculated > from the box vectors in the .cpt file. > > On Wed, Dec 3, 2014 at 1:04 PM, Mark Abraham <mark.j.abra...@gmail.com> > wrote: > >> A .cpt file has one frame in it. An .edr file has values and statistics >> from many frames. Are you comparing things that are comparable? >> >> Mark >> >> On Wed, Dec 3, 2014 at 6:56 PM, Johnny Lu <johnny.lu...@gmail.com> wrote: >> >> > g_energy seems more correct than gmxdump in box size. >> > >> > >> > [= npt13c_step169777880. gmxdump =] >> > box (3x3): >> > box[ 0]={ 7.50577e+00, 0.00000e+00, 0.00000e+00} >> > box[ 1]={ 0.00000e+00, 7.50577e+00, 0.00000e+00} >> > box[ 2]={ 3.75289e+00, 3.75289e+00, 5.30739e+00} >> > >> > volume from box vector: >> > 7.50577 * 7.50577 * 5.30739 = 299.000218803 >> > >> > [= npt13c. g_energy =] >> > time(ps) volume >> > ------------- ---------- >> > 339555.760000 298.385254 >> > >> > [= commands for starting a NVT simulation, from the npt frame. =] >> > ../../sofware/gromacs-4.6.7/bin/grompp -f nvt14d.mdp -c >> npt13c.tpr -t >> > npt13c_step169777880.cpt -o nvt14d.tpr >> > >> > [= gmxdump_nvt14d_step62571050. gmxdump =] >> > box (3x3): >> > box[ 0]={ 7.50062e+00, 0.00000e+00, 0.00000e+00} >> > box[ 1]={ 0.00000e+00, 7.50062e+00, 0.00000e+00} >> > box[ 2]={ 3.75032e+00, 3.75032e+00, 5.30375e+00} >> > >> > volume from box vector: >> > 7.50062 * 7.50062 * 5.30375 = 298.385264414 (the same value >> in >> > g_energy of npt13c) >> > >> > [= gmxdump_nvt14d_step6247910. gmxdump =] >> > box (3x3): >> > box[ 0]={ 7.50062e+00, 0.00000e+00, 0.00000e+00} >> > box[ 1]={ 0.00000e+00, 7.50062e+00, 0.00000e+00} >> > box[ 2]={ 3.75032e+00, 3.75032e+00, 5.30375e+00} >> > >> > volume from box vector: >> > 7.50062 * 7.50062 * 5.30375 = 298.385264414 >> > >> > On Wed, Dec 3, 2014 at 11:34 AM, Johnny Lu <johnny.lu...@gmail.com> >> wrote: >> > >> > > Hi. >> > > >> > > I get two different volumes with g_energy and gmxdump. >> > > >> > > Which one is true? >> > > >> > > For now, I'm trying to get a NVT simulation with correct pressure, >> after >> > a >> > > 300 ns NPT equilibration. >> > > The 400 ns NPT equilibration has the following statistics, according >> to >> > > g_energy of gromacs 4.6.7, and the equilibration seems to be >> sufficient. >> > > >> > > Last energy frame read 21438168 time 428763.375 >> > > >> > > Statistics over 214381681 steps [ 0.0000 through 428763.3600 ps >> ], >> > > 5 data sets >> > > All statistics are over 17108015 points >> > > >> > > Energy Average Err.Est. RMSD >> > Tot-Drift >> > > >> > > >> > >> ------------------------------------------------------------------------------- >> > > Total Energy -307350 6.1 nan >> > > -15.4944 (kJ/mol) >> > > Temperature 299.851 0.0018 nan >> > > -0.00756116 (K) >> > > Pressure 1.01127 5.7e-05 nan >> > > 0.000126851 (bar) >> > > Volume 298.385 0.0043 nan >> > > 0.00672558 (nm^3) >> > > Density 1015.42 0.015 nan >> > > -0.0229017 (kg/m^3) >> > > >> > > gcq#328: "I used to be blond and stupid, but now I dyed it >> black" >> > > (Miss Li) >> > > >> > > The nan in RMSD is caused by that I did one restart of the >> > > simulation. >> > > >> > > Getting the correct volume is very important for me because the >> > isothermal >> > > compressibility of water is 4.5e-5, and a small change in volume can >> lead >> > > to a relatively large change in pressure. >> > > >> > > gromacs5.0.1. g_energy_d >> > > time(ps) box-x box-y box-z volume >> > > ------------- -------- -------- -------- ---------- >> > > 125142.100000 7.500611 7.500611 5.303739 298.383881 >> > > >> > > gromacs4.6.7. g_energy >> > > >> > > time(ps) volume >> > > ------------- ---------- >> > > 125142.100000 298.383881 >> > > >> > > gromacs4.6.7. gmxdump >> > > box (3x3): >> > > box[ 0]={ 7.50577e+00, 0.00000e+00, 0.00000e+00} >> > > box[ 1]={ 0.00000e+00, 7.50577e+00, 0.00000e+00} >> > > box[ 2]={ 3.75289e+00, 3.75289e+00, 5.30739e+00} >> > > >> > > from the box vectors, volume is |z dot (x cross y)| >> > > 7.50577 * 7.50577 * 5.30739 = 299.000218803 >> > > >> > > gromacs5.0.1. gmxdump_d >> > > box (3x3): >> > > box[ 0]={ 7.50577e+00, 0.00000e+00, 0.00000e+00} >> > > box[ 1]={ 0.00000e+00, 7.50577e+00, 0.00000e+00} >> > > box[ 2]={ 3.75289e+00, 3.75289e+00, 5.30739e+00} >> > > >> > > example command for running gmx_dump: >> > > gmxdump_d -s ../npt13c.tpr -f ../npt13c_step62571050.cpt &> >> > > gmxdump5.0.1d_step62571050 >> > > >> > > example command for running g_energy: >> > > g_energy_d -f ../npt13c.edr npt13c_volume_gromacs5.0.1_d.xvg >> > > >> > > since the timestep is 0.002 ps, the time(ps) corresponding to >> > > the check point file is: >> > > >> > > 62571050 * 0.002 = 125142.1 ps >> > > >> > > All the files (tpr, cpt, edr) are generated by mdrun of gromacs4.6.7 >> > > (mixed precision). It seems that it is ok to use the g_energy and >> gmxdump >> > > of gromacs 5.0.1 on these files. >> > > >> > > Size of the .edr file is 5 gb. >> > > >> > > Thank you again. >> > > >> > -- >> > Gromacs Users mailing list >> > >> > * Please search the archive at >> > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before >> > posting! >> > >> > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists >> > >> > * For (un)subscribe requests visit >> > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or >> > send a mail to gmx-users-requ...@gromacs.org. >> > >> -- >> Gromacs Users mailing list >> >> * Please search the archive at >> http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before >> posting! >> >> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists >> >> * For (un)subscribe requests visit >> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or >> send a mail to gmx-users-requ...@gromacs.org. >> > > -- Gromacs Users mailing list * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting! * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists * For (un)subscribe requests visit https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-requ...@gromacs.org.