🧪 PHCAL: pH Calculation 🤖
Comprehensive Analysis of Acid-Base Equilibria Using MBE, CBE, and PBE
This package provides codes for the paper "Comprehensive Analysis of Acid-Base Equilibria Using MBE, CBE, and PBE". It includes tools to calculate pH values for various acid-base systems using Charge Balance Equation (CBE) and Proton Balance Equation (PBE) methods.
📄 Want to read the paper? Click here
🌐 Prefer the online version? Click here
Usage Examples
Example 1: Calculation of 0.01 M HCl
Charge Balance Equation (CBE) Calculation
from phcal import CBE_Inert, CBE_calc
HCl = CBE_Inert(charge=-1, conc=0.01)
pH = CBE_calc(HCl)
pH.pH_calc()
print(pH.pH)
Proton Balance Equation (PBE) Calculation
from phcal import PBE_Inert, PBE_calc
HCl = PBE_Inert(conc=0.01, proton=1, proton_ref=1)
# HCl = PBE_Acid(conc=0.01, Ka=100000, proton=1, proton_ref=1)
calc = PBE_calc(HCl)
calc.pH_calc()
print(calc.pH)
Example 2: Calculation of 0.01 M (NH4)2(HPO4)
Charge Balance Equation (CBE) Calculation
from phcal import CBE_Acid, CBE_calc
NH4 = CBE_Acid(charge=1, conc=0.01*3, pKa=9.25)
pKa = [1.97, 6.82, 12.5]
P = CBE_Acid(charge=0, conc=0.01, pKa=pKa)
pH = CBE_calc(NH4, P)
pH.pH_calc()
print(pH.pH)
Proton Balance Equation (PBE) Calculation
from phcal import PBE_Acid, PBE_calc
NH4 = PBE_Acid(conc=0.01 * 3, pKa=9.25, proton=1, proton_ref=1)
pKa = [1.97, 6.82, 12.5]
P = PBE_Acid(conc=0.01, pKa=pKa, proton=3, proton_ref=0)
calc = PBE_calc(NH4, P)
calc.pH_calc()
print(calc.pH)
Contact
If you have any questions or suggestions, please feel free to contact me at me@ericxin.eu.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for phcal 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| phcal-0.1.0.tar.gz | 5.1 kB | Without provenance | Details for phcal-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| phcal-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for phcal-0.1.0-py3-none-any.whl |
Total release size: 11.3 kB
Release files / phcal-0.1.0.tar.gz
| Download URL | phcal-0.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ccc48ef1a2893b8476d8b232cab998957ff7e6da94fd234f65a8fb0f819bc415
|
|
BLAKE2b-256 checksum How to use checksums |
df9279e578b0ff4ae8bae33438330a65f4606577f4557e0ef3a7fafbe454fad4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.13
|
Release files / phcal-0.1.0-py3-none-any.whl
| Download URL | phcal-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
536e67f93351daa4f7c6a0c2ef17655eac74d7dfcca39fda257d335c5020427e
|
|
BLAKE2b-256 checksum How to use checksums |
e62e3f0ae93fe59aef1e5f478d52738dc8faea0e93628850cc5c590c6b47e13e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.13
|
Security for phcal 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.