Conversation
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #72 +/- ##
==========================================
+ Coverage 88.16% 96.10% +7.94%
==========================================
Files 7 6 -1
Lines 338 334 -4
==========================================
+ Hits 298 321 +23
+ Misses 40 13 -27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
pre-commit.ci autofix |
There was a problem hiding this comment.
use a consistent type for the dataset it seems to interchange nc.Dataset and netCDF4.Dataset.
There was a problem hiding this comment.
Changed this!
src/openfe_analysis/rmsd.py
Outdated
| ) -> dict[str, list[float]]: | ||
| """Generate structural analysis of RBFE simulation | ||
| """ | ||
| Compute structural RMSD-based metrics for a multistate RBFE simulation. |
There was a problem hiding this comment.
Just checking this is correct and it only works on RBFEs and not ABFEs as well?
There was a problem hiding this comment.
It should also work for ABFE so I changed this to BFE.
| consecutive frames, it is translated by an integer number of box | ||
| vectors to keep its motion continuous. | ||
|
|
||
| The transformation operates in-place on the AtomGroup coordinates |
There was a problem hiding this comment.
Maybe this should be in the notes as well with the other caveats?
| Identifies two AtomGroups: | ||
| - protein, defined as having standard amino acid names, then filtered | ||
| down to CA | ||
| - ligand, defined as resname UNK | ||
|
|
||
| Then applies some transformations. | ||
| Depending on whether a protein is present, a sequence of trajectory | ||
| transformations is applied: | ||
|
|
||
| If a protein is present: | ||
| - prevents the protein from jumping between periodic images | ||
| - moves the ligand to the image closest to the protein | ||
| - aligns the entire system to minimise the protein RMSD | ||
| (class:`NoJump`) | ||
| - moves the ligand to the image closest to the protein (:class:`Minimiser`) | ||
| - aligns the entire system to minimise the protein RMSD (:class:`Aligner`) | ||
|
|
||
| If only a ligand: | ||
| If only a ligand is present: | ||
| - prevents the ligand from jumping between periodic images | ||
| - Aligns the ligand to minimize its RMSD |
There was a problem hiding this comment.
Details on the method should go under Notes I think.
| For each thermodynamic state (lambda), this function: | ||
| - Loads the trajectory using ``FEReader`` | ||
| - Applies standard PBC-handling and alignment transformations | ||
| - Computes protein and ligand structural metrics over time | ||
|
|
||
| The following analyses are produced per state: | ||
| - 1D protein CA RMSD time series | ||
| - 1D ligand RMSD time series | ||
| - Ligand center-of-mass displacement from its initial position | ||
| (``ligand_wander``) | ||
| - Flattened 2D protein RMSD matrix (pairwise RMSD between frames) |
There was a problem hiding this comment.
I think method details are best in a Notes section.
| This transformation performs an on-the-fly least-squares alignment | ||
| of the entire universe to a reference AtomGroup. | ||
| At each frame, the coordinates are translated and rotated to minimize the | ||
| RMSD of the atoms relative to their positions in the reference. |
There was a problem hiding this comment.
Lets put all method details in notes sections.
| The timestep is inferred from the serialized MCMC move stored in the | ||
| ``mcmc_moves`` group of the NetCDF file. Specifically, this assumes the | ||
| move defines both a ``timestep`` and ``n_steps`` parameter, such that | ||
|
|
||
| dt_iteration = n_steps * timestep |
There was a problem hiding this comment.
Probably should be in the notes section?
jthorton
left a comment
There was a problem hiding this comment.
Just a couple of changes: I think it would be great to unify the functions to discuss implementation details and background in the notes sections, and keep the extended description to clarify functionality that might not be clear from the short description.
No description provided.