Skip to content

Commit

Permalink
Update Mole.loads method for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Nov 10, 2023
1 parent 14d8882 commit a525c0c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyscf/gto/mole.py
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,10 @@ def loads(molstr):
mol.atom = eval(mol.atom)
mol.basis= eval(mol.basis)
mol.ecp = eval(mol.ecp)
mol.pseudo = eval(mol.pseudo)
if 'pseudo' in moldic:
# backward compatibility with old dumps function, which does not have
# the pseudo attribute
mol.pseudo = eval(mol.pseudo)
mol._atm = numpy.array(mol._atm, dtype=numpy.int32)
mol._bas = numpy.array(mol._bas, dtype=numpy.int32)
mol._env = numpy.array(mol._env, dtype=numpy.double)
Expand Down

0 comments on commit a525c0c

Please sign in to comment.