-
Notifications
You must be signed in to change notification settings - Fork 51
Enable user defn boresch restraints in ABFE Protocol #2019
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
base: main
Are you sure you want to change the base?
Changes from all commits
e47b90a
c5425b9
82f3c94
a453b53
12c509f
f593327
505f4b7
6ddcba1
801220a
b3de6fd
487b8ef
3f08aaf
44931cb
10f4ad1
e221fa7
dbbe314
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| **Added:** | ||
|
|
||
| * Added support for user-defined Boresch restraints in the | ||
| ABFE Protocol (`PR #2019 <https://github.com/OpenFreeEnergy/openfe/pull/2019>`_). | ||
|
|
||
| **Changed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Deprecated:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Removed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Fixed:** | ||
|
|
||
| * <news item> | ||
|
|
||
| **Security:** | ||
|
|
||
| * <news item> |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -213,6 +213,29 @@ def must_be_all(cls, v): | |||
| return v | ||||
|
|
||||
|
|
||||
| class ABFEBoreschRestraintSettings(BoreschRestraintSettings): | ||||
| host_restraint_ids: tuple[int, int, int] | None = None | ||||
| """ | ||||
| The indices of the host component atoms to restrain. | ||||
| The entries define the H0, H1, and H2 atoms in order. | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be helpful to add how the restraints are defined, since people use different definitions of H0 vs H2 (meaning, is the bond between H0 and G0 or between H2 and G0?)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll double check but I think the docstring gets inherited from
Which has the whole description of the restraints including my attempt at ASCII art. |
||||
| If defined, these will override any automatic selection. | ||||
| """ | ||||
| guest_restraint_ids: tuple[int, int, int] | None = None | ||||
| """ | ||||
| The indices of the guest component atoms to restraint. | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is based on the only ligand indices (from the sdf), correct? Maybe worth adding that this are not the indices the ligand would have in the complex (probably obvious since the complex is not created yet, but maybe just to be extra clear). |
||||
| The entries define the G0, G1, and G2 atoms in order. | ||||
| If defined, these will override any automatic selection. | ||||
| """ | ||||
|
|
||||
| @field_validator("guest_restraint_ids", "host_restraint_ids") | ||||
| def positive_idxs_three_tuple(cls, v): | ||||
| if v is not None: | ||||
| if any([i < 0 for i in v]): | ||||
| errmsg = "``guest_atoms`` and ``host_atoms`` cannot have negative indices." | ||||
| raise ValueError(errmsg) | ||||
| return v | ||||
|
|
||||
|
|
||||
| # This subclasses from SettingsBaseModel as it has vacuum_forcefield and | ||||
| # solvent_forcefield fields, not just a single forcefield_settings field | ||||
| class AbsoluteSolvationSettings(SettingsBaseModel): | ||||
|
|
||||
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.
If one of these is defined and the other one is None, this will crash out here, but i wonder if it would be helpful to fail earlier.
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.
Good call, we can add a validitor for that.