9 |
|
#include <mpi.h> |
10 |
|
#endif //is_mpi |
11 |
|
|
12 |
< |
#include "ForceFields.hpp" |
13 |
< |
#include "SRI.hpp" |
14 |
< |
#include "simError.h" |
12 |
> |
#include "UseTheForce/ForceFields.hpp" |
13 |
> |
#include "primitives/SRI.hpp" |
14 |
> |
#include "utils/simError.h" |
15 |
> |
#include "types/AtomType.hpp" |
16 |
> |
#include "UseTheForce/DarkSide/eam_interface.h" |
17 |
|
|
18 |
< |
#include "fortranWrappers.hpp" |
18 |
> |
//#include "UseTheForce/fortranWrappers.hpp" |
19 |
|
|
20 |
|
#ifdef IS_MPI |
21 |
< |
#include "mpiForceField.h" |
21 |
> |
#include "UseTheForce/mpiForceField.h" |
22 |
|
#endif // is_mpi |
23 |
|
|
24 |
|
|
42 |
|
// 1 -> in MPI: tells nodes to stop listening |
43 |
|
} atomStruct; |
44 |
|
|
45 |
< |
int parseAtom( char *lineBuffer, int lineNum, atomStruct &info, char *eamPotFile ); |
46 |
< |
int parseEAM( atomStruct &info, char *eamPotFile, double **eam_rvals, |
45 |
> |
int parseAtom( char *lineBuffer, int lineNum, atomStruct &info, string eamPotFile ); |
46 |
> |
int parseEAM( atomStruct &info, string eamPotFile, double **eam_rvals, |
47 |
|
double **eam_rhovals, double **eam_Frhovals); |
48 |
|
#ifdef IS_MPI |
49 |
|
|
161 |
|
EAM_FF(""); |
162 |
|
} |
163 |
|
|
164 |
< |
EAM_FF::EAM_FF(char* the_variant){ |
164 |
> |
EAM_FF::EAM_FF(string the_variant){ |
165 |
|
|
166 |
< |
char fileName[200]; |
167 |
< |
char* ffPath_env = "FORCE_PARAM_PATH"; |
166 |
< |
char* ffPath; |
167 |
< |
char temp[200]; |
166 |
> |
string fileName; |
167 |
> |
string tempString; |
168 |
|
|
169 |
|
headAtomType = NULL; |
170 |
|
currentAtomType = NULL; |
172 |
|
// Set eamRcut to 0.0 |
173 |
|
eamRcut = 0.0; |
174 |
|
|
175 |
– |
// do the funtion wrapping |
176 |
– |
wrapMeFF( this ); |
177 |
– |
|
175 |
|
#ifdef IS_MPI |
176 |
|
int i; |
177 |
|
|
203 |
|
|
204 |
|
// generate the force file name |
205 |
|
|
206 |
< |
strcpy( fileName, "EAM" ); |
206 |
> |
fileName = "EAM"; |
207 |
|
|
208 |
< |
if (strlen(the_variant) > 0) { |
208 |
> |
if (!the_variant.empty()) { |
209 |
|
has_variant = 1; |
210 |
< |
strcpy( variant, the_variant); |
211 |
< |
strcat( fileName, "."); |
215 |
< |
strcat( fileName, variant ); |
216 |
< |
|
210 |
> |
fileName += "." + the_variant; |
211 |
> |
|
212 |
|
sprintf( painCave.errMsg, |
213 |
|
"Using %s variant of EAM force field.\n", |
214 |
< |
variant ); |
214 |
> |
the_variant.c_str() ); |
215 |
|
painCave.severity = OOPSE_INFO; |
216 |
|
painCave.isFatal = 0; |
217 |
|
simError(); |
218 |
< |
} |
224 |
< |
strcat( fileName, ".frc"); |
218 |
> |
} |
219 |
|
|
220 |
+ |
fileName += ".frc"; |
221 |
+ |
|
222 |
|
//fprintf( stderr,"Trying to open %s\n", fileName ); |
223 |
|
|
224 |
|
// attempt to open the file in the current directory first. |
225 |
|
|
226 |
< |
frcFile = fopen( fileName, "r" ); |
226 |
> |
frcFile = fopen( fileName.c_str(), "r" ); |
227 |
|
|
228 |
|
if( frcFile == NULL ){ |
229 |
|
|
230 |
|
// next see if the force path enviorment variable is set |
231 |
|
|
232 |
< |
ffPath = getenv( ffPath_env ); |
233 |
< |
if( ffPath == NULL ) { |
234 |
< |
STR_DEFINE(ffPath, FRC_PATH ); |
235 |
< |
} |
240 |
< |
|
241 |
< |
|
242 |
< |
strcpy( temp, ffPath ); |
243 |
< |
strcat( temp, "/" ); |
244 |
< |
strcat( temp, fileName ); |
245 |
< |
strcpy( fileName, temp ); |
232 |
> |
tempString = ffPath + "/" + fileName; |
233 |
> |
fileName = tempString; |
234 |
> |
|
235 |
> |
frcFile = fopen( fileName.c_str(), "r" ); |
236 |
|
|
247 |
– |
frcFile = fopen( fileName, "r" ); |
248 |
– |
|
237 |
|
if( frcFile == NULL ){ |
238 |
|
|
239 |
|
sprintf( painCave.errMsg, |
241 |
|
"\t%s\n" |
242 |
|
"\tHave you tried setting the FORCE_PARAM_PATH environment " |
243 |
|
"variable?\n", |
244 |
< |
fileName ); |
244 |
> |
fileName.c_str() ); |
245 |
|
painCave.severity = OOPSE_ERROR; |
246 |
|
painCave.isFatal = 1; |
247 |
|
simError(); |
286 |
|
} |
287 |
|
|
288 |
|
|
289 |
< |
void EAM_FF::initForceField( int ljMixRule ){ |
290 |
< |
initFortran( ljMixRule, 0 ); |
289 |
> |
void EAM_FF::initForceField( ){ |
290 |
> |
initFortran(0); |
291 |
|
} |
292 |
|
|
293 |
|
void EAM_FF::cleanMe( void ){ |
316 |
|
double *eam_rvals; // Z of r values |
317 |
|
double *eam_rhovals; // rho of r values |
318 |
|
double *eam_Frhovals; // F of rho values |
319 |
< |
char eamPotFile[1000]; |
319 |
> |
string eamPotFile; |
320 |
> |
|
321 |
|
|
322 |
|
|
323 |
|
bigSigma = 0.0; |
456 |
|
int isError; |
457 |
|
|
458 |
|
// dummy variables |
470 |
– |
int isLJ = 0; |
471 |
– |
int isDipole = 0; |
472 |
– |
int isSSD = 0; |
473 |
– |
int isGB = 0; |
474 |
– |
int isEAM = 1; |
475 |
– |
int isCharge = 0; |
476 |
– |
double dipole = 0.0; |
477 |
– |
double charge = 0.0; |
478 |
– |
double eamSigma = 0.0; |
479 |
– |
double eamEpslon = 0.0; |
459 |
|
|
460 |
|
currentAtomType = headAtomType->next; |
461 |
|
while( currentAtomType != NULL ){ |
462 |
|
|
463 |
|
if( currentAtomType->name[0] != '\0' ){ |
464 |
< |
isError = 0; |
465 |
< |
makeAtype( &(currentAtomType->ident), |
466 |
< |
&isLJ, |
467 |
< |
&isSSD, |
468 |
< |
&isDipole, |
469 |
< |
&isGB, |
470 |
< |
&isEAM, |
471 |
< |
&isCharge, |
472 |
< |
&eamEpslon, |
494 |
< |
&eamSigma, |
495 |
< |
&charge, |
496 |
< |
&dipole, |
497 |
< |
&isError ); |
498 |
< |
if( isError ){ |
499 |
< |
sprintf( painCave.errMsg, |
500 |
< |
"Error initializing the \"%s\" atom type in fortran\n", |
501 |
< |
currentAtomType->name ); |
502 |
< |
painCave.isFatal = 1; |
503 |
< |
simError(); |
504 |
< |
} |
505 |
< |
} |
464 |
> |
|
465 |
> |
AtomType* at = new AtomType(); |
466 |
> |
at->setIdent(currentAtomType->ident); |
467 |
> |
at->setName(currentAtomType->name); |
468 |
> |
at->setEAM(); |
469 |
> |
at->complete(); |
470 |
> |
|
471 |
> |
} |
472 |
> |
|
473 |
|
currentAtomType = currentAtomType->next; |
474 |
|
} |
475 |
|
|
476 |
< |
entry_plug->useLJ = 0; |
476 |
> |
entry_plug->useLennardJones = 0; |
477 |
|
entry_plug->useEAM = 1; |
478 |
|
// Walk down again and send out EAM type |
479 |
|
currentAtomType = headAtomType->next; |
632 |
|
|
633 |
|
|
634 |
|
|
635 |
< |
int EAM_NS::parseAtom( char *lineBuffer, int lineNum, atomStruct &info, char *eamPotFile ){ |
635 |
> |
int EAM_NS::parseAtom( char *lineBuffer, int lineNum, atomStruct &info, string eamPotFile ){ |
636 |
|
|
637 |
|
char* the_token; |
638 |
|
|
656 |
|
painCave.isFatal = 1; |
657 |
|
simError(); |
658 |
|
} |
659 |
< |
|
660 |
< |
strcpy( eamPotFile, the_token ); |
659 |
> |
|
660 |
> |
eamPotFile = the_token; |
661 |
> |
|
662 |
|
return 1; |
663 |
|
} |
664 |
|
else return 0; |
665 |
|
} |
666 |
|
|
667 |
< |
int EAM_NS::parseEAM(atomStruct &info, char *eamPotFile, |
667 |
> |
int EAM_NS::parseEAM(atomStruct &info, string eamPotFile, |
668 |
|
double **eam_rvals, |
669 |
|
double **eam_rhovals, |
670 |
|
double **eam_Frhovals){ |
672 |
|
double* myEam_rhovals; |
673 |
|
double* myEam_Frhovals; |
674 |
|
|
707 |
– |
char* ffPath_env = "FORCE_PARAM_PATH"; |
708 |
– |
char* ffPath; |
675 |
|
char* the_token; |
676 |
|
char* eam_eof_test; |
677 |
|
FILE *eamFile; |
678 |
|
const int BUFFERSIZE = 3000; |
679 |
|
|
680 |
< |
char temp[200]; |
680 |
> |
string tempString; |
681 |
|
int linenumber; |
682 |
|
int nReadLines; |
683 |
|
char eam_read_buffer[BUFFERSIZE]; |
684 |
|
|
719 |
– |
|
685 |
|
int i,j; |
686 |
|
|
687 |
|
linenumber = 0; |
688 |
|
|
689 |
|
// Open eam file |
690 |
< |
eamFile = fopen( eamPotFile, "r" ); |
690 |
> |
eamFile = fopen( eamPotFile.c_str(), "r" ); |
691 |
|
|
727 |
– |
|
692 |
|
if( eamFile == NULL ){ |
693 |
|
|
694 |
|
// next see if the force path enviorment variable is set |
695 |
|
|
696 |
< |
ffPath = getenv( ffPath_env ); |
697 |
< |
if( ffPath == NULL ) { |
734 |
< |
STR_DEFINE(ffPath, FRC_PATH ); |
735 |
< |
} |
736 |
< |
|
737 |
< |
|
738 |
< |
strcpy( temp, ffPath ); |
739 |
< |
strcat( temp, "/" ); |
740 |
< |
strcat( temp, eamPotFile ); |
741 |
< |
strcpy( eamPotFile, temp ); |
696 |
> |
tempString = ffPath + "/" + eamPotFile; |
697 |
> |
eamPotFile = tempString; |
698 |
|
|
699 |
< |
eamFile = fopen( eamPotFile, "r" ); |
744 |
< |
|
699 |
> |
eamFile = fopen( eamPotFile.c_str(), "r" ); |
700 |
|
|
746 |
– |
|
701 |
|
if( eamFile == NULL ){ |
702 |
|
|
703 |
|
sprintf( painCave.errMsg, |
704 |
|
"Error opening the EAM force parameter file: %s\n" |
705 |
|
"Have you tried setting the FORCE_PARAM_PATH environment " |
706 |
|
"variable?\n", |
707 |
< |
eamPotFile ); |
707 |
> |
eamPotFile.c_str() ); |
708 |
|
painCave.isFatal = 1; |
709 |
|
simError(); |
710 |
|
} |
715 |
|
linenumber++; |
716 |
|
if(eam_eof_test == NULL){ |
717 |
|
sprintf( painCave.errMsg, |
718 |
< |
"error in reading commment in %s\n", eamPotFile); |
718 |
> |
"error in reading commment in %s\n", eamPotFile.c_str()); |
719 |
|
painCave.isFatal = 1; |
720 |
|
simError(); |
721 |
|
} |
727 |
|
linenumber++; |
728 |
|
if(eam_eof_test == NULL){ |
729 |
|
sprintf( painCave.errMsg, |
730 |
< |
"error in reading Identifier line in %s\n", eamPotFile); |
730 |
> |
"error in reading Identifier line in %s\n", eamPotFile.c_str()); |
731 |
|
painCave.isFatal = 1; |
732 |
|
simError(); |
733 |
|
} |
737 |
|
|
738 |
|
if ( (the_token = strtok( eam_read_buffer, " \n\t,;")) == NULL){ |
739 |
|
sprintf( painCave.errMsg, |
740 |
< |
"Error parsing EAM ident line in %s\n", eamPotFile ); |
740 |
> |
"Error parsing EAM ident line in %s\n", eamPotFile.c_str() ); |
741 |
|
painCave.isFatal = 1; |
742 |
|
simError(); |
743 |
|
} |
746 |
|
|
747 |
|
if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
748 |
|
sprintf( painCave.errMsg, |
749 |
< |
"Error parsing EAM mass in %s\n", eamPotFile ); |
749 |
> |
"Error parsing EAM mass in %s\n", eamPotFile.c_str() ); |
750 |
|
painCave.isFatal = 1; |
751 |
|
simError(); |
752 |
|
} |
754 |
|
|
755 |
|
if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
756 |
|
sprintf( painCave.errMsg, |
757 |
< |
"Error parsing EAM Lattice Constant %s\n", eamPotFile ); |
757 |
> |
"Error parsing EAM Lattice Constant %s\n", eamPotFile.c_str() ); |
758 |
|
painCave.isFatal = 1; |
759 |
|
simError(); |
760 |
|
} |
764 |
|
eam_eof_test = fgets(eam_read_buffer, sizeof(eam_read_buffer),eamFile); |
765 |
|
if(eam_eof_test == NULL){ |
766 |
|
sprintf( painCave.errMsg, |
767 |
< |
"error in reading number of points line in %s\n", eamPotFile); |
767 |
> |
"error in reading number of points line in %s\n", |
768 |
> |
eamPotFile.c_str()); |
769 |
|
painCave.isFatal = 1; |
770 |
|
simError(); |
771 |
|
} |
772 |
|
|
773 |
|
if ( (the_token = strtok( eam_read_buffer, " \n\t,;")) == NULL){ |
774 |
|
sprintf( painCave.errMsg, |
775 |
< |
"Error parseing EAM nrho: line in %s\n", eamPotFile ); |
775 |
> |
"Error parseing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
776 |
|
painCave.isFatal = 1; |
777 |
|
simError(); |
778 |
|
} |
781 |
|
|
782 |
|
if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
783 |
|
sprintf( painCave.errMsg, |
784 |
< |
"Error parsing EAM drho in %s\n", eamPotFile ); |
784 |
> |
"Error parsing EAM drho in %s\n", eamPotFile.c_str() ); |
785 |
|
painCave.isFatal = 1; |
786 |
|
simError(); |
787 |
|
} |
789 |
|
|
790 |
|
if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
791 |
|
sprintf( painCave.errMsg, |
792 |
< |
"Error parsing EAM # r in %s\n", eamPotFile ); |
792 |
> |
"Error parsing EAM # r in %s\n", eamPotFile.c_str() ); |
793 |
|
painCave.isFatal = 1; |
794 |
|
simError(); |
795 |
|
} |
797 |
|
|
798 |
|
if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
799 |
|
sprintf( painCave.errMsg, |
800 |
< |
"Error parsing EAM dr in %s\n", eamPotFile ); |
800 |
> |
"Error parsing EAM dr in %s\n", eamPotFile.c_str() ); |
801 |
|
painCave.isFatal = 1; |
802 |
|
simError(); |
803 |
|
} |
805 |
|
|
806 |
|
if( ( the_token = strtok( NULL, " \n\t,;" ) ) == NULL ){ |
807 |
|
sprintf( painCave.errMsg, |
808 |
< |
"Error parsing EAM rcut in %s\n", eamPotFile ); |
808 |
> |
"Error parsing EAM rcut in %s\n", eamPotFile.c_str() ); |
809 |
|
painCave.isFatal = 1; |
810 |
|
simError(); |
811 |
|
} |
837 |
|
if(eam_eof_test == NULL){ |
838 |
|
sprintf( painCave.errMsg, |
839 |
|
"error in reading EAM file %s at line %d\n", |
840 |
< |
eamPotFile,linenumber); |
840 |
> |
eamPotFile.c_str(), linenumber); |
841 |
|
painCave.isFatal = 1; |
842 |
|
simError(); |
843 |
|
} |
846 |
|
// Value 1 |
847 |
|
if ( (the_token = strtok( eam_read_buffer, " \n\t,;")) == NULL){ |
848 |
|
sprintf( painCave.errMsg, |
849 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
849 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
850 |
|
painCave.isFatal = 1; |
851 |
|
simError(); |
852 |
|
} |
856 |
|
// Value 2 |
857 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
858 |
|
sprintf( painCave.errMsg, |
859 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
859 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
860 |
|
painCave.isFatal = 1; |
861 |
|
simError(); |
862 |
|
} |
866 |
|
// Value 3 |
867 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
868 |
|
sprintf( painCave.errMsg, |
869 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
869 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
870 |
|
painCave.isFatal = 1; |
871 |
|
simError(); |
872 |
|
} |
876 |
|
// Value 4 |
877 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
878 |
|
sprintf( painCave.errMsg, |
879 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
879 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
880 |
|
painCave.isFatal = 1; |
881 |
|
simError(); |
882 |
|
} |
886 |
|
// Value 5 |
887 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
888 |
|
sprintf( painCave.errMsg, |
889 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
889 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
890 |
|
painCave.isFatal = 1; |
891 |
|
simError(); |
892 |
|
} |
908 |
|
if(eam_eof_test == NULL){ |
909 |
|
sprintf( painCave.errMsg, |
910 |
|
"error in reading EAM file %s at line %d\n", |
911 |
< |
eamPotFile,linenumber); |
911 |
> |
eamPotFile.c_str(), linenumber); |
912 |
|
painCave.isFatal = 1; |
913 |
|
simError(); |
914 |
|
} |
917 |
|
// Value 1 |
918 |
|
if ( (the_token = strtok( eam_read_buffer, " \n\t,;")) == NULL){ |
919 |
|
sprintf( painCave.errMsg, |
920 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
920 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
921 |
|
painCave.isFatal = 1; |
922 |
|
simError(); |
923 |
|
} |
927 |
|
// Value 2 |
928 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
929 |
|
sprintf( painCave.errMsg, |
930 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
930 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
931 |
|
painCave.isFatal = 1; |
932 |
|
simError(); |
933 |
|
} |
937 |
|
// Value 3 |
938 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
939 |
|
sprintf( painCave.errMsg, |
940 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
940 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
941 |
|
painCave.isFatal = 1; |
942 |
|
simError(); |
943 |
|
} |
947 |
|
// Value 4 |
948 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
949 |
|
sprintf( painCave.errMsg, |
950 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
950 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
951 |
|
painCave.isFatal = 1; |
952 |
|
simError(); |
953 |
|
} |
957 |
|
// Value 5 |
958 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
959 |
|
sprintf( painCave.errMsg, |
960 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
960 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
961 |
|
painCave.isFatal = 1; |
962 |
|
simError(); |
963 |
|
} |
978 |
|
if(eam_eof_test == NULL){ |
979 |
|
sprintf( painCave.errMsg, |
980 |
|
"error in reading EAM file %s at line %d\n", |
981 |
< |
eamPotFile,linenumber); |
981 |
> |
eamPotFile.c_str(), linenumber); |
982 |
|
painCave.isFatal = 1; |
983 |
|
simError(); |
984 |
|
} |
987 |
|
// Value 1 |
988 |
|
if ( (the_token = strtok( eam_read_buffer, " \n\t,;")) == NULL){ |
989 |
|
sprintf( painCave.errMsg, |
990 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
990 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
991 |
|
painCave.isFatal = 1; |
992 |
|
simError(); |
993 |
|
} |
997 |
|
// Value 2 |
998 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
999 |
|
sprintf( painCave.errMsg, |
1000 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
1000 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
1001 |
|
painCave.isFatal = 1; |
1002 |
|
simError(); |
1003 |
|
} |
1007 |
|
// Value 3 |
1008 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
1009 |
|
sprintf( painCave.errMsg, |
1010 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
1010 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
1011 |
|
painCave.isFatal = 1; |
1012 |
|
simError(); |
1013 |
|
} |
1017 |
|
// Value 4 |
1018 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
1019 |
|
sprintf( painCave.errMsg, |
1020 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
1020 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
1021 |
|
painCave.isFatal = 1; |
1022 |
|
simError(); |
1023 |
|
} |
1027 |
|
// Value 5 |
1028 |
|
if ( (the_token = strtok( NULL, " \n\t,;")) == NULL){ |
1029 |
|
sprintf( painCave.errMsg, |
1030 |
< |
"Error parsing EAM nrho: line in %s\n", eamPotFile ); |
1030 |
> |
"Error parsing EAM nrho: line in %s\n", eamPotFile.c_str() ); |
1031 |
|
painCave.isFatal = 1; |
1032 |
|
simError(); |
1033 |
|
} |
1042 |
|
fclose(eamFile); |
1043 |
|
return 0; |
1044 |
|
} |
1090 |
– |
|
1091 |
– |
double EAM_FF::getAtomTypeMass (char* atomType) { |
1092 |
– |
|
1093 |
– |
currentAtomType = headAtomType->find( atomType ); |
1094 |
– |
if( currentAtomType == NULL ){ |
1095 |
– |
sprintf( painCave.errMsg, |
1096 |
– |
"AtomType error, %s not found in force file.\n", |
1097 |
– |
atomType ); |
1098 |
– |
painCave.isFatal = 1; |
1099 |
– |
simError(); |
1100 |
– |
} |
1101 |
– |
|
1102 |
– |
return currentAtomType->mass; |
1103 |
– |
} |
1104 |
– |
|