Skip to content

Commit b99666f

Browse files
authored
GPL-3.0 license, guides, and minor improvements (#23)
- Version is stored in separate file and sourced in the script, crest.prepare now reads out the version in the same fashion as runxtb.sh; also added reading the configuration file for future use (and at no extra cost) - Cleanup: added more messaging to crest.prepare and fixed display bug(s), added (secret) configuration option to customise command for Open Babel (obabel_cmd). - Bugfix: adjusted PATH settings for runxtb, i.e. XTBHOME/{python,scripts} will be added to the environment if they exist. - Added: guide for automatic NMR with enso, the guides directory contains a tutorial (or explanation) how to create a NMR specrum automatically from a guessed structure. - Added: example module files for xtb. - Extended: walltime switch now accepts suffixes for days, hours, and minutes; jobname will now be derived from either the coordinate filename, or the program name, and as a fall-back from the directory name. - Added: GPL-3.0 license. - Update to version 0.3.1
1 parent 0f8bc74 commit b99666f

10 files changed

Lines changed: 1413 additions & 90 deletions

File tree

LICENSE

Lines changed: 622 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,19 @@ Additionally it can be used to create scripts to submit it to a queueing system.
1616

1717
## Installation
1818

19-
The simplest way to install it is to copy it to the same directory as the
20-
program, and use a symbolic link for execution, e.g. in `~/bin`.
21-
There is - in principle - no need to configure it.
22-
(I would not recommend that version anymore.)
23-
You can also use it from any directory, if you set the path to the
24-
executable manually on the command line (see below).
25-
Lastly, and my personally preferred way, is to clone the git repository
26-
and configure the script.
19+
My personally preferred way to install it, is to clone the git repository
20+
(or download the source code) and configure the script.
2721
There is a configure script, which will prompt for the values
2822
with a short description.
2923
It will also try to recover values from a previous configuration
3024
in the same locations as outlined below.
31-
I recommend deleting old configuration files before updating to version 0.2.0 of this script.
25+
I recommend deleting old configuration files before updating to version > 0.2.0 of this script.
3226

3327
The wrapper script will first look for a file `.runxtbrc`,
3428
then for a file `runxtb.rc` (example included),
3529
in directories of the following order:
3630
`scriptpath`, `/home/$USER`, `/home/$USER/.config`, and `$PWD`.
37-
If `.runxtbrc` is found, it won't look for `runxtb.rc`.
31+
If a `.runxtbrc` is found, it will skip `runxtb.rc`.
3832
The last file found will be used to set the (local) default parameters.
3933
This gives the possibility that every user may configure local settings,
4034
it also gives the possibilities to overwrite settings for one directory only.
@@ -43,6 +37,12 @@ A summary of the settings to be used are given with the `-h` option.
4337
This directory is currently set up to find `runxtb.rc` and should test
4438
sucessfully without any changes.
4539

40+
There used to be a way to install thes script alongside with the executable of xtb,
41+
without further need to configure it, and place a symbolic link to it
42+
in a directory included in `PATH`, e.g. in `~/bin`.
43+
I have not tested this set-up for a long time, so I am not sure if the recent edits have broken it.
44+
(I would not recommend trying it.)
45+
4646
## Updating
4747

4848
Updating should be as easy as pulling the new version of the repository.
@@ -75,12 +75,15 @@ The following script options are available:
7575
* `-m <ARG>` Secify the memory to be used (in megabyte).
7676
This will set `OMP_STACKSIZE=<ARG>`. (Default in the script is `1000`.)
7777
* `-o <ARG>` Trap the output (without errors) of `xtb` into a file called `<ARG>`.
78-
In non-interactive mode it will be derived from the first argument given
79-
after the options, which should be `coord_file`, or if it is not a file,
80-
from the parent working directory.
81-
The automatic generation of the file name is the default,
82-
but it can be also be triggered with `-o ''` (space is important), `-o0`, or `-o auto`.
83-
To send the output stream to standad output, settings can be overwritten
78+
The default behaviour in non-interactive mode is to guess the filename:
79+
If the first argument given after the script options is a readable file,
80+
i.e. a `coord_file` or `coords.xyz`, the job- and output-name will be based on that.
81+
If the executed program is not `xtb` (`-C` switch), it will be based on that.
82+
As fallback it will be derived from the parent working directory.
83+
If necessary, the automatic generation of the file name can be also be triggered
84+
with `-o ''` (space is important), `-o0`, or `-o auto`.
85+
This may be useful to overwrite any previous settings.
86+
To send the output stream to standad output, e.g. the terminal, settings can be overwritten
8487
with `-c stdout`, or `-c -`.
8588
(configuration option `output_file='',0,auto|stdout,-`)
8689
* `-s` Write a submitscript instead of interactive execution (PBS is default).
@@ -134,15 +137,16 @@ The following files come with this script:
134137
* `crest.prepare.sh` A small script that creates a new directory
135138
with a suitable `coord` file to start a `crest` run.
136139
* `README.md` This file.
137-
* `configure` A directury containing a script to configure the wrapper.
140+
* `configure` A directory containing a script to configure the wrapper.
141+
* `guides` A directory with markup-formatted file(s), which can be used as tutorials.
138142

139143
## Exit status
140144

141145
The script `runxtb` carries over the exit statusses of its dependencies.
142146
In interactive mode that is the exit status of `xtb`.
143147
In submission mode it is the exit status of `qsub`, `bsub`, or `sbatch`.
144148
In all other cases it will be `0` if everything went according to plan,
145-
or `1` if there was a problem.
149+
or `1` if there was a problem within the script.
146150
The script `crest.prepare.sh` will exit with `0` if nothing went wrong
147151
and a crest run can be started. If files are not present, or I/O operations
148152
fail it will exit with `1`.
@@ -161,5 +165,24 @@ If you find anything not going as expected,
161165
please include the debug output when submitting a bug report to the
162166
[GitHub issue tracker](https://github.com/polyluxus/runxtb.bash/issues).
163167

168+
## License (GNU General Public License v3.0)
169+
170+
runxtb.bash - a wrapper script for xtb
171+
Copyright (C) 2019 Martin C Schwarzer
172+
173+
This program is free software: you can redistribute it and/or modify
174+
it under the terms of the GNU General Public License as published by
175+
the Free Software Foundation, either version 3 of the License, or
176+
(at your option) any later version.
177+
178+
This program is distributed in the hope that it will be useful,
179+
but WITHOUT ANY WARRANTY; without even the implied warranty of
180+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
181+
GNU General Public License for more details.
182+
183+
See [LICENSE](LICENSE) to see the full text.
184+
185+
You should have received a copy of the GNU General Public License
186+
along with this program. If not, see <https://www.gnu.org/licenses/>.
164187

165-
(Martin; 2019-03-18; wrapper version 0.3.0)
188+
(Martin; 2019-09-10; wrapper version 0.3.1)

VERSION

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
version="0.3.1"
3+
versiondate="2019-09-10"

configure/configure.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
#!/bin/bash
22

3+
###
4+
#
5+
# Tis configuration script is part of
6+
# runxtb.bash --
7+
# a repository to set the environment for the xtb program
8+
# Copyright (C) 2019 Martin C Schwarzer
9+
#
10+
# This program is free software: you can redistribute it and/or modify
11+
# it under the terms of the GNU General Public License as published by
12+
# the Free Software Foundation, either version 3 of the License, or
13+
# (at your option) any later version.
14+
#
15+
# This program is distributed in the hope that it will be useful,
16+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
# GNU General Public License for more details.
19+
#
20+
# You should have received a copy of the GNU General Public License
21+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
#
23+
###
24+
325
# This script should be used to configure runxtb.sh
426

527
#

0 commit comments

Comments
 (0)