https://github.com/datakinds/stoichiometry-toolkit
A terminal application for analyzing reactions and chemical formulas.
https://github.com/datakinds/stoichiometry-toolkit
calculator chemistry ruby stoichiometry terminal toolkit
Last synced: 2 months ago
JSON representation
A terminal application for analyzing reactions and chemical formulas.
- Host: GitHub
- URL: https://github.com/datakinds/stoichiometry-toolkit
- Owner: DataKinds
- Created: 2018-01-31T21:54:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-10T02:17:42.000Z (over 8 years ago)
- Last Synced: 2025-03-24T06:12:36.676Z (over 1 year ago)
- Topics: calculator, chemistry, ruby, stoichiometry, terminal, toolkit
- Language: Ruby
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Stoichiometry Toolkit
===
An interactive toolkit to analyze chemical formulas and perform stoichiometric conversions.
Usage
---
`ruby main.rb`
Requires: a relatively new version of Ruby (>2.0.0)
Example session
---
~~~
┌────────────────────────────────────────────────────┐
│░█▀▀░▀█▀░█▀█░▀█▀░█▀▀░█░█░▀█▀░█▀█░█▄█░█▀▀░▀█▀░█▀▄░█░█│
│░▀▀█░░█░░█░█░░█░░█░░░█▀█░░█░░█░█░█░█░█▀▀░░█░░█▀▄░░█░│
│░▀▀▀░░▀░░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀▀▀░▀░▀░▀▀▀░░▀░░▀░▀░░▀░│
└────────────────────────────────────────────────────┘
Hello, and welcome to the stoichiometry toolbox. Type `r` for a reaction or `f` for a single chemical formula, then strike `Return`.
r
Input the reactant(s), separated by a `+`. Note: do not add the coefficients. They will be automatically generated.
MgCl2 + Al2(SO3)3
Input the product(s), separated by a `+`.
MgSO3 + AlCl3
Original reaction:
MgCl2 + Al2(SO3)3 → MgSO3 + AlCl3
Balanced reaction:
3MgCl2 + Al2(SO3)3 → 3MgSO3 + 2AlCl3
What would you like to do with this reaction?
Perform a stoichiometric (c)onversion
Find the (l)imiting reactant
(Q)uit to the main page
c
What unit are you asking for?
(l): liters
(mc): molecules
(g): grams
mc
Of?
Reactants:
(0): MgCl2
(1): Al2(SO3)3
Products:
(2): MgSO3
(3): AlCl3
0
What quantity are you given?
4.78e24
What unit are you given?
(l): liters
(mc): molecules
(g): grams
mc
Of?
Reactants:
(0): MgCl2
(1): Al2(SO3)3
Products:
(2): MgSO3
(3): AlCl3
1
4.78e+24 mc Al2(SO3)3 | 1 mol | 3 mol MgCl2 | 6.022e+23 mc
--------------------------------------------------------------------- = 1.434e+25 mc MgCl2
| 6.022e+23 mc | 1 mol Al2(SO3)3 | 1 mol
What would you like to do with this reaction?
Perform a stoichiometric (c)onversion
Find the (l)imiting reactant
(Q)uit to the main page
q
~~~
About
---
Please submit a pull request or an issue if something doesn't work right. I'm a one man team, so I'm not going to be able to get to every issue ASAP. Expect flaws, etc, etc. Message me on https://twitter.com/aearnus or on Discord: @Aearnus#7521 for something urgent.
Shoot me a message if you'd be willing to donate for this. I'll set up a donation box.
License
---
GNU GPLv3
Provided as-is, with no guarantee for updates and support (unless you pay me :) ).