Skip to content

Commit

Permalink
Devel (#5)
Browse files Browse the repository at this point in the history
* l3 without gESC
* cleanup of crest_combi
  • Loading branch information
fabothch authored May 4, 2021
1 parent 6fd656e commit 7a0eab5
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 55 deletions.
17 changes: 16 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
|GitHub release| |DOI|

.. |GitHub release| image:: https://img.shields.io/github/v/release/grimme-lab/CRENSO
:target: https://github.com/grimme-lab/CRENSO/releases/latest


.. |DOI| image:: https://img.shields.io/badge/DOI-10.1021/acs.jpca.1c00971-blue
:target: https://doi.org/10.1021/acs.jpca.1c00971


====================
CRENSO / CREST_COMBI
====================
Expand Down Expand Up @@ -49,7 +59,12 @@ Title: Efficient quantum chemical calculation of structure ensembles and free en

Authors: Grimme, Stefan; Bohle, Fabian; Hansen, Andreas; Pracht, Philipp; Spicher, Sebastian; Stahn, Marcel

further information will be updated once available.
General reference:

S. Grimme, F. Bohle, A. Hansen, P. Pracht, S. Spicher, and M. Stahn
*J. Phys. Chem. A* **2021**, XXXX, XXX, XXX-XXX.

DOI: `10.1021/acs.jpca.1c00971 <https://doi.org/10.1021/acs.jpca.1c00971>`_.

License
=======
Expand Down
76 changes: 60 additions & 16 deletions crenso
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,14 @@ echo 'Note: for -pka, the main (coord) dir must contain the correct .CHRG file f

mode=""
argcheck=y
optstr=$@
or=off
nmr=off
OUT=crenso.out
T=6
setT=off # logical for T = threads in CREST
P=3 # threads in CENSO
O=2 # cores per thread in CENSO
censorc='~/.censorc'
censorc="$HOME/.censorc"
p3=off
printhelp=off
progress=on
Expand All @@ -32,6 +31,7 @@ while [ "$argcheck" = "y" ]; do
"-l1" ) mode=1; p2=off ;; # quick crest_combi + part0/1
"-l1opt" ) mode=1; p2=on ;; # " " + part0/1/2 ie DFT opt
"-l2" ) mode=2 ;; # full crest_combi + gesc+ part0/1/2 ie DFT opt
"-l3" ) mode=3; p2=on ;; # full crest_combi, NO-gesc, part0/1/2 in CENSO
# EWINS: CREST part0 part1
# 2.0 kcal here yields reasonable thermal averages while more for OR are taken
# 8 kcal in crest is required because we really wanna have the best in spectro mode while in thermo mode, a close to best is ok
Expand All @@ -51,7 +51,7 @@ while [ "$argcheck" = "y" ]; do
"-T" ) shift; T=$1; setT=on ;;
"-P" ) shift; P=$1 ;; # independent parallel threads in CENSO --> P * O = T
"-O" ) shift; O=$1 ;; # number of cores for independent threads in CENSO --> P * O = T
"-inprc" ) shift; censorc=$1; echo $censorc ;; # explicit path to censorc
"-inprc" ) shift; censorc=$1 ;; # explicit path to censorc
"-h" ) printhelp=on;;
"--help" ) printhelp=on;;
esac
Expand All @@ -70,6 +70,7 @@ if [ $printhelp == on ];then
echo "-l1 = quick crest_combi + CENSO[part0/1]"
echo "-l1opt = quick crest_combi + CENSO[part0/1/2] i.e. DFT optimization"
echo "-l2 = full crest_combi + gESC + CENSO[part0/1/2]"
echo "-l3 = full crest_combi + CENSO[part0/1/2] (NO gESC)"
echo "-pka = pka calculation for acid (A) and base (B) in water"
echo "-kow = 1-octanol/water partition coefficent calculation"
echo "-kow_fine = 1-octanol/water partition coefficient calculation using CENSO[part3] for COSMO-RS[FINE]"
Expand All @@ -83,8 +84,8 @@ if [ $printhelp == on ];then
echo "-or_fine [solvent] = optical roatatory dispersion calculation using larger energy windows/thresholds"
echo "-nmr [solvent] = NMR calculation, settings are determined from the CENSO global configuration file"
echo "-T = number of threads used in CREST, can also be set by using P and O"
echo "-P = number of independent parallel cthreads in CENSO (P * O = T)"
echo "-O = number of cores for independent threads in CENSO (P * O = T)"
echo "-P = number of independent parallel threads in CENSO (P * O = T)"
echo "-O = number of cores per independent thread in CENSO (P * O = T)"
echo "-inprc = provide explicit absolute path to a CENSO global configuration file"
echo "-h = print help message"
echo ""
Expand All @@ -106,27 +107,29 @@ fi

# determine T from P and O
if [ $setT != on ];then
T=$(expr $P \* $O)
T=$(($P * $O))
echo "Total number of CPUs(threads) (T) is set to $T"
fi

startdir=$PWD

if [ "$mode" != "" ]; then # run block (else just print)
########################## prepare
chrga=0
chrgb=0
uhfa=0
uhfb=0
if test -f .CHRG; then
chrga=`cat .CHRG`
chrgb=`cat .CHRG`
chrga=$(cat .CHRG)
chrgb=$(cat .CHRG)
fi
if test -f .UHF; then
uhfa=`cat .UHF`
uhfb=`cat .UHF`
uhfa=$(cat .UHF)
uhfb=$(cat .UHF)
fi
if test -f .UHFA; then
uhfa=`cat .UHFA`
uhfb=`cat .UHFB`
uhfa=$(cat .UHFA)
uhfb=$(cat .UHFB)
fi

if [ "$run" = "pka" ]; then
Expand Down Expand Up @@ -163,7 +166,7 @@ if [ "$mode" != "" ]; then # run block (else just print)
cp coord A
fi

echo $ec $ep0 $ep1 $s1 $s2 $mode $run $OUT
echo "$ec $ep0 $ep1 $s1 $s2 $mode $run $OUT"

########################## run

Expand All @@ -187,8 +190,8 @@ if [ "$mode" != "" ]; then # run block (else just print)
cd $m
echo -e "\n#>>># Starting calculation in $m charge= $chrg uhf= $uhf solvent= $s" |tee -a $OUT

echo $uhf > .UHF
echo $chrg > .CHRG
echo "$uhf" > .UHF
echo "$chrg" > .CHRG

rm -rf enso* CONF*

Expand Down Expand Up @@ -270,6 +273,9 @@ if [ "$mode" != "" ]; then # run block (else just print)
echo -e "#>>># Running full crest_combi in $m" >> $OUT
if [ "$run" = "nmr" ]; then
time crest_combi -s $s -ewin $ec -T $T -nmr >> $OUT
elif [ "$run" = "or" ]; then
# increases number of clusters in crest_combi
time crest_combi -s $s -ewin $ec -T $T -or >> $OUT
else
time crest_combi -s $s -ewin $ec -T $T >> $OUT
fi
Expand Down Expand Up @@ -328,7 +334,45 @@ if [ "$mode" != "" ]; then # run block (else just print)
echo -e "#>>># CENSO: All done!"
echo -e "\n#>>># CENSO: All done!" >> $OUT
fi
cd ..
################################################################################
if [ "$mode" = "3" ]; then
# MODE3 = CREST_COMBI + CENSO with optimization (NO gESC)
############## full crest_combi GFN2 + DFT opt #############
echo -e "#>>># Running full crest_combi in $m in MODE 3 (no gESC)"
echo -e "#>>># Running full crest_combi in $m in MODE 3 (no gESC)" >> $OUT
if [ "$run" = "nmr" ]; then
time crest_combi -s $s -ewin $ec -T $T -nmr >> $OUT
else
time crest_combi -s $s -ewin $ec -T $T >> $OUT
fi
rm -rf enso* CONF*
echo -e "#>>># Running CENSO after full crest_combi in $m "
echo -e "\n#>>># Running CENSO after full crest_combi in $m \n" >> $OUT
PARAMS3=(
-solvent $s
-chrg $chrg
-u $uhf
-inp crest_combi.xyz
-part0 on
-part0_threshold $ep0
-part1 on
-part1_threshold $ep1
-part2 on
-optlevel2 $olev
-part3 $p3
-part4 $nmr
-OR $or
-inprc $censorc
-P $P
-O $O
-progress $progress
)
time censo "${PARAMS3[@]}" >> $OUT
echo -e "#>>># CENSO: All done!"
echo -e "\n#>>># CENSO: All done!" >> $OUT
fi
################################################################################
cd $startdir
done
fi # run block

Expand Down
Loading

0 comments on commit 7a0eab5

Please sign in to comment.