Skip to content

Commit

Permalink
re-add extended (xt) PES search option (#7)
Browse files Browse the repository at this point in the history
* print xtb, crest and censo version
* extended search option and output cleanup
  • Loading branch information
fabothch committed Aug 9, 2021
1 parent 17fd469 commit 63adeb0
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 20 deletions.
58 changes: 42 additions & 16 deletions crenso
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

echo ' '
echo ' =================================================='
echo ' == crenso V 1.0.4, SG, FB Feb 2021, MCTC UBonn =='
echo ' == crenso V 1.0.5, SG, FB Feb 2021, MCTC UBonn =='
echo ' =================================================='
echo ""

# V 1.0.1 Sun Jan 31 23:37:16 CET 2021 -kow/oa_fine flag added, part3 on
# V 1.0.2 We Feb 10 12:04:11 CET 2021 -nmr, -help, -P, -O flags added
# V 1.0.3 Mo Feb 22 15:22:35 CET 2021 added printout
# V 1.0.4 Mo Jul 05 11:04:10 CET 2021 added vapor pressure option
# V 1.0.5 Mo Aug 09 15:41:23 CET 2021 added extended PES search again

mode=""
argcheck=y
Expand All @@ -26,6 +27,7 @@ printhelp=off
progress=on
change_solvent="off"
vp="off"
xt_search="off"
while [ "$argcheck" = "y" ]; do
if [ -n "$1" ]; then
case $1 in
Expand Down Expand Up @@ -57,9 +59,10 @@ while [ "$argcheck" = "y" ]; do
"-inprc" ) shift; censorc=$1 ;; # explicit path to censorc
"-vp" ) shift; s1_alpb=$1; shift; s1_eps=$1; shift; s1_dcosmors=$1; s1='same'; s2=gas; run="vaporpressure"; vp="on"; ec=6; ep0=3; ep1=2.0; olev=lax; p3=off; p1=on ;; # calculate vapor pressure
"-vp_fine") shift; s1_alpb=$1; shift; s1_eps=$1; shift; s1_dcosmors=$1; s1='same'; s2=gas; run="vaporpressure"; vp="on"; ec=6; ep0=3; ep1=2.0; olev=lax; p3=on; p1=on ;; # calculate vapor pressure
"-temperature") shift; temperature=$1 ;;
"-h" ) printhelp=on;;
"--help" ) printhelp=on;;
"-temperature") shift; temperature=$1 ;;
"-xt" ) xt_search="on" ;;
"-h" ) printhelp="on";;
"--help" ) printhelp="on";;
esac
shift
else
Expand Down Expand Up @@ -98,6 +101,7 @@ if [ $printhelp == on ];then
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 "-xt = Perform crest_combi with the extended FF and GFN2 PES search"
echo "-h = print help message"
echo ""
echo "General information:"
Expand Down Expand Up @@ -224,11 +228,9 @@ if [ "$mode" != "" ]; then # run block (else just print)
#echo "system " $m ":" $chrg $uhf $s
if [ "$m" == "B" ] && [ "$run" == "or" ]; then
echo -e "\n#>>># CRENSO: All done!"
echo -e "\n#>>># CRENSO: All done!" >> $OUT
exit
elif [ "$m" == "B" ] && [ "$run" == "nmr" ]; then
echo -e "\n#>>># CRENSO: All done!"
echo -e "\n#>>># CRENSO: All done!" >> $OUT
exit
fi

Expand Down Expand Up @@ -354,22 +356,33 @@ if [ "$mode" != "" ]; then # run block (else just print)
echo -e "#>>># CENSO: All done!"
echo -e "\n#>>># CENSO: All done!" >> $OUT
fi
if [ "$mode" == "2" ]; then
if [ "$mode" == "2" ]; then
############## full crest_combi GESC GFN2 + DFT opt #############
echo -e "#>>># Running full crest_combi in $m"
echo -e "#>>># Running full crest_combi in $m" >> $OUT
if [ "$run" == "vaporpressure" ] && [ "$s" != "gas" ]; then
s=$s1_alpb
change_solvent="on"
fi
#----------------------------------------------------------------------
PARAMS2crest=(
-s "$s"
-ewin "$ec"
-T "$T"
)
if [ "$run" = "nmr" ]; then
time crest_combi -s "$s" -ewin "$ec" -T "$T" -nmr >> $OUT
# create anmr_nucinfo anmr_rotamers
PARAMS2crest+=("-nmr")
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
PARAMS2crest+=("-or")
fi
if [ "$xt_search" == "on" ]; then
# search with FF + GFN2
PARAMS2crest+=("-xt")
fi
time crest_combi "${PARAMS2crest[@]}" >> $OUT
#----------------------------------------------------------------------
echo -e "#>>># Running CENSO after full crest_combi in $m "
echo -e "\n#>>># Running CENSO after full crest_combi in $m \n" >> $OUT
if [ "$run" == "vaporpressure" ] && [ "$change_solvent" == "on" ]; then
Expand Down Expand Up @@ -408,7 +421,7 @@ if [ "$mode" != "" ]; then # run block (else just print)
change_solvent="on"
fi
time crest -gesc+ enso_ensemble_part1.xyz -gescopt loose -alpb "$s" -nocross -norotmd -mdlen x1.0 -ewin "$ep0" -T "$T" >> "$OUT"
crest -for crest_conformers.xyz --cluster tightincr -T "$T" >> $OUT
crest -for crest_conformers.xyz --cluster tightincr -T "$T" >> $OUT
rm -rf enso* CONF*
echo -e "#>>># Running CENSO after CREST[gESC] search in $m"
echo -e "\n#>>># Running CENSO after CREST[gESC] search in $m \n" >> $OUT
Expand Down Expand Up @@ -451,11 +464,25 @@ if [ "$mode" != "" ]; then # run block (else just print)
s=$s1_alpb
change_solvent="on"
fi
#----------------------------------------------------------------------
PARAMS3crest=(
-s "$s"
-ewin "$ec"
-T "$T"
)
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
# create anmr_nucinfo anmr_rotamers
PARAMS3crest+=("-nmr")
elif [ "$run" = "or" ]; then
# increases number of clusters in crest_combi
PARAMS3crest+=("-or")
fi
if [ "$xt_search" == "on" ]; then
# search with FF + GFN2
PARAMS2crest+=("-xt")
fi
time crest_combi "${PARAMS3crest[@]}" >> $OUT
#----------------------------------------------------------------------
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
Expand Down Expand Up @@ -525,7 +552,6 @@ if [ "$run" == "vaporpressure" ]; then
done
echo "===================================================="
echo -e "\n#>>># CRENSO: All done!"
echo -e "\n#>>># CRENSO: All done!" >> $OUT
exit
fi

Expand Down
23 changes: 19 additions & 4 deletions crest_combi
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

echo ' '
echo ' ========================================================'
echo ' == crest_combi V 1.0.3, SG/PP/FB Feb 2021, MCTC UBonn =='
echo ' == crest_combi V 1.0.4, SG/PP/FB Feb 2021, MCTC UBonn =='
echo ' ========================================================'

#defaults
Expand Down Expand Up @@ -50,11 +50,11 @@ while [ "$argcheck" = "y" ]; do
"-solvent" ) shift; solv=$1 ;;
"-g" ) shift; solv=$1 ;;
"-ewin" ) shift; ewin=$1 ;;
"-ffonly" ) mode="ff" ;;
"-xt" ) mode="" ;; #xt = extended search with FF + GFN2 PES search
"-T" ) shift; threads=$1 ;;
"-threads" ) shift; threads=$1 ;;
"-nmr" ) nmr="-nmr" ;;
"-or") nclust="2000";;
"-or") nclust="1000";;
"-h" ) printhelp="on";;
"--help" ) printhelp="on";;
esac
Expand All @@ -73,7 +73,7 @@ if [ "$printhelp" == "on" ];then
echo "-g = solvent e.g. h2o or chcl3, equivalent to -s or -solvent"
echo "-solvent = solvent e.g. h2o or chcl3, equivalent to -g or -s"
echo "-ewin = Energy window within which all structures are considered"
echo "-ffonly = Perform the search with GFN-FF only and don't use a subsequent GFN2 search"
echo "-xt = Perform the PES search with GFN-FF and with GFN2"
echo "-T = number of threads used in CREST, equivalent to -threads"
echo "-nmr = create anmr_nucinfo and anmr_rotamer file for subsequent NMR calculation"
echo "-h = print help message"
Expand All @@ -97,6 +97,21 @@ fi
ewin2=$((ewin+4)) # ewin for intermediate FF run re-ranking with GFN2
ewin3=$((ewin-2)) # ewin for last GFN2 search (if mode="")

echo ""
echo "*****************************************"
echo "CREST energy window : $ewin kcal/mol"
echo "ewin for FF reranking : $ewin2 kcal/mol"
echo "applied solvent : $solv"
if [ "$mode" == "" ]; then
echo "search method : FF + GFN2 "
echo "ewin for last GFN2 search: $ewin3"
else
echo "search method : $mode"
fi
echo "nclust : $nclust"
echo "*****************************************"


#########################
#search on FF level
#########################
Expand Down

0 comments on commit 63adeb0

Please sign in to comment.