Skip to content

Atomic polarization tensors via numerical differentiation#4287

Merged
oschuett merged 18 commits intocp2k:masterfrom
LeoDecking:born_refactoring
Jul 21, 2025
Merged

Atomic polarization tensors via numerical differentiation#4287
oschuett merged 18 commits intocp2k:masterfrom
LeoDecking:born_refactoring

Conversation

@hossamelgabarty
Copy link
Contributor

Implement atomic polarization tensors as numerical derivatives of the forces with respect to an external electric field.

The differentiation is performed using symmetric differences, requiring a total of six force calculations under external e-field. This is much faster than analytic DFPT-based calculations.

Although this is not a DFPT calculation, for the sake of user convenience the calculation is requested using a new keyword "APT_FD" under the DCDR section. The electric field strength can be set with "APT_FD_DE".

Best regards,
Leo Decking and Hossam Elgabarty

!> \author Leo Decking, Hossam Elgabarty
! **************************************************************************************************

MODULE qs_apt_fdiff_types
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to move these definitions into the module qs_apt_fdiff_methods?

Various improvements

- Add the acronym "APT" to docs/acronyms.md
- Remove superfluous comments
- make apt_fdiff_points normal variable, not a pointer
@oschuett
Copy link
Member

Please add your new Fortran source files to src/CMakeLists.txt so CMake can find them.

@oschuett oschuett merged commit 716159d into cp2k:master Jul 21, 2025
42 checks passed
@rangsimanketkaew
Copy link
Member

Hi @hossamelgabarty

Thanks for the PR :) I was wondering if you did happen to compare the APTs and the nuclear charge (sum average of the trace of APT) between analytical and numerical methods. If so, how close are they?

Best,
Rangsiman

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.

5 participants