Skip to content

Commit aa95dd6

Browse files
authored
Merge pull request #264 from ktwalsh/devel
Finished incorporating new single excitation specific functions to mopac workflow
2 parents d7912d7 + b15c458 commit aa95dd6

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/libra_py/packages/mopac/methods.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def mopac_compute_adi(q, params, full_id):
488488
* **params[i]["CAS"]** (list of of ints, int): the list represents the indices of spatial orbitals used in CAS definition in INDO-CI
489489
calculations, absoluted values; the "int" represents the number of electrons in the active space. For example, if the HOMO is 8
490490
and and CAS was (6, 3) - 6 orbitals with 3 doubly-filled orbitals, then one would use: [ [6,7,8, 9, 10, 11], 6]
491-
491+
* **params[i]["is_single_excitation"]** ( bool or int): 0 - consider full configuration space, 1 - use single excitation specific methods
492492
Returns:
493493
PyObject: obj, with the members:
494494
@@ -541,7 +541,7 @@ def mopac_compute_adi(q, params, full_id):
541541
CAS = params[itraj]["CAS"]
542542
mult_S = params[itraj]["mult_S"]
543543
mult_Ms = params[itraj]["mult_Ms"]
544-
544+
is_single_excitation = params[itraj]["is_single_excitation"]
545545
natoms = len(labels)
546546
ndof = 3 * natoms
547547

@@ -559,12 +559,16 @@ def mopac_compute_adi(q, params, full_id):
559559
"orbital_space":orbital_space,
560560
"nstates":nstates
561561
})
562-
563-
configs_curr, CSF_coeff_curr = interfaces.configs_and_T_matrix(configs_raw_curr,
562+
if is_single_excitation:
563+
configs_curr, CSF_coeff_curr = interfaces.configs_and_T_matrix_singlet(configs_raw_curr,
564+
active_space=CAS[0],
565+
orbital_space = actual_orbital_space,
566+
nelec=CAS[1], S=mult_S, Ms=mult_Ms)
567+
else:
568+
configs_curr, CSF_coeff_curr = interfaces.configs_and_T_matrix(configs_raw_curr,
564569
active_space=CAS[0],
565570
orbital_space = actual_orbital_space,
566571
nelec=CAS[1], S=mult_S, Ms=mult_Ms)
567-
568572
# Get the properties at the previous time-step
569573
E_prev, MO_prev, E_CI_prev, CI_prev, configs_prev, configs_raw_prev = None, None, None, None, None, None
570574
CSF_coeff_prev = None

0 commit comments

Comments
 (0)