bjodah / chempy

⚗ A package useful for chemistry written in Python
BSD 2-Clause "Simplified" License
544 stars 78 forks source link

Fix balance stoich regression gh158 (#159) #160

Closed bjodah closed 5 years ago

bjodah commented 5 years ago

As implemented currently "component 0" represents net charge, and can hence be negative. (which would not have been the case if e.g. 0 had been chosen to represent e.g. number of electrons).

We add a special check for a component only existing on one side: if it's present with both positive and negative sign, then the equation can still be balanced.