-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Hello,
This minimal example failed to be imported into QP2 with the following error:
Nuclei ... OK
Electrons ... 5 5
Basis ... Gaussian
AOS ... Traceback (most recent call last):
File "/opt/qp2_dev_stable/scripts/qp_import_trexio.py", line 576, in <module>
write_ezfio(trexio_filename, EZFIO_FILE)
File "/opt/qp2_dev_stable/scripts/qp_import_trexio.py", line 317, in write_ezfio
assert (len(coefficient) == ao_num)
I realized that the issue is related to the basis set of the carbon atoms, not hydrogen. If I use H or He it works
I used the cc-pVDZ basis set in an uncontracted form from BSE. I am not sure if this is related to issue #42, so I opened a new issue. Feel free to close it if you think it might be redundant
from pyscf import gto, scf, symm, mcscf, fci, ao2mo, lib
import pyscf.mcscf.chkfile as chkfile
import numpy as np
import os
# Define the molecule
# Trexio needs to have the uncontracted general basis from BSE
# Basis set: cc-pvdz
mol = gto.M(
atom = '''
C 0.0000 0.0000 0.0000
H 0.6266 0.6266 0.6266
H 0.6266 -0.6266 -0.6266
H -0.6266 0.6266 -0.6266
H -0.6266 -0.6266 0.6266
''',
charge = 0,
spin = 0,
symmetry = True,
# symmetry_subgroup = 'D2h',
verbose = 4,
basis ={
'H': gto.parse('''
H S
1.301000E+01 1.968500E-02
1.962000E+00 1.379770E-01
4.446000E-01 4.781480E-01
1.220000E-01 5.012400E-01
H S
1.220000E-01 1.000000E+00
H P
7.270000E-01 1.0000000
'''),
'C': gto.parse('''
C S
6.665000E+03 6.920000E-04
1.000000E+03 5.329000E-03
2.280000E+02 2.707700E-02
6.471000E+01 1.017180E-01
2.106000E+01 2.747400E-01
7.495000E+00 4.485640E-01
2.797000E+00 2.850740E-01
5.215000E-01 1.520400E-02
1.596000E-01 -3.191000E-03
C S
6.665000E+03 -1.460000E-04
1.000000E+03 -1.154000E-03
2.280000E+02 -5.725000E-03
6.471000E+01 -2.331200E-02
2.106000E+01 -6.395500E-02
7.495000E+00 -1.499810E-01
2.797000E+00 -1.272620E-01
5.215000E-01 5.445290E-01
1.596000E-01 5.804960E-01
C S
1.596000E-01 1.000000E+00
C P
9.439000E+00 3.810900E-02
2.002000E+00 2.094800E-01
5.456000E-01 5.085570E-01
1.517000E-01 4.688420E-01
C P
1.517000E-01 1.000000E+00
C D
5.500000E-01 1.0000000
''')},
)
# Perform SCF calculation
print("------------------------------------------------")
print("----------------------RHF-----------------------")
print("------------------------------------------------")
rhf = scf.RHF(mol)
rhf.verbose = 4
rhf.chkfile = 'rhf.chk'
rhf.kernel()
filename = 'rhf.hdf5'
# Convert PySCF checkpoint to TREXIO
os.system('trexio convert-from -t pyscf -i rhf.chk -b hdf5 rhf.hdf5')
Metadata
Metadata
Assignees
Labels
No labels