{
 "about": {
  "method": "buffer-recipe (mass of the exact form, pH-meter setpoint at the preparation temperature)",
  "recordedOn": "2026-10-10",
  "script": "pipeline/lab-calculators/buffer_recipe_reference.py",
  "scriptSha256": "b23c5ecd5e0230e0dd73d79fc0e5570973a8aeb9ecabd24e527619e67d64830d",
  "reads": {
   "pipeline/lab-calculators/reference.py": "28b2d3e1b6d5fe017c9b86d5881ac7b9061b6a7b1b981dc54d9d9c2f479443e1"
  },
  "source": "Goldberg RN, Kishore N, Lennen RM. J Phys Chem Ref Data 2002;31:231-370, section 8 and equation 12, as transcribed a second time in reference.py; CIAAW 2021 standard atomic weights as transcribed in reference.py",
  "checkedEntries": [
   "acetate",
   "bicine",
   "ches",
   "citrate-3",
   "glycine-2",
   "hepes",
   "imidazole",
   "mes",
   "mops",
   "phosphate-2",
   "pipes",
   "taps",
   "tes",
   "tricine",
   "tris"
  ],
  "tolerances": {
   "mass": "within 1e-9 relative",
   "setpoint": "within 0.01 pH, shown to 2 decimals",
   "refusals": "exact"
  }
 },
 "oracle": {
  "name": "Goldberg 2002 equation 12 in NumPy; CIAAW 2021 sum in Python decimal",
  "version": "NumPy 2.5.3; Python 3.13.16"
 },
 "count": 18,
 "recordedOn": "2026-10-10",
 "cases": [
  {
   "name": "worked-tris-cold-room",
   "about": "The CSO's worked example: 50 mM Tris base in 1 L for pH 7.5 at 4 °C, adjusted at 25 °C: about 6.057 g, set to 6.86",
   "input": {
    "buffer": "tris",
    "form": "C4H11NO3",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "7.5",
    "workC": "4",
    "prepC": "25"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "121.136",
    "massG": 6.0568,
    "massExact": "6.0568",
    "pKAtWork": 8.7103,
    "pKAtPrep": 8.072,
    "setpoint": 6.8617,
    "setpointShown": "6.86"
   }
  },
  {
   "name": "tris-hcl-form",
   "about": "The same buffer weighed as Tris·HCl: the salt's own formula weight, never the parent's",
   "input": {
    "buffer": "tris",
    "form": "C4H11NO3·HCl",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "7.5",
    "workC": "4",
    "prepC": "25"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "157.594",
    "massG": 7.8797,
    "massExact": "7.8797",
    "pKAtWork": 8.7103,
    "pKAtPrep": 8.072,
    "setpoint": 6.8617,
    "setpointShown": "6.86"
   }
  },
  {
   "name": "tris-warm-to-cold",
   "about": "Tris for pH 8.0 at 37 °C, adjusted at 20 °C",
   "input": {
    "buffer": "tris",
    "form": "C4H11NO3",
    "concentrationM": "0.02",
    "volumeL": "0.5",
    "targetPh": "8.0",
    "workC": "37",
    "prepC": "20"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "121.136",
    "massG": 1.21136,
    "massExact": "1.21136",
    "pKAtWork": 7.7527,
    "pKAtPrep": 8.2142,
    "setpoint": 8.4615,
    "setpointShown": "8.46"
   }
  },
  {
   "name": "same-temperature",
   "about": "Prepared at the working temperature, the setpoint is the target",
   "input": {
    "buffer": "hepes",
    "form": "C8H18N2O4S",
    "concentrationM": "0.025",
    "volumeL": "0.25",
    "targetPh": "7.4",
    "workC": "25",
    "prepC": "25"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "238.302",
    "massG": 1.4893875,
    "massExact": "1.4893875",
    "pKAtWork": 7.564,
    "pKAtPrep": 7.564,
    "setpoint": 7.4,
    "setpointShown": "7.40"
   }
  },
  {
   "name": "hepes-37",
   "about": "HEPES for pH 7.4 at 37 °C, adjusted at 22 °C",
   "input": {
    "buffer": "hepes",
    "form": "C8H18N2O4S",
    "concentrationM": "0.01",
    "volumeL": "2",
    "targetPh": "7.4",
    "workC": "37",
    "prepC": "22"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "238.302",
    "massG": 4.76604,
    "massExact": "4.76604",
    "pKAtWork": 7.4238,
    "pKAtPrep": 7.6002,
    "setpoint": 7.5764,
    "setpointShown": "7.58"
   }
  },
  {
   "name": "phosphate-heptahydrate",
   "about": "Phosphate pK2 for pH 7.2 at 4 °C, weighed as Na2HPO4·7H2O",
   "input": {
    "buffer": "phosphate-2",
    "form": "Na2HPO4·7H2O",
    "concentrationM": "0.1",
    "volumeL": "1",
    "targetPh": "7.2",
    "workC": "4",
    "prepC": "25"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "268.063",
    "massG": 26.8063,
    "massExact": "26.8063",
    "pKAtWork": 7.2786,
    "pKAtPrep": 7.198,
    "setpoint": 7.1194,
    "setpointShown": "7.12"
   }
  },
  {
   "name": "mops-cold",
   "about": "MOPS for pH 7.0 at 4 °C",
   "input": {
    "buffer": "mops",
    "form": "C7H15NO4S",
    "concentrationM": "0.02",
    "volumeL": "1",
    "targetPh": "7.0",
    "workC": "4",
    "prepC": "21"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "209.260",
    "massG": 4.1852,
    "massExact": "4.1852",
    "pKAtWork": 7.4605,
    "pKAtPrep": 7.2341,
    "setpoint": 6.7736,
    "setpointShown": "6.77"
   }
  },
  {
   "name": "acetate-small-dh",
   "about": "Acetate, whose ΔrH° is near zero: the setpoint barely moves",
   "input": {
    "buffer": "acetate",
    "form": "C2H3NaO2·3H2O",
    "concentrationM": "0.1",
    "volumeL": "1",
    "targetPh": "4.8",
    "workC": "4",
    "prepC": "25"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "136.079",
    "massG": 13.6079,
    "massExact": "13.6079",
    "pKAtWork": 4.7708,
    "pKAtPrep": 4.756,
    "setpoint": 4.7852,
    "setpointShown": "4.79"
   }
  },
  {
   "name": "glycine-2-warm",
   "about": "Glycine pK2 for pH 9.5 at 37 °C",
   "input": {
    "buffer": "glycine-2",
    "form": "C2H5NO2",
    "concentrationM": "0.05",
    "volumeL": "0.1",
    "targetPh": "9.5",
    "workC": "37",
    "prepC": "25"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "75.067",
    "massG": 0.375335,
    "massExact": "0.375335",
    "pKAtWork": 9.4827,
    "pKAtPrep": 9.78,
    "setpoint": 9.7973,
    "setpointShown": "9.80"
   }
  },
  {
   "name": "mes-small-volume",
   "about": "MES for pH 6.0 at 25 °C in 50 mL, adjusted at 4 °C",
   "input": {
    "buffer": "mes",
    "form": "C6H13NO4S·H2O",
    "concentrationM": "0.1",
    "volumeL": "0.05",
    "targetPh": "6.0",
    "workC": "25",
    "prepC": "4"
   },
   "expected": {
    "expect": "ok",
    "formulaWeight": "213.248",
    "massG": 1.06624,
    "massExact": "1.06624",
    "pKAtWork": 6.27,
    "pKAtPrep": 6.4657,
    "setpoint": 6.1957,
    "setpointShown": "6.20"
   }
  },
  {
   "name": "refused-below-range",
   "about": "A working temperature below 274 K (0 °C)",
   "input": {
    "buffer": "tris",
    "form": "C4H11NO3",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "7.5",
    "workC": "0",
    "prepC": "25"
   },
   "expected": {
    "expect": "refused",
    "problem": "temperature-range"
   }
  },
  {
   "name": "refused-above-range",
   "about": "A preparation temperature above 350 K (80 °C)",
   "input": {
    "buffer": "tris",
    "form": "C4H11NO3",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "7.5",
    "workC": "25",
    "prepC": "80"
   },
   "expected": {
    "expect": "refused",
    "problem": "temperature-range"
   }
  },
  {
   "name": "refused-outside-buffer-range",
   "about": "pH 9.5 with Tris at 25 °C is more than 1 unit from its pK",
   "input": {
    "buffer": "tris",
    "form": "C4H11NO3",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "9.5",
    "workC": "25",
    "prepC": "25"
   },
   "expected": {
    "expect": "refused",
    "problem": "outside-buffer-range"
   }
  },
  {
   "name": "refused-overlapping-citrate",
   "about": "Citrate pK3 at pH 6.0 is within 2 units of citrate pK2: the single-step shift does not hold",
   "input": {
    "buffer": "citrate-3",
    "form": "C6H5Na3O7·2H2O",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "6.0",
    "workC": "25",
    "prepC": "25"
   },
   "expected": {
    "expect": "refused",
    "problem": "overlapping-pk"
   }
  },
  {
   "name": "refused-carbonate",
   "about": "Carbonate and bicarbonate are an open CO₂ system",
   "input": {
    "buffer": "carbonate-1",
    "form": "NaHCO3",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "6.5",
    "workC": "25",
    "prepC": "25"
   },
   "expected": {
    "expect": "refused",
    "problem": "open-system"
   }
  },
  {
   "name": "refused-unchecked-entry",
   "about": "BES rests on one transcription of the paper",
   "input": {
    "buffer": "bes",
    "form": "C6H15NO5S",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "7.2",
    "workC": "25",
    "prepC": "25"
   },
   "expected": {
    "expect": "refused",
    "problem": "not-second-transcribed"
   }
  },
  {
   "name": "refused-no-form",
   "about": "No chemical form named",
   "input": {
    "buffer": "tris",
    "form": "",
    "concentrationM": "0.05",
    "volumeL": "1",
    "targetPh": "7.5",
    "workC": "4",
    "prepC": "25"
   },
   "expected": {
    "expect": "refused",
    "problem": "no-form"
   }
  },
  {
   "name": "refused-zero-volume",
   "about": "A volume of zero",
   "input": {
    "buffer": "tris",
    "form": "C4H11NO3",
    "concentrationM": "0.05",
    "volumeL": "0",
    "targetPh": "7.5",
    "workC": "4",
    "prepC": "25"
   },
   "expected": {
    "expect": "refused",
    "problem": "amount"
   }
  }
 ]
}
