Rubychem

RubyChem (pronounced /ˈruːˈbeːˈkːˈem/) is a freely available (MIT License) program, written in Ruby, supporting the calculation of moles, balancing chemical equations and valence orbital calculations.

Example

The Ruby official distribution also includes "irb" (Interactive Ruby Shell), an interactive command-line interpreter which can be used to test code quickly. The following code fragment represents a sample session using irb:

$ irb
irb(main):001:0> require 'rubychem'
irb(main):002:0> RubyChem::Equation.new("C12H26+O2=CO2+H2O").balance
=> 2C12H26 + 37O2 = 24C1O2 + 26H2O1"
gollark: <@!330678593904443393> We can hardly be locked down forever, or even much longer.
gollark: No, that is mediocre things.
gollark: Good things, however, are measured in kelvin-seconds per ohm-katal squared.
gollark: No, bad things are dimensionless.
gollark: According to my calculations, my promotion to owner would increase good things by 2589172.7 and decrease bad things by 1092740.0007.

See also

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.