--- trunk/OOPSE/libmdtools/DUFF.cpp 2003/10/28 16:03:37 829 +++ trunk/OOPSE/libmdtools/DUFF.cpp 2004/01/22 17:34:20 976 @@ -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 @@ -475,7 +477,7 @@ DUFF::DUFF(){ // Init the atomStruct mpi type atomStruct atomProto; // mpiPrototype - int atomBC[3] = {15,11,4}; // block counts + int atomBC[3] = {15,12,5}; // block counts MPI_Aint atomDspls[3]; // displacements MPI_Datatype atomMbrTypes[3]; // member mpi types @@ -729,8 +731,6 @@ void DUFF::readParams( void ){ while( currentAtomType != NULL ){ currentAtomType->duplicate( atomInfo ); - - sendFrcStruct( &atomInfo, mpiAtomStructType ); sprintf( checkPointMsg, @@ -748,21 +748,19 @@ void DUFF::readParams( void ){ else{ // listen for node 0 to send out the force params - + MPIcheckPoint(); headAtomType = new LinkedAtomType; - recieveFrcStruct( &atomInfo, mpiAtomStructType ); + receiveFrcStruct( &atomInfo, mpiAtomStructType ); while( !atomInfo.last ){ - - headAtomType->add( atomInfo ); MPIcheckPoint(); - recieveFrcStruct( &atomInfo, mpiAtomStructType ); + receiveFrcStruct( &atomInfo, mpiAtomStructType ); } } @@ -779,11 +777,13 @@ void DUFF::readParams( void ){ int isGB = 0; int isLJ = 1; int isEAM =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), @@ -800,8 +800,10 @@ void DUFF::readParams( void ){ &(currentAtomType->isDipole), &isGB, &isEAM, + &isCharge, &(currentAtomType->epslon), &(currentAtomType->sigma), + &charge, &(currentAtomType->dipole), &isError ); if( isError ){ @@ -892,11 +894,11 @@ void DUFF::readParams( void ){ MPIcheckPoint(); headBondType = new LinkedBondType; - recieveFrcStruct( &bondInfo, mpiBondStructType ); + receiveFrcStruct( &bondInfo, mpiBondStructType ); while( !bondInfo.last ){ headBondType->add( bondInfo ); - recieveFrcStruct( &bondInfo, mpiBondStructType ); + receiveFrcStruct( &bondInfo, mpiBondStructType ); } } @@ -975,11 +977,11 @@ void DUFF::readParams( void ){ MPIcheckPoint(); headBendType = new LinkedBendType; - recieveFrcStruct( &bendInfo, mpiBendStructType ); + receiveFrcStruct( &bendInfo, mpiBendStructType ); while( !bendInfo.last ){ headBendType->add( bendInfo ); - recieveFrcStruct( &bendInfo, mpiBendStructType ); + receiveFrcStruct( &bendInfo, mpiBendStructType ); } } @@ -1060,11 +1062,11 @@ void DUFF::readParams( void ){ MPIcheckPoint(); headTorsionType = new LinkedTorsionType; - recieveFrcStruct( &torsionInfo, mpiTorsionStructType ); + receiveFrcStruct( &torsionInfo, mpiTorsionStructType ); while( !torsionInfo.last ){ headTorsionType->add( torsionInfo ); - recieveFrcStruct( &torsionInfo, mpiTorsionStructType ); + receiveFrcStruct( &torsionInfo, mpiTorsionStructType ); } }