Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhcui authored and sunqm committed Jan 3, 2024
1 parent 558d443 commit 50deefb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pyscf/pbc/df/df_jk.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,15 @@ def get_k_kpts(mydf, dm_kpts, hermi=1, kpts=numpy.zeros((1,3)), kpts_band=None,
skmoR = skmo2R = None
if not mydf.force_dm_kbuild:
if mo_coeff is not None:
if isinstance(mo_coeff[0], (list, tuple)) or \
isinstance(mo_coeff[0], numpy.ndarray and mo_coeff[0] == 3):
if isinstance(mo_coeff[0], (list, tuple)) or (isinstance(mo_coeff[0], numpy.ndarray)
and mo_coeff[0] == 3):
mo_coeff = [mo for mo1 in mo_coeff for mo in mo1]
if len(mo_coeff) != nset*nkpts: # wrong shape
log.warn('mo_coeff from dm tag has wrong shape. '
'Calculating mo from dm instead.')
mo_coeff = None
elif isinstance(mo_occ[0], (list, tuple)) or \
isinstance(mo_occ[0], numpy.ndarray and mo_occ[0] == 2):
elif isinstance(mo_occ[0], (list, tuple)) or (isinstance(mo_occ[0], numpy.ndarray)
and mo_occ[0] == 2):
mo_occ = [mo for mo1 in mo_occ for mo in mo1]
if mo_coeff is not None:
skmoR, skmoI = _format_mo(mo_coeff, mo_occ, shape=(nset,nkpts), order='F',
Expand Down Expand Up @@ -706,15 +706,15 @@ def get_k_kpts_kshift(mydf, dm_kpts, kshift, hermi=0, kpts=numpy.zeros((1,3)), k
skmoR = skmo2R = None
if not mydf.force_dm_kbuild:
if mo_coeff is not None:
if isinstance(mo_coeff[0], (list, tuple)) or \
isinstance(mo_coeff[0], numpy.ndarray and mo_coeff[0] == 3):
if isinstance(mo_coeff[0], (list, tuple)) or (isinstance(mo_coeff[0], numpy.ndarray)
and mo_coeff[0] == 3):
mo_coeff = [mo for mo1 in mo_coeff for mo in mo1]
if len(mo_coeff) != nset*nkpts: # wrong shape
log.warn('mo_coeff from dm tag has wrong shape. '
'Calculating mo from dm instead.')
mo_coeff = None
elif isinstance(mo_occ[0], (list, tuple)) or \
isinstance(mo_occ[0], numpy.ndarray and mo_occ[0] == 2):
elif isinstance(mo_occ[0], (list, tuple)) or (isinstance(mo_occ[0], numpy.ndarray)
and mo_occ[0] == 2):
mo_occ = [mo for mo1 in mo_occ for mo in mo1]
if mo_coeff is not None:
skmoR, skmoI = _format_mo(mo_coeff, mo_occ, shape=(nset,nkpts), order='F',
Expand Down

0 comments on commit 50deefb

Please sign in to comment.