purcell / chembalance

Balance chemical equations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chembalance.el

Balance chemical equations.

Installation:

After installing the package (or copying it to your load-path), add this to your init file:

(require 'chembalance)

Usage:

It works interactively (entering your equation at the minibuffer) and also with region.

M-x chembalance => goes to the minibuffer. Enter equation.

Ex. FeS + O2 => Fe2O3 + SO2

It returns:

Balanced reaction : 4 FeS + 7 O2 => 2 Fe2O3 + 4 SO2

You can also use it to check if a reaction is already balanced.

You can mark a region with a chemical equation and then M-x chembalance.

It will give you the balanced equation.

Chembalance supports formulas with parentheses.

Ex: 3 Hg(OH)2 + 2 H3PO4 => Hg3(PO4)2 + 6 H2O

Customize:

To customize chembalance, do M-x customize-group RET chembalance.

There are two custom variables:

chembalance-arrow-syntax (list of accepted arrows).

chembalance-insert-string (if non-nil, when you call chembalance with selected region, chembalance will kill that region and insert the balanced reaction).

Please, email me your comments, bugs, improvements or opinions on this package to sergi.ruiz.trepat@gmail.com.

About

Balance chemical equations

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%