Преглед изворни кода

fix double bonds from sctruct_conn records

dsehnal пре 3 година
родитељ
комит
bee3dc4595
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/mol-model/structure/structure/unit/bonds/intra-compute.ts

+ 1 - 1
src/mol-model/structure/structure/unit/bonds/intra-compute.ts

@@ -133,7 +133,7 @@ function findBonds(unit: Unit.Atomic, props: BondComputationProps): IntraUnitBon
 
                 const p = partnerA.atomIndex === aI ? partnerB : partnerA;
                 const _bI = SortedArray.indexOf(unit.elements, p.atomIndex) as StructureElement.UnitIndex;
-                if (_bI < 0) continue;
+                if (_bI < 0 || atoms[_bI] < aI) continue;
 
                 atomA[atomA.length] = _aI;
                 atomB[atomB.length] = _bI;