rxn_parser

0.1.2 • Public • Published

rxn-parser.js

Javascript version of elementary reaction expression parser

Build Status

Install

npm install rxn_parser

Test

npm test

Example

> var RxnEquation = require('./rxn_parser.js').RxnEquation;
> var ChemState = require('./rxn_parser.js').ChemState;
> var ChemFormula = require('./rxn_parser.js').ChemFormula;

// Operate chemial equation.
> var equation = new RxnEquation('CO_s + O_s <-> CO-O_s + 2*_s -> CO2_g + 2*_s');
> equation.checkConservation();
true
> var chemStates = equation.toList();
[ ChemState { chemState: 'CO_s + O_s' },
  ChemState { chemState: 'CO-O_s + *_s' },
  ChemState { chemState: 'CO2_g + 2*_s' } ]

// Operate chemical state...
// Operate chemical formual...

Readme

Keywords

Package Sidebar

Install

npm i rxn_parser

Weekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • zjshao