Skip to content

Commit

Permalink
cleaned up remaining bare excepts
Browse files Browse the repository at this point in the history
  • Loading branch information
mcocdawc committed Nov 21, 2024
1 parent 471d9e8 commit 5307ba1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/kbe/lo_k.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get_pao_native_k(Ciao, S, mol, valence_basis, kpts, ortho=True):
if ortho:
try:
Cpao[k] = symm_orth_k(cpao_, ovlp=S[k])
except:
except ValueError:
print("Symm orth PAO failed. Switch to cano orth", flush=True)
npao0 = cpao_.shape[1]
Cpao[k] = cano_orth(cpao_, ovlp=S[k])
Expand Down
2 changes: 1 addition & 1 deletion src/molbe/lo.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def get_pao_native(Ciao, S, mol, valence_basis):

try:
Cpao = symm_orth(Cpao, ovlp=S)
except:
except ValueError:
print("Symm orth PAO failed. Switch to cano orth", flush=True)
npao0 = Cpao.shape[1]
Cpao = cano_orth(Cpao, ovlp=S)
Expand Down
3 changes: 2 additions & 1 deletion src/molbe/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,8 @@ def ao2mofn(moish):
)
try:
return ao2mo.incore.general(Vos, moish, compact=False)
except:
except NotImplementedError:
# ao2mo.incore.general is not implemented for complex numbers
return numpy.einsum(
"ijkl,ip,jq,kr,ls->pqrs",
Vos,
Expand Down

0 comments on commit 5307ba1

Please sign in to comment.