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

[Defaults] ASE DFTD3 and Simple-DFTD3 disagree? #68

Closed
tgmaxson opened this issue Jun 13, 2024 · 1 comment
Closed

[Defaults] ASE DFTD3 and Simple-DFTD3 disagree? #68

tgmaxson opened this issue Jun 13, 2024 · 1 comment

Comments

@tgmaxson
Copy link

I am trying to use the Simple-DFTD3 module but I am seeing disagreements between the ASE DFTD3 implementation and Simple-DFTD3. Importantly, ASE DFTD3 agrees with VASP but Simple-DFTD3 does not as a result. I provide here a minimum example to reproduce this issue. The difference also shows up in forces and strain if I recall correctly, but the example here just highlights the energy difference.

Is there some difference in cutoffs, many body terms, etc? I believe we use the dftd3 on conda from psi4.

#!/usr/bin/env python
from ase.io import read, write
from ase.calculators.dftd3 import DFTD3  #import ASE-D3
from dftd3.ase import DFTD3 as SimpleD3 #import Simple-D3
from ase.build import bulk

atoms = bulk("Pd") * (6,6,6)

ase_d3 = DFTD3(xc="pbe", damping="bj")
simple_d3 = SimpleD3(method="pbe", damping="d3bj")


for calculator in ase_d3, simple_d3:
    atoms.calc = calculator
    print(f"Dispersion: {calculator} {atoms.get_potential_energy()}", end="\n")

This produces the following output

(work) tgmaxson@front-0:~/D3Disagree$ python d3.py
Dispersion: <ase.calculators.dftd3.DFTD3 object at 0x7f4bbe48c250> -144.65636838944943
Dispersion: <dftd3.ase.DFTD3 object at 0x7f4c0fe20f40> -127.1336927513601
@awvwgk
Copy link
Member

awvwgk commented Jun 25, 2024

This can be related to cutoffs for the two implementations for D3, in simple-dftd3 the cutoffs can be increased to converge the real space summation. An alternative approach would be to employ Ewald summation (#69).

@awvwgk awvwgk changed the title [Bug / Defaults] ASE DFTD3 and Simple-DFTD3 disagree? [Defaults] ASE DFTD3 and Simple-DFTD3 disagree? Jul 27, 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