Skip to main content

🧪 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

molweightcal-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

molweightcal-0.1.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

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

Hashes for molweightcal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10cd5dee8aadec81e7c32da70b6b2652f9515ed2f920cfe5d6fd58610bb5f313
MD5 53b734a476c38897de0eef52fce72d0e
BLAKE2b-256 1a670d7a8bf7070657fe71e5a93870c4ed8c8f0c1710098db558924b72c840ba

See more details on using hashes here.

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

Hashes for molweightcal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daef46cfe249ff99cefec1c399e835f7052bc2c28b79c87d89e3b3cf996ecae0
MD5 9a73100f61de2652395678e3dbff72c7
BLAKE2b-256 2c63685e53e311567fe4e08c12c4f3f636ace2999a1ac4f298a0d795daec620d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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