Enable ligand proton chi sampling by default#396
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #396 +/- ##
==========================================
+ Coverage 89.57% 90.09% +0.51%
==========================================
Files 357 358 +1
Lines 31088 31373 +285
==========================================
+ Hits 27847 28265 +418
+ Misses 3241 3108 -133 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| conf_dofs_kto[dst + 1, :] = orig_dofs_kto[src + 1, :] | ||
| copied_dofs = orig_dofs_kto[src + 1, :] | ||
| nonfinite = ~torch.isfinite(copied_dofs).all(dim=1) | ||
| if torch.any(nonfinite): |
There was a problem hiding this comment.
i really don't think we want this here
the pose coming into optH should already be complete and well formed.
for proteins, we use 'generate_missing_leaf_atoms' to build missing H subject to ideal geometry, then call this function. ligands should use same logic. my guess is the logic in that function, not here, needs to get fixed.
There was a problem hiding this comment.
sounds good, seems like you changed that by now?
| chi_for_rotamers.shape[1], | ||
| opth_cache.expanded_samples.shape[1], | ||
| ) | ||
| for chi_col in range(n_chi_cols): |
There was a problem hiding this comment.
this is completely fine and how R3 works. But you might want to talk to @aleaverfay about this, one downside is with large ligands the number of rotamers blows up exponentially. It should be possible to treat each proton chi independently in the packer.
That might be a future effort though, it's fine for now.
There was a problem hiding this comment.
@aleaverfay any idea comment on this here?
There was a problem hiding this comment.
we talked about it at the meeting yesterday, it's a to do but not in this PR
There was a problem hiding this comment.
The combinatorics of ligand / sugar hydroxyls was a big motivating factor for talking about blocks rather than residues. "Residue" is a somewhat rigid idea but "block" has no particular connotation to anything biochemical: it's just a unit on which you operate. The plan for hydroxyls is that they will be broken off from the rest of the residues that they come from and treated as independent blocks. Each block will have its own set of rotamers. What we have to create to make that work is:
- a way to split a residue into multiple blocks,
- a way to update all of the parameters in the scoring layer to reflect this splitting,
- a way to convert a PoseStack created with the un-split block types into one with split block types, and
- a way to convert a PoseStack back to its un-split block types form to return structures back to the user in a format that they will understand and be willing to work with
It feels like a decent amount of work, but one limiting factor until now has been that we don't even have any non-amino-acid residue types to start working from, so your push on the ligands is a big step forward on getting this implemented
Wire multi-proton-chi OptH sampling through pose construction and add regression coverage that documents the remaining ligand ideal-DOF failure.
…rate case' corrections in folding near the root. Add a postprocessing step where geometry-based correctings are applied to bond connectivities.
…uctures, bugfix in name-matching
db6ad1f to
11d2481
Compare
Summary
sample_proton_chi=Trueby default in both Biotite pose-building entry pointsKnown failing ligand and failure
This is intentionally a draft because one end-to-end gate is still failing.
tmol/tests/data/protein_ligand_test/cif_inputs/ace.ligand.cifLG1pose_stack_from_biotite(..., prepare_ligands=True)after OptHSampler packing_assert_no_nan_coords()reports NaN coordinates for ligand polar hydrogensHN1,HN2,HN3,HO1,HO2,HO3, andHO4HN1,HN2,HN3,HO2,HO3, andHO4sample_proton_chi=Falsebuilds the same ACE/LG1 pose with finite coordinatesNo other ligand fixture has been identified as failing yet; ACE/LG1 is the reproduced case currently covered by the end-to-end regression.
Verification
blackandflake8: passNext step
Repair ligand ideal internal-coordinate construction for sampled polar hydrogens, then require the ACE/LG1 end-to-end regression and CI to pass before marking this PR ready for review.