From 50deefb3cc40ff85e6e27b0da277ee6aa6bb92ad Mon Sep 17 00:00:00 2001 From: Zhihao Cui Date: Fri, 22 Dec 2023 22:51:23 -0500 Subject: [PATCH] fix indentation --- pyscf/pbc/df/df_jk.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pyscf/pbc/df/df_jk.py b/pyscf/pbc/df/df_jk.py index 068d4b6526..d5c2a337f1 100644 --- a/pyscf/pbc/df/df_jk.py +++ b/pyscf/pbc/df/df_jk.py @@ -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', @@ -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',