You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation, I think this should work:
import pyscf
import pyscf.mcscf as mcscf
import numpy as np
import h5py
if __name__=="__main__":
mol = pyscf.gto.Mole(atom="C 0. 0. 0.; O 0. 0. 1.2171071",
ecp='ccecp',
basis='ccecpccpvtz')
mf = pyscf.scf.RHF(mol)
mf.chkfile = 'mf.chk'
mf.kernel()
print(mf.mo_energy)
print(mf.mo_occ)
mc = mcscf.CASSCF(mf, 6,6)
mc.chkfile = 'cas.chk'
mc.kernel()
with h5py.File(mc.chkfile, "a") as f:
f["mcscf/nelecas"] = list(mc.nelecas)
f["mcscf/ci"] = mc.ci
import pyqmc.api as pyq
mol, mf, mc = pyq.recover_pyscf('mf.chk',ci_checkfile='cas.chk')
However, I get an error as follows:
Traceback (most recent call last):
File "/projects/wagner/lkwagner/co_newopt/opt_3state.py", line 53, in <module>
run_optimization(nstates=nstates, nconfig=nconfig,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/projects/wagner/lkwagner/co_newopt/opt_3state.py", line 14, in run_optimization
mol, mf, mc = pyq.recover_pyscf('mf.chk',ci_checkfile='cas.chk')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lkwagner/pyqmc/pyqmc/pyscftools.py", line 73, in recover_pyscf
mc = pyscf.mcscf.CASCI(mol, casdict["ncas"], casdict["nelecas"])
~~~~~~~^^^^^^^^
The text was updated successfully, but these errors were encountered:
hmm, I think that there was some cruft left in some of the files; I don't get the same error when rerunning it. Is there some issue with it looking in the mf versus cas check file?
According to the documentation, I think this should work:
However, I get an error as follows:
The text was updated successfully, but these errors were encountered: