Closed mfherbst closed 3 years ago
Considering that the execution of suscep requires additional information from the user, and that the calculation of both J-values and susceptibility is not necessarily required every time, we decided not to create a single executable. Clear instructions to execute each executable have been provided in the wiki. We have also included a basic script (in the bin directory) for executing both the ej_calc executables.
The script in the bin directory is basically useless. It's not fair to assume J2suscep will be placed in the home directory (or even named as J2suscep).
Why not use command-line arguments to merge the binaries? For example, running "ej_calc -f" would run the formal version, and "ej_calc -s" would be the spin_dens version. Maybe even just one binary for all "j2suscep" with -f and -s above, and -S for suscep or something along those lines.
I agree with @mturiansky. The script is not useful for me either and I don't see my original points fully addressed in the current version of the code.
@mfherbst @mturiansky The script has been modified for better functionality. Once the installation is complete, one needs to either copy/move the contents of the bin folder to a directory in their pathway (the 'PATH' environment variable) or add the bin to the pathway (see wiki). The script also solves the problem of executing multiple executables for ej_calc using the same input file and it can also be used to execute the suscep code. Furthermore, it can be used to execute all the codes sequentially passing the output on one as the input of the next and hence go all the way from the initial input data, through the coupling constants to the susceptibility data output. The input file for suscep has been broken down into three files in a way such that the input file of ej_calc containing the Hamiltonian can be directly used as one of the three input files that are required. The second file is generated by the script if one tries to execute all codes sequentially. The third input file contains additional information that is needed from the user end and has to be created manually. One can use the example input files as templates to edit as needed.
This seems like an improvement. It would be nice if the script would print out usage information when invalid input is entered instead of just exiting with no message. (Just need to add an else
block to the script.)
I agree. In a similar vein I would consider adding a -h
flag or similar, which prints usage.
@mturiansky @mfherbst The script has been modified such that it prints out usage information when invalid input is provided or when –h tag is used.
It's a bit repetitive (for the error section and the -h
section of the script). Perhaps you can refactor that. Otherwise I'm good.
@mfherbst The script has been updated to avoid repetition now.
review for JOSS
I find it a bit strange that the project contains 3 different executables and it is not completely clear to me how the interoperate and which data that is output from one program should be fed to the other. To simply this I would suggest to restructure the workflow as follows:
Instead of shipping three separate executables, ship a single one that internally dispatches to functions doing the work for each stage of the calculation. In order to decide which steps should be executed one can use for example input arguments / commandline flags. If the data required for a particular step has not yet been computed it can be computed on the fly and passed from one stage to the other inside the executable without worrying the user to build a new input file manually for each stage of the calculation.
If the aforementioned is not possible for some reason than at the very least the authors should provide a set of script that execute the programs in the right order and parse / drop input / output files automatically to some extent to reduce on the required manual labour.