Skip to content

PySCF interface retrieves incorrect atomic numbers if ECPs are used #247

@vvp-nsk

Description

@vvp-nsk

Describe the bug
Hej!

I wonder whether it is ok that ECP does affect a dispersion energy:

%cat b3lyp-d4.py
from   pyscf import gto, scf, dft
import dftd4.pyscf as disp

mol = gto.M()
# 12 atom(s)
mol.atom = '''
C -1.207353289 -0.697065746  0.000000000
C -1.207353289  0.697065746  0.000000000
C  0.000000000  1.394131493  0.000000000
C  1.207353289  0.697065746  0.000000000
C  1.207353289 -0.697065746  0.000000000
C  0.000000000 -1.394131493  0.000000000
H -2.142871219 -1.237187275  0.000000000
H -2.142871219  1.237187275  0.000000000
H  0.000000000  2.474374550  0.000000000
H  2.142871219  1.237187275  0.000000000
H  2.142871219 -1.237187275  0.000000000
H  0.000000000 -2.474374550  0.000000000
'''

mol.charge = 0
mol.spin = 0
mol.verbose = 4
mol.build()

d4 = disp.DFTD4Dispersion(mol, xc="b3lyp")
print("w/o ECP:",d4.kernel()[0])

mol.ecp =  'ccecp'
mol.build()

d4 = disp.DFTD4Dispersion(mol, xc="b3lyp")
print("w/  ECP:",d4.kernel()[0])

%python b3lyp-d4.py
w/o ECP: -0.01734794021287107
w/  ECP: -0.021050072978489192

Package versions used:

Python 3.11.5
dftd4  3.6.0
pyscf  2.3.0

Thank you in advance!

With best regards,
Victor

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions