ph_speciation
Exact Henderson-Hasselbalch polyprotic acid-base microspecies solver: species fractions, net charge at pH, molar buffer capacity, and pH-dependent logD from intrinsic logP.
- Field
- Chemistry
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 0.05 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001acetic acid (pKa 4.76) at pH 4.76 -> charge -0.5, neutral 0.5, beta = ln(10)/4 = 0.575646passed
net_charge-0.5 ± 1e-09-0.5lockedunder 0.01 % of the tolerance usedneutral_fraction0.5 ± 1e-090.5lockedunder 0.01 % of the tolerance usedbuffer_capacity0.575646 ± 1e-060.575646locked0.32 % of the tolerance usedlogd1.69897 ± 0.00011.69897lockedunder 0.01 % of the tolerance usedr0002glycine (pKa 2.34, 9.60; max_charge +1) at pH 5.97 -> zwitterion net charge 0.0passed
net_charge0 ± 1e-060lockedunder 0.01 % of the tolerance useddominant_charge= 00lockedexact match
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
pkas | Acid dissociation constants pKa1, pKa2, ... | ||
max_charge | 0 | Charge of the fully protonated species (0 for carboxylic acid, +1 for amine/amino acid). | |
ph | 1 | 7.4 | |
logp | 1 | Optional intrinsic neutral logP to compute logD(pH). |
Readings
| Name | Unit | Meaning |
|---|---|---|
ph | 1 | |
net_charge | 1 | |
dominant_charge | 1 | |
neutral_fraction | 1 | |
buffer_capacity | 1 | |
logd | 1 | |
species |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.