--- trunk/OOPSE/libmdtools/DUFF.cpp 2004/01/13 23:01:43 941 +++ trunk/OOPSE/libmdtools/DUFF.cpp 2004/06/02 18:27:52 1224 @@ -116,7 +116,7 @@ namespace DUFF_NS { // restrict the access of the fol void printMe( void ){ std::cerr << "LinkedAtype " << name << ": ident = " << ident << "\n"; - if( next != NULL ) next->printMe(); + // if( next != NULL ) next->printMe(); } @@ -477,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 @@ -595,10 +595,12 @@ DUFF::DUFF(){ if( frcFile == NULL ){ sprintf( painCave.errMsg, - "Error opening the force field parameter file: %s\n" - "Have you tried setting the FORCE_PARAM_PATH environment " - "vairable?\n", + "Error opening the force field parameter file:\n" + "\t%s\n" + "\tHave you tried setting the FORCE_PARAM_PATH environment " + "variable?\n", fileName ); + painCave.severity = OOPSE_ERROR; painCave.isFatal = 1; simError(); } @@ -730,8 +732,6 @@ void DUFF::readParams( void ){ currentAtomType = headAtomType->next; //skip the first element who is a place holder. while( currentAtomType != NULL ){ currentAtomType->duplicate( atomInfo ); - - sendFrcStruct( &atomInfo, mpiAtomStructType ); @@ -750,21 +750,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 ); } } @@ -898,11 +896,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 ); } } @@ -926,7 +924,7 @@ void DUFF::readParams( void ){ fastForward( "BendTypes", "initializeBends" ); // we are now at the bendTypes section - + eof_test = fgets( readLine, sizeof(readLine), frcFile ); lineNum++; @@ -981,11 +979,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 ); } } @@ -1066,11 +1064,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 ); } } @@ -1124,6 +1122,7 @@ void DUFF::initializeAtoms( int nAtoms, Atom** the_ato // initialize the atoms DirectionalAtom* dAtom; + double ji[3]; for(int i=0; isetMass( currentAtomType->mass ); - the_atoms[i]->setEpslon( currentAtomType->epslon ); - the_atoms[i]->setSigma( currentAtomType->sigma ); the_atoms[i]->setIdent( currentAtomType->ident ); - the_atoms[i]->setLJ(); if( bigSigma < currentAtomType->sigma ) bigSigma = currentAtomType->sigma; @@ -1148,19 +1144,19 @@ void DUFF::initializeAtoms( int nAtoms, Atom** the_ato if( the_atoms[i]->isDirectional() ){ dAtom = (DirectionalAtom *) the_atoms[i]; - dAtom->setMu( currentAtomType->dipole ); dAtom->setHasDipole( 1 ); - dAtom->setJx( 0.0 ); - dAtom->setJy( 0.0 ); - dAtom->setJz( 0.0 ); + + ji[0] = 0.0; + ji[1] = 0.0; + ji[2] = 0.0; + + dAtom->setJ( ji ); if(!strcmp("SSD",the_atoms[i]->getType())){ dAtom->setI( waterI ); - dAtom->setSSD( 1 ); } else if(!strcmp("HEAD",the_atoms[i]->getType())){ dAtom->setI( headI ); - dAtom->setSSD( 0 ); } else{ sprintf(painCave.errMsg, @@ -1184,7 +1180,7 @@ void DUFF::initializeAtoms( int nAtoms, Atom** the_ato else{ if( the_atoms[i]->isDirectional() ){ sprintf( painCave.errMsg, - "DUFF error: Atom \"%s\" was given a standard" + "DUFF error: Atom \"%s\" was given a standard " "orientation in the BASS file, yet it is not a dipole.\n", currentAtomType->name); painCave.isFatal = 1;