Add support for N-terminal, protonated, disulfide-bonded cysteine (branch form of #2194)#2195
Merged
Conversation
) * fix(proteins): generate n-terminal disulfide cysteine templates * chore(proteins): update cysteine substructure data * test(proteins): cover n-terminal cysteine disulfide ingestion * docs: note n-terminal cysteine disulfide support * fix(utils): use reachable wwPDB CIF endpoint * chore(proteins): align cysteine data with full regeneration
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
j-wags
commented
Jun 8, 2026
j-wags
left a comment
Member
Author
There was a problem hiding this comment.
This looks flawless to me. Thanks @joelaforet!
| ATOM 39 HH32 NME 5 22.113 28.665 21.068 1.00 0.00 H | ||
| ATOM 40 HH33 NME 5 21.838 29.792 22.415 1.00 0.00 H | ||
| TER 41 NME 5 | ||
| END |
Member
Author
There was a problem hiding this comment.
(not blocking) Reviewing this made me realize that our CYX loading test files don't have CONECT records for the disulfide bond. So right now we only test the case where there are disulfide bonds without CONECT records, but maybe it'd be good to add variants of the test inputs to exercise the explicit-CONECT case as well. This isn't something that should be handled here but I may make a separate issue for this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the continuation of the changeset in #2194
The following is copied from @joelaforet's original PR body:
Fixes #2191.
This PR adds support for loading N-terminal, protonated, disulfide-bonded cysteine residues from PDB files.
Specifically, this covers a
CYSresidue with:NH3+SGHGSG-SGdisulfide connectivityChanges made:
utilities/make_substructure_dict/_cif_to_substructure_dict.py.aa_residues_substructures_with_caps.jsonaa_residues_substructures_explicit_bond_orders_with_caps.jsonaa_residues_substructures_explicit_bond_orders_with_caps_explicit_connectivity.jsonMolecule.from_polymer_pdb.docs/releasehistory.md.ftp.wwpdb.orgtofiles.wwpdb.org, sinceftp.wwpdb.orgdid not resolve locally but the same wwPDB file was available fromfiles.wwpdb.org.Validation run locally:
mamba run -n openff-toolkit-ncy pytest openff/toolkit/_tests/test_molecule.py -k "cys_disulfide or mainchain_cyx_dipeptide or mainchain_cys_dipeptide or mainchain_cym_dipeptide"Result:
4 passed
Additional checks:
The regenerated explicit-connectivity SMARTS library validates successfully.
The motivating protein, PDB=4CHA, now loads with Topology.from_pdb, giving 3519 atoms and 1 molecule.