A low-level chemistry library for solving and practicing chemistry problems.
Project description
Chemsolve
Chemsolve is a library for solving and practicing chemistry problems. It's made to have easy usability while still retaining a powerful engine with functionality allowing it to tackle more complicated problems. It was designed as a tool for lower-level chemistry and problem solving as opposed to a materials science or higher-level chemistry library.
Installation
Chemsolve currently runs on Python 3.6 or higher. You can install it from PyPi via pip:
pip install chemsolve
if you want to install it directly from this repository:
git clone https://github.com/amogh7joshi/chemsolve.git
cd chemsolve
python setup.py install
Then execute:
# Install system requirements.
python3 -m pip install -r requirements.txt
# Try it out
cd tests
python3 elementtest.py
Chemsolve uses the chempy library.
Using Chemsolve
Chemsolve relies heavily on class framework with classes representing chemical objects: elements, compounds, reactions.
Examples
Examples for all of the implemented structures can be found in /examples
:
- The Element Class and usage.
- The Compound Class and usage.
- The Reaction Class and usage.
In this example, we will use the Reaction class.
Import the required module(s):
from chemsolve import Compound, Reaction
Create the Necessary Object and its Object parameters:
# Compounds which will be reacted.
r1 = Compound("NH3", grams = 5.00)
r2 = Compound("O2", grams = 3.46)
p1 = Compound("NO2")
p2 = Compound("H2O")
reaction = Reaction(r1, r2, "-->", p1, p2)
From here, you can access the object's attributes.
print(reaction.balanced_reaction)
print(reaction.limiting_reactant)
For further reference, please visit /examples
.
License
All code in this library is avaliable under the MIT License.
Issues
If you notice an issues or bugs with the library, please feel free to create an issue. Make sure to follow the issue guidelines.
Contributions
Contributions are always welcome, and feel free to contribute to the library. Please make sure to follow the pull request guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for chemsolve-1.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c001a35d79dddcfab577c6d5f4c8514e9f382f324040859a409735a1b5cfdf82 |
|
MD5 | 23aeecb34255262e8a263f276a29c987 |
|
BLAKE2b-256 | 5b94e32ff56b92a9b64820a2bd298060f4b8680c48b401daab2409b018bf6e39 |