All Projects → chemplexity → molecules

chemplexity / molecules

Licence: MIT License
chemical graph theory library for JavaScript

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to molecules

senpai
Molecular dynamics simulation software
Stars: ✭ 124 (+49.4%)
Mutual labels:  science, chemistry, cheminformatics
CATmistry
Chemistry, Gamified
Stars: ✭ 15 (-81.93%)
Mutual labels:  science, chemistry
mongodb-chemistry
Ideas for chemical similarity searches in MongoDB.
Stars: ✭ 23 (-72.29%)
Mutual labels:  chemistry, cheminformatics
bioicons
A library of free open source icons for science illustrations in biology and chemistry
Stars: ✭ 665 (+701.2%)
Mutual labels:  science, chemistry
homebrew-cheminformatics
Cheminformatics formulae for the Homebrew package manager
Stars: ✭ 19 (-77.11%)
Mutual labels:  science, cheminformatics
pem-dataset1
Proton Exchange Membrane (PEM) Fuel Cell Dataset
Stars: ✭ 48 (-42.17%)
Mutual labels:  science, chemistry
MolecularGraph.jl
Graph-based molecule modeling toolkit for cheminformatics
Stars: ✭ 144 (+73.49%)
Mutual labels:  chemistry, cheminformatics
organic-chemistry-reaction-prediction-using-NMT
organic chemistry reaction prediction using NMT with Attention
Stars: ✭ 30 (-63.86%)
Mutual labels:  chemistry, cheminformatics
EzReson
An efficient toolkit for chemical resonance analysis based on quantum chemistry calculations. It implements the quantitative theory of resonance by expansion of the wave function from a DFT/HF calculation in terms of those of the Lewis structures.
Stars: ✭ 14 (-83.13%)
Mutual labels:  chemistry, graph-theory
sirius
SIRIUS is a software for discovering a landscape of de-novo identification of metabolites using tandem mass spectrometry. This repository contains the code of the SIRIUS Software (GUI and CLI)
Stars: ✭ 32 (-61.45%)
Mutual labels:  science, cheminformatics
molml
A library to interface molecules and machine learning.
Stars: ✭ 57 (-31.33%)
Mutual labels:  chemistry, cheminformatics
Version3
Version 3 of Chem4Word - A Chemistry Add-In for Microsoft Word
Stars: ✭ 53 (-36.14%)
Mutual labels:  chemistry, cheminformatics
mlearn
Benchmark Suite for Machine Learning Interatomic Potentials for Materials
Stars: ✭ 89 (+7.23%)
Mutual labels:  science, chemistry
py4chemoinformatics
Python for chemoinformatics
Stars: ✭ 78 (-6.02%)
Mutual labels:  chemistry, cheminformatics
periodum
Periodum: An Interactive, Open-Source Periodic Table!
Stars: ✭ 346 (+316.87%)
Mutual labels:  science, chemistry
GLaDOS
Web Interface for ChEMBL @ EMBL-EBI
Stars: ✭ 28 (-66.27%)
Mutual labels:  chemistry, cheminformatics
Atomic-Periodic-Table.Android
Atomic - Periodic Table
Stars: ✭ 33 (-60.24%)
Mutual labels:  science, chemistry
chembience
A Docker-based, cloudable platform for the development of chemoinformatics-centric web applications and microservices.
Stars: ✭ 41 (-50.6%)
Mutual labels:  chemistry, cheminformatics
SciCompforChemists
Scientific Computing for Chemists text for teaching basic computing skills to chemistry students using Python, Jupyter notebooks, and the SciPy stack. This text makes use of a variety of packages including NumPy, SciPy, matplotlib, pandas, seaborn, NMRglue, SymPy, scikit-image, and scikit-learn.
Stars: ✭ 65 (-21.69%)
Mutual labels:  science, chemistry
AMPL
The ATOM Modeling PipeLine (AMPL) is an open-source, modular, extensible software pipeline for building and sharing models to advance in silico drug discovery.
Stars: ✭ 85 (+2.41%)
Mutual labels:  chemistry, cheminformatics

molecules.js

A chemical graph theory library for JavaScript. Latest demo of molecules.js + d3.js here.

Features

  • Import molecules encoded with SMILES chemical line notation.
  • Compute various graph matrices of a molecule (e.g. adjacency, degree, distance, Laplacian, Randic, reciprocal).
  • Compute several topological indices of a molecule (e.g. Balaban, Harary, Hyper-Wiener, Randic, Wiener).
  • Visualize molecules with d3.js force directed graphs.

Imgur

Getting Started

The Molecules module contains the primary functions for loading, saving, computing graph matrices and computing topological indices.

var Molecules = require('molecules.js');

Introduction

A molecule is a graph comprised of nodes (atoms) and edges (bonds). In molecules.js a molecule is an object with the following schema:

molecule = {
   id : Number,
   name : String,
   atoms : Object,
   bonds : Object,
   properties : {
       mass : Number,
       formula : Object
   } 
}

Loading Molecules

// Create a molecule by parsing a SMILES string 
var molecule = Molecules.load.smiles('NCC(O)O');
// Import a molecule from a JSON file
var molecule = Molecules.load.json(url);

Saving Molecules

// Convert a molecule to JSON format
var data = Molecules.save.json(molecule);
// Convert a molecule to a d3 graph object
var graph = Molecules.save.d3(molecule);

Graph Matrices

// Load a molecule of ethanol ('CCO')
var ethanol = Molecules.load.smiles('CCO');

Adjacency Matrix

// Compute the adjacency matrix of ethanol
var adjacencyMatrix = Molecules.topology.matrix.adjacency(ethanol);

//     C  C  O 
// C [ 0, 1, 0 ]
// C [ 1, 0, 1 ]
// O [ 0, 1, 0 ]

Distance Matrix

// Use the adjacency matrix to compute the distance matrix
var distanceMatrix = Molecules.topology.matrix.distance(adjacencyMatrix);

//     C  C  O
// C [ 0, 1, 2 ]
// C [ 1, 0, 1 ]
// O [ 2, 1, 0 ]

Degree Matrix

// Use the adjacency matrix to compute the degree matrix
var degreeMatrix = Molecules.topology.matrix.degree(adjacencyMatrix);

//     C  C  O
// C [ 1, 0, 0 ] 
// C [ 0, 2, 0 ]
// O [ 0, 0, 1 ]

Reciprocal Matrix

// Use the distance matrix to compute the reciprocal matrix
var reciprocalMatrix = Molecules.topology.matrix.reciprocal(distanceMatrix);

//      C    C    O
// C [ 0.0, 1.0, 0.5 ]
// C [ 1.0, 0.0, 1.0 ]
// C [ 0.5, 1.0, 0.0 ]

Laplacian Matrix

// Use the adjacency and degree matrix to compute the Laplacian matrix
var laplacianMatrix = Molecules.topology.matrix.laplacian(adjacencyMatrix, degreeMatrix);

//      C   C   O
// C [  1, -1,  0 ]
// C [ -1,  2, -1 ]
// C [  0, -1,  1 ]

Randic Matrix

// Use the adjacency and degree matrix to compute the Randic matrix
var randicMatrix = Molecules.topology.matrix.randic(adjacencyMatrix, degreeMatrix);

//       C      C      O
// C [ 0.000, 0.707, 0.000 ]
// C [ 0.707, 0.000, 0.707 ]
// O [ 0.000, 0.707, 0.000 ]

Topological Indices

// Load a molecule of ethanol ('CCO')
var ethanol = Molecules.load.smiles('CCO');

// Compute the following graph matrices
var adjacencyMatrix  = Molecules.topology.matrix.adjacency(ethanol);
var distanceMatrix   = Molecules.topology.matrix.distance(adjacencyMatrix);
var degreeMatrix     = Molecules.topology.matrix.degree(adjacencyMatrix);
var reciprocalMatrix = Molecules.topology.matrix.reciprocal(distanceMatrix);
var randicMatrix     = Molecules.topology.matrix.randic(adjacencyMatrix, degreeMatrix);

Wiener Index

// Use the distance matrix to compute the Wiener index
var wienerIndex = Molecules.topology.index.wiener(distanceMatrix);

// 4.0

Hyper-Wiener Index

// Use the distance matrix to compute the Hyper-Wiener index
var hyperwienerIndex = Molecules.topology.index.hyperwiener(distanceMatrix);

// 5.0

Harary Index

// Use the reciprocal matrix to compute the Harary index
var hararyIndex = Molecules.topology.index.harary(reciprocalMatrix);

// 2.5

Balaban Index

// Use the distance matrix to compute the Balaban index
var balabanIndex = Molecules.topology.index.balaban(distanceMatrix);

// 1.632993

Randic Index

// Use the Randic matrix to compute the Randic index
var randicIndex = Molecules.topology.index.randic(randicMatrix);

// 1.414213
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].