Skip to content

Commit

Permalink
Set default LASSIS ncharge, nspin = 's'
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewRHermes committed Oct 30, 2023
1 parent 853a33d commit f739ceb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion my_pyscf/lassi/lassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions tests/lassi/test_c2h4n4.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f739ceb

Please sign in to comment.