--- trunk/OOPSE/libmdtools/EAM_FF.cpp 2003/07/17 19:25:51 631 +++ trunk/OOPSE/libmdtools/EAM_FF.cpp 2003/07/30 21:17:01 657 @@ -262,10 +262,17 @@ EAM_FF::~EAM_FF(){ #ifdef IS_MPI } #endif // is_mpi +} + + +void EAM_FF::calcRcut( void ){ + double tempEamRcut; + + entry_plug->setRcut(eamRcut); } + void EAM_FF::initForceField( int ljMixRule ){ - initFortran( ljMixRule, 0 ); } @@ -284,6 +291,7 @@ void EAM_FF::readParams( void ){ #endif // is_mpi } + void EAM_FF::readParams( void ){ atomStruct info; @@ -477,6 +485,7 @@ void EAM_FF::readParams( void ){ if( currentAtomType->name[0] != '\0' ){ isError = 0; + cerr << "Calling newEAMtype for type "<eam_ident <<"\n"; newEAMtype( &(currentAtomType->lattice_constant), &(currentAtomType->eam_nrho), &(currentAtomType->eam_drho), @@ -488,6 +497,7 @@ void EAM_FF::readParams( void ){ currentAtomType->eam_Frhovals, &(currentAtomType->eam_ident), &isError); + cerr << "Returned from newEAMtype\n"; if( isError ){ sprintf( painCave.errMsg, "Error initializing the \"%s\" atom type in fortran EAM\n", @@ -507,6 +517,8 @@ void EAM_FF::readParams( void ){ MPIcheckPoint(); #endif // is_mpi + cerr << "Done sending eamtypes to fortran\n"; + } @@ -661,19 +673,23 @@ int EAM_NS::parseEAM(atomStruct &info, char *eamPotFil double **eam_rvals, double **eam_rhovals, double **eam_Frhovals){ - + double* myEam_rvals; + double* myEam_rhovals; + double* myEam_Frhovals; + char* ffPath_env = "FORCE_PARAM_PATH"; char* ffPath; char* the_token; char* eam_eof_test; FILE *eamFile; - const int BUFFERSIZE = 2000; + const int BUFFERSIZE = 3000; char temp[200]; int linenumber; int nReadLines; char eam_read_buffer[BUFFERSIZE]; + int i,j; linenumber = 0; @@ -814,20 +830,25 @@ int EAM_NS::parseEAM(atomStruct &info, char *eamPotFil info.eam_rcut = atof( the_token); + + + // Ok now we have to allocate point arrays and read in number of points // Index the arrays for fortran, starting at 1 - *eam_Frhovals = new double[info.eam_nrho]; - *eam_rvals = new double[info.eam_nr]; - *eam_rhovals = new double[info.eam_nr]; + myEam_Frhovals = new double[info.eam_nrho]; + myEam_rvals = new double[info.eam_nr]; + myEam_rhovals = new double[info.eam_nr]; // Parse F of rho vals. // Assume for now that we have a complete number of lines nReadLines = int(info.eam_nrho/5); + + for (i=0;i