Closed RudoRoemer closed 8 years ago
It seems that it will only write a sample input file (felix.inp.simdraw) when you don't have a 'felix.inp' in the working directory. Looking at the source code to see why.
Okay, found out why. There are two separate error messages (with reference numbers) one for opening the file and one for reading the file. If there is an error with opening the file (felix.inp) you are sent to a piece of code with a '120' reference, writeoutinputfile is called and a goto sends you to where the whole input file is written to the screen (and where the 'a sample file has been written for you' is) . If there is a problem with reading the input file you are sent to a '20' reference. This is after the 120 reference and writeoutinputfile is not called but you are still sent to the goto. Therefore a file is not written for you, but the message is still printed. All I have to do is call the Writeoutinputfile in the read error message. Doing it now.
felix should only print a sample input file if it doesnt find one not if the current input file is incorrect. If the program finds an input file but its incorrectly formatted, it should print the correct format to the screen.
Dang, just merged. I can change the 'sample file has been written' message using a switch. and put appropriate ones in for each case? Instead of suggesting a sample file has been written in every case?
When running "felixsim" in V1.10 under SuSe, I get
... A Sample Input File Has been Written For you as felix.inp.simdraw_sample It must be renamed to felix.inp before use ReadInput( 0 ) error 1 in ReadInpFile() felixsim( 0 ) error in ReadInput() phsht@linux-jn15:~/tmp/felixtest> ls felix.cif felix.hkl felix.inp felix.sca F-S0_B1_M0_P0064_T01000
i.e. no sample input seems to have been generated. Where is it?