#!/bin/sh export NSCM=1 report=report.txt STRUCTDIR=$AMSHOME/examples/Hybrid/PeriodicCapping/systems # ensure that not a comma is used for decimals in the printf function LC_NUMERIC=en_US.UTF-8 export AMS_JOBNAME=reference rm -rf $AMS_JOBNAME.results $AMSBIN/ams< $report printf "\nThe system can be cut in several variations into a a QM and an MM part breaking a B-N bond\n" >>$report printf "\n%15s %20s\n" "variation" "QM atoms" >>$report printf "%15s %20s\n" "var1" "B(1),H(2)" >>$report printf "%15s %20s\n" "var2" "B(5),H(6)" >>$report printf "%15s %20s\n" "var3" "N(3),H(4)" >>$report printf "%15s %20s\n" "var4" "N(7),H(8)" >>$report printf "%15s %20s\n" "var5" "B(1),H(2),N(3),H(4)" >>$report printf "%15s %20s\n" "var6" "B(5),H(6),N(7),H(8)" >>$report printf "\nVariation one is equivalent to variation two, and variation 3 should be equivalent with variation 4\n" >>$report printf "\nVariation five is equivalent to variation six\n" >>$report export AMS_JOBNAME=cheap rm -rf $AMS_JOBNAME.results $AMSBIN/ams<> $report printf "%10s %10s %10s\n" "distance" "qm" "mm" >> $report printf "%10s %10.3f %10.3f\n" "B(1)-H(2)" $aaa1qm $aaa1mm >> $report printf "%10s %10.3f %10.3f\n" "B(5)-H(6)" $aaa2qm $aaa2mm >> $report printf "%10s %10.3f %10.3f\n" "N(3)-H(4)" $bbb1qm $bbb1mm >> $report printf "%10s %10.3f %10.3f\n" "N(7)-H(8)" $bbb2qm $bbb2mm >> $report printf "%10s %10.3f %10.3f\n" "B(1)-N(3)" $ccc1qm $ccc1mm >> $report printf "%10s %10.3f %10.3f\n" "B(5)-N(7)" $ccc2qm $ccc2mm >> $report printf "\nNow we try the hybrid engine with several variations for the QM region\n" >> $report printf "\nTwo capping methods are tried as well.\n" >>$report printf "\n%15s %15s %15s %15s %15s %15s %15s %15s %15s\n" "variation" "capping" "energy" "B(1)-H(2)" "B(5)-H(6)" "N(3)-H(4)" "N(7)-H(8)" "B(1)-N(3)" "B(5)-N(7)" >> $report for system in var1 var2 var3 var4 var5 var6 do # This calc in only needed to start from a reasonable guess export AMS_JOBNAME=$system.cheap rm -rf $AMS_JOBNAME.results $AMSBIN/ams<> $report done done done printf "\nHere are some observations\n" >>$report printf " * generally the fixed capping seems a bit better\n" >>$report printf "\nHere are some remarks\n" >>$report printf " * Starting from the initial very bad structure the fixed capping fails completely for variant 5 and 6\n" >>$report printf " (not if you use as qm engine band and as mm engine dftb)\n" >>$report printf " * A reasonable starting geometry can avoid strange collapses\n" >>$report printf " * The more the two engines disagree about the capped QM region, the stronger the capping forces\n" >>$report echo "begin report" cat $report echo "end report"