-
Notifications
You must be signed in to change notification settings - Fork 68
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
[Feature Request]: Add dispersion to ASE calculator #188
Comments
See https://github.com/dftd3/tad-dftd3 and https://github.com/dftd4/tad-dftd4. |
Thanks, I am aware of these repositories, but I don't think they yet have an implementation with ASE and can't be simply plugged into an ASE |
Makes sense! Definitely in the meantime, |
@ajhoffman1229 Can you please give some tests on the DFTD and SumCalculator and share a notebook example or open a PR? Happy to help and merge if the combined calculator works stably on your side. If the above code works smoothly with no compatibility issues, the easiest thing is to add a DFT-D3.ipynb under chgnet/examples |
Yes, I can make a notebook and submit a PR so it can be added as an example to the repo. The code above worked when I tested it locally. I will try to polish it later this week and submit for review. |
Hi folks, I am not sure what I did but the code that I wrote earlier this week now seems to be working now and I can compute energies with a CHGNet+D4 |
That's wonderful! Thanks for the update! |
Email (Optional)
[email protected]
Problem
I would like to be able to add a dispersion/van der Waals correction to the pre-trained CHGNet model. A similar option is available in the MACE-MP-0 model here.
Proposed Solution
I believe that an option can be added to the CHGNetCalculator for a dispersion correction similar to the option in MACE-MP-0. Their implementation requires installing torch-dftd, and creates an instance of an ASE
SumCalculator
that adds the energies, forces, and stresses of each contribution together.Alternatives
If this feature cannot be added, it would be great if a note could be added to the README pointing users to the torch-dftd implementation in the event that they want to add a dispersion correction to CHGNet independent of the repo. Currently, the python packages for DFT-D3 and DFT-D4 dispersion models from the Grimme group are not compatible with torch, so the conventional method of adding the dispersion does not work with CHGNet.
Here is some example code where this works with CHGNet and the torch-dftd implementation:
Code of Conduct
The text was updated successfully, but these errors were encountered: