Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/MatthewRHermes/mrh into vala…
Browse files Browse the repository at this point in the history
…y_gpu
  • Loading branch information
cjknight committed Nov 12, 2024
2 parents a778faf + 01c24c4 commit 121a98c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
2 changes: 0 additions & 2 deletions my_pyscf/fci/csdstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ def csdaddrs2csdstrs (norb, neleca, nelecb, csdaddrs):
if len (idx) == 1:
if not idx[0]:
continue
else:
idx = 0
try:
dconf_addr = (csdaddrs[idx] - offset) // (sconf_size * spins_size)
except:
Expand Down
6 changes: 3 additions & 3 deletions my_pyscf/fci/csfstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ def _transform_det2csf (inparr, norb, neleca, nelecb, smult, reverse=False, csd_
ndet_all = ndeta_all * ndetb_all
ncsf_all = count_all_csfs (norb, neleca, nelecb, smult)

ncol_out = (ncsf_all, ndet_all)[reverse or project]
ncol_in = (ncsf_all, ndet_all)[~reverse or project]
ncol_out = ndet_all if (reverse or project) else ncsf_all
ncol_in = ndet_all if ((not reverse) or project) else ncsf_all
if not project:
outarr = np.ascontiguousarray (np.zeros ((nrow, ncol_out), dtype=np.float64))
csf_addrs = np.zeros (ncsf_all, dtype=np.bool_)
Expand Down Expand Up @@ -1096,7 +1096,7 @@ def unpack_csfaddrs (norb, neleca, nelecb, smult, addrs):
npair[ix] = np.where (npair_csf_offset <= iaddr)[0][-1]
sconf_size = npair_sconf_size[npair[ix]]
spincpl_size = npair_spincpl_size[npair[ix]]
iad = iaddr - npair_csf_offset[npair[ix]]
iad = np.squeeze (iaddr - npair_csf_offset[npair[ix]])
npair[ix] += min_npair
domo_addrs[ix] = iad // (sconf_size * spincpl_size)
iad = iad % (sconf_size * spincpl_size)
Expand Down
4 changes: 2 additions & 2 deletions my_pyscf/mcscf/productstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# TODO: linkstr support
class ProductStateFCISolver (StateAverageNMixFCISolver, lib.StreamObject):
'''Minimize the energy of a wave function of the form
r'''Minimize the energy of a wave function of the form
|Psi> = A \prod_K |ci_K>
Expand Down Expand Up @@ -332,7 +332,7 @@ def state_average_fcisolver (solver, weights=(.5,.5), wfnsym=None):
return state_average_mcscf (dummy, weights=weights, wfnsym=wfnsym).fcisolver

class ImpureProductStateFCISolver (ProductStateFCISolver):
'''Minimize the energy of an impure state:
r'''Minimize the energy of an impure state:
E = \sum_n1 w_n1 \sum_n2 w_n2 \sum_n3 w_n3 ... <n1n2n3...|H|n1n2n3...>
Expand Down
2 changes: 1 addition & 1 deletion pyscf-forge_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
git+https://github.com/pyscf/pyscf-forge.git@be401a8361ba1406e5ef906161fca251a9b742a3
git+https://github.com/pyscf/pyscf-forge.git@77a6d7e7b3ff9dc498fae5d94bb82ff1d6312aef
2 changes: 1 addition & 1 deletion pyscf_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
git+https://github.com/pyscf/pyscf.git@410d9608a73ad3a507b3008a6f68549288ebfc33
git+https://github.com/pyscf/pyscf.git@2c7f7625fd2719b8f3e9715e40c3937cab65c06e
2 changes: 1 addition & 1 deletion tests/lassi/test_c2h4n4.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_lassis_slow (self):
with self.subTest (opt=opt):
lsis = LASSIS (las1).run (opt=opt)
self.assertTrue (lsis.converged)
self.assertAlmostEqual (lsis.e_roots[0], -295.5210783894406, 7)
self.assertAlmostEqual (lsis.e_roots[0], -295.5211528768355, 7)
case_lassis_fbf_2_model_state (self, lsis)
case_lassis_fbfdm (self, lsis)
with self.subTest ('as_scanner'):
Expand Down
2 changes: 1 addition & 1 deletion tests/lassi/test_lassis_targets_slow.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_c2h4n4_2frag (self):
self.assertTrue (lsi.converged)
# test
de = 1000 * (e_str - e_equil)
self.assertAlmostEqual (de, 191.185141573740, 1)
self.assertAlmostEqual (de, 191.06467851275966, 1)

def test_kremer_cr2_model (self):
xyz='''Cr -1.320780000000 0.000050000000 -0.000070000000
Expand Down

0 comments on commit 121a98c

Please sign in to comment.