diff --git a/src/casci.f90 b/src/casci.f90 index c1df266..25e2da2 100644 --- a/src/casci.f90 +++ b/src/casci.f90 @@ -137,6 +137,9 @@ SUBROUTINE casci key = 'nroot' write (unit_cidata) key write (unit_cidata) nroot + key = 'totsym' + write (unit_cidata) key + write (unit_cidata) totsym key = 'ecas' write (unit_cidata) key write (unit_cidata) ecas(1:nroot) diff --git a/src/read_cidata.f90 b/src/read_cidata.f90 index bd9515b..49cc865 100644 --- a/src/read_cidata.f90 +++ b/src/read_cidata.f90 @@ -12,7 +12,7 @@ subroutine read_cidata character(len=len_convert_int_to_chr) :: chr_totsym character(:), allocatable :: filename integer :: unit, i, dict_cas_idx_size - integer :: ninact_read, nact_read, nsec_read, nelec_read, nroot_read + integer :: ninact_read, nact_read, nsec_read, nelec_read, nroot_read, totsym_read integer(kind=int64), allocatable :: dict_cas_idx_values(:) real(8), allocatable :: ecas(:) @@ -23,6 +23,7 @@ subroutine read_cidata call add_essential_input("nelec") call add_essential_input("ndet") call add_essential_input("nroot") + call add_essential_input("totsym") call add_essential_input("ecas") call add_essential_input("dict_cas_idx_values") call add_essential_input("ci_coefficients") @@ -84,6 +85,14 @@ subroutine read_cidata call stop_with_errorcode(1) end if call update_esesential_input(trim(adjustl(key)), .true.) + case ("totsym") + read (unit) totsym_read + if (totsym_read /= totsym) then + if (rank == 0) print *, "Error: Invalid totsym in cidata file. totsym in cidata = ", totsym_read, & + " totsym = ", totsym + call stop_with_errorcode(1) + end if + call update_esesential_input(trim(adjustl(key)), .true.) case ("ecas") if (.not. essential_input_is_specified("nroot")) then if (rank == 0) print *, "Error: ecas detected before nroot."