Closed ilfreddy closed 2 days ago
Attention: Patch coverage is 27.86561%
with 1095 lines
in your changes missing coverage. Please review.
Project coverage is 65.53%. Comparing base (
764eb22
) to head (dc430cf
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@ilfreddy I have found two minor bugs that I would like to fix:
radius_factor
from 0.6 to 0.5.Should I create a pull request for this branch?
@moritzgubler I think I have fixed what you asked. Could you check and the fixes, and then review the whole PR? Thereafter we can most likely merge it into master (assuming no test fails this time).
@moritzgubler the test fails with the new default, so I explicitly used 0.6 in the test. Although the gradient should in principle be the same, I assume this is a low prec calculation with an SCF which is not converged either. I therefore assume it is not granted the computed gradient makes physical sense at this stage.
In order to reduce testing time, I did not converge the SCF in the test (I basically copied the test from the Hellmann Feynman forces). The resulting forces do not make physical sense and even depend on the shape of the surface integral but I think this is ok for testing.
If you are OK with my fixes and you can review the whole PR, I believe this gan go now, unless @stigrj wants to have a look first.
If @moritzgubler and @stigrj are happy this one can finally go for my part.
The changes look good to me.
Taken from PR #488 from @moritzgubler and rebased with the AZORA functionality which has just been merged in master.
Rest of the description verbatim from #488
This is my implementation of the idea I had of calculating forces with surface integrals.
It works quite well and the forces are more accurate. Also, mrchem struggles to compute forces when the world precision is 1e-7 or smaller. Then it requires a lot of memory (more than 32 GB for a H2 molecule). This is not the case with my approach . Geometry optimizations seem to be reliable if the stopping criterion is chosen 10 * world_prec.
I have already put all the parameters into the parser, so it is quite simple to test and run my code (look for the section "- name: Forces" in the template.yaml input parser file).
It works with lda and gga functionals and for both closed and open shell systems. At the moment, there is one thing that might be improved in the future:
The exact exchange stress is not computed. Therefore forces can not be computed for exact exchange. It shouldn't be too complicated to implement, but in a quick search I did not find a reference that derives it.