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.19.0 to 5.19.1

2

lib-esm/path/getAllAtomsPaths.d.ts

@@ -11,3 +11,3 @@ import { Molecule } from 'openchemlib';

path: number[];
distance: number;
pathLength: number;
}

@@ -14,0 +14,0 @@ /**

@@ -16,3 +16,3 @@ /**

let atomPaths = [];
atomPaths.push({ path: [i], distance: 0 });
atomPaths.push({ path: [i], pathLength: 0 });
oneAtomPaths.push(atomPaths);

@@ -32,3 +32,3 @@ let nextIndexes = [0];

const previousPath = oneAtomPaths[sphere - 1][index].path;
for (let conn = 0; conn < molecule.getConnAtoms(atom); conn++) {
for (let conn = 0; conn < molecule.getAllConnAtoms(atom); conn++) {
const connectedAtom = molecule.getConnAtom(atom, conn);

@@ -41,3 +41,3 @@ if (previousPath.includes(connectedAtom))

path: [...previousPath, connectedAtom],
distance: sphere,
pathLength: sphere,
});

@@ -44,0 +44,0 @@ }

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

interface GetAtomPathOptions {
distance?: number;
pathLength?: number;
}

@@ -19,0 +19,0 @@ interface GetHoseFragmentOptions {

@@ -97,9 +97,9 @@ import { getAllAtomsPaths } from '../path/getAllAtomsPaths.js';

getAtomPaths(atom1, atom2, options = {}) {
const { distance } = options;
if (distance !== undefined && distance > this.options.maxPathLength) {
const { pathLength } = options;
if (pathLength !== undefined && pathLength > this.options.maxPathLength) {
throw new Error('The distance is too long, you should increase the maxPathLength when instanciating the TopicMolecule');
}
const atomPaths = this.atomsPaths[atom1];
const minDistance = distance || 0;
const maxDistance = distance || this.options.maxPathLength;
const minDistance = pathLength || 0;
const maxDistance = pathLength || this.options.maxPathLength;
const paths = [];

@@ -106,0 +106,0 @@ for (let i = minDistance; i <= maxDistance; i++) {

@@ -11,3 +11,3 @@ import { Molecule } from 'openchemlib';

path: number[];
distance: number;
pathLength: number;
}

@@ -14,0 +14,0 @@ /**

@@ -19,3 +19,3 @@ "use strict";

let atomPaths = [];
atomPaths.push({ path: [i], distance: 0 });
atomPaths.push({ path: [i], pathLength: 0 });
oneAtomPaths.push(atomPaths);

@@ -35,3 +35,3 @@ let nextIndexes = [0];

const previousPath = oneAtomPaths[sphere - 1][index].path;
for (let conn = 0; conn < molecule.getConnAtoms(atom); conn++) {
for (let conn = 0; conn < molecule.getAllConnAtoms(atom); conn++) {
const connectedAtom = molecule.getConnAtom(atom, conn);

@@ -44,3 +44,3 @@ if (previousPath.includes(connectedAtom))

path: [...previousPath, connectedAtom],
distance: sphere,
pathLength: sphere,
});

@@ -47,0 +47,0 @@ }

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

interface GetAtomPathOptions {
distance?: number;
pathLength?: number;
}

@@ -19,0 +19,0 @@ interface GetHoseFragmentOptions {

@@ -100,9 +100,9 @@ "use strict";

getAtomPaths(atom1, atom2, options = {}) {
const { distance } = options;
if (distance !== undefined && distance > this.options.maxPathLength) {
const { pathLength } = options;
if (pathLength !== undefined && pathLength > this.options.maxPathLength) {
throw new Error('The distance is too long, you should increase the maxPathLength when instanciating the TopicMolecule');
}
const atomPaths = this.atomsPaths[atom1];
const minDistance = distance || 0;
const maxDistance = distance || this.options.maxPathLength;
const minDistance = pathLength || 0;
const maxDistance = pathLength || this.options.maxPathLength;
const paths = [];

@@ -109,0 +109,0 @@ for (let i = minDistance; i <= maxDistance; i++) {

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

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

@@ -13,3 +13,3 @@ import { Molecule } from 'openchemlib';

path: number[];
distance: number;
pathLength: number;
}

@@ -36,3 +36,3 @@

let atomPaths: AtomPath[] = [];
atomPaths.push({ path: [i], distance: 0 });
atomPaths.push({ path: [i], pathLength: 0 });
oneAtomPaths.push(atomPaths);

@@ -56,3 +56,3 @@

const previousPath = oneAtomPaths[sphere - 1][index].path;
for (let conn = 0; conn < molecule.getConnAtoms(atom); conn++) {
for (let conn = 0; conn < molecule.getAllConnAtoms(atom); conn++) {
const connectedAtom = molecule.getConnAtom(atom, conn);

@@ -64,3 +64,3 @@ if (previousPath.includes(connectedAtom)) continue;

path: [...previousPath, connectedAtom],
distance: sphere,
pathLength: sphere,
});

@@ -67,0 +67,0 @@ }

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

*/
distance?: number;
pathLength?: number;
}

@@ -177,4 +177,4 @@

getAtomPaths(atom1: number, atom2: number, options: GetAtomPathOptions = {}) {
const { distance } = options;
if (distance !== undefined && distance > this.options.maxPathLength) {
const { pathLength } = options;
if (pathLength !== undefined && pathLength > this.options.maxPathLength) {
throw new Error(

@@ -185,4 +185,4 @@ 'The distance is too long, you should increase the maxPathLength when instanciating the TopicMolecule',

const atomPaths = this.atomsPaths[atom1];
const minDistance = distance || 0;
const maxDistance = distance || this.options.maxPathLength;
const minDistance = pathLength || 0;
const maxDistance = pathLength || this.options.maxPathLength;
const paths = [];

@@ -189,0 +189,0 @@ for (let i = minDistance; i <= maxDistance; i++) {

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