Skip to content
Snippets Groups Projects
Commit f5467dd3 authored by Alexander Rose's avatar Alexander Rose
Browse files

allow intra-residue contacts in single-residue models

parent 847678ea
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ function validPair(structure: Structure, infoA: Features.Info, infoB: Features.I ...@@ -44,7 +44,7 @@ function validPair(structure: Structure, infoA: Features.Info, infoB: Features.I
const altA = altLoc(infoA.unit, indexA); const altA = altLoc(infoA.unit, indexA);
const altB = altLoc(infoB.unit, indexB); const altB = altLoc(infoB.unit, indexB);
if (altA && altB && altA !== altB) return false; // incompatible alternate location id if (altA && altB && altA !== altB) return false; // incompatible alternate location id
if (infoA.unit.residueIndex[infoA.unit.elements[indexA]] === infoB.unit.residueIndex[infoB.unit.elements[indexB]] && infoA.unit === infoB.unit) return false; // same residue if (infoA.unit === infoB.unit && infoA.unit.model.atomicHierarchy.residueAtomSegments.count > 1 && infoA.unit.residueIndex[infoA.unit.elements[indexA]] === infoB.unit.residueIndex[infoB.unit.elements[indexB]]) return false; // same residue (and more than one residue)
// e.g. no hbond if donor and acceptor are bonded // e.g. no hbond if donor and acceptor are bonded
if (connectedTo(structure, infoA.unit, indexA, infoB.unit, indexB)) return false; if (connectedTo(structure, infoA.unit, indexA, infoB.unit, indexB)) return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment