From f739ceb675c046b02d87696cfe5b20dce340da0f Mon Sep 17 00:00:00 2001 From: Matthew R Hermes Date: Mon, 30 Oct 2023 13:02:00 -0500 Subject: [PATCH] Set default LASSIS ncharge, nspin = 's' --- my_pyscf/lassi/lassis.py | 2 +- tests/lassi/test_c2h4n4.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/my_pyscf/lassi/lassis.py b/my_pyscf/lassi/lassis.py index c106bec9..7ea1d6a8 100644 --- a/my_pyscf/lassi/lassis.py +++ b/my_pyscf/lassi/lassis.py @@ -294,7 +294,7 @@ def charge_excitation_products (las2, las1): raise NotImplementedError (">3-frag LASSIS") class LASSIS (LASSI): - def __init__(self, las, ncharge=1, nspin=0, sa_heff=True, deactivate_vrv=False, + def __init__(self, las, ncharge='s', nspin='s', sa_heff=True, deactivate_vrv=False, crash_locmin=False, **kwargs): self.ncharge = ncharge self.nspin = nspin diff --git a/tests/lassi/test_c2h4n4.py b/tests/lassi/test_c2h4n4.py index 79878958..9bb7581d 100644 --- a/tests/lassi/test_c2h4n4.py +++ b/tests/lassi/test_c2h4n4.py @@ -160,8 +160,11 @@ def test_spin_shuffle (self): def test_lassis (self): # TODO: investigate here if the VRVSolver is actually doing anything from mrh.my_pyscf.lassi.lassis import LASSIS - lsis = LASSIS (las).run (max_cycle_macro=1) - self.assertLess (lsis.e_roots[0], las.e_states[0]) + las1 = LASSCF (las._scf, (4,4), (4,4), spin_sub=(1,1)) + las1.mo_coeff = las.mo_coeff + las1.lasci () + lsis = LASSIS (las1).run (max_cycle_macro=1) + self.assertLess (lsis.e_roots[0], las1.e_states[0]) if __name__ == "__main__": print("Full Tests for SA-LASSI of c2h4n4 molecule")