Fatal Error: Cannot set element X since there are only X elements

Dear collegues,
I am new to Psi4 software, and facing some problems while working with heavy metals. It was showing error: "Fatal Error: Cannot set element 12 since there are only 12 elements.
! Error occurred in file: D:\a\1\s\psi4\src\psi4/libmints/vector.h on line: 207. ".
Please suggest me an input file format for SAPT calculation for heavy metals. Below I have attached my input file.
Benzene_Ba.dat (1.6 KB)

Thanks for the report. This is a bug in Psi4. I’ll try to have it fixed soon and report back.

1 Like

I think there is a problem with the basis set that you specified for Ba. Judging from the GENECP name, I assume you intended to specify both an effective core potential for inner-shell electrons and a valence basis set for the outer-shell ones. However, your input specifies a valence basis set but no ECP.

As a result, Psi4 sees only 12 basis functions centered on Ba, and that’s not enough occupied orbitals to place all electrons of Ba2+. I think this might be the source of the error.

For an example how to specify a user-defined ECP, please see the Psi4 definition of the def2-svp basis set here. Note that Ba is represented twice in that file, first with the valence basis set and then with an ECP (look for BA-ECP).

Hope this helps!

2 Likes

Konrad’s diagnosis was spot on. The most that Psi can do is give you a better error message. And in 1.8, it will.

For your use, please specify an ECP per Konrad’s post above.

1 Like

Sorry for late reply, and thank you all for the suggestion. I created the file according to the suggestion, I attached below (Input 1 & input 2). It again showing an error:
“Fatal Error: BasisSet contains ECP shells but libecpint addon not enabled. Re- !compile with -D ENABLE_ecpint=ON.”
And when i exclude Ba-ECP portion from input file (input 2), it calculates sapt0 successfully. What mistake I did in input 1 file. How to use Ba-ECP portion of basis set?
And also how to assign multiple basis set for heavy metals?
input1.dat (2.4 KB)
input2.dat (1.8 KB)

How did you install Psi4? Did you get it from conda? Did you compile it yourself? We need to know exactly what you did.

1 Like

I installed new version of psi4 using conda (linux) by following given instruction in “Conda Binary distribution – Quick installation”. Also I created Scratch folder as mention.

Thanks. I’ve notified our build specialist, @loriab, who can provide more detailed advice.

1 Like

What’s your conda list and which conda python psi4, please? Either v1.6 or v1.7 should have ecpint enabled, so I’d like to check your environment.

1 Like

I attached the enviroment list below:
Psi4 versioin - 1.7.
Also suggest to how to enable this ecpint on linux and windows.
thankyou.

No, we need conda list and which conda python psi4. We need that to suggest how to enable libecpint.

Sorry for the late reply, I again installed it in my Linux system, and it is working now, but on my Windows system, it is showing same the problem. I attached the conda list and other pictures.
Thankyou










How do you launch Psi4?

I installed it in the environment named psi16. So I just go to cmd and type conda activate psi16 and then I access psi4 for calculations.

Please double-check that the conda list you gave us was for the psi16 environment rather than base.

The above pictures are from Conda Base. For psi16, I attached the CONDA list below.
![Screenshot (45)1|690x360] (upload://5lppbbklAE4Rmz3r0k0kFWJLE5J.png)
![Screenshot (44)1|391x500] (upload://gi6KBnVA60goQt4fofyolxVwIip.png)

They’re not attached.

I am not able to attach files (screenshots). I don’t know why. The same exclamation mark appears each time.

Can you copy-paste the output instead?

Name Version Build Channel

attrs 22.2.0 pyh71513ae_0 conda-forge
bzip2 1.0.8 h8ffe710_4 conda-forge
ca-certificates 2022.12.7 h5b45459_0 conda-forge
certifi 2022.12.7 pyhd8ed1ab_0 conda-forge
cffi 1.15.1 py38hd8c33c5_0 conda-forge
colorama 0.4.6 pyhd8ed1ab_0 conda-forge
dftd3-python 0.6.0 py38heb50f4f_1 conda-forge
exceptiongroup 1.1.0 pyhd8ed1ab_0 conda-forge
gau2grid 2.0.7 hcb41399_1 conda-forge
gcp-correction 2.3.1 ha368592_2 conda-forge
importlib-metadata 6.0.0 pyha770c72_0 conda-forge
importlib_metadata 6.0.0 hd8ed1ab_0 conda-forge
importlib_resources 5.10.2 pyhd8ed1ab_0 conda-forge
iniconfig 2.0.0 pyhd8ed1ab_0 conda-forge
intel-openmp 2019.1 144
libblas 3.8.0 8_mkl conda-forge
libcblas 3.8.0 8_mkl conda-forge
libffi 3.4.2 hd77b12b_6
libint2 2.6.0 h2e52968_4 psi4
liblapack 3.8.0 8_mkl conda-forge
libxc 5.2.3 py38h294d835_1 conda-forge
libzlib 1.2.12 h8ffe710_2 conda-forge
m2w64-gcc-libgfortran 5.3.0 6 conda-forge
m2w64-gcc-libs 5.3.0 7 conda-forge
m2w64-gcc-libs-core 5.3.0 7 conda-forge
m2w64-gmp 6.1.0 2 conda-forge
m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge
mctc-lib 0.3.1 hd5c7e75_0 conda-forge
mkl 2019.1 144
msgpack-python 1.0.4 py38hbd9d945_0 conda-forge
msys2-conda-epoch 20160418 1 conda-forge
networkx 3.0 pyhd8ed1ab_0 conda-forge
numpy 1.22.4 py38h1d2777f_0 conda-forge
openssl 3.0.5 h8ffe710_1 conda-forge
optking 0.2.1 pyhbc12335_1 psi4
packaging 22.0 pyhd8ed1ab_0 conda-forge
pint 0.17 pyhd8ed1ab_0 psi4
pip 22.3.1 py38haa95532_0
pluggy 1.0.0 pyhd8ed1ab_5 conda-forge
psi4 1.7+6ce35a5 py38_0 psi4
psutil 5.9.1 py38h294d835_0 conda-forge
py-cpuinfo 9.0.0 pyhd8ed1ab_0 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pydantic 1.9.2 py38h294d835_0 conda-forge
pytest 7.2.0 pyhd8ed1ab_2 conda-forge
python 3.8.13 hcf16a7b_0_cpython conda-forge
python_abi 3.8 3_cp38 conda-forge
pyyaml 6.0 py38h294d835_4 conda-forge
qcelemental 0.25.1 pyhd8ed1ab_1 psi4
qcengine 0.26.0 pyhd8ed1ab_0 psi4
scipy 1.8.1 py38h9bf8e03_0 conda-forge
setuptools 65.6.3 py38haa95532_0
simple-dftd3 0.6.0 hd5c7e75_0 conda-forge
sqlite 3.40.1 h2bbff1b_0
tk 8.6.12 h8ffe710_0 conda-forge
toml-f 0.2.3 hd5c7e75_0 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
typing-extensions 4.4.0 hd8ed1ab_0 conda-forge
typing_extensions 4.4.0 pyha770c72_0 conda-forge
vc 14.2 h21ff451_1
vs2015_runtime 14.27.29016 h5e58377_2
wheel 0.37.1 pyhd3eb1b0_0
wincertstore 0.2 py38haa95532_2
xz 5.2.6 h8d14728_0 conda-forge
yaml 0.2.5 h8ffe710_2 conda-forge
zipp 3.11.0 pyhd8ed1ab_0 conda-forge