Run the executable like
RAYON_NUM_THREADS=16 RUST_BACKTRACE=1 $bin [input file] & disown -h
The environment variables RAYON_NUM_THREADS
and RUST_BACKTRACE
are not
required, but the first will prevent rayon from using too many resources, and
the latter will help debug any issues. $bin
should be the path of the
executable. If you plan to run many of these or are testing the program, you
may want to group this commands into a run script like
#!/bin/sh
d=$(date +%y-%m-%d_%H-%M-%S)
if ! [[ -d archive ]] ; then
mkdir archive
fi
mv semp.out archive/$d.out
mv semp.log archive/$d.log
mv version archive/$d.ver
ls -lth $bin > version
RAYON_NUM_THREADS=16 RUST_BACKTRACE=1 $bin & disown -h
tail -F semp.out
which will help organize previous runs without overwriting them. Output is
written to semp.out
. Progress information and errors are written to semp.log
.
If input file
argument to the binary is omitted, a default of semp.toml
is
assumed. The form of this input file is given below with all of the options
annotated:
# global config
job_limit = 10000 # the maximum number of jobs to submit at once
chunk_size = 128 # the number of jobs to include in one queue submission
sleep_int = 5 # the interval to sleep before polling complete jobs again
max_iter = 5 # maximum levmar iterations
# the initial parameters to optimize in MOPAC EXTERNAL format
params = """
USS H -11.246958000000
ZS H 1.268641000000
BETAS H -8.352984000000
GSS H 14.448686000000
USS C -51.089653000000
UPP C -39.937920000000
ZS C 2.047558000000
ZP C 1.702841000000
BETAS C -15.385236000000
BETAP C -7.471929000000
GSS C 13.335519000000
GPP C 10.778326000000
GSP C 11.528134000000
GP2 C 9.486212000000
HSP C 0.717322000000
FN11 C 0.046302000000
"""
optimize = "energy" # whether to optimize on "energy" or "frequency"
broyden = false # use broyden's method for approximate jacobian updates
broyd_int = 10 # interval at which to run full jacobians when broyden = true
reset_lambda = false # reset the levmar lambda parameter if the algorithm fails
queue = "slurm" # queue type to use
delta = 1e-4 # step size in the parameters for the jacobian
# this section holds configuration options for individual molecules. more than
# one [[molecule]] section is allowed in an input file, and the optimization
# will operate over all of them
[[molecule]]
atom_names = ["C", "C", "C", "H", "H"] # atom names in the order of the geometry
charge = 0 # molecular charge
dummies = [] # dummy atoms (unused?)
# the geometry as a Z-matrix or XYZ geometry, following MOPAC formatting rules
geometry = """
C
C 1 CC
C 1 CC 2 CCC
H 2 CH 1 HCC 3 180.0
H 3 CH 1 HCC 2 180.0
CC = 1.42101898
CCC = 55.60133141
CH = 1.07692776
HCC = 147.81488230
"""
# the coordinate type for the QFF. if sic, a corresponding intder input file is
# required. other options are "norm" and "cart"
coord_type = { sic = "test_files/intder.in" }
# the "true" values of the anharmonic frequencies to train on
true_freqs = [3139.8, 3108.7, 1595.1, 1275.8, 1056.9, 1007.9, 876.8, 876.5, 772.7]
# the symmetries of the frequencies in true_freqs. the order must match true_freqs
irreps = [ "A1", "B2", "A1", "A1", "B2", "A2", "A1", "B2", "B1"]
# the MOPAC template for the computations
template = "scfcrt=1.D-21 aux(precision=14) PM6 threads=1"