Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #88 +/- ##
==========================================
+ Coverage 88.16% 92.87% +4.70%
==========================================
Files 7 7
Lines 338 407 +69
==========================================
+ Hits 298 378 +80
+ Misses 40 29 -11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/openfe_analysis/prolif.py
Outdated
| import prolif as plf | ||
|
|
||
|
|
||
| class ProLIFAnalysis: |
There was a problem hiding this comment.
Can you subclass AnalysisBase here?
There was a problem hiding this comment.
Yup should be doable, will look into it :)
Wanted to wait and see how RMSD will look like to use an identical structure and have this initial PR to have bulletpoints to discuss tomorrow during the meeting and also have an easier overview on what was changed etc. :)
|
I am not sure if this should be handled in the analysis class or in a protocol before running this class but there is an issue when doing this kind of analysis on trajectories from our hybrid topology protocol, where the connectivity of the end state ligands and identities of the atoms can get confused see this example on end stateB when looking at torsions. Should we add an option to provide and rdkit molecule for the ligand and use this to correct the ligand atom group automatically or should we have users fix this beforehand? This will be needed in the torsion analysis as well so a general function which could fix an atom group might be a good idea? |
|
|
||
| # Currently adding here but maybe as args? | ||
| self.protein_ag = self.universe.select_atoms( | ||
| "protein and byres around 12 group ligand", |
There was a problem hiding this comment.
Yes, I agree I think it would be great to have these (also for water below) as args.
| and "WaterBridge" in fp_interactions | ||
| ): | ||
| if self.water_ag.n_atoms == 0: | ||
| raise ValueError("WaterBridge selected but water selection is empty.") |
There was a problem hiding this comment.
Maybe instead raise a warning, or what would happen if there are individual frames that don't have water molecules?
There was a problem hiding this comment.
Yes warining would be better in that case, since that is quite a possible scenario, best approach would be truly warning + remove the water_bridge interaction so that it doesn't run when there are no waters, since I would need to check, but I think currently it would possibly still try to run it 🤔
First draft of the ProLIF implementation into OpenFE Analysis.
Changes made:
ProLIFAnalysisclass for calculation of interactions using ProLIFtest_prolif.py, which mainly look into if interactions were calculated sucessfully and protein/ligand conversion fromMDAnalysisintoProLIFworked sucessfully.Currently that is the first draft and PR is to see that the tests work etc.
Some notes:
pd.DataFrameformat, since that is easy to see if it worked. We can see what the best way is to present the results, be it 2D visualization of the interactions, dataframes or some other format.MDAnalysisis sometimes tricky, which is the case here. So the code currently needs to guess bonds, which it does here:universe.select_atoms("protein").guess_bonds(vdwradii=vdwradii)But for the
vdwradiiit wants some values forCl,Bretc. that we need to provide, so we need to see what defaults we select there.3, which means it can be something like:Ligand--Water--Water--Water--ProteinProLIFAnalysis.run()there we can also look into what the defaults have to be, how many cores and if the interactions should beatombased (Ligand with Protein atom) orresiduebased (Ligand with Protein residue).This is the first draft, will be updated during further development :)
PS. A small thing I also noticed, since I tested it on different PCs with one being with Windows currently somehow
python 3.14has module loading Issues withrdkitand thus I had to downgrade there topython 3.13.