Skip to content

Commit

Permalink
Fix LZ interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Hollas committed Dec 12, 2023
1 parent bc648bc commit 680685d
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions interfaces/BAGEL-LZ/r.bagel-lz
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ geom="../geom.dat.$ibead"
# Number of states
read -r -t 2 nstate
# Which state do we compute the gradient for?
read -r -t 2 -a tocalc
read -r -t 2 target_state
# ABIN counts from 1, BAGEL from 0
(( target_state-- ))

# Number of singlet states
read -r -t 2 nstate_singlet
# This interface only support singlet manifold, no S-T crossing
if [[ $nstate -ne $nstate_singlet ]];then
>&2 echo "ERROR: This BAGEL interface does not support triplets!"
exit 2
fi

thresh_CASSCF="1.0e-8"
thresh_CASPT2="1.0e-8"
Expand All @@ -39,19 +49,6 @@ ORBITAL_FILE=orbitals
file_exists "$geom"
rm -f "../engrad.dat.$ibead" ../nacm.dat ENERGY.out FORCE_*

# Determine for which state we need to calculate forces
for ((ist=0; ist<nstate; ist++))
do
if [[ ${tocalc[$ist]} -eq 1 ]]; then
if [[ -z ${target_state-} ]]; then
target_state=$ist
else
>&2 echo "ERROR: Invalid tocalc, cannot compute gradient for more than one state"
exit 2
fi
fi
done

### GENERATE BAGEL INPUT
function generate_input {
local input=$1
Expand Down

0 comments on commit 680685d

Please sign in to comment.