Skip to content

Commit 3dc2ed8

Browse files
Set default MSPDFT to L-PDFT (#138) (#142)
* Add "simple usage" card to top of mcpdft * Set default multi-state MC-PDFT to L-PDFT * Fix CMS-PDFT PDM unittest
1 parent 3f1d3c4 commit 3dc2ed8

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

pyscf/mcpdft/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@
1414
# limitations under the License.
1515
#
1616
# Lahh dee dah
17+
'''
18+
Multi-configuration pair-density functional theory
19+
==================================================
20+
21+
Simple usage::
22+
23+
>>> from pyscf import gto, scf, mcpdft
24+
>>> mol = gto.M(atom='N 0 0 0; N 0 0 1', basis='def2-tzvp')
25+
>>> mf = scf.RHF(mol).run ()
26+
>>> mc = mcpdft.CASSCF (mf, 'tPBE', 6, 6)
27+
>>> mc.run()
28+
'''
29+
30+
1731
import copy
1832
from pyscf.mcpdft.mcpdft import get_mcpdft_child_class
1933
from pyscf.mcpdft.otfnal import make_hybrid_fnal as hyb

pyscf/mcpdft/mcpdft.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,15 +764,15 @@ def state_average_mix_(self, fcisolvers=None, weights=(0.5, 0.5)):
764764
state_average_mix_(self, fcisolvers, weights)
765765
return self
766766

767-
def multi_state_mix(self, fcisolvers=None, weights=(0.5, 0.5), method='CMS'):
767+
def multi_state_mix(self, fcisolvers=None, weights=(0.5, 0.5), method='LIN'):
768768
if method.upper() == "LIN":
769769
from pyscf.mcpdft.lpdft import linear_multi_state_mix
770770
return linear_multi_state_mix(self, fcisolvers=fcisolvers, weights=weights)
771771

772772
else:
773773
raise NotImplementedError(f"StateAverageMix not available for {method}")
774774

775-
def multi_state(self, weights=(0.5, 0.5), method='CMS'):
775+
def multi_state(self, weights=(0.5, 0.5), method='LIN'):
776776
if method.upper() == "LIN":
777777
from pyscf.mcpdft.lpdft import linear_multi_state
778778
return linear_multi_state(self, weights=weights)

pyscf/prop/dip_moment/test/test_cmspdft_pdm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def get_h2o(mol,iroots=3):
4747
#mc.fcisolver = csf_solver(mol, smult=1, symm='A1')
4848
fix_spin_(mc.fcisolver, ss=0)
4949
mc.fcisolver.wfnsym = 'A1'
50-
mc = mc.multi_state(weights)
50+
mc = mc.multi_state(weights, 'cms')
5151
mo = mcscf.sort_mo(mc, mf.mo_coeff, [4,5,8,9])
5252
mc.conv_tol = 1e-11
5353
mc.kernel(mo)

0 commit comments

Comments
 (0)