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
I wonder how to get CI coefficients using the SHSISCF solver. Specifically, it returns just an integer instead of a float array :
from pyscf import gto, scf, fci
from pyscf.shciscf import shci
b = 1.243
mol = gto.Mole()
mol.build(
verbose = 5,
output = None,
atom = [
['C',( 0.000000, 0.000000, -b/2)],
['C',( 0.000000, 0.000000, b/2)], ],
basis = {'C': 'ccpvdz', },
symmetry = True,
symmetry_subgroup = 'D2h',
spin = 0
)
# Create HF molecule
mf = scf.RHF( mol )
mf.conv_tol = 1e-9
mf.scf()
# Number of orbital and electrons
norb = 26
nelec = 8
# Create SHCI molecule for just variational opt.
# Active spaces chosen to reflect valence active space.
mch = shci.SHCISCF( mf, norb, nelec )
mch.fcisolver.stochastic = True
mch.fcisolver.nPTiter = 0
mch.fcisolver.sweep_iter = [ 0, 3 ]
mch.fcisolver.DoRDM = True
mch.fcisolver.sweep_epsilon = [ 5e-3, 1e-3 ]
e_tot, e_cas, fcivec, mo, mo_energy = mch.kernel()
print(type(fcivec),fcivec)
It turns out that the 'fcivec' object is a scalar integer - <class 'int'> 0. However, if the mcscf.CASCI class is used then it returns float array - <class 'pyscf.fci.direct_spin1.FCIvector'> [[ ... ]]
The CI coefficients are needed to proceed further with fci.addons.large_ci addon.
Thank you in advance!
With best regards,
Victor Vysotskiy
The text was updated successfully, but these errors were encountered:
Maybe you already figured out but I leave it here in case someone may find this usefull:
This keyword needs to be included in input.dat: writebestdeterminants numer_of_best_determinants to generate dets.bin. My last PR has also included this so that it can be included directly from the interface: mch.fcisolver.writebestdeterminants = 1000000
The following function read_dice_wavefunction can be used to obtain ci coefficients from dets.bin: ci, occa, occb = read_dice_wavefunction('dets.bin')
Hi!
I wonder how to get CI coefficients using the SHSISCF solver. Specifically, it returns just an integer instead of a float array :
It turns out that the 'fcivec' object is a scalar integer - <class 'int'> 0. However, if the mcscf.CASCI class is used then it returns float array - <class 'pyscf.fci.direct_spin1.FCIvector'> [[ ... ]]
The CI coefficients are needed to proceed further with fci.addons.large_ci addon.
Thank you in advance!
With best regards,
Victor Vysotskiy
The text was updated successfully, but these errors were encountered: