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 0.6.1 to 0.7.0

7

CHANGELOG.md
# Changelog
## [0.7.0](https://www.github.com/cheminfo/openchemlib-utils/compare/v0.6.1...v0.7.0) (2021-03-01)
### Features
* allow to initOCL with keepExisting option ([6f9049a](https://www.github.com/cheminfo/openchemlib-utils/commit/6f9049aaad5416d4beeb117eafe680108d67d2ec))
### [0.6.1](https://www.github.com/cheminfo/openchemlib-utils/compare/v0.6.0...v0.6.1) (2021-01-17)

@@ -4,0 +11,0 @@

27

lib/index.js

@@ -22,4 +22,11 @@ 'use strict';

}
function initOCL(newOCL) {
/**
*
* @param {OCL} newOCL
* @param {object} [options={}]
* @param {boolean} [options.keepExisting=false] Will keep current OCL if we initialize more than once
*/
function initOCL(newOCL, options = {}) {
const { keepExisting = false } = options;
if (OCL && keepExisting) return;
if (OCL && OCL !== newOCL) {

@@ -866,3 +873,3 @@ throw new Error('OCL-utils was already initialized with a different OCL');

let fragment;
let fragment$1;

@@ -915,3 +922,3 @@ /**

if (!fragment) fragment = new OCL.Molecule(0, 0);
if (!fragment$1) fragment$1 = new OCL.Molecule(0, 0);

@@ -950,5 +957,5 @@ let atoms = [];

molecule.copyMoleculeByAtoms(fragment, atomMask, true, atomMap);
makeRacemic(fragment);
let oclID = fragment.getCanonizedIDCode(
molecule.copyMoleculeByAtoms(fragment$1, atomMask, true, atomMap);
makeRacemic(fragment$1);
let oclID = fragment$1.getCanonizedIDCode(
OCL.Molecule.CANONIZER_ENCODE_ATOM_CUSTOM_LABELS,

@@ -973,3 +980,3 @@ );

let fragment$1;
let fragment;

@@ -996,4 +1003,4 @@ /**

if (!fragment$1) {
fragment$1 = new OCL.Molecule(0, 0);
if (!fragment) {
fragment = new OCL.Molecule(0, 0);
}

@@ -1000,0 +1007,0 @@

{
"name": "openchemlib-utils",
"version": "0.6.1",
"version": "0.7.0",
"description": "",

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

@@ -9,4 +9,11 @@ let OCL;

}
export function initOCL(newOCL) {
/**
*
* @param {OCL} newOCL
* @param {object} [options={}]
* @param {boolean} [options.keepExisting=false] Will keep current OCL if we initialize more than once
*/
export function initOCL(newOCL, options = {}) {
const { keepExisting = false } = options;
if (OCL && keepExisting) return;
if (OCL && OCL !== newOCL) {

@@ -13,0 +20,0 @@ throw new Error('OCL-utils was already initialized with a different OCL');

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