Ver Fonte

fix double bonds from sctruct_conn records

dsehnal há 3 anos atrás
pai
commit
bee3dc4595

+ 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;