tequilahub / tequila

A High-Level Abstraction Framework for Quantum Algorithms
MIT License
369 stars 103 forks source link

problem in F12Correction #290

Closed taoyx23 closed 1 year ago

taoyx23 commented 1 year ago

Hi all, I'm reading F12Correction.ipynb, and when I run the Active procedure for the F12 correction, the following problem occurs:

Set up universal f12-correction using a HF-RI-basis, with an active space as OBS. Traceback (most recent call last): File "/raid/home/taoyx/work/basis/hea/tequila/active/activespace.py", line 33, in corr_active[l] = mol.perturbative_f12_correction( File "/raid/home/taoyx/software/anaconda3/envs/tequila/lib/python3.9/site-packages/tequila/quantumchemistry/psi4_interface.py", line 680, in perturbative_f12_correction return correction.compute() File "/raid/home/taoyx/software/anaconda3/envs/tequila/lib/python3.9/site-packages/tequila/quantumchemistry/f12_corrections/_f12_correction_psi4.py", line 300, in compute h, g, r = self.setup_tensors_active() File "/raid/home/taoyx/software/anaconda3/envs/tequila/lib/python3.9/site-packages/tequila/quantumchemistry/f12_corrections/_f12_correction_psi4.py", line 102, in setup_tensors_active r_elems = numpy.asarray(mints.mo_f12(correlationFactor, C_RI, C_RI, C_RI, C_RI)) TypeError: mo_f12(): incompatible function arguments. The following argument types are supported:

  1. (self: psi4.core.MintsHelper, corr: List[Tuple[float, float]], C1: psi4.core.Matrix, C2: psi4.core.Matrix, C3: psi4.core.Matrix, C4: psi4.core.Matrix) -> psi4.core.Matrix

Invoked with: <psi4.core.MintsHelper object at 0x7f3094d8afb0>, <psi4.core.FittedSlaterCorrelationFactor object at 0x7f309949a7b0>, <psi4.core.Matrix object at 0x7f3092ec4ae0>, <psi4.core.Matrix object at 0x7f3092ec4ae0>, <psi4.core.Matrix object at 0x7f3092ec4ae0>, <psi4.core.Matrix object at 0x7f3092ec4ae0>

The version of tequila-basic is 1.8.8, and the version of psi4 is 1.7+6ce35a5. Let me know if I do something wrong.

Thanks

kottmanj commented 1 year ago

Hi,

thanks for the feedback. In order for the f12 technology to work, you need a modified version of psi4. Unfortunately some things do not work with the standard psi4 version, and we might be able to integrate it at some point to lower that boundary.

Can you try to install psi4 from this fork here: https://github.com/philipp-q/psi4/tree/ri_space This means, you need to compile from source, and the source should be the repo above. That should hopefully fix the issue.

Instruction on installation can be found here: https://psicode.org/psi4manual/master/build_planning.html#faq-buildquick

Pinging @philipp-q for more info.

taoyx23 commented 1 year ago

Hi,

thanks for the feedback. In order for the f12 technology to work, you need a modified version of psi4. Unfortunately some things do not work with the standard psi4 version, and we might be able to integrate it at some point to lower that boundary.

Can you try to install psi4 from this fork here: https://github.com/philipp-q/psi4/tree/ri_space This means, you need to compile from source, and the source should be the repo above. That should hopefully fix the issue.

Instruction on installation can be found here: https://psicode.org/psi4manual/master/build_planning.html#faq-buildquick

Pinging @philipp-q for more info.

Thanks for your reply, I'll try to install psi4 from this fork.

kottmanj commented 1 year ago

I assume it worked with the fork of psi4? If not, just open another issue, and we see what we can do.