A lightweight package to calculate molecular weights from chemical formulas.
Project description
🧪 molweightcal
molweightcal is a Python package to calculate the molecular weight of a chemical compound given its molecular formula (e.g., H2O, C6H12O6, (NH4)2SO4).
Features
✅ Provides step-by-step calculation for each element ✅ Supports all known elements ✅ Lightweight and fast — no external dependencies
🔧 Installation
pip install molweightcal
🚀 Usage
import molweightcal
print(molweightcal("C6H12O6"))
✅ Output
Molecular weight of C6H12O6: 180.156 Details: C(6) × 12.011 = 72.066 H(12) × 1.008 = 12.096 O(6) × 15.999 = 95.994
❗ Error Handling
molweightcal performs thorough input validation to detect and report issues such as:
✅ Unknown chemical elements (e.g., "Z6H2") ✅ Lowercase letters in invalid positions, etc.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file molweightcal-0.1.0.tar.gz.
File metadata
- Download URL: molweightcal-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10cd5dee8aadec81e7c32da70b6b2652f9515ed2f920cfe5d6fd58610bb5f313
|
|
| MD5 |
53b734a476c38897de0eef52fce72d0e
|
|
| BLAKE2b-256 |
1a670d7a8bf7070657fe71e5a93870c4ed8c8f0c1710098db558924b72c840ba
|
File details
Details for the file molweightcal-0.1.0-py3-none-any.whl.
File metadata
- Download URL: molweightcal-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daef46cfe249ff99cefec1c399e835f7052bc2c28b79c87d89e3b3cf996ecae0
|
|
| MD5 |
9a73100f61de2652395678e3dbff72c7
|
|
| BLAKE2b-256 |
2c63685e53e311567fe4e08c12c4f3f636ace2999a1ac4f298a0d795daec620d
|