Skip to content

Commit 1325e9c

Browse files
committed
Fix issues in pv
1 parent d50c61a commit 1325e9c

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎pyscf/pv/energy.py‎

100755100644
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
'''
2020

2121
import numpy
22+
23+
from pyscf import gto, lib
2224
from pyscf.scf import dhf
23-
from pyscf import lib, gto
2425

2526

2627
def fc_integrals(mol, mf, atom, **kwargs):
@@ -97,7 +98,6 @@ def gamma5_fc_integrals(mol, mf, atom, **kwargs):
9798
atom_index = 0
9899
fc_matrix = PV_integrals(mol, mf, atom_index)
99100
"""
100-
c = lib.param.LIGHT_SPEED
101101
n4c = mf.mo_coeff.shape[0]
102102
n2c = n4c // 2
103103

@@ -374,12 +374,8 @@ def Epv_molecule(mol, mf, dm=None):
374374
nNeg = nmo // 2
375375
nmo_pos = nmo - nNeg
376376

377-
# AO density
378-
if dm.shape[0] == n4c:
379-
ncol = nmo_pos
380-
381-
# MO density
382-
elif dm.shape[0] == nmo_pos:
377+
# AO or MO density
378+
if dm.shape[0] == n4c or dm.shape[0] == nmo_pos:
383379
ncol = nmo_pos
384380

385381
else:

0 commit comments

Comments
 (0)