pKa Calculations
CHEMSMART provides pKa workflows in two separate stages:
Job submission — generate and run Gaussian or ORCA calculations for HA, A⁻, and (optionally) a reference acid. See Gaussian pKa Calculations and ORCA pKa Calculations.
Output analysis — compute pKa values from completed output files using the backend-independent command
chemsmart run pka. Analysis is program-agnostic: the same workflow reads Gaussian.logand ORCA.outfiles and extracts the energies and thermal corrections needed for the pKa cycle.
pKa Calculations
Execution Architecture
Job submission
chemsmart run/sub gaussian ... pka [submit|batch]— prepare and run Gaussian pKa calculations.chemsmart run/sub orca ... pka [submit|batch]— prepare and run ORCA pKa calculations.Use
chemsmart runfor local preparation and execution; usechemsmart subon HPC clusters to generate scheduler scripts (see HPC Cluster Submission (chemsmart sub)).A single structure yields one job; batch input (CSV table or multi-molecule CDXML) can produce multiple jobs in one invocation.
When
pkais invoked without an explicit subcommand, a submission table triggersbatch; otherwisesubmitruns.
Output analysis
chemsmart run pka analyze— single-system analysis from up to eight output files.chemsmart run pka batch-analyze— table-driven batch analysis.Both commands use the same pKa analysis workflow. Gaussian
.logand ORCA.outfiles can be mixed in the same batch table; each file is read and interpreted on its own.Analysis never invokes
gaussianororcajob submission — only reads completed output files.
Theory
The pKa of an acid HA in aqueous solution is defined by the equilibrium:
The pKa is related to the standard Gibbs free energy change by:
where \(R\) is the gas constant and \(T\) is the temperature.
Thermodynamic Cycles
CHEMSMART supports two thermodynamic cycles for pKa calculations:
1. Proton Exchange (Isodesmic) Cycle (Default, Recommended)
This is the default when -s is omitted for both job submission and output analysis. A reference acid HRef with known
experimental pKa is required to cancel systematic errors:
The pKa is computed as:
where:
2. Direct Cycle
Uses the absolute free energy of a proton in water:
Default value: \(\Delta G^{\circ}(\text{H}^{+})_{\text{aq}} = -265.9\) kcal/mol (Tissandier et al., 1998).
Dual-Level Approach
CHEMSMART implements a dual-level approach for accurate solvation free energies:
Thermal corrections (\(G_{\text{corr}}\)) from gas-phase frequency calculations using quasi-harmonic Gibbs free energy:
\[G_{\text{corr}} = G_{\text{qh}}(T) - E_{\text{gas}}\]Solvent energies (\(E_{\text{solv}}\)) from high-level single-point calculations in implicit solvent (e.g., SMD or CPCM).
Total free energy in solution:
\[G_{\text{soln}} = E_{\text{solv}} + G_{\text{corr}}\]
Note
All internal energies are stored in Hartree (au). \(\Delta G_{\text{soln}}\) (proton exchange) and \(\Delta G_{\text{diss}}\) (direct dissociation) are converted to kcal/mol for the pKa formula (1 Hartree = 627.5094740631 kcal/mol).
Job Submission (Gaussian / ORCA)
Job submission is backend-specific. Use the dedicated pages for full examples and parameter tables:
Commands
The default scheme is proton exchange, which requires a reference acid (-r, -rpi, -rc, -rm). Use
-s direct only when you want the direct dissociation cycle without a reference acid.
# Proton exchange (default) — reference acid required
chemsmart run gaussian -p my_project -f acid.xyz -c 0 -m 1 pka \
-pi 10 -r ref_acid.xyz -rpi 21 -rc 1 -rm 1
chemsmart run orca -p my_project -f acid.xyz -c 0 -m 1 pka \
-pi 10 -r ref_acid.xyz -rpi 21 -rc 1 -rm 1
# Direct cycle — no reference acid; must set -s direct explicitly
chemsmart run gaussian -p my_project -f acid.xyz -c 0 -m 1 pka -pi 10 -s direct
chemsmart run orca -p my_project -f acid.xyz -c 0 -m 1 pka -pi 10 -s direct
# Batch submission (proton exchange requires reference options on the pka group)
chemsmart run gaussian -p my_project -f pka_input.csv pka \
-r ref_acid.xyz -rpi 21 -rc 1 -rm 1 batch
# Batch submission (direct cycle)
chemsmart run gaussian -p my_project -f pka_input.csv pka -s direct batch
Submission input table (pka batch)
Comma- or whitespace-delimited table with columns filepath, proton_index, charge, multiplicity.
ChemDraw CDXML / CDX Input (pKa Jobs)
pKa job submission can read structures directly from ChemDraw .cdxml and .cdx files. CHEMSMART reads atom
colours in the drawing to identify the acidic proton to remove. Colour the proton (or the H in a functional
group such as –OH) in ChemDraw with a distinct colour; CHEMSMART auto-detects it so -pi is often unnecessary.
Single-molecule submit
When -f points to one CDXML structure with a single fragment, omit -pi if the coloured proton is unique:
chemsmart run gaussian -p my_project -f phenol.cdxml -c 0 -m 1 pka \
-r ref_acid.xyz -rpi 21 -rc 1 -rm 1
chemsmart run gaussian -p my_project -f phenol.cdxml -c 0 -m 1 pka -s direct
Use -cc / --color-code when several hydrogens share similar styling and you need to select a specific ChemDraw
colour-table index. The reference acid may also be a CDXML file; in that case -rpi can be omitted when the reference
proton is uniquely coloured (or use -rcc / --reference-color-code).
Multi-molecule CDXML (one job per fragment)
A single .cdxml / .cdx file may contain multiple molecules (multiple ChemDraw fragments). CHEMSMART performs
per-fragment coloured-proton detection and creates one pKa job per fragment.
Pass the file with pka batch (or pka submit for a single-fragment file):
chemsmart run gaussian -p my_project -f acids.cdxml -c 0 -m 1 pka \
-r ref_acid.xyz -rpi 21 -rc 1 -rm 1 batch
chemsmart run orca -p my_project -f acids.cdxml -c 0 -m 1 pka -s direct batch
Job labels are derived from the filename, e.g. acids_frag1_pka (Gaussian) or acids_frag1_pka (ORCA).
Charge and multiplicity
How charge and multiplicity are resolved depends on the input mode:
Input mode |
Charge / multiplicity source |
|---|---|
CSV batch table |
Required columns on each row ( |
Multi-fragment CDXML ( |
Parent |
Single-molecule submit (XYZ, LOG, CDXML, …) |
|
Blank proton_index in a single-molecule CDXML table row triggers coloured-proton auto-detection only; it does
not remove the requirement for charge and multiplicity columns in CSV tables.
CDXML paths inside a CSV batch table
You can mix XYZ and CDXML inputs in the same submission table. Each row becomes one pKa job. For a single-molecule
.cdxml / .cdx row, leave proton_index blank to auto-detect the coloured proton; an explicit value overrides
the detection (same behaviour as single-file CDXML submit). Non-CDXML rows still require proton_index.
filepath,proton_index,charge,multiplicity
/path/to/acid1.xyz,12,0,1
/path/to/acid2.cdxml,,0,1
Multi-molecule CDXML files cannot be expanded from a table row. Pass them directly as -f with pka batch (see
above) to create one job per ChemDraw fragment.
Note
If -f is a CDXML file (not a CSV table), CHEMSMART routes to coloured-proton batch expansion automatically. For
general CDXML structure handling outside pKa, see ChemDraw Files.
Proton and reference options for CDXML
Short |
Long |
Description |
|---|---|---|
|
|
Optional for CDXML when a uniquely coloured proton is present. Required for XYZ/LOG/COM inputs. |
|
|
ChemDraw colour-table index for the target acidic proton ( |
|
|
Optional when |
|
|
ChemDraw colour-table index for the reference proton ( |
Job output file naming
Each pKa job creates gas-phase opt+freq and solvent single-point sub-jobs. Output filenames follow the sub-job label:
Sub-job label suffix |
Species |
|---|---|
|
Target acid HA (gas-phase opt+freq) |
|
Target conjugate base A⁻ (gas-phase opt+freq) |
|
HA solvent single-point |
|
A⁻ solvent single-point |
|
Reference acid / conjugate base (proton exchange only) |
|
Reference solvent single-points (proton exchange only) |
Gaussian batch jobs use the input stem as the job label (e.g. acid1_HA_opt.log). ORCA batch jobs append _pka to
the stem (e.g. acid1_pka_HA_opt.out). The output-analysis autodiscovery convention below is aligned with the
{basename}_pka_* pattern used by ORCA submission and by typical batch output tables.
HPC Cluster Submission (chemsmart sub)
On a cluster, use chemsmart sub instead of chemsmart run to write scheduler scripts and per-job run wrappers.
The pKa workflow is unchanged at the chemistry level; only the launch path differs.
Single job
chemsmart sub gaussian -p my_project -f acid.xyz -c 0 -m 1 pka -pi 10 -s direct submit
Batch table or multi-fragment CDXML
One scheduler submission is created per table row or per ChemDraw fragment. CHEMSMART expands pka batch into
multiple jobs locally, then writes a separate chemsmart_sub_<label>.sh and chemsmart_run_<label>.py for each
job.
chemsmart sub gaussian -p my_project -f pka_input.csv pka -s direct batch
chemsmart sub gaussian -p my_project -f acids.cdxml -c 0 -m 1 pka -s direct batch
Per-job script reconstruction
Each cluster run wrapper must replay one pKa submission, not the entire batch table or full multi-fragment CDXML
file. When a job is created from pka batch, CHEMSMART stores row- or fragment-level metadata and rewrites the CLI
inside chemsmart_run_<label>.py before submission:
CSV batch rows — replace the table path in
-f/--filenamewith that row’sfilepath; changebatchtosubmit.Multi-fragment CDXML — point
-fat the same CDXML file but add--index/-iso only one fragment is processed; changebatchtosubmit.Explicit per-job options — inject or update
--proton-index,--charge,--multiplicity, and--labelso the reconstructed command is self-contained and passes Click validation on the cluster node.Proton exchange tables — rows after the first may run with
-s direct; reference-acid flags are dropped from later rows automatically (same behaviour as localpka batch).
Example: a two-row CSV batch submitted with chemsmart sub ... pka batch yields two run scripts. The script for row
two might equivalent to:
chemsmart run gaussian -p my_project -f /path/to/acid2.xyz -c 0 -m 1 \
pka -pi 8 -s direct submit
Example: a five-fragment CDXML file pka_scale.cdxml yields labels such as pka_scale_frag1_pka, …,
pka_scale_frag5_pka. Each run script targets one fragment via --index and the matching --proton-index,
--label, -c, and -m.
This reconstruction is what allows chemsmart sub ... pka batch on a cluster to behave like five independent pka
submit calls while you only maintain one top-level submission command locally.
See also Command Line Interface Overview for general chemsmart sub usage and Server Settings for scheduler
configuration.
Output Analysis (chemsmart run pka)
All post-processing lives under chemsmart run pka. No Gaussian or ORCA backend is invoked during analysis.
Thermochemistry extraction
For each output file, analysis:
Open the file and detect the program (Gaussian or ORCA).
Reads the gas-phase SCF energy and quasi-harmonic Gibbs free energy (for opt+freq outputs).
Reads the solvent-phase SCF energy (for single-point outputs).
Raises a clear error if a required quantity cannot be extracted.
Computing pKa from Output Files (analyze)
If you have completed output files for a single acid, compute pKa with analyze.
Proton exchange (default)
Only -ha and -hr are strictly required; the remaining six companion files are auto-discovered when they follow
the naming convention below. -rp / --reference-pka is required.
chemsmart run pka analyze \
-ha acid1_pka_HA_opt.log \
-hr ref_acid_pka_HRef_opt.log \
-rp 6.75 \
-T 333.15 -c 1.0 -csg 100 -ch 100
Provide all eight files explicitly when auto-discovery is not appropriate:
chemsmart run pka analyze \
-ha acid1_pka_HA_opt.log \
-a acid1_pka_A_opt.log \
-hr ref_acid_pka_HRef_opt.log \
-r ref_acid_pka_Ref_opt.log \
-has acid1_pka_HA_sp.log \
-as acid1_pka_A_sp.log \
-hrs ref_acid_pka_HRef_sp.log \
-rs ref_acid_pka_Ref_sp.log \
-rp 6.75 \
-T 298.15
Direct dissociation
Four output files are required (HA, A⁻, and their solvent single-points). Both -s direct and -dG must be
specified on the pka group before the analyze subcommand:
chemsmart run pka -s direct -dG -265.9 analyze \
-ha acid1_pka_HA_opt.log \
-T 298.15
Only -ha is strictly required; -a, -has, and -as are auto-discovered from the target-acid suffix
convention when omitted.
File autodetection (analyze)
When companion paths are omitted, CHEMSMART derives them from the HA and HRef gas-phase files using the same suffix
patterns as batch-analyze:
From the HA gas-phase file (``-ha``)
<basename>_pka_A_opt.<ext>— conjugate base gas-phase<basename>_pka_HA_sp.<ext>— HA solvent single-point<basename>_pka_A_sp.<ext>— conjugate base solvent SP
From the HRef gas-phase file (``-hr``)
<basename>_pka_Ref_opt.<ext>— reference conjugate base<basename>_pka_HRef_sp.<ext>— reference acid solvent SP<basename>_pka_Ref_sp.<ext>— reference conjugate base solvent SP
Alternative suffixes (_HRef_opt, _pka_cb, etc.) are also recognised. The file extension (.log or .out)
is chosen from the detected program. Override any auto-discovered path with the corresponding flag.
If a required file is missing or cannot be parsed, analysis stops with a clear error (missing paths or missing thermochemistry data).
Batch Processing of Output Files (batch-analyze)
Parse a table of pre-computed output file paths to calculate pKa values in batch.
Proton exchange (default)
chemsmart run pka -T 333.15 -c 1.0 -csg 100 -ch 100 batch-analyze \
-o pka_output_table.csv \
-O results.dat
Direct dissociation
Both -s direct and -dG are required:
chemsmart run pka -s direct -dG -265.9 batch-analyze \
-o pka_output_table_direct.csv \
-O results_direct.dat
The formatted batch summary table is printed to stdout. When -O / --output-results is given, the same formatted
report is written to that file (not a wide CSV of input columns).
Output table format
The output table (-o / --output-table) must contain at least a basename column. Other file paths may be
omitted and are auto-discovered from basename when blank.
Required column
basename: Unique identifier for each acid. Used for file auto-discovery.
Target-acid columns (both schemes)
Accepted header aliases include ha_opt, a_opt, ha_solv, a_solv, etc. (see column list below).
When blank, CHEMSMART searches for <basename><suffix>.<ext> in the current working directory. Suffixes are tried in
order; both .log and .out are tested.
Column |
Description |
Auto-discovery suffixes (first match wins) |
|---|---|---|
|
HA gas-phase opt+freq output |
|
|
A⁻ gas-phase opt+freq output |
|
|
HA solvent single-point output |
|
|
A⁻ solvent single-point output |
|
Reference-acid columns (proton exchange only)
Ignored for direct dissociation. Blank reference columns inherit values from the previous row.
Column |
Description |
|---|---|
|
HRef gas-phase opt+freq output (not auto-discovered from |
|
Ref⁻ gas-phase opt+freq output |
|
HRef solvent single-point output |
|
Ref⁻ solvent single-point output |
|
Experimental pKa of the reference acid |
Example pka_output_table.csv:
basename,ha_gas,a_gas,ha_sp,a_sp,href_gas,ref_gas,href_sp,ref_sp,pka_ref
phenol,,,,,ref_acid_pka_HRef_opt.log,ref_acid_pka_Ref_opt.log,ref_acid_pka_HRef_sp.log,ref_acid_pka_Ref_sp.log,6.75
benzoic_acid,,,,,,,,,6.75
batch-analyze options
Short |
Long |
Description |
|---|---|---|
|
|
Required. Path to the output-file table. |
|
|
Optional path for the formatted results report. Stdout always receives the summary table. |
|
|
Require every populated output path to match |
Mixed Gaussian / ORCA tables
With -p auto (default), the program behind each output file is detected automatically. A batch table may contain
Gaussian .log targets and ORCA .out reference files in the same run. Use -p gaussian or -p orca only
when you want to validate that all populated paths belong to one backend.
Analysis Scheme Options
These options apply to chemsmart run pka (analyze and batch-analyze). They are separate from submission
options on chemsmart run/sub gaussian ... pka and chemsmart run/sub orca ... pka.
Short |
Long |
Description |
|---|---|---|
|
|
Thermodynamic cycle: |
|
|
\(G_{\text{soln}}(\text{H}^{+})\) in kcal/mol for the direct cycle. Required when |
Note
For job submission, -dG defaults to -265.9 kcal/mol. For output analysis you must pass -dG explicitly
whenever -s direct is used.
Output File Options
Used by analyze (not batch-analyze, which reads paths from the table).
Gas-phase optimization + frequency files
Short |
Long |
Description |
|---|---|---|
|
|
HA gas-phase opt+freq output. |
|
|
A⁻ gas-phase opt+freq output. |
|
|
HRef gas-phase opt+freq output. |
|
|
Ref⁻ gas-phase opt+freq output. |
Solvent single-point files
Short |
Long |
Description |
|---|---|---|
|
|
HA solvent single-point output. |
|
|
A⁻ solvent single-point output. |
|
|
HRef solvent single-point output. |
|
|
Ref⁻ solvent single-point output. |
Thermochemistry Options
Shared by analyze and batch-analyze.
Short |
Long |
Description |
|---|---|---|
|
|
Temperature in Kelvin. Default: |
|
|
Concentration in mol/L. Default: |
|
|
Pressure in atm. Default: |
|
|
Cutoff frequency (cm⁻¹) for entropy using Grimme’s quasi-RRHO. Default: |
|
|
Cutoff frequency (cm⁻¹) for entropy using Truhlar’s quasi-RRHO. Mutually exclusive with |
|
|
Cutoff frequency (cm⁻¹) for enthalpy using Head-Gordon’s method. Default: |
|
|
Experimental pKa of HRef. Required for proton exchange analysis. |
Output Format
When computing pKa from output files, CHEMSMART prints a detailed summary. The format depends on the analysis scheme.
Proton exchange
==============================================================================
pKa Calculation - Dual-level Proton Exchange Scheme
==============================================================================
Reaction: HA + Ref- -> A- + HRef
Temperature: 373.15 K
Method:
G_corr = qh-G(T) - E_gas (from gas-phase freq calculation)
G_soln = E_solv + G_corr (solution free energy)
DG_soln = [G(A-)_soln + G(HRef)_soln] - [G(HA)_soln + G(Ref-)_soln]
pKa = pKa_ref + DG_soln / (RT * ln10)
------------------------------------------------------------------------------
Gas-Phase Electronic Energies (E_gas, au):
HA: -345.7419436500
A-: -344.9153986020
HRef: -365.8436493070
Ref-: -365.4561783660
Thermal Corrections (G_corr = qh-G - E_gas, au):
HA: 0.0931931305
A-: 0.0758935969
HRef: 0.1404528844
Ref-: 0.1267467582
Solvent Single-Point Energies (E_solv, au):
HA: -346.4882221850
A-: -345.8989956310
HRef: -366.5974351550
Ref-: -366.1368369100
Solution Free Energies (G_soln = E_solv + G_corr, au):
HA: -346.3950290545
A-: -345.8231020341
HRef: -366.4569822706
Ref-: -366.0100901518
------------------------------------------------------------------------------
pKa Calculation:
DG_soln = 0.1250349015 au
= 78.4606 kcal/mol
pKa(HRef)_ref = 6.75
*** Computed pKa(HA) = 52.70 ***
==============================================================================
Direct dissociation
==============================================================================
pKa Calculation - Direct Dissociation Scheme
==============================================================================
Reaction: HA -> A- + H+
Temperature: 298.15 K
Method:
G_corr = qh-G(T) - E_gas (from gas-phase freq calculation)
G_soln = E_solv + G_corr (solution free energy)
DG_diss = G_soln(A-) + G_soln(H+) - G_soln(HA)
pKa = DG_diss / (2.303 * R * T)
------------------------------------------------------------------------------
Gas-Phase Electronic Energies (E_gas, au):
HA: -345.7419436500
A-: -344.9153986020
Thermal Corrections (G_corr = qh-G - E_gas, au):
HA: 0.0931931305
A-: 0.0758935969
Solvent Single-Point Energies (E_solv, au):
HA: -346.4882221850
A-: -345.8989956310
Solution Free Energies (G_soln = E_solv + G_corr, au):
HA: -346.3950290545
A-: -345.8231020341
------------------------------------------------------------------------------
pKa Calculation:
G_soln(H+) = -265.9000 kcal/mol
DG_diss = 0.1250349015 au
= 78.4606 kcal/mol
*** Computed pKa(HA) = 52.70 ***
==============================================================================
Batch analyze output
batch-analyze prints a compact table whose ΔG column header matches the scheme. The same formatted report is written
to -O when provided.
Typical table (single-acid basenames):
==============================================================================
Batch pKa Results (Dual-level Proton Exchange)
==============================================================================
Temperature: 298.15 K
Pressure: 1.0 atm
basename pKa ΔG_soln (kcal/mol)
------------------------------------------------------------------------------
phenol 10.12 13.4567
benzoic_acid 4.20 5.7890
==============================================================================
Multi-fragment CDXML workflow — after chemsmart sub ... -f pka_scale.cdxml pka batch and chemsmart run pka
batch-analyze, basenames match the fragment labels (<stem>_frag<N>_pka or the Gaussian stem without _pka
suffix, depending on backend). Example (values from a test reference acid; not physically meaningful):
==============================================================================
Batch pKa Results (Dual-level Proton Exchange)
==============================================================================
Temperature: 278.15 K
Pressure: 1.0 atm
basename pKa ΔG_soln (kcal/mol)
------------------------------------------------------------------------------
pka_scale_frag1 -8.17 -23.8913
pka_scale_frag4 -1.24 -15.0654
pka_scale_frag3 9.22 -1.7521
pka_scale_frag5 -2.68 -16.8958
==============================================================================
For direct dissociation, the header reads Batch pKa Results (Direct Dissociation) and the column is labeled
ΔG_diss (kcal/mol).
References
Tissandier, M. D. et al. (1998). J. Phys. Chem. A, 102, 7787. (Absolute proton solvation energy)
Grimme, S. (2012). Chem. Eur. J., 18, 9955. (Quasi-RRHO method)
Marenich, A. V.; Cramer, C. J.; Truhlar, D. G. (2009). J. Phys. Chem. B, 113, 6378. (SMD solvation model)