Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openchemlib-utils

Package Overview
Dependencies
Maintainers
4
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openchemlib-utils - npm Package Compare versions

Comparing version 5.17.0 to 5.18.0

3

lib-esm/topic/getCanonizedHoseCodes.d.ts

@@ -1,4 +0,3 @@

import { HoseCodesOptions } from './HoseCodesOptions.js';
import { TopicMolecule } from './TopicMolecule.js';
export declare function getCanonizedHoseCodes(diaMol: TopicMolecule, options?: HoseCodesOptions): any[];
export declare function getCanonizedHoseCodes(topicMolecule: TopicMolecule): any[];
//# sourceMappingURL=getCanonizedHoseCodes.d.ts.map
import { getHoseCodesForAtomsInternal } from '../hose/getHoseCodesForAtomsInternal.js';
import { tagAtom } from '../util/tagAtom';
export function getCanonizedHoseCodes(diaMol, options = {}) {
const heterotopicSymmetryRanks = diaMol.heterotopicSymmetryRanks;
const moleculeWithH = diaMol.moleculeWithH;
const finalRanks = diaMol.finalRanks;
export function getCanonizedHoseCodes(topicMolecule) {
const options = topicMolecule.options;
const heterotopicSymmetryRanks = topicMolecule.heterotopicSymmetryRanks;
const moleculeWithH = topicMolecule.moleculeWithH;
const finalRanks = topicMolecule.finalRanks;
const canonizedHoseCodes = new Array(moleculeWithH.getAllAtoms());
moleculeWithH.ensureHelperArrays(diaMol.molecule.getOCL().Molecule.cHelperSymmetryStereoHeterotopicity);
moleculeWithH.ensureHelperArrays(topicMolecule.molecule.getOCL().Molecule
.cHelperSymmetryStereoHeterotopicity);
const cache = {};
for (let i = 0; i < diaMol.moleculeWithH.getAllAtoms(); i++) {
for (let i = 0; i < topicMolecule.moleculeWithH.getAllAtoms(); i++) {
const rank = heterotopicSymmetryRanks[i];

@@ -16,3 +18,3 @@ if (rank && cache[rank]) {

}
const tempMolecule = diaMol.moleculeWithH.getCompactCopy();
const tempMolecule = topicMolecule.moleculeWithH.getCompactCopy();
tagAtom(tempMolecule, i);

@@ -19,0 +21,0 @@ const hoses = getHoseCodesForAtomsInternal(tempMolecule, options);

import type { Molecule } from 'openchemlib';
import { HoseCodesOptions } from './HoseCodesOptions.js';
interface ToMolfileOptions {

@@ -13,4 +14,5 @@ version?: 2 | 3;

idCode: string;
options: HoseCodesOptions;
private cache;
constructor(molecule: Molecule);
constructor(molecule: Molecule, options?: HoseCodesOptions);
ensureMapNo(): void;

@@ -17,0 +19,0 @@ toMolfile(options?: ToMolfileOptions): string;

@@ -13,4 +13,5 @@ import { getConnectivityMatrix } from '../util/getConnectivityMatrix.js';

export class TopicMolecule {
constructor(molecule) {
constructor(molecule, options = {}) {
this.originalMolecule = molecule;
this.options = options;
this.idCode = molecule.getIDCode();

@@ -17,0 +18,0 @@ this.molecule = this.originalMolecule.getCompactCopy();

@@ -1,4 +0,3 @@

import { HoseCodesOptions } from './HoseCodesOptions.js';
import { TopicMolecule } from './TopicMolecule.js';
export declare function getCanonizedHoseCodes(diaMol: TopicMolecule, options?: HoseCodesOptions): any[];
export declare function getCanonizedHoseCodes(topicMolecule: TopicMolecule): any[];
//# sourceMappingURL=getCanonizedHoseCodes.d.ts.map

@@ -6,10 +6,12 @@ "use strict";

const tagAtom_1 = require("../util/tagAtom");
function getCanonizedHoseCodes(diaMol, options = {}) {
const heterotopicSymmetryRanks = diaMol.heterotopicSymmetryRanks;
const moleculeWithH = diaMol.moleculeWithH;
const finalRanks = diaMol.finalRanks;
function getCanonizedHoseCodes(topicMolecule) {
const options = topicMolecule.options;
const heterotopicSymmetryRanks = topicMolecule.heterotopicSymmetryRanks;
const moleculeWithH = topicMolecule.moleculeWithH;
const finalRanks = topicMolecule.finalRanks;
const canonizedHoseCodes = new Array(moleculeWithH.getAllAtoms());
moleculeWithH.ensureHelperArrays(diaMol.molecule.getOCL().Molecule.cHelperSymmetryStereoHeterotopicity);
moleculeWithH.ensureHelperArrays(topicMolecule.molecule.getOCL().Molecule
.cHelperSymmetryStereoHeterotopicity);
const cache = {};
for (let i = 0; i < diaMol.moleculeWithH.getAllAtoms(); i++) {
for (let i = 0; i < topicMolecule.moleculeWithH.getAllAtoms(); i++) {
const rank = heterotopicSymmetryRanks[i];

@@ -20,3 +22,3 @@ if (rank && cache[rank]) {

}
const tempMolecule = diaMol.moleculeWithH.getCompactCopy();
const tempMolecule = topicMolecule.moleculeWithH.getCompactCopy();
(0, tagAtom_1.tagAtom)(tempMolecule, i);

@@ -23,0 +25,0 @@ const hoses = (0, getHoseCodesForAtomsInternal_js_1.getHoseCodesForAtomsInternal)(tempMolecule, options);

import type { Molecule } from 'openchemlib';
import { HoseCodesOptions } from './HoseCodesOptions.js';
interface ToMolfileOptions {

@@ -13,4 +14,5 @@ version?: 2 | 3;

idCode: string;
options: HoseCodesOptions;
private cache;
constructor(molecule: Molecule);
constructor(molecule: Molecule, options?: HoseCodesOptions);
ensureMapNo(): void;

@@ -17,0 +19,0 @@ toMolfile(options?: ToMolfileOptions): string;

@@ -16,4 +16,5 @@ "use strict";

class TopicMolecule {
constructor(molecule) {
constructor(molecule, options = {}) {
this.originalMolecule = molecule;
this.options = options;
this.idCode = molecule.getIDCode();

@@ -20,0 +21,0 @@ this.molecule = this.originalMolecule.getCompactCopy();

{
"name": "openchemlib-utils",
"version": "5.17.0",
"version": "5.18.0",
"description": "Various utilities that extends openchemlib-js like HOSE codes or diastereotopic IDs",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

import { getHoseCodesForAtomsInternal } from '../hose/getHoseCodesForAtomsInternal.js';
import { tagAtom } from '../util/tagAtom';
import { HoseCodesOptions } from './HoseCodesOptions.js';
import { TopicMolecule } from './TopicMolecule.js';
export function getCanonizedHoseCodes(
diaMol: TopicMolecule,
options: HoseCodesOptions = {},
) {
const heterotopicSymmetryRanks = diaMol.heterotopicSymmetryRanks;
const moleculeWithH = diaMol.moleculeWithH;
const finalRanks = diaMol.finalRanks;
export function getCanonizedHoseCodes(topicMolecule: TopicMolecule) {
const options = topicMolecule.options;
const heterotopicSymmetryRanks = topicMolecule.heterotopicSymmetryRanks;
const moleculeWithH = topicMolecule.moleculeWithH;
const finalRanks = topicMolecule.finalRanks;
const canonizedHoseCodes = new Array(moleculeWithH.getAllAtoms());
moleculeWithH.ensureHelperArrays(
diaMol.molecule.getOCL().Molecule.cHelperSymmetryStereoHeterotopicity,
topicMolecule.molecule.getOCL().Molecule
.cHelperSymmetryStereoHeterotopicity,
);
const cache: Record<string, any> = {};
for (let i = 0; i < diaMol.moleculeWithH.getAllAtoms(); i++) {
for (let i = 0; i < topicMolecule.moleculeWithH.getAllAtoms(); i++) {
const rank = heterotopicSymmetryRanks[i];

@@ -25,3 +23,3 @@ if (rank && cache[rank]) {

}
const tempMolecule = diaMol.moleculeWithH.getCompactCopy();
const tempMolecule = topicMolecule.moleculeWithH.getCompactCopy();
tagAtom(tempMolecule, i);

@@ -28,0 +26,0 @@ const hoses = getHoseCodesForAtomsInternal(tempMolecule, options);

@@ -5,2 +5,3 @@ import type { Molecule } from 'openchemlib';

import { HoseCodesOptions } from './HoseCodesOptions.js';
import { getCanonizedDiaIDs } from './getCanonizedDiaIDs';

@@ -28,7 +29,9 @@ import { getCanonizedHoseCodes } from './getCanonizedHoseCodes';

idCode: string;
options: HoseCodesOptions;
private cache: any;
constructor(molecule: Molecule) {
constructor(molecule: Molecule, options: HoseCodesOptions = {}) {
this.originalMolecule = molecule;
this.options = options;
this.idCode = molecule.getIDCode();

@@ -35,0 +38,0 @@ this.molecule = this.originalMolecule.getCompactCopy();

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc