소스 검색

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;