openchemlib 9.15.0 → 9.16.1

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.
@@ -3044,6 +3044,7 @@ export interface DepictorOptions {
3044
3044
  noImplicitHydrogen?: boolean;
3045
3045
  drawBondsInGray?: boolean;
3046
3046
  noCarbonLabelWithCustomLabel?: boolean;
3047
+ noAtomCustomLabels?: boolean;
3047
3048
  }
3048
3049
 
3049
3050
  export declare class Reaction {
@@ -7025,7 +7025,7 @@ function getExports($wnd) {
7025
7025
  }
7026
7026
  isSmallCustomLabelOnly = false;
7027
7027
  isSmallCustomLabel = false;
7028
- atomStr = this.mMol.getAtomCustomLabel_0(atom);
7028
+ atomStr = (this.mDisplayMode & 65536) != 0 ? null : this.mMol.getAtomCustomLabel_0(atom);
7029
7029
  if (jsNotEquals(atomStr, null) && jl.startsWith_Ljava_lang_String__Z__devirtual$(atomStr, "]")) {
7030
7030
  isSmallCustomLabelOnly = jsEquals(isoStr, null);
7031
7031
  isSmallCustomLabel = true;
@@ -8068,6 +8068,7 @@ function getExports($wnd) {
8068
8068
  carc2.cDModeBondNo = 4;
8069
8069
  carc2.cDModeDrawBondsInGray = 16384;
8070
8070
  carc2.cDModeHiliteAllQueryFeatures = 8;
8071
+ carc2.cDModeNoAtomCustomLabels = 65536;
8071
8072
  carc2.cDModeNoCarbonLabelWithCustomLabel = 32768;
8072
8073
  carc2.cDModeNoColorOnESRAndCIP = 4096;
8073
8074
  carc2.cDModeNoImplicitAtomLabelColors = 1024;
@@ -15642,15 +15643,21 @@ function getExports($wnd) {
15642
15643
  return -$wnd.Math.atan2(v2.getLength() * v1.dot(n2), n1.dot(n2));
15643
15644
  };
15644
15645
  _.changeAtom_0 = function changeAtom(atom, atomicNo, mass, abnormalValence, radical) {
15646
+ var changed;
15645
15647
  if ((atomicNo == 1 || atomicNo == 151 || atomicNo == 152) && this.getOccupiedValence_0(atom) > 1)
15646
15648
  return false;
15649
+ changed = this.mIsFragment && neq(and_0(this.mAtomQueryFeatures[atom], not_0(1)), 0);
15647
15650
  this.mAtomQueryFeatures[atom] = and_0(this.mAtomQueryFeatures[atom], not_0(1));
15648
- if (jsNotEquals(this.mAtomList, null))
15651
+ if (jsNotEquals(this.mAtomList, null) && jsNotEquals(this.mAtomList[atom], null)) {
15649
15652
  this.mAtomList[atom] = null;
15650
- if (jsNotEquals(this.mAtomCustomLabel, null))
15653
+ changed = true;
15654
+ }
15655
+ if (jsNotEquals(this.mAtomCustomLabel, null) && jsNotEquals(this.mAtomCustomLabel[atom], null)) {
15651
15656
  this.mAtomCustomLabel[atom] = null;
15657
+ changed = true;
15658
+ }
15652
15659
  if (atomicNo == this.mAtomicNo[atom] && mass == this.mAtomMass[atom] && abnormalValence == this.getAtomAbnormalValence_0(atom) && radical == this.getAtomRadical_0(atom))
15653
- return false;
15660
+ return changed;
15654
15661
  if (atomicNo == 151 || atomicNo == 152) {
15655
15662
  mass = atomicNo - 149;
15656
15663
  atomicNo = 1;
@@ -40052,6 +40059,8 @@ function getExports($wnd) {
40052
40059
  return null;
40053
40060
  }
40054
40061
  productIndex = jl.indexOf_I_I__devirtual$(rxnCode, 33);
40062
+ if (productIndex == -1)
40063
+ return null;
40055
40064
  isProduct = false;
40056
40065
  idcodeIndex = productIndex == 0 ? 1 : 0;
40057
40066
  mappingIndex = 0;
@@ -40061,21 +40070,13 @@ function getExports($wnd) {
40061
40070
  else
40062
40071
  rxn.clear_0();
40063
40072
  while (idcodeIndex != -1) {
40064
- if (productIndex != -1 && idcodeIndex > productIndex) {
40073
+ if (idcodeIndex > productIndex)
40065
40074
  isProduct = true;
40066
- }
40067
40075
  delimiterIndex = jl.indexOf_II_I__devirtual$(rxnCode, 32, idcodeIndex);
40068
- if (!isProduct && (delimiterIndex > productIndex || delimiterIndex == -1)) {
40076
+ if (productIndex > idcodeIndex && (delimiterIndex > productIndex || delimiterIndex == -1))
40069
40077
  delimiterIndex = productIndex;
40070
- }
40071
- idcode = null;
40072
- if (delimiterIndex == -1) {
40073
- idcode = jl.substring_I_Ljava_lang_String___devirtual$(rxnCode, idcodeIndex);
40074
- idcodeIndex = -1;
40075
- } else {
40076
- idcode = jl.substring_II_Ljava_lang_String___devirtual$(rxnCode, idcodeIndex, delimiterIndex);
40077
- idcodeIndex = delimiterIndex + 1;
40078
- }
40078
+ idcode = delimiterIndex == -1 ? jl.substring_I_Ljava_lang_String___devirtual$(rxnCode, idcodeIndex) : jl.substring_II_Ljava_lang_String___devirtual$(rxnCode, idcodeIndex, delimiterIndex);
40079
+ idcodeIndex = delimiterIndex == -1 || delimiterIndex == jl.length__I__devirtual$_0(rxnCode) - 1 ? -1 : delimiterIndex + 1;
40079
40080
  mapping = null;
40080
40081
  if (jsNotEquals(rxnMapping, null) && !jl.isEmpty__Z__devirtual$(rxnMapping)) {
40081
40082
  delimiterIndex = jl.indexOf_II_I__devirtual$(rxnMapping, 32, mappingIndex);
@@ -40245,8 +40246,8 @@ function getExports($wnd) {
40245
40246
  coordsSequence.append_9(coords[index_0]);
40246
40247
  idcode[index_0] = "";
40247
40248
  }
40249
+ idcodeSequence.append_4(33);
40248
40250
  if (reaction.getProducts_0() != 0) {
40249
- idcodeSequence.append_4(33);
40250
40251
  if (reaction.getReactants_0() != 0) {
40251
40252
  mappingSequence.append_4(32);
40252
40253
  coordsSequence.append_4(32);
@@ -47126,7 +47127,7 @@ function getExports($wnd) {
47126
47127
  this.setCurrentTool(18);
47127
47128
  else if (key == 32)
47128
47129
  this.setCurrentTool(2);
47129
- else if (key == -4)
47130
+ else if (key == 48)
47130
47131
  this.setCurrentTool(4);
47131
47132
  else if (key == 116)
47132
47133
  this.setCurrentTool(21);
@@ -48953,7 +48954,7 @@ function getExports($wnd) {
48953
48954
  if (degenerated) {
48954
48955
  new carcc3.CoordinateInventor_0(0).invent(mol);
48955
48956
  }
48956
- mol.ensureHelperArrays_0(255);
48957
+ mol.ensureHelperArrays_0(95);
48957
48958
  viewMode = cargju.getDepictorViewMode(options);
48958
48959
  displayMode = cargju.getDepictorDisplayMode(options);
48959
48960
  d = new carc2.SVGDepictor(mol, displayMode, id_0);
@@ -51447,6 +51448,8 @@ function getExports($wnd) {
51447
51448
  displayMode |= 128;
51448
51449
  if (options.noCarbonLabelWithCustomLabel)
51449
51450
  displayMode |= 32768;
51451
+ if (options.noAtomCustomLabels)
51452
+ displayMode |= 65536;
51450
51453
  if (options.showSymmetryAny)
51451
51454
  displayMode |= 768;
51452
51455
  if (options.showSymmetrySimple)
@@ -71390,7 +71393,7 @@ function getExports($wnd) {
71390
71393
  $sendStats("moduleStartup", "end");
71391
71394
  $gwt && $gwt.permProps && __gwtModuleFunction.__moduleStartupDone($gwt.permProps);
71392
71395
  const toReturn = $wnd["OCL"];
71393
- toReturn.version = "9.15.0";
71396
+ toReturn.version = "9.16.1";
71394
71397
  return toReturn;
71395
71398
  }
71396
71399
  var isBrowserWindow = typeof window !== "undefined" && typeof window.document !== "undefined";
@@ -71534,8 +71537,8 @@ export {
71534
71537
  };
71535
71538
  /**
71536
71539
  * openchemlib - Manipulate molecules
71537
- * @version v9.15.0
71538
- * @date 2025-10-31T11:31:21.849Z
71540
+ * @version v9.16.1
71541
+ * @date 2025-11-05T07:35:22.900Z
71539
71542
  * @link https://github.com/cheminfo/openchemlib-js
71540
71543
  * @license BSD-3-Clause
71541
71544
  */