18 |
|
|
19 |
|
// generate the force file name |
20 |
|
|
21 |
+ |
|
22 |
|
strcpy( fileName, "TraPPE_Ex.frc" ); |
23 |
< |
|
23 |
> |
fprintf( stderr,"Trying to open %s\n", fileName ); |
24 |
> |
|
25 |
|
// attempt to open the file in the current directory first. |
26 |
|
|
27 |
|
frcFile = fopen( fileName, "r" ); |
31 |
|
// next see if the force path enviorment variable is set |
32 |
|
|
33 |
|
ffPath = getenv( ffPath_env ); |
34 |
+ |
if( ffPath == NULL ) { |
35 |
+ |
fprintf( stderr, |
36 |
+ |
"Error opening the force field parameter file: %s\n" |
37 |
+ |
"Have you tried setting the FORCE_PARAM_PATH environment " |
38 |
+ |
"vairable?\n", |
39 |
+ |
fileName ); |
40 |
+ |
exit( 8 ); |
41 |
+ |
} |
42 |
+ |
|
43 |
+ |
|
44 |
|
strcpy( temp, ffPath ); |
45 |
|
strcat( temp, "/" ); |
46 |
|
strcat( temp, fileName ); |