Repository navigation
Conversation
A link partner without altloc (a LINK record with a blank altloc column, or a _struct_conn row with pdbx_ptnrN_label_alt_id ?) can name an atom that exists only as altloc A, B, ... The strict altloc matching of find_cra() does not find it, so the _struct_conn and LINK writers wrote ? or blank for the atom name, symmetry and distance, and the SSBOND writer skipped the record. New find_connection_atoms() falls back to the closest pair of atoms of the same conformer, as complete_ssbond() does when reading. The atom names, symmetry and distance are written; no altloc is added. Atoms that are really absent (LINKR gap) are handled as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A link partner can have no altloc - a PDB LINK record with a blank altloc
column, or an mmCIF
_struct_connrow withpdbx_ptnrN_label_alt_id?- whilethe atom it names exists only in alternative conformations.
find_cra()matchesaltlocs strictly (
'\0'matches only atoms without an altloc), so the writersdo not find the atom:
_struct_conn:?for the atom name,ptnr2_symmetryandpdbx_dist_valueExample
A zinc bound to HIS 64 NE2, which has two conformers; the LINK gives no altloc:
Before (0.7.5):
After:
The same for a disulfide read from mmCIF (the SSBOND record was lost)
CYS 5 SG has conformers A and B; the
_struct_connrow has alt_id?.Before (0.7.5): only the CRYST1 line - no SSBOND.
After:
Change
New
find_connection_atoms(st, con)(declared into_pdb.hpp, next touse_hetatm()):find_cra()for both partners, and if a partner without altlocnames an atom that is present only in alternative conformations, the closest
pair of atoms of the same conformer - as
complete_ssbond()already does whenreading SSBOND records. It is used by
write_struct_conn()and by the SSBONDand LINK writers.
(
?/ blank for such a partner).Tests
tests/test_mol.py:test_link_to_altloc_atomsandtest_ssbond_to_altloc_atoms, both failing without the change. Locally thePython tests and
cpptestpass.Not in this PR: whether such a link should become one link per conformer, as
the wwPDB writes them (one
_struct_connrow per altloc) - I will raise thatseparately in an issue.