tmkontra / stoichkit Goto Github PK
View Code? Open in Web Editor NEWa toolkit for stoichiometry
Home Page: https://crates.io/crates/stoichkit
License: MIT License
a toolkit for stoichiometry
Home Page: https://crates.io/crates/stoichkit
License: MIT License
Hi!
It seems that every time I try to calculate anything using any of the sub-commands, for example:
.../stoichkit/target/release$ ./stoichkit balance H2O+O2 = H2O2
or
.../stoichkit/target/release$ ./stoichkit theoretical-yield "2H2O2" 4.0 = "2H2O" O2
I always get the same error:
error: Found argument '=' which wasn't expected, or isn't valid in this context
(or other argument, like 'O2' or '0.5')
However, the toolkit has compiled properly and --V or --help options are working.
Am I missing something?
Crate has been compiled on Ubuntu 22.04.3 with rustc 1.74.0 (79e9716c9 2023-11-13)
Currently a hydrate molecule would need to be expressed as:
MgCl2(H2O)6
Traditionally, hydrates are denoted with an alternate syntax, since the water is part of the crystal:
MgCl2 * 6 H2O
Purpose: clean up usage of "Substance", "Reagent/Reactant", etc
substance
is a parsed chemical formula (molecule, possibly a hydrate)reactant
is a substance with molar coefficient, a member of a reactionreagent
is a reactant with an amount (grams)For example
C2H4NO2 + H2O = CH3 + NO2 + H2O
returns
0 C2H4NO2 + 1 H2O = 0 CH3 + 0 NO2 + 1 H2O
A null matrix is always a solution, but is not a valid reaction. Some determination should be done to see if this is a bug/edge case in matrix decomposition or just a result of an impossible reaction.
If the reaction truly cannot be balanced, that error should be returned
Currently, the parser is adapted from solution 2 here. It uses a mutable iteration pointer and performs look-ahead based on the current character.
This is inflexible, and it would be nice to implement a strongly typed state machine that can handle spaces, hydrate syntax (#3,) etc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.