Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Vector is empty #11

Open
NastaMauger opened this issue Nov 13, 2024 · 1 comment
Open

CI Vector is empty #11

NastaMauger opened this issue Nov 13, 2024 · 1 comment

Comments

@NastaMauger
Copy link

NastaMauger commented Nov 13, 2024

Hello,

I would like to access the CI vector after a DICE calculation (and not just the CI coefficients). However, when I try the following:

my_dice = shci.SHCISCF(rhf, norb, nelec)
my_dice.verbose = 9
my_dice.fcisolver.stochastic = True
my_dice.fcisolver.DoRDM = True
my_dice.fcisolver.mpiprefix = 'mpirun -np 1'
my_dice.fcisolver.nPTiter = 0
my_dice.fcisolver.sweep_iter = [0, 3]
my_dice.fcisolver.sweep_epsilon = [9e-1, 1.1e-1]
my_dice.fcisolver.writebestdeterminants = 1000000
e_shci = casci.mc1step()[0]
ci_vector = my_dice.ci
print(ci_vector)  # This returns 0

I am unable to access the CI vector, as my_dice.ci returns 0.

Is there a way to access the CI vector, please?

I also tried to build the CI vector manually using the CI coefficients with a shape of num_det x num_det, but I encounter size mismatches when attempting to use it in:

rdm1 = mcscf.addons.make_rdm1(my_dice, ci=new_ci_vector)

Where new_ci_vector is my manually constructed matrix. For some reason, I always get this error:

Traceback (most recent call last):
  File "/home/shci.py", line 220, in <module>
    rdm1, rdm2 = mcscf.addons.make_rdm12(casci, ci=new_ci_vector)
  File "/opt/pyscf/pyscf/mcscf/addons.py", line 761, in make_rdm12
    casdm1, casdm2 = casscf.fcisolver.make_rdm12(ci, ncas, nelecas)
  File "/opt/shciscf/pyscf/shciscf/shci.py", line 410, in make_rdm12
    file2pdm = "spatialRDM.%d.%d.txt" % (state, state)
TypeError: %d format: a real number is required, not numpy.ndarray

Could you please advise on how to resolve this?

Best

@sanshar
Copy link

sanshar commented Nov 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants