ihmwg / python-ihm

Python package for handling IHM mmCIF and BinaryCIF files
MIT License
14 stars 7 forks source link

Add support for cross-links whose endpoints don't match experimental data #119

Open benmwebb opened 1 year ago

benmwebb commented 1 year ago

By design a cross-link in python-ihm acts on the residue pair identified experimentally, but with assigned asyms, i.e. if an ExperimentalCrossLink acts between EntityA-ResidueX and EntityB-ResidueY then every CrossLink which uses that experimental identification must act on AsymC-ResidueX and AsymD-ResidueY where AsymC is an instance of EntityA and AsymD an instance of EntityB. This matches their use in IMP and most other applications. However, some researchers have elected to model cross-links on different residues, e.g. AsymC-ResidueN / AsymD-ResidueM - perhaps because the experimentally-identified residues were not modeled. The dictionary allows for this but python-ihm does not. Add a new class, perhaps NearbyResidueCrossLink, which takes two Residue arguments, and also handle such mismatched cross-links on read.