--- trunk/OOPSE/libmdtools/Thermo.cpp 2003/04/04 01:57:11 454 +++ trunk/OOPSE/libmdtools/Thermo.cpp 2003/04/04 19:47:19 458 @@ -125,45 +125,12 @@ int Thermo::getNDF(){ return total; } -int Thermo::getNDF(){ - int ndf_local, ndf; - - ndf_local = 3 * entry_plug->n_atoms + 3 * entry_plug->n_oriented - - entry_plug->n_constraints; - -#ifdef IS_MPI - MPI_Allreduce(&ndf_local,&ndf,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); -#else - ndf = ndf_local; -#endif - - ndf = ndf - 3; - - return ndf; -} - -int Thermo::getNDFraw() { - int ndfRaw_local, ndfRaw; - - // Raw degrees of freedom that we have to set - ndfRaw_local = 3 * entry_plug->n_atoms + 3 * entry_plug->n_oriented; - -#ifdef IS_MPI - MPI_Allreduce(&ndfRaw_local,&ndfRaw,1,MPI_INT,MPI_SUM, MPI_COMM_WORLD); -#else - ndfRaw = ndfRaw_local; -#endif - - return ndfRaw; -} - - double Thermo::getTemperature(){ const double kb = 1.9872179E-3; // boltzman's constant in kcal/(mol K) double temperature; - temperature = ( 2.0 * this->getKinetic() ) / ( (double)this->getNDF() * kb ); + temperature = ( 2.0 * this->getKinetic() ) / ((double)entry_plug->ndf * kb ); return temperature; } @@ -186,8 +153,6 @@ void Thermo::velocitize() { const double kb = 8.31451e-7; // kb in amu, angstroms, fs, etc. double av2; double kebar; - int ndf, ndf_local; // number of degrees of freedom - int ndfRaw, ndfRaw_local; // the raw number of degrees of freedom int n_atoms; Atom** atoms; DirectionalAtom* dAtom; @@ -201,8 +166,8 @@ void Thermo::velocitize() { n_oriented = entry_plug->n_oriented; n_constraints = entry_plug->n_constraints; - kebar = kb * temperature * (double)this->getNDF() / - ( 2.0 * (double)this->getNDFraw() ); + kebar = kb * temperature * (double)entry_plug->ndf / + ( 2.0 * (double)entry_plug->ndfRaw ); for(vr = 0; vr < n_atoms; vr++){