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

Sign of atomic forces in the C++ version #207

Merged
merged 1 commit into from
Oct 5, 2023
Merged

Sign of atomic forces in the C++ version #207

merged 1 commit into from
Oct 5, 2023

Conversation

mondracek
Copy link
Collaborator

Fixes #149

@NikoOinonen
Copy link
Collaborator

NikoOinonen commented Oct 1, 2023

@mondracek I cannot tell what changed in relax.py because there are so many formatting changes. We are currently doing the formatting fixes in separate PRs, so would it be possible for you to redo the changes without the black formatter?

The formatting is also not quite right, because this is missing the latest PR #196 that changed the line length to 180 chars.

 - change sign (to -dE/dr) of forces from atomic potentials in Forces.h
 - accordingly, flip sign of dR as an argument of addAtom_func in ProbeParticle.cpp
 - fix forceSpringRotated() in Forces.h
 - fix test in tests/test_vdW.py by flipping sign of x_FF
 - change the CoulombConst in ppafm/common.py to positive
 - make unit-converting constants in ppafm/common.py consistent with those in ppafm/cpp/
 - fix the sign of force returned by getMorse in ppafm/ocl/cl/FF.cl
@mondracek
Copy link
Collaborator Author

@NikoOinonen I have deleted all but the first commit in this branch and redone all the substantial changes from the other commits without formatting, as an amend to the first commit.
There should have been no changes apart from formatting in relax.py, by the way, so now that file is completely unchanged.

Copy link
Collaborator

@NikoOinonen NikoOinonen left a comment

Choose a reason for hiding this comment

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

Everything looks good to me. Thanks for fixing this.

@mondracek mondracek merged commit fe168c2 into main Oct 5, 2023
12 checks passed
@mondracek mondracek deleted the force-sign branch October 5, 2023 08:48
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.

Odd sign convention in force calculation
2 participants