openchemlib 9.6.0 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openchemlib.debug.js +47 -28
- package/dist/openchemlib.js +9 -9
- package/package.json +12 -12
|
@@ -8258,7 +8258,6 @@ function getExports($wnd) {
|
|
|
8258
8258
|
_.connectSeparatedSingletons = function connectSeparatedSingletons() {
|
|
8259
8259
|
var atom, bond, candidate, current, currentAtom, found, graphAtom, graphLevel, highest, i, isCompatibleBond, j, parent_0, parentAtom;
|
|
8260
8260
|
for (atom = 0; atom < this.mMol.getAtoms_0(); atom++) {
|
|
8261
|
-
this.mMol.ensureHelperArrays_0(1);
|
|
8262
8261
|
if (this.mIsDelocalizedAtom[atom]) {
|
|
8263
8262
|
found = false;
|
|
8264
8263
|
graphAtom = initUnidimensionalArray(cggl.I_classLit, { 6: 1, 4: 1, 1: 1 }, 5, this.mMol.getAtoms_0(), 15, 1);
|
|
@@ -8368,6 +8367,18 @@ function getExports($wnd) {
|
|
|
8368
8367
|
}
|
|
8369
8368
|
this.mPiElectronsAdded = 0;
|
|
8370
8369
|
};
|
|
8370
|
+
_.isAmineOxid = function isAmineOxid(atom, mayChangeAtomCharges) {
|
|
8371
|
+
var connAtom, i;
|
|
8372
|
+
for (i = 0; i < this.mMol.getConnAtoms_0(atom); i++) {
|
|
8373
|
+
connAtom = this.mMol.getConnAtom_0(atom, i);
|
|
8374
|
+
if (this.mMol.getAtomicNo_0(connAtom) == 8 && this.mMol.getConnAtoms_0(connAtom) == 1) {
|
|
8375
|
+
if (mayChangeAtomCharges && this.mMol.getAtomCharge_0(connAtom) == 0)
|
|
8376
|
+
this.mMol.setAtomCharge_0(connAtom, -1);
|
|
8377
|
+
return true;
|
|
8378
|
+
}
|
|
8379
|
+
}
|
|
8380
|
+
return false;
|
|
8381
|
+
};
|
|
8371
8382
|
_.locateDelocalizedDoubleBonds = function locateDelocalizedDoubleBonds(isAromaticBond) {
|
|
8372
8383
|
return this.locateDelocalizedDoubleBonds_0(isAromaticBond, false, false);
|
|
8373
8384
|
};
|
|
@@ -8393,7 +8404,7 @@ function getExports($wnd) {
|
|
|
8393
8404
|
this.promoteObviousBonds();
|
|
8394
8405
|
while (this.promoteOuterShellDelocalizedRingSystems(ringSet, mayChangeAtomCharges))
|
|
8395
8406
|
this.promoteObviousBonds();
|
|
8396
|
-
|
|
8407
|
+
while (this.promoteSixMemberedAromaticRings(ringSet, mayChangeAtomCharges))
|
|
8397
8408
|
this.promoteObviousBonds();
|
|
8398
8409
|
while (this.promoteOneDelocalizationLeak(ringSet, mayChangeAtomCharges))
|
|
8399
8410
|
this.promoteObviousBonds();
|
|
@@ -8406,7 +8417,7 @@ function getExports($wnd) {
|
|
|
8406
8417
|
}
|
|
8407
8418
|
}
|
|
8408
8419
|
if (mayChangeAtomCharges)
|
|
8409
|
-
this.unchargeImmoniumNHChains();
|
|
8420
|
+
this.unchargeImmoniumNHChains(mayChangeAtomCharges);
|
|
8410
8421
|
if (this.mDelocalizedAtoms - this.mPiElectronsAdded >= 2)
|
|
8411
8422
|
this.connectSeparatedSingletons();
|
|
8412
8423
|
for (atom = 0; atom < this.mMol.getAtoms_0(); atom++) {
|
|
@@ -8533,14 +8544,14 @@ function getExports($wnd) {
|
|
|
8533
8544
|
ringAtom = ringSet.getRingAtoms_0(ring);
|
|
8534
8545
|
for (i = 0; i < ringAtom.length; i++) {
|
|
8535
8546
|
atom = ringAtom[i];
|
|
8547
|
+
bondLengthSum = jsEquals(this.mBondLength, null) ? 0 : this.mBondLength[ringBond[i]] + this.mBondLength[ringBond[(i == 0 ? ringAtom.length : i) - 1]];
|
|
8536
8548
|
priority = this.mIsDelocalizedFiveRingMember[atom] ? this.checkAtomTypeLeak5(atom, false) : this.checkAtomTypeLeak7(atom, false);
|
|
8537
8549
|
if (bestDelocalizationLeakPriority < priority) {
|
|
8538
8550
|
bestDelocalizationLeakPriority = priority;
|
|
8539
8551
|
bestDelocalizationLeakIndex = i;
|
|
8540
8552
|
if (jsNotEquals(this.mBondLength, null))
|
|
8541
|
-
bestBondLengthSum =
|
|
8553
|
+
bestBondLengthSum = bondLengthSum;
|
|
8542
8554
|
} else if (bestDelocalizationLeakPriority == priority && jsNotEquals(this.mBondLength, null)) {
|
|
8543
|
-
bondLengthSum = this.mBondLength[(i == 0 ? ringAtom.length : i) - 1] + this.mBondLength[i];
|
|
8544
8555
|
if (bestBondLengthSum < bondLengthSum) {
|
|
8545
8556
|
bestDelocalizationLeakIndex = i;
|
|
8546
8557
|
bestBondLengthSum = bondLengthSum;
|
|
@@ -8801,11 +8812,11 @@ function getExports($wnd) {
|
|
|
8801
8812
|
}
|
|
8802
8813
|
}
|
|
8803
8814
|
};
|
|
8804
|
-
_.unchargeImmoniumNHChains = function unchargeImmoniumNHChains() {
|
|
8815
|
+
_.unchargeImmoniumNHChains = function unchargeImmoniumNHChains(mayChangeAtomCharges) {
|
|
8805
8816
|
var atom, bond, candidate, current, currentAtom, found, graphAtom, graphLevel, highest, i, isCompatibleBond, j, parent_0, parentAtom;
|
|
8806
8817
|
for (atom = 0; atom < this.mMol.getAtoms_0(); atom++) {
|
|
8807
8818
|
this.mMol.ensureHelperArrays_0(1);
|
|
8808
|
-
if (this.mMol.getAtomicNo_0(atom) == 7 && this.mMol.getAtomCharge_0(atom) == 1 && this.mMol.getAtomPi_0(atom) == 1) {
|
|
8819
|
+
if (this.mMol.getAtomicNo_0(atom) == 7 && this.mMol.getAtomCharge_0(atom) == 1 && this.mMol.getAtomPi_0(atom) == 1 && !this.isAmineOxid(atom, mayChangeAtomCharges)) {
|
|
8809
8820
|
found = false;
|
|
8810
8821
|
graphAtom = initUnidimensionalArray(cggl.I_classLit, { 6: 1, 4: 1, 1: 1 }, 5, this.mMol.getAtoms_0(), 15, 1);
|
|
8811
8822
|
parentAtom = initUnidimensionalArray(cggl.I_classLit, { 6: 1, 4: 1, 1: 1 }, 5, this.mMol.getAtoms_0(), 15, 1);
|
|
@@ -17509,7 +17520,7 @@ function getExports($wnd) {
|
|
|
17509
17520
|
newStereoBond = this.preferredTHStereoBond(stereoCenter, false);
|
|
17510
17521
|
if (this.mBondAtom[0][newStereoBond] != stereoCenter) {
|
|
17511
17522
|
this.mBondAtom[1][newStereoBond] = this.mBondAtom[0][newStereoBond];
|
|
17512
|
-
this.mBondAtom[
|
|
17523
|
+
this.mBondAtom[0][newStereoBond] = stereoCenter;
|
|
17513
17524
|
}
|
|
17514
17525
|
}
|
|
17515
17526
|
}
|
|
@@ -24544,19 +24555,21 @@ function getExports($wnd) {
|
|
|
24544
24555
|
return (this.mBondRingFeatures[bond] & 65536) != 0;
|
|
24545
24556
|
};
|
|
24546
24557
|
_.isAtomMember_0 = function isAtomMember(ringNo, atom) {
|
|
24547
|
-
var
|
|
24548
|
-
ringAtom = castTo(this.mRingAtomSet.getAtIndex(ringNo), 6);
|
|
24549
|
-
|
|
24550
|
-
if (atom == ringAtom
|
|
24558
|
+
var ringAtom, ringAtom$array, ringAtom$index, ringAtom$max;
|
|
24559
|
+
for (ringAtom$array = castTo(this.mRingAtomSet.getAtIndex(ringNo), 6), ringAtom$index = 0, ringAtom$max = ringAtom$array.length; ringAtom$index < ringAtom$max; ++ringAtom$index) {
|
|
24560
|
+
ringAtom = ringAtom$array[ringAtom$index];
|
|
24561
|
+
if (atom == ringAtom)
|
|
24551
24562
|
return true;
|
|
24563
|
+
}
|
|
24552
24564
|
return false;
|
|
24553
24565
|
};
|
|
24554
24566
|
_.isBondMember_0 = function isBondMember(ringNo, bond) {
|
|
24555
|
-
var
|
|
24556
|
-
ringBond = castTo(this.mRingBondSet.getAtIndex(ringNo), 6);
|
|
24557
|
-
|
|
24558
|
-
if (bond == ringBond
|
|
24567
|
+
var ringBond, ringBond$array, ringBond$index, ringBond$max;
|
|
24568
|
+
for (ringBond$array = castTo(this.mRingBondSet.getAtIndex(ringNo), 6), ringBond$index = 0, ringBond$max = ringBond$array.length; ringBond$index < ringBond$max; ++ringBond$index) {
|
|
24569
|
+
ringBond = ringBond$array[ringBond$index];
|
|
24570
|
+
if (bond == ringBond)
|
|
24559
24571
|
return true;
|
|
24572
|
+
}
|
|
24560
24573
|
return false;
|
|
24561
24574
|
};
|
|
24562
24575
|
_.isDelocalized_0 = function isDelocalized_0(ringNo) {
|
|
@@ -24667,20 +24680,22 @@ function getExports($wnd) {
|
|
|
24667
24680
|
}
|
|
24668
24681
|
};
|
|
24669
24682
|
_.updateRingSize = function updateRingSize(ringAtom, ringBond) {
|
|
24670
|
-
var
|
|
24683
|
+
var atom, atom$array, atom$index, atom$max, bond, bond$array, bond$index, bond$max, currentSize, ringSize;
|
|
24671
24684
|
ringSize = ringAtom.length;
|
|
24672
|
-
for (
|
|
24673
|
-
|
|
24685
|
+
for (atom$array = ringAtom, atom$index = 0, atom$max = atom$array.length; atom$index < atom$max; ++atom$index) {
|
|
24686
|
+
atom = atom$array[atom$index];
|
|
24687
|
+
currentSize = this.mAtomRingFeatures[atom] & 65535;
|
|
24674
24688
|
if (currentSize == 0 || currentSize > ringSize) {
|
|
24675
|
-
this.mAtomRingFeatures[
|
|
24676
|
-
this.mAtomRingFeatures[
|
|
24689
|
+
this.mAtomRingFeatures[atom] &= ~65535;
|
|
24690
|
+
this.mAtomRingFeatures[atom] |= ringSize;
|
|
24677
24691
|
}
|
|
24678
24692
|
}
|
|
24679
|
-
for (
|
|
24680
|
-
|
|
24693
|
+
for (bond$array = ringBond, bond$index = 0, bond$max = bond$array.length; bond$index < bond$max; ++bond$index) {
|
|
24694
|
+
bond = bond$array[bond$index];
|
|
24695
|
+
currentSize = this.mBondRingFeatures[bond] & 65535;
|
|
24681
24696
|
if (currentSize == 0 || currentSize > ringSize) {
|
|
24682
|
-
this.mBondRingFeatures[
|
|
24683
|
-
this.mBondRingFeatures[
|
|
24697
|
+
this.mBondRingFeatures[bond] &= ~65535;
|
|
24698
|
+
this.mBondRingFeatures[bond] |= ringSize;
|
|
24684
24699
|
}
|
|
24685
24700
|
}
|
|
24686
24701
|
};
|
|
@@ -43968,6 +43983,10 @@ function getExports($wnd) {
|
|
|
43968
43983
|
queryFeatures |= ringSize << 17;
|
|
43969
43984
|
}
|
|
43970
43985
|
}
|
|
43986
|
+
if (this.mCBMatchFormalOrder.isSelected_0())
|
|
43987
|
+
queryFeatures |= 8388608;
|
|
43988
|
+
if (this.mCBMatchStereo.isSelected_0())
|
|
43989
|
+
queryFeatures |= 1048576;
|
|
43971
43990
|
}
|
|
43972
43991
|
this.mMol.setBondQueryFeature_0(bond, 16777215, false);
|
|
43973
43992
|
this.mMol.setBondQueryFeature_0(bond, queryFeatures, true);
|
|
@@ -71023,7 +71042,7 @@ function getExports($wnd) {
|
|
|
71023
71042
|
$sendStats("moduleStartup", "end");
|
|
71024
71043
|
$gwt && $gwt.permProps && __gwtModuleFunction.__moduleStartupDone($gwt.permProps);
|
|
71025
71044
|
const toReturn = $wnd["OCL"];
|
|
71026
|
-
toReturn.version = "9.
|
|
71045
|
+
toReturn.version = "9.7.0";
|
|
71027
71046
|
return toReturn;
|
|
71028
71047
|
}
|
|
71029
71048
|
var isBrowserWindow = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
@@ -71167,8 +71186,8 @@ export {
|
|
|
71167
71186
|
};
|
|
71168
71187
|
/**
|
|
71169
71188
|
* openchemlib - Manipulate molecules
|
|
71170
|
-
* @version v9.
|
|
71171
|
-
* @date 2025-
|
|
71189
|
+
* @version v9.7.0
|
|
71190
|
+
* @date 2025-08-13T10:05:12.842Z
|
|
71172
71191
|
* @link https://github.com/cheminfo/openchemlib-js
|
|
71173
71192
|
* @license BSD-3-Clause
|
|
71174
71193
|
*/
|