--- trunk/mdtools/interface_implementation/TraPPE_ExFF.cpp 2002/10/16 20:01:53 136 +++ trunk/mdtools/interface_implementation/TraPPE_ExFF.cpp 2002/10/16 20:02:05 137 @@ -18,8 +18,10 @@ TraPPE_ExFF::TraPPE_ExFF(){ // generate the force file name + strcpy( fileName, "TraPPE_Ex.frc" ); - + fprintf( stderr,"Trying to open %s\n", fileName ); + // attempt to open the file in the current directory first. frcFile = fopen( fileName, "r" ); @@ -29,6 +31,16 @@ TraPPE_ExFF::TraPPE_ExFF(){ // next see if the force path enviorment variable is set ffPath = getenv( ffPath_env ); + if( ffPath == NULL ) { + fprintf( stderr, + "Error opening the force field parameter file: %s\n" + "Have you tried setting the FORCE_PARAM_PATH environment " + "vairable?\n", + fileName ); + exit( 8 ); + } + + strcpy( temp, ffPath ); strcat( temp, "/" ); strcat( temp, fileName );