Skill Tracer
Skills › Scientific Agent Skills › primer-design › thermodynamics.md

thermodynamics.md

119 lines · skills/primer-design/references/thermodynamics.md at 5f2bc03

Open on GitHub
1# Thermodynamic calculations and interpretation
2
3Documentation checked: 2026-10-01 against primer3-py 2.3.1 documentation.
4Use the version recorded by the actual run to describe tested behavior.
5

Thermodynamic calculations and interpretation

Documentation checked: 2026-10-01 against primer3-py 2.3.1 documentation. Use the version recorded by the actual run to describe tested behavior.

Raw lines 1 to 5
6## Record the physical assumptions
7
8Nearest-neighbor predictions use sequence context and specified solution
9conditions. They do not make an oligo's Tm an invariant property. The unified DNA
10parameter framework is described by
11[SantaLucia (1998)](https://pubmed.ncbi.nlm.nih.gov/9465037/); mixed monovalent and
12magnesium effects require appropriate correction, as studied by
13[Owczarzy et al. (2008)](https://pubmed.ncbi.nlm.nih.gov/18422348/).
15| Input | primer3-py unit | Reporting requirement |
16| --- | --- | --- |
17| Monovalent cations (`mv_conc`) | mM | State measured, manufacturer-supplied, or assumed value |
18| Divalent cations (`dv_conc`) | mM | Record the supplied magnesium/cation value |
19| dNTPs (`dntp_conc`) | mM | State concentration convention; avoid silently mixing total and per-nucleotide amounts |
20| Oligo concentration (`dna_conc`) | nM | Use the model's concentration convention consistently |
21| Free-energy evaluation (`temp_c`) | °C | Store with every ΔG comparison |
22| DMSO, when modeled | percent | Tm correction is not a complete reaction model |
23| Formamide, when modeled | mol/L | Do not enter a percentage as molarity |
25These parameter units are documented in the
26[primer3-py quickstart](https://libnano.github.io/primer3-py/quickstart.html).
27For proprietary mixes with undisclosed composition, label chosen values as
28assumptions and compare plausible conditions if necessary. Never back-fill exact
29chemistry from the name of a kit.
31`PRIMER_DNA_CONC` is an effective concentration of annealing oligos during PCR;
32the Primer3 manual distinguishes it from initial reaction primer concentration.
33Record both and explain the model choice. The supplied checker uses the entered
34`dna_conc` for core Tm and structures, so comparisons share that assumption.
35The native `calc_tm` API supports DMSO/formamide, but the bundled adapter does not
36expose them; its results assume zero additive correction.
37[Primer3 concentration convention](https://primer3.org/manual.html#PRIMER_DNA_CONC).
39Native Primer3 can return a finite -273.15°C Tm at zero effective salt. The checker
40rejects Tm at/below absolute zero as invalid, alongside NaN/infinite output; it does
41not convert these to valid low-temperature candidates. This guard is not a complete
42test that a buffer lies within the model's calibrated range.

Record the physical assumptions

Nearest-neighbor predictions use sequence context and specified solution conditions. They do not make an oligo's Tm an invariant property. The unified DNA parameter framework is described by SantaLucia (1998); mixed monovalent and magnesium effects require appropriate correction, as studied by Owczarzy et al. (2008).

Inputprimer3-py unitReporting requirement
Monovalent cations (mv_conc)mMState measured, manufacturer-supplied, or assumed value
Divalent cations (dv_conc)mMRecord the supplied magnesium/cation value
dNTPs (dntp_conc)mMState concentration convention; avoid silently mixing total and per-nucleotide amounts
Oligo concentration (dna_conc)nMUse the model's concentration convention consistently
Free-energy evaluation (temp_c)°CStore with every ΔG comparison
DMSO, when modeledpercentTm correction is not a complete reaction model
Formamide, when modeledmol/LDo not enter a percentage as molarity

These parameter units are documented in the primer3-py quickstart. For proprietary mixes with undisclosed composition, label chosen values as assumptions and compare plausible conditions if necessary. Never back-fill exact chemistry from the name of a kit.

PRIMER_DNA_CONC is an effective concentration of annealing oligos during PCR; the Primer3 manual distinguishes it from initial reaction primer concentration. Record both and explain the model choice. The supplied checker uses the entered dna_conc for core Tm and structures, so comparisons share that assumption. The native calc_tm API supports DMSO/formamide, but the bundled adapter does not expose them; its results assume zero additive correction. Primer3 concentration convention.

Native Primer3 can return a finite -273.15°C Tm at zero effective salt. The checker rejects Tm at/below absolute zero as invalid, alongside NaN/infinite output; it does not convert these to valid low-temperature candidates. This guard is not a complete test that a buffer lies within the model's calibrated range.

Raw lines 6 to 43
44## Calculate several distinct quantities
46Use the snake_case APIs: `calc_tm`, `calc_hairpin`, `calc_homodimer`,
47`calc_heterodimer`, and `calc_end_stability`. The end-stability calculation is
48directional; examine both oligo orders when either primer's 3′ end matters.
49Do not reverse-complement an oligo before passing synthesized sequences to the
50structure routines. [API definitions](https://libnano.github.io/primer3-py/api/bindings.html).
52For each oligo record its annealing-core Tm, GC fraction, and length, then review
53hairpin and self-dimer results for the full ordered sequence. For each interacting
54pair record heterodimer and both directional 3′-end assessments. Preserve predicted
55structure alignments when available so the location of terminal complementarity
56can be inspected.
58`ThermoResult.dg` and `.dh` use **cal/mol**; `.ds` uses **cal/(mol·K)**; `.tm` uses
59°C. Divide energy by 1000 before displaying kcal/mol. Store `structure_found`:
60missing structures and zero-valued fields are not interchangeable evidence.
61[ThermoResult documentation](https://libnano.github.io/primer3-py/api/thermoanalysis.html).

Calculate several distinct quantities

Use the snake_case APIs: calc_tm, calc_hairpin, calc_homodimer, calc_heterodimer, and calc_end_stability. The end-stability calculation is directional; examine both oligo orders when either primer's 3′ end matters. Do not reverse-complement an oligo before passing synthesized sequences to the structure routines. API definitions.

For each oligo record its annealing-core Tm, GC fraction, and length, then review hairpin and self-dimer results for the full ordered sequence. For each interacting pair record heterodimer and both directional 3′-end assessments. Preserve predicted structure alignments when available so the location of terminal complementarity can be inspected.

ThermoResult.dg and .dh use cal/mol; .ds uses cal/(mol·K); .tm uses °C. Divide energy by 1000 before displaying kcal/mol. Store structure_found: missing structures and zero-valued fields are not interchangeable evidence. ThermoResult documentation.

Raw lines 44 to 62
63## Keep screening thresholds in context
65- A low difference between primer Tm values supports compatible conditions but says
66 nothing about reference specificity or amplification efficiency.
67- A predicted favorable dimer ΔG does not by itself show that the polymerase can
68 extend that alignment. Inspect 3′ placement as well as thermodynamic stability.
69- Compare energies only at matched temperatures, concentrations, and model settings.
70 Comparing one program's default ΔG with another's numeric cutoff is unreliable.
71- A candidate close to a chosen limit deserves sensitivity analysis, not unwarranted
72 numerical precision. Report useful decimals while retaining raw output.
74Thresholds are selection criteria chosen for a particular assay. They are not
75universal scientific pass/fail constants. Retain the assumptions, threshold
76definition, observed value, and reason for any override.
78Predicted Tm is not an automatic annealing temperature. Follow the selected
79polymerase's current instructions and validate an appropriate condition range.
80Even manufacturer protocols differ; for example, NEB's
81[Q5 annealing-temperature study](https://media.neb.com/m/5ee45964c1bea954/original/AppNote_Q5_UniversalAnnealing_Temp.pdf)
82and [Phusion Flash guidance](https://www.neb.com/en/protocols/guidelines-for-pcr-optimization-with-phusion-flash-high-fidelity-pcr-master-mix?pdf=true)
83use product-specific recommendations. A temperature tested on one enzyme,
84formulation, or target collection does not establish performance for another.

Keep screening thresholds in context

  • A low difference between primer Tm values supports compatible conditions but says nothing about reference specificity or amplification efficiency.
  • A predicted favorable dimer ΔG does not by itself show that the polymerase can extend that alignment. Inspect 3′ placement as well as thermodynamic stability.
  • Compare energies only at matched temperatures, concentrations, and model settings. Comparing one program's default ΔG with another's numeric cutoff is unreliable.
  • A candidate close to a chosen limit deserves sensitivity analysis, not unwarranted numerical precision. Report useful decimals while retaining raw output.

Thresholds are selection criteria chosen for a particular assay. They are not universal scientific pass/fail constants. Retain the assumptions, threshold definition, observed value, and reason for any override.

Predicted Tm is not an automatic annealing temperature. Follow the selected polymerase's current instructions and validate an appropriate condition range. Even manufacturer protocols differ; for example, NEB's Q5 annealing-temperature study and Phusion Flash guidance use product-specific recommendations. A temperature tested on one enzyme, formulation, or target collection does not establish performance for another.

Raw lines 63 to 85
86## Model and implementation boundaries
88The documented `calc_tm` nearest-neighbor path applies up to its configured length
89limit, normally 60 bases; longer sequences switch to an approximation. Structure
90routines also have length limits. The bundled checker constrains ordinary oligos
91instead of silently using unsupported long-tail calculations. Check runtime errors
92and emitted limits rather than inferring successful analysis from a partial table.
93[primer3-py API](https://libnano.github.io/primer3-py/api/bindings.html).
95Do not substitute ambiguity symbols, RNA, inosine, or modified bases into an ACGT
96DNA model and call the result validated. Modified chemistries require appropriate
97parameters; for example, LNA substitutions affect both stability and
98sequence-dependent mismatch discrimination.
99[LNA thermodynamics study](https://pubmed.ncbi.nlm.nih.gov/21928795/).
101For tailed primers, model the core's initial template interaction separately from
102full-oligo structures. For degenerate mixtures, a single “consensus Tm” hides the
103different species and effective concentrations. For multiplex panels, include
104cross-pair interactions and disclose any capped enumeration.

Model and implementation boundaries

The documented calc_tm nearest-neighbor path applies up to its configured length limit, normally 60 bases; longer sequences switch to an approximation. Structure routines also have length limits. The bundled checker constrains ordinary oligos instead of silently using unsupported long-tail calculations. Check runtime errors and emitted limits rather than inferring successful analysis from a partial table. primer3-py API.

Do not substitute ambiguity symbols, RNA, inosine, or modified bases into an ACGT DNA model and call the result validated. Modified chemistries require appropriate parameters; for example, LNA substitutions affect both stability and sequence-dependent mismatch discrimination. LNA thermodynamics study.

For tailed primers, model the core's initial template interaction separately from full-oligo structures. For degenerate mixtures, a single “consensus Tm” hides the different species and effective concentrations. For multiplex panels, include cross-pair interactions and disclose any capped enumeration.

Raw lines 86 to 105
106## Reproducibility and implementation checks
108Record Python, primer3-py, and underlying libprimer3 versions, full sequence inputs,
109all chemistry/model settings, warnings, and raw results. Test that:
1111. Tm changes appropriately when chemistry inputs change; values were not replaced
112 by a fixed rule based only on GC count.
1132. Displayed energy units match raw values and conversions.
1143. Swapping oligos preserves symmetric dimer comparisons while directional end
115 results retain their correct orientation.
1164. An invalid or unsupported sequence is reported as unassessed, never silently
117 shortened, stripped of modifications, or replaced with an arbitrary base.
1185. Tails are included in full-oligo interaction analysis and excluded from the
119 initial binding-core Tm and ordinary reference search.

Reproducibility and implementation checks

Record Python, primer3-py, and underlying libprimer3 versions, full sequence inputs, all chemistry/model settings, warnings, and raw results. Test that:

  1. Tm changes appropriately when chemistry inputs change; values were not replaced by a fixed rule based only on GC count.
  2. Displayed energy units match raw values and conversions.
  3. Swapping oligos preserves symmetric dimer comparisons while directional end results retain their correct orientation.
  4. An invalid or unsupported sequence is reported as unassessed, never silently shortened, stripped of modifications, or replaced with an arbitrary base.
  5. Tails are included in full-oligo interaction analysis and excluded from the initial binding-core Tm and ordinary reference search.
Raw lines 106 to 119