Skip to content

Add support for N-terminal, protonated, disulfide-bonded cysteine (branch form of #2194)#2195

Merged
j-wags merged 1 commit into
mainfrom
fix-nterm-disulfide-cys
Jun 8, 2026
Merged

Add support for N-terminal, protonated, disulfide-bonded cysteine (branch form of #2194)#2195
j-wags merged 1 commit into
mainfrom
fix-nterm-disulfide-cys

Conversation

@j-wags

@j-wags j-wags commented Jun 8, 2026

Copy link
Copy Markdown
Member

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 CYS residue with:

  • N-terminal NH3+
  • neutral degree-2 side-chain SG
  • no HG
  • external SG-SG disulfide connectivity

Changes made:

  • Adds missing CYS substructures in utilities/make_substructure_dict/_cif_to_substructure_dict.py.
  • Regenerates:
    • aa_residues_substructures_with_caps.json
    • aa_residues_substructures_explicit_bond_orders_with_caps.json
    • aa_residues_substructures_explicit_bond_orders_with_caps_explicit_connectivity.json
  • Adds a minimal regression PDB fixture for this chemistry.
  • Adds a regression test covering ingestion with Molecule.from_polymer_pdb.
  • Updates docs/releasehistory.md.
  • Updates the substructure-generator CIF download URL from ftp.wwpdb.org to files.wwpdb.org, since ftp.wwpdb.org did not resolve locally but the same wwPDB file was available from files.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.

)

* 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
@j-wags j-wags changed the title Add support for N-terminal, protonated, disulfide-bonded cysteine (#2… Add support for N-terminal, protonated, disulfide-bonded cysteine (branch form of #2194) Jun 8, 2026
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.19%. Comparing base (8e39c98) to head (71d4f4d).

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@j-wags j-wags marked this pull request as ready for review June 8, 2026 22:07

@j-wags j-wags left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(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.

@j-wags j-wags merged commit 0c16be0 into main Jun 8, 2026
23 checks passed
@j-wags j-wags deleted the fix-nterm-disulfide-cys branch June 8, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding parameters for CYS residues that are N-terminal, protonated, and participate in a disulfide bridge

2 participants