Add structural analysis to the SepTop protocol#1982
Conversation
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1982 +/- ##
==========================================
- Coverage 94.94% 90.62% -4.32%
==========================================
Files 216 217 +1
Lines 20481 20744 +263
==========================================
- Hits 19445 18799 -646
- Misses 1036 1945 +909
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…reeEnergy/openfe into structural_analysis_septop
|
As discussed offline, CI is currently breaking since the prev. openfe 1.11 results files for gather do not have the new |
| rdmol_A=d["rdmol_A"], | ||
| rdmol_B=d["rdmol_B"], | ||
| protein_selection="protein and name CA", | ||
| skip=None, |
There was a problem hiding this comment.
How about a test which checks the length of the output analysis changes in response to the skip value?
Co-authored-by: Josh Horton <joshua.horton@openforcefield.org> Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
for more information, see https://pre-commit.ci
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
…reeEnergy/openfe into structural_analysis_septop
IAlibay
left a comment
There was a problem hiding this comment.
overall looks good - just the one blocker for me re: settings
| (complex leg only). | ||
| * **Protein 2D RMSD** — pairwise RMSD matrix between all analyzed frames (complex leg only). | ||
|
|
||
| Results are saved as an NPZ file (``structural_analysis.npz``) and plots are generated |
There was a problem hiding this comment.
[nit] can you link to https://numpy.org/doc/stable/reference/generated/numpy.savez.html in case someone doessn't know what NPZ is.
| ThermoSettings, | ||
| ) | ||
| from openfe.protocols.openmm_md.plain_md_methods import PlainMDSimulationUnit | ||
| from openfe.protocols.openmm_septop.equil_septop_settings import MultiStateAnalysisSettings |
There was a problem hiding this comment.
Can you import directly from omm_settings or does it cause a circular import?
| rdmol_B, | ||
| ) | ||
|
|
||
| except Exception as e: |
There was a problem hiding this comment.
That's fair - I'd open an issue and put a todo here for now then.
| ligand_B_indices: list[int], | ||
| smc_A: SmallMoleculeComponent, | ||
| smc_B: SmallMoleculeComponent, | ||
| analysis_settings: MultiStateAnalysisSettings, |
There was a problem hiding this comment.
Rather than passing it directly, can you just access it via _get_settings? That way you won't have two sets of settings around.
There was a problem hiding this comment.
Yes, changed this!
| trajectory = simulation.outputs["trajectory"] | ||
| checkpoint = simulation.outputs["checkpoint"] | ||
|
|
||
| alchem_comps = self._inputs["alchemical_components"] |
There was a problem hiding this comment.
That's odd - something we can work out in a separate issue / PR - could you raise an issue about setup.inputs being empty? That seems unintuitive.
| # Get the analysis settings | ||
| settings = self._get_settings() | ||
| analysis_settings = settings["analysis_settings"] |
There was a problem hiding this comment.
Can we do this in run to match the other units / general pattern across the protocols?
There was a problem hiding this comment.
Moved this into run!
| skip: int | None = None | ||
| """ | ||
| Frame stride for structural analysis. If ``None``, a stride is | ||
| chosen such that approximately (max.) 500 frames are analyzed per state. |
There was a problem hiding this comment.
Might be good to open an issue to work out if this is something we want to keep around in the future - at least it seems rather unintuitive to not just use all the data we have on hand.
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
|
No API break detected ✅ |





Checklist
newsentry, or the changes are not user-facing.pre-commit.ci autofix.Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).
Developers certificate of origin