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

can't ignore atoms with zero occupancy

- is too often the case when just not set
parent 613cdc31
No related branches found
No related tags found
No related merge requests found
......@@ -102,9 +102,7 @@ function findPairBonds(unitA: Unit.Atomic, unitB: Unit.Atomic, props: BondComput
if (added) continue;
}
// ignore atoms with zero occupancy (assuming they are not actually atoms)
const occA = occupancyA.value(aI);
if (hasOccupancy && occA === 0) continue;
const { indices, count, squaredDistances } = lookup3d.find(imageA[0], imageA[1], imageA[2], MAX_RADIUS);
if (count === 0) continue;
......
......@@ -39,7 +39,6 @@ function _computeBonds(unit: Unit.Atomic, props: BondComputationProps): IntraUni
const atomCount = unit.elements.length;
const { elements: atoms, residueIndex, chainIndex } = unit;
const { type_symbol, label_atom_id, label_alt_id } = unit.model.atomicHierarchy.atoms;
const { occupancy } = unit.model.atomicConformation;
const { label_comp_id, label_seq_id } = unit.model.atomicHierarchy.residues;
const { index } = unit.model.atomicHierarchy;
const { byEntityKey } = unit.model.sequence;
......@@ -117,9 +116,6 @@ function _computeBonds(unit: Unit.Atomic, props: BondComputationProps): IntraUni
}
lastResidue = raI;
// ignore atoms with zero occupancy (assuming they are not actually atoms)
if (occupancy.isDefined && occupancy.value(aI) === 0) continue;
const aeI = getElementIdx(type_symbol.value(aI));
const atomIdA = label_atom_id.value(aI);
const componentPairs = componentMap ? componentMap.get(atomIdA) : void 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment