ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Thermo.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/Thermo.cpp (file contents):
Revision 763 by tim, Mon Sep 15 16:52:02 2003 UTC vs.
Revision 799 by mmeineke, Fri Oct 3 22:11:53 2003 UTC

# Line 130 | Line 130 | double Thermo::getEnthalpy() {
130    return temperature;
131   }
132  
133 double Thermo::getEnthalpy() {
134
135  const double e_convert = 4.184E-4; // convert kcal/mol -> (amu A^2)/fs^2
136  double u, p, v;
137  double press[3][3];
138
139  u = this->getTotalE();
140
141  this->getPressureTensor(press);
142  p = (press[0][0] + press[1][1] + press[2][2]) / 3.0;
143
144  v = this->getVolume();
145
146  return (u + (p*v)/e_convert);
147 }
148
133   double Thermo::getVolume() {
134  
135    return info->boxVol;
# Line 272 | Line 256 | void Thermo::velocitize() {
256  
257   void Thermo::velocitize() {
258    
275  double x,y;
259    double aVel[3], aJ[3], I[3][3];
260    int i, j, vr, vd; // velocity randomizer loop counters
261    double vdrift[3];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines