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
Fix cutoff and lifting parameters in RESTCapableHybridTopologyFactory
#1046
Conversation
RESTCapableHybridTopologyFactory
The change of the parameter name from Also, if we decide to change this, then I think there are also some other things we have to review in |
I guess the bigger concern I see, is that it could also just silently fail, if the user decide to use |
I've updated the description above to be more clear -- hopefully its now more obvious why this PR is necessary. More specifically, the name change is needed because The Also, in the last release (0.10.0), we introduced at least one PR that break backwards compatibility: #1024
I can add these changes today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks fine. it seems there's quite a bit of code duplication though. might want to think about revising this at some point.
to clarify, this is a better handler for vacuum lifting, correct? otherwise you would have been lifing to ~100nm, which is probably problematic w.r.t. convergence?
rest_radius=0.3, | ||
w_scale=0.3, | ||
rest_radius=0.3 * unit.nanometer, | ||
w_lifting=0.3 * unit.nanometer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you found that 0.3nm is a good lifting value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, from preliminary experiments I found that 0.3 was good. I still need to run the w_lifting
optimization experiments for the paper, but hopefully the results will be similar to the preliminary experiments.
@dominicrufa : yes, see the description of the PR for more details on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can afford the API-breaking changes. I like that we are using explicit units in the parameters. Looks good!
The rest factory is still pretty experimental, so I don’t think it’s essential to ensure backwards compatibility at this point.
I changed the name because originally we were using 2 parameters (w_scale and r_cutoff) to control one distance — this is 1) wrong (the lifting distance should not depend on the cutoff distance) and 2) unnecessary. To solve problem 1, I removed the dependence on r_cutoff. At this point, I could introduce a new user-defined parameter called lifting_cutoff, but then problem 2 arises, where now we are telling the user to specify w_scale and lifting_cutoff to compute the distance, which is w_scale* lifting_cutoff. It would be simpler to just tell the user to specify the distance directly, which I’ve named w_lifting. Not tied to this name, but I do think all the changes in this PR are necessary.
On Jun 15, 2022, at 17:18, Iván Pulido ***@***.***> wrote:
I guess the bigger problem is that it could also just silently fail, if the user decide to use w_scale but the actual name is changed to w_lifting, as far as I can see.
—
Reply to this email directly, view it on GitHub<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fchoderalab%2Fperses%2Fpull%2F1046%23issuecomment-1156956077&data=05%7C01%7Civy.zhang%40wustl.edu%7C900fc2d78e484263d52108da4f148b22%7C4ccca3b571cd4e6d974b4d9beb96c6d6%7C0%7C0%7C637909246891844830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=czCSHzeeBgzVm6paRWZtFYsSwMeCbfqIs6E%2FhofR6IQ%3D&reserved=0>, or unsubscribe<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAIPGJCRCCT476GWBQCMFZCTVPJCA3ANCNFSM5Y4P63GA&data=05%7C01%7Civy.zhang%40wustl.edu%7C900fc2d78e484263d52108da4f148b22%7C4ccca3b571cd4e6d974b4d9beb96c6d6%7C0%7C0%7C637909246891844830%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PEqHLnJe6O%2BWGYNn8XGZah%2FWwQCsVXGveLuB8EBKiIA%3D&reserved=0>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Description
This PR addresses the following problem:
The
RESTCapableHybridTopologyFactory
is not performing lifting to the 4th dimension correctly in vacuum. We are maximally lifting to 100 nm, which is much too large. The maximal lifting distance is currently defined byw_scale * r_cutoff
. For vacuum, we setr_cutoff
to be 100 nm, which is the distance we want to use when callingCustomNonbondedForce.setCutoffDistance()
, but we do not want the maximal lifting distance to be that large, therefore, we need to remove the dependence of the maximal lifting distance onr_cutoff
.In fact, we actually don't need the maximal lifting distance to depend on 2 parameters, we can use just 1 parameter, which I'll call
w_lifting
, that defines the maximal lifting distance in nanometers.This PR does the following:
r_cutoff
tocutoff
.cutoff
is copied from the real system and if the nonbonded method is vacuum,cutoff
is set to 100 nm.cutoff
is only used when setting the cutoff distance in theCustomNonbondedForce
s viasetCutoffDistance
and not in the custom expression when defining lifting expressions.w_lifting
)Motivation and context
How has this been tested?
Change log