Skip to main content

Chemsolve

PyPI version Downloads License: MIT Travis (.com) Latest Commit

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 makes use of the chempy library for backend stoichiometry calculations.

Using Chemsolve

Chemsolve relies heavily on an object-based framework with classes representing important objects in chemistry: elements, compounds, reactions. The structure of Chemsolve is similar to the following:

Classes

In addition, Chemsolve includes numerous features to ease chemistry calculations, available in the associated modules within Chemsolve, such as molarity and molality calculations in chemsolve.solutions and the ideal gas formula within chemsolve.gases.

Examples

Examples for all of the primary implemented structures can be found in /examples:

  1. The Element Class and usage.
  2. The Compound Class and usage.
  3. 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 available under the MIT License. You are welcome to download the repository on your own and work with it, however.

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.

Metadata

Release files for chemsolve 1.8.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chemsolve 1.8.3
File Size Uploaded Provenance
chemsolve-1.8.3.tar.gz 33.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for chemsolve 1.8.3
File Interpreter ABI Platform
chemsolve-1.8.3-py3-none-any.whl Python 3 none any Details

Total release size: 75.3 kB

Release files / chemsolve-1.8.3.tar.gz

Download URL chemsolve-1.8.3.tar.gz
Size 33.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c6e0b08195a954767563cca34579a2b80370f6c48d64ba6eb227ff467ea3dca2
BLAKE2b-256 checksum
How to use checksums
11b8306735410c2551521837bf4490fb521f7498fcb9a8255b4e041222f7b6e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.3

Release files / chemsolve-1.8.3-py3-none-any.whl

Download URL chemsolve-1.8.3-py3-none-any.whl
Size 41.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cad2ab652d25eb782123987f35f5ed07ebdea498dda030cc194005e85d06b4f7
BLAKE2b-256 checksum
How to use checksums
820bc20db88134c71e02dbac5b24ba62684bc55044235f01754ac60c456b9199
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.3

Security for chemsolve 1.8.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page