Open Babel Binding for Node.js
Open Babel is a chemical toolbox designed to speak the many languages of chemical data written in C++. Now you can use the Open Babel features in node.js !
Contents
Installation
Linux
First of all you should install openbabel
with header files.
sudo apt-get install libopenbabel-dev
Then you can easily install this package using npm
npm install openbabel
OS X
Install openbabel
using brew
brew install open-babelnpm install openbabel
Usage
Check the Documentation API for more details.
Use the openbabel
module in your project.
var ob = ;
Conversion
Read chemical file formats
Create an instance of ob.Conversion
:
var conversion = ;var mol = conversion;console;
And you can use fs
to read chimcal data from files :
var fs = ; var data = ;var conversion = ;var mol = conversion;console;
Write chemical file formats
Use an ob.Conversion
instance :
var str = conversion;console;
And also you can export it as a file :
var str = conversion;fs;
ForceField
Energy Calculation
Create an instance of ob.Conversion
using The ob.Conversion.findForceField
factory :
var ff = obConversion;ff;console;
Conformers search
Call one of systematicRotorSearch
, randomRotorSearch
, weightedRotorSearch
. (Read more in API)
console; // Before getting conformerff;console; // After getting conformer
Atom types
You can get data which is set for an atom by calling getData
method such as FFAtomType
.
ff;console;