--- trunk/OOPSE/libmdtools/DUFF.cpp 2003/08/20 19:11:51 704 +++ trunk/OOPSE/libmdtools/DUFF.cpp 2004/01/13 23:01:43 941 @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include using namespace std; @@ -32,6 +32,7 @@ namespace DUFF_NS { // restrict the access of the fol double mass; double epslon; double sigma; + double charge; double dipole; double w0; double v0; @@ -41,6 +42,7 @@ namespace DUFF_NS { // restrict the access of the fol double rlp; double rup; int isSSD; + int isCharge; int isDipole; int ident; int last; // 0 -> default @@ -454,7 +456,6 @@ DUFF::DUFF(){ char* ffPath_env = "FORCE_PARAM_PATH"; char* ffPath; char temp[200]; - char errMsg[1000]; headAtomType = NULL; currentAtomType = NULL; @@ -476,7 +477,7 @@ DUFF::DUFF(){ // Init the atomStruct mpi type atomStruct atomProto; // mpiPrototype - int atomBC[3] = {15,6,4}; // block counts + int atomBC[3] = {15,11,4}; // block counts MPI_Aint atomDspls[3]; // displacements MPI_Datatype atomMbrTypes[3]; // member mpi types @@ -658,12 +659,7 @@ void DUFF::readParams( void ){ void DUFF::readParams( void ){ - int i, a, b, c, d; int identNum; - char* atomA; - char* atomB; - char* atomC; - char* atomD; atomStruct atomInfo; bondStruct bondInfo; @@ -785,13 +781,13 @@ void DUFF::readParams( void ){ int isGB = 0; int isLJ = 1; int isEAM =0; - double GB_dummy = 0.0; - - + int isCharge = 0; + double charge=0.0; + currentAtomType = headAtomType->next;; while( currentAtomType != NULL ){ - if(currentAtomType->isDipole) entry_plug->useDipole = 1; + if(currentAtomType->isDipole) entry_plug->useDipoles = 1; if(currentAtomType->isSSD) { entry_plug->useSticky = 1; set_sticky_params( &(currentAtomType->w0), &(currentAtomType->v0), @@ -808,8 +804,10 @@ void DUFF::readParams( void ){ &(currentAtomType->isDipole), &isGB, &isEAM, + &isCharge, &(currentAtomType->epslon), &(currentAtomType->sigma), + &charge, &(currentAtomType->dipole), &isError ); if( isError ){ @@ -1310,8 +1308,7 @@ void DUFF::initializeBends( int nBends, Bend** bendArr } gBend = new GhostBend( *the_atoms[a], - *the_atoms[b], - *the_atoms[c] ); + *the_atoms[b]); gBend->setConstants( currentBendType->k1, currentBendType->k2, @@ -1640,7 +1637,7 @@ int DUFF_NS::parseBond( char *lineBuffer, int lineNum, else{ sprintf( painCave.errMsg, "Unknown DUFF bond type \"%s\" at line %d\n", - info.type, + bondType, lineNum ); painCave.isFatal = 1; simError();