--- trunk/OOPSE/libmdtools/Thermo.cpp 2003/04/09 04:06:43 483 +++ trunk/OOPSE/libmdtools/Thermo.cpp 2003/04/09 13:59:35 484 @@ -134,6 +134,29 @@ double Thermo::getPressure() { return temperature; } +double Thermo::getEnthalpy() { + + const double e_convert = 4.184E-4; // convert kcal/mol -> (amu A^2)/fs^2 + double u, p, v; + double press[9]; + + u = this->getTotalE(); + + this->getPressureTensor(press); + p = (press[0] + press[4] + press[8]) / 3.0; + + v = this->getVolume(); + + return (u + (p*v)/e_convert); +} + +double Thermo::getVolume() { + double theBox[3]; + + entry_plug->getBox(theBox); + return (theBox[0] * theBox[1] * theBox[2]); +} + double Thermo::getPressure() { // returns the pressure in units of atm // Relies on the calculation of the full molecular pressure tensor