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

Major refactoring and gradient fix #10

Merged
merged 10 commits into from
Jan 9, 2023
Merged

Conversation

marvinfriede
Copy link
Member

  • adapt Fortran code structure
  • gradient is now correct and translationally invariant
  • test gradient against numerical gradient

@marvinfriede marvinfriede linked an issue Dec 17, 2022 that may be closed by this pull request
@marvinfriede
Copy link
Member Author

Note that this new structure makes the code somewhat slower.
I suspect that this comes from calculating the reference C6 coefficients separately for the two- and the three-body term. Before, they were calculated "on-the-fly" within the energy/gradient functions. The "on-the-fly" version, however, was very difficult to debug as it is very different from the Fortran reference.

include/dftd_dispersion.h Outdated Show resolved Hide resolved
include/dftd_geometry.h Outdated Show resolved Hide resolved
@marvinfriede marvinfriede merged commit b97e268 into dftd4:main Jan 9, 2023
@marvinfriede marvinfriede deleted the gradient branch January 9, 2023 08:31
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

Successfully merging this pull request may close these issues.

Check gradient against reference implementation
2 participants