--- trunk/OOPSE/libmdtools/EAM_FF.cpp 2003/09/25 19:27:15 787 +++ trunk/OOPSE/libmdtools/EAM_FF.cpp 2004/01/22 17:34:20 976 @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include using namespace std; @@ -30,10 +30,10 @@ namespace EAM_NS{ double mass; double lattice_constant; double eam_drho; // The distance between each of the points indexed by rho. + double eam_rcut; // The cutoff radius for eam. double eam_dr; // The distance between each of the rho points. int eam_nrho; // Number of points indexed by rho int eam_nr; // The number of points based on r (Both Phi(r) and Rho(r)). - double eam_rcut; // The cutoff radius for eam. int eam_ident; // Atomic number int ident; int last; // 0 -> default @@ -179,7 +179,7 @@ EAM_FF::EAM_FF(){ // Init the atomStruct mpi type atomStruct atomProto; // mpiPrototype - int atomBC[3] = {15,4,6}; // block counts + int atomBC[3] = {15,5,5}; // block counts MPI_Aint atomDspls[3]; // displacements MPI_Datatype atomMbrTypes[3]; // member mpi types @@ -267,12 +267,12 @@ void EAM_FF::calcRcut( void ){ void EAM_FF::calcRcut( void ){ - #ifdef IS_MPI +#ifdef IS_MPI double tempEamRcut = eamRcut; MPI_Allreduce( &tempEamRcut, &eamRcut, 1, MPI_DOUBLE, MPI_MAX, MPI_COMM_WORLD); #endif //is_mpi - entry_plug->setRcut(eamRcut); + entry_plug->setDefaultRcut(eamRcut); } @@ -407,7 +407,7 @@ void EAM_FF::readParams( void ){ MPIcheckPoint(); headAtomType = new LinkedAtomType; - recieveFrcStruct( &info, mpiAtomStructType ); + receiveFrcStruct( &info, mpiAtomStructType ); while( !info.last ){ @@ -433,7 +433,7 @@ void EAM_FF::readParams( void ){ MPIcheckPoint(); - recieveFrcStruct( &info, mpiAtomStructType ); + receiveFrcStruct( &info, mpiAtomStructType ); } @@ -449,8 +449,10 @@ void EAM_FF::readParams( void ){ int isDipole = 0; int isSSD = 0; int isGB = 0; - int isEAM= 1; + int isEAM = 1; + int isCharge = 0; double dipole = 0.0; + double charge = 0.0; double eamSigma = 0.0; double eamEpslon = 0.0; @@ -465,8 +467,10 @@ void EAM_FF::readParams( void ){ &isDipole, &isGB, &isEAM, + &isCharge, &eamEpslon, &eamSigma, + &charge, &dipole, &isError ); if( isError ){