From 680685df6a84452d4e225731fa2d96108bd84394 Mon Sep 17 00:00:00 2001 From: Daniel Hollas Date: Tue, 12 Dec 2023 18:12:41 +0000 Subject: [PATCH] Fix LZ interface --- interfaces/BAGEL-LZ/r.bagel-lz | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/interfaces/BAGEL-LZ/r.bagel-lz b/interfaces/BAGEL-LZ/r.bagel-lz index f72c77b0..a0c1bb23 100755 --- a/interfaces/BAGEL-LZ/r.bagel-lz +++ b/interfaces/BAGEL-LZ/r.bagel-lz @@ -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" @@ -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&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