polyluxus / runxtb.bash

wrapper for the extended tight-binding semi-empirical program package xtb
GNU General Public License v3.0
2 stars 3 forks source link

Expand `~` in xtb root for locating the bin directory #26

Closed msh-yi closed 4 years ago

msh-yi commented 4 years ago

Hello,

While configuring runxtb.bash, I set the xtb install root directory to where I installed it (~/xtb_6.2.3). However the error: Cannot locate bin directory in '~/xtb_6.2.3' always shows up. Debug output is below:

DEBUG  : (main) Writing errors to temporary file '/tmp/runxtb.err.z3wuQg'.
DEBUG  : (get_bindir) Getting directory for './runxtb.sh'.
DEBUG  : (get_bindir) File is './runxtb.sh'
DEBUG  : (get_bindir) Directory of runxtb '/gpfs/loomis/home.grace/mhs65/xtb_6.2.3/runxtb.bash' resolves to '/gpfs/loomis/home.grace/mhs65/xtb_6.2.3/runxtb.bash'
DEBUG  : (get_bindir) Directory of runxtb is '/gpfs/loomis/home.grace/mhs65/xtb_6.2.3/runxtb.bash'
DEBUG  : (main) Version 0.3.2 from 2020-02-27.
DEBUG  : (test_rc_file) Testing '/gpfs/loomis/home.grace/mhs65/xtb_6.2.3/runxtb.bash/.runxtbrc' ...
DEBUG  : (test_rc_file) ... missing.
DEBUG  : (test_rc_file) Testing '/gpfs/loomis/home.grace/mhs65/xtb_6.2.3/runxtb.bash/runxtb.rc' ...
DEBUG  : (get_rc)    (found) return_runxtbrc_loc=/gpfs/loomis/home.grace/mhs65/xtb_6.2.3/runxtb.bash/runxtb.rc
DEBUG  : (test_rc_file) Testing '/home/mhs65/.runxtbrc' ...
DEBUG  : (test_rc_file) ... missing.
DEBUG  : (test_rc_file) Testing '/home/mhs65/runxtb.rc' ...
DEBUG  : (test_rc_file) ... missing.
DEBUG  : (test_rc_file) Testing '/home/mhs65/.config//.runxtbrc' ...
DEBUG  : (test_rc_file) ... missing.
DEBUG  : (test_rc_file) Testing '/home/mhs65/.config//runxtb.rc' ...
DEBUG  : (test_rc_file) ... missing.
DEBUG  : (test_rc_file) Testing '/home/mhs65/xtb_6.2.3/runxtb.bash/.runxtbrc' ...
DEBUG  : (test_rc_file) ... missing.
DEBUG  : (test_rc_file) Testing '/home/mhs65/xtb_6.2.3/runxtb.bash/runxtb.rc' ...
DEBUG  : (get_rc)    (found) return_runxtbrc_loc=/home/mhs65/xtb_6.2.3/runxtb.bash/runxtb.rc
DEBUG  : (get_rc) (returned) return_runxtbrc_loc=/home/mhs65/xtb_6.2.3/runxtb.bash/runxtb.rc
DEBUG  : (main) runxtbrc_loc=/home/mhs65/xtb_6.2.3/runxtb.bash/runxtb.rc
INFO   : Configuration file '/home/mhs65/xtb_6.2.3/runxtb.bash/runxtb.rc' applied.
DEBUG  : (main) Guessed jobname is 'runxtb.bash'.
DEBUG  : (main) Commands for xtb are ''.
WARNING: There are no commands to pass on to xtb.
INFO   : This is not the original xtb program!
INFO   : This is only a wrapper to set paths and variables.
DEBUG  : (main) Using path settings.
ERROR  : Cannot locate bin directory in '~/xtb_6.2.3'.
DEBUG  : (cleanup_and_quit) removed ‘/tmp/runxtb.err.z3wuQg’
INFO   : Runxtb (0.3.2, 2020-02-27) wrapper script completed.

Thanks for writing the script! Will make it easier to prepare submissions of larger jobs to queues.

polyluxus commented 4 years ago

Hi! could you please include your configuration file that is applied, i.e. /home/mhs65/xtb_6.2.3/runxtb.bash/runxtb.rc. I'm currently not too sure whether I resolve a ~, but I'll have a look into the code tonight. Did you manually edit the rc file, or did you run it through configure/configure.sh? Just to make double dead sure: There is a ~/xtb_6.2.3/bin? Thanks for using the script and helping to improve it.

msh-yi commented 4 years ago

You're right - I replaced ~ with /home/mhs65 and it works. I manually edited the .rc file, since (this might be a separate issue for others) since, for the last question in the config.sh on where I want to save these changes, it wasn't clear how I would input my choice between the preset location and the recommended location. I just tested the wrapper on preparing a slurm input file for job submission, and it works. Thank you!

polyluxus commented 4 years ago

Thanks for the feedback. I'm glad we could (at least temporarily) work around it. I'll still look into it and check whether I can resolve that; hence I'll leave this issue open.


For the question with the config, I'll happily look into that, too. You can add more information here, or open another issue. But I think I can guess what you mean.

polyluxus commented 4 years ago

@msh-yi I think I have fixed the issue now and it should work when you use the special meaning of ~. I have also updated to configure script to hopefully be clearer on its intend. You can find the prerelease here: https://github.com/polyluxus/runxtb.bash/releases/tag/v0.4.0.rc I'll run some more tests and will look on a few more things to update. If you have any more suggestions, I'm happy to hear them.
I think I'll pull this in within the next weeks.