Calculate the liquid junction potential between two solutions, chosen for the pipette and bath. The output line shows the potential of the pipette relative to the bath.
The calculation use the Generalized Henderson Equation and the relative mobilities, u, and valences z defined in the individual species. For ion concentrations Cb and Cp in the bath and pipette respectively, this states that the potential difference between the pipette and bath,
Ep-Eb = RT/F S ln Q
where
S = sum z u [Cp - Cb] / sum z z u [Cp - Cb],
Q = sum z z u Cb / sum z z u Cp,
and R is the gas constant, T the temperature and F Faraday's constant. The term RT/F = 25.3 mV at 20 degrees. The sums are taken over all the ions present.
See eg Ng and Barry, J. Neuroscience Methods 56, 1995, 37-41.
Note that the results are only as good as the input data, specifically, the relative mobilities of the species. The standard specie list with Spatch contains values from the above paper. The full published list of relative mobilities is:
Cs 1.05; K 1.0; Li 0.525; NH4 1.00; Na 0.682; Rb 1.059;
Br 1.063; Cl 1.039; I 1.045; F 0.753;
Ba 0.433; Ca 0.405; Co 0.370; Mg 0.361; Sr 0.404; Zn 0.359;
CLO4 0.916; H2PO4 0.45; HCO3 0.605; NO3 0.972; HPO4 0.390; SO4 0.544;
Choline 0.51; TEA 0.444; TMA 0.611; Acetate 0.556; Benzoate 0.441; Picrate 0.411; Propionate 0.487; SCN 0.900; Sulfonate 0.586; NMDG 0.33; Tris 0.40; Aspartate 0.30; Gluconate 0.33; Glutamate 0.26; HEPES 0.30; Isethionate 0.52; MES 0.37; MOPS 0.35; EGTA_2- 0.24; EGTA_3- 0.25; Thallium 1.02; Butyrate 0.44;