Преглед на файлове

ignore H-H index-pair bonds

Alexander Rose преди 4 години
родител
ревизия
61c63df9e9

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

@@ -75,6 +75,7 @@ function findPairBonds(unitA: Unit.Atomic, unitB: Unit.Atomic, props: BondComput
                 const _bI = SortedArray.indexOf(unitA.elements, indexPairs.b[i]) as StructureElement.UnitIndex;
                 if (_bI < 0) continue;
                 if (symmetryA[i] === symmetryB[i]) continue;
+                if (type_symbolA.value(aI) === 'H' && type_symbolB.value(indexPairs.b[i]) === 'H') continue;
                 if (symmUnitA === symmetryA[i] && symmUnitB === symmetryB[i]) {
                     builder.add(_aI, _bI, { order: order[i], flag: BondType.Flag.Covalent });
                 }

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

@@ -67,6 +67,7 @@ function _computeBonds(unit: Unit.Atomic, props: BondComputationProps): IntraUni
                 const _bI = SortedArray.indexOf(unit.elements, indexPairs.b[i]) as StructureElement.UnitIndex;
                 if (_bI < 0) continue;
                 if (edgeProps.symmetryA[i] !== edgeProps.symmetryB[i]) continue;
+                if (type_symbol.value(aI) === 'H' && type_symbol.value(indexPairs.b[i]) === 'H') continue;
                 atomA[atomA.length] = _aI;
                 atomB[atomB.length] = _bI;
                 order[order.length] = edgeProps.order[i];