--- trunk/OOPSE/libmdtools/Integrator.cpp 2003/07/21 21:27:40 643 +++ trunk/OOPSE/libmdtools/Integrator.cpp 2003/08/11 19:41:36 677 @@ -11,7 +11,7 @@ #include "simError.h" -Integrator::Integrator( SimInfo *theInfo, ForceFields* the_ff ){ +template Integrator::Integrator( SimInfo *theInfo, ForceFields* the_ff ) { info = theInfo; myFF = the_ff; @@ -41,7 +41,7 @@ Integrator::Integrator( SimInfo *theInfo, ForceFields* checkConstraints(); } -Integrator::~Integrator() { +template Integrator::~Integrator() { if( nConstrained ){ delete[] constrainedA; @@ -54,7 +54,7 @@ Integrator::~Integrator() { } -void Integrator::checkConstraints( void ){ +template void Integrator::checkConstraints( void ){ isConstrained = 0; @@ -155,7 +155,7 @@ void Integrator::checkConstraints( void ){ } -void Integrator::integrate( void ){ +template void Integrator::integrate( void ){ int i, j; // loop counters @@ -183,11 +183,11 @@ void Integrator::integrate( void ){ // initialize the forces before the first step - myFF->doForces(1,1); + calcForce(1, 1); if( info->setTemp ){ - tStats->velocitize(); + thermalize(); } calcPot = 0; @@ -220,7 +220,7 @@ void Integrator::integrate( void ){ if( info->setTemp ){ if( info->getTime() >= currThermal ){ - tStats->velocitize(); + thermalize(); currThermal += thermalTime; } } @@ -251,7 +251,7 @@ void Integrator::integrate( void ){ delete statOut; } -void Integrator::integrateStep( int calcPot, int calcStress ){ +template void Integrator::integrateStep( int calcPot, int calcStress ){ @@ -270,7 +270,7 @@ void Integrator::integrateStep( int calcPot, int calcS // calc forces - myFF->doForces(calcPot,calcStress); + calcForce(calcPot,calcStress); #ifdef IS_MPI strcpy( checkPointMsg, "Succesful doForces\n" ); @@ -292,7 +292,7 @@ void Integrator::integrateStep( int calcPot, int calcS } -void Integrator::moveA( void ){ +template void Integrator::moveA( void ){ int i, j; DirectionalAtom* dAtom; @@ -371,7 +371,7 @@ void Integrator::moveA( void ){ } -void Integrator::moveB( void ){ +template void Integrator::moveB( void ){ int i, j; DirectionalAtom* dAtom; double Tb[3], ji[3]; @@ -413,7 +413,7 @@ void Integrator::moveB( void ){ } } -void Integrator::preMove( void ){ +template void Integrator::preMove( void ){ int i, j; double pos[3]; @@ -431,7 +431,7 @@ void Integrator::preMove( void ){ } } -void Integrator::constrainA(){ +template void Integrator::constrainA(){ int i,j,k; int done; @@ -582,7 +582,7 @@ void Integrator::constrainA(){ } -void Integrator::constrainB( void ){ +template void Integrator::constrainB( void ){ int i,j,k; int done; @@ -691,7 +691,7 @@ void Integrator::constrainB( void ){ } -void Integrator::rotate( int axes1, int axes2, double angle, double ji[3], +template void Integrator::rotate( int axes1, int axes2, double angle, double ji[3], double A[3][3] ){ int i,j,k; @@ -772,3 +772,12 @@ void Integrator::rotate( int axes1, int axes2, double } } } + +template void Integrator::calcForce( int calcPot, int calcStress ){ + myFF->doForces(calcPot,calcStress); + +} + +template void Integrator::thermalize(){ + tStats->velocitize(); +}