New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openchemlib-extended

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openchemlib-extended - npm Package Compare versions

Comparing version 1.14.3 to 1.14.4

2

package.json
{
"name": "openchemlib-extended",
"version": "1.14.3",
"version": "1.14.4",
"description": "Openchemlib extended",

@@ -5,0 +5,0 @@ "keywords": [

@@ -90,4 +90,14 @@ # openchemlib-extended

* mass: put the rounded mass on the diagonal (default: false)
* atomicNo: put the atomic number on the diagonal (default: false)
Example using npm:
```
var OCLE = require('openchemlib-extended');
var molecule = OCLE.Molecule.fromSmiles('c1ccccc1');
var matrix = molecule.getConnectivityMatrix({mass: true, sdt: true});
console.log(matrix);
```
### getMF()

@@ -94,0 +104,0 @@

@@ -5,7 +5,7 @@ 'use strict';

module.exports = function getConnectivityMatrix(options={}) {
var {
sdt,
mass
} = options;
module.exports = function getConnectivityMatrix(options) {
var options = options || {};
var sdt=options.sdt;
var mass=options.mass;
var atomicNo=options.atomicNo;

@@ -17,3 +17,8 @@ this.ensureHelperArrays(OCL.Molecule.cHelperNeighbours);

result[i]=new Array(nbAtoms).fill(0);
result[i][i]=(mass) ? OCL.Molecule.cRoundedMass[this.getAtomicNo(i)] : 1;
if (atomicNo) {
result[i][i]=this.getAtomicNo(i);
} else {
result[i][i]=(mass) ? OCL.Molecule.cRoundedMass[this.getAtomicNo(i)] : 1;
}
}

@@ -20,0 +25,0 @@

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