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

Port RF Boresch restraints to PME #226

Merged

Conversation

nigel-palmer-cresset
Copy link
Contributor

Based of Boresch restraints for RF in
src/libs/SireMove/openmmfrenergyst.cpp and
43ed4bc

  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): y
  • I confirm that I have added a changelog entry to the changelog (we will add a link to this PR as part of the review): y
  • I confirm that I have permission to release this code under the GPL3 license: y

Suggested reviewers:

@chryswoods, @lohedges

Based of Boresch restraints for RF in
src/libs/SireMove/openmmfrenergyst.cpp and
OpenBioSim@43ed4bc
lohedges
lohedges previously approved these changes Aug 14, 2024
Copy link
Contributor

@lohedges lohedges left a comment

Choose a reason for hiding this comment

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

Thanks, @nigel-palmer-cresset. This looks good to me. Happy to wait for @fjclark to comment before merging if needed. (He has also ported this on his own branch.)

@fjclark
Copy link
Collaborator

fjclark commented Aug 26, 2024

Hi @lohedges the Boresch part looks good to me. My only minor comment is that the flat-bottomed distance restraint equation:

    OpenMM::CustomBondForce * custom_link_bond = new OpenMM::CustomBondForce("lamrest*kl*max(0,d-dl*dl);"
                                                                             "d=(r-reql)*(r-reql)");

is inconsistent with that in openmmfrenergyst.cpp:

    OpenMM::CustomBondForce *custom_link_bond = new OpenMM::CustomBondForce("delta(min(0, r_eff))*(lamrest^5)*kl*r_eff^2;"
                                                                            "r_eff=abs(r-reql)-dl");

Likely because I updated the former to the latter and the older version has been copied. The minor issue with the older version is that the potential is not harmonic with equilibrium position dl (instead it's (r-reql)^2 - dl^2). I'd suggest updating to the newer version which gives the intended harmonic potential ((abs(r-reql)-dl)**2). Scaling with lambda^5 makes makes turning on the potential smoother.

Updated to match the equation in openmmfrenergyst.cpp. This is due to
a minor issue with the older version where the potential is not harmonic
with equilibrium position dl.
@nigel-palmer-cresset
Copy link
Contributor Author

Thanks @fjclark, I have updated the equation.

@lohedges lohedges mentioned this pull request Sep 2, 2024
@lohedges lohedges merged commit a2bc064 into OpenBioSim:devel Sep 6, 2024
5 checks passed
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.

3 participants