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

def2-SVP Energy mismatch between MESS and PySCF #23

Open
majhas opened this issue Dec 5, 2024 · 0 comments
Open

def2-SVP Energy mismatch between MESS and PySCF #23

majhas opened this issue Dec 5, 2024 · 0 comments
Assignees

Comments

@majhas
Copy link

majhas commented Dec 5, 2024

Hey, MESS does not get the same energy as PySCF when using the def2-SVP basis set. For other basis sets (sto-3g; 6-31g) there is no issue. Here is the code to reproduce the problem:

import numpy as np
from mess.interop import to_pyscf
from mess import minimise, basisset, Hamiltonian, molecule
from pyscf import dft

basis_name = "6-31g"
xc_method = "pbe"


mol = molecule("water")
basis = basisset(mol, basis_name=basis_name)
H = Hamiltonian(basis, xc_method=xc_method)
E, C, sol = minimise(H)

scf_mol = to_pyscf(mol, basis_name)
s = dft.RKS(scf_mol, xc=xc_method)
s.kernel()

print(f"MESS Energy ({basis_name}/{xc_method}): {E:.6f} (hartree)")
print(f"PySCF Energy ({basis_name}/{xc_method}): {s.energy_tot():.6f} (hartree)")
print(f"MESS == PySCF ({basis_name}/{xc_method}): {np.allclose(E, s.energy_tot())}")


basis_name = "def2-SVP"

basis = basisset(mol, basis_name=basis_name)
H = Hamiltonian(basis, xc_method=xc_method)
E, C, sol = minimise(H)

scf_mol = to_pyscf(mol, basis_name)
s = dft.RKS(scf_mol, xc=xc_method)
s.kernel()


print(f"MESS Energy ({basis_name}/{xc_method}): {E:.6f} (hartree)")
print(f"PySCF Energy ({basis_name}/{xc_method}): {s.energy_tot():.6f} (hartree)")
print(f"MESS == PySCF ({basis_name}/{xc_method}): {np.allclose(E, s.energy_tot())}")

I get the following output:

MESS Energy (6-31g/pbe): -76.298987 (hartree)
PySCF Energy (6-31g/pbe): -76.298981 (hartree)
MESS == PySCF (6-31g/pbe): True

MESS Energy (def2-SVP/pbe): -75.505216 (hartree)
PySCF Energy (def2-SVP/pbe): -76.273886 (hartree)
MESS == PySCF (def2-SVP/pbe): False
@FNTwin FNTwin self-assigned this Dec 6, 2024
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