Docs are under construction. Content may be incomplete or change.

tako.phonon Settings

Page type: Reference · Generated from src/script/takoScriptDocs.ts · Verified 2026-07-11T00:00:00.000Z
On this page

This page is generated from code-owned Doxygen-style metadata in src/script/takoScriptDocs.ts. Update that file first, then regenerate this page so runtime capability descriptions, docs, and agent guidance stay aligned.

tako.phonon

Runs finite-displacement phonons for periodic structures.

Signature: await tako.phonon(structure, { calculator, properties, phononSupercell, phononDisplacementAngstrom, phononBandPath, phononBandPointsPerSegment })

Theory

  • Finite-displacement phonons approximate the Hessian, or force-constant matrix, by displacing atoms in a supercell and evaluating restoring forces. Diagonalizing the mass-weighted dynamical matrix gives normal-mode frequencies and eigenvectors.
  • The supercell controls how far real-space force constants extend. Larger supercells reduce artificial interaction between displaced images and improve acoustic/low-frequency modes, but each additional atom increases force evaluations.
  • Imaginary modes, reported as negative frequencies in many plots, indicate the structure is unstable at that wave vector under the chosen model or insufficiently relaxed. Re-optimize before trusting a phonon spectrum.
  • A band path samples phonon frequencies along high-symmetry reciprocal-space lines. DOS-like outputs require reciprocal-space sampling and are sensitive to cell quality and force-constant convergence.

Usage Notes

  • Use periodic structures with a well-relaxed cell and small residual forces before calling phonon.
  • Use nequix-phono or another force model validated for phonons when possible; force noise directly pollutes frequencies.
  • The normalized default is [3, 3, 3] for nequix-phono and [2, 2, 2] for other levels. Use larger supercells only when the added force evaluations fit the workflow budget.

Settings

SettingTypeDefaultValuesUnitValidationDescription
calculatorcalculatorRequired for calculator-backed operations; validate the operation, structure element coverage, and requested properties before executionCalculator object from tako.calculator.gxtb(...), gfn2(...), mlip(...), or dft(...). It controls the level of theory, charge/spin where supported, runtime assets, property availability, and the synchronous supported-element list used by TakoScript and the UI.
propertiespropertieslevel-dependent normalization; MLIP: ['energy', 'forces']; GFN2: ['energy', 'forces', 'charges', 'dos', 'pdos']energy, forces, stress, dos, pdos, charges, electronDensity, chargeDensity, nci, molden, wfn, hdf5, orbitals, spinDensity, esp, densityDerivatives, fukui, elfUnknown names are removed and energy/forces are reinserted. The phonon worker consumes forces; normalized electronic property names do not create single-point post-processing in this operation.Shared calculator property request retained in calculation settings. Phonon bands and the Gamma histogram are operation outputs; charges, DOS/PDOS, density, NCI, and WFN are not returned even if present after level-default normalization.
phononSupercellarraylevel-dependent; nequix-phono: [3,3,3]; otherwise [2,2,2]Finite-displacement supercell repeats along a, b, c. Values are normalized to positive integers and capped at 6 per direction for browser runtime safety.
phononDisplacementAngstromnumber0.01Displacement amplitude in A. Too small amplifies numerical noise; too large samples anharmonic forces. 0.01 A is the standard starting point.
phononBandPointsPerSegmentinteger16Interpolation points per band-path segment. Higher values smooth plots without changing underlying force constants.
phononBandPathstring''Optional band path string such as G X M G. Empty means no explicit user path; the UI may provide or infer a path when symmetry data is available.
thermoTemperatureKnumber298.15Evaluation temperature for the crystal thermochemistry payload (U/S/F from the phonon DOS).
thermoFormulaUnitsinteger1Formula units per cell; U/S/F are divided by this so values read per formula unit.

Example

const crystal = await tako.input("input/silicon.extxyz");
const calculator = tako.calculator.mlip({ levelOfTheory: "nequix-phono" });
const result = await tako.phonon(crystal, {
  calculator,
  properties: ["energy", "forces"],
  phononSupercell: [3, 3, 3],
  phononDisplacementAngstrom: 0.01,
  phononBandPath: "G X M G",
  phononBandPointsPerSegment: 24,
});
await tako.output("output/phonon-result.json", result);

Result

Returned phonon object with Gamma frequencies/modes, a Gamma-only positive-mode histogram, and an optional reciprocal-path band. The public result does not contain force constants, derived viewer artifacts, displaced structures, or logs.

FieldTypeUnitAvailabilityDescription
kind”phonon”Every successful result, including nonperiodic fallbackRuntime result discriminator.
level_of_theorystringEvery successful resultNormalized calculator level used for displaced evaluations.
engine”gfn2” | “mlip”Every successful resultCalculator engine family.
phonon_cell”primitive”Periodic result only; absent for nonperiodic fallbackStates that SeekPath primitive-cell standardization preceded the phonon calculation.
supercell[integer, integer, integer]Every successful resultEffective repeat counts after clamping each direction to 1–6.
band_points_per_segmentintegerEvery successful resultEffective points per segment after clamping to 1–64.
frequencies_cm_invnumber[]cm^-1Every successful resultTop-level duplicate of the Gamma signed frequency list.
modesnumber[mode][atom][3]Every successful resultTop-level duplicate of Gamma Cartesian mode vectors; periodic results contain every reconstructed primitive atom because input constraints are not transferred.
phononobjectEvery successful resultGamma-point vibration payload formed by summing image-resolved force constants.
phonon.frequencies_cm_invnumber[]cm^-1Every successful resultSigned Gamma frequencies; negative values represent imaginary modes.
phonon.frequency_components{ real: number, imaginary: number }[]cm^-1Every successful resultSeparate real and imaginary frequency components.
phonon.energies_hartree{ real: number, imaginary: number }[]HartreeEvery successful resultComplex harmonic energy components for Gamma modes.
phonon.zero_point_energy_hartreenumberHartreeEvery successful resultGamma-mode harmonic zero-point sum; not crystal thermochemistry.
phonon.zero_point_energy_evnumbereVEvery successful resultThe same Gamma-mode harmonic zero-point sum in electronvolts.
phonon.modesnumber[mode][atom][3]Every successful resultGamma Cartesian displacements derived from mass-weighted eigenvectors. Periodic primitive reconstruction uses all atoms and default elemental masses; nonperiodic fallback can retain zero vectors for fully fixed atoms.
phonon_dosobjectEvery successful result after the histogram stagePositive-mode Gamma histogram, not a q-mesh-integrated crystal DOS.
phonon_dos.energies_hartreenumber[]HartreeWith phonon_dosHistogram bin-center harmonic energies.
phonon_dos.energies_cm_invnumber[]cm^-1With phonon_dosThe same bin centers converted to inverse centimeters.
phonon_dos.weightsnumber[]With phonon_dosCount of positive Gamma modes in each bin.
thermochemistryobjectWhen the thermochemistry post-processing succeeds (periodic: crystal model from the phonon DOS; molecular fallback: ideal-gas model)Crystal U/S/F per formula unit at the configured temperature, with a 50–1000 K sweep. Fields mirror the vibration thermochemistry object.
thermochemistry.internal_energy_evnumbereVWith thermochemistryInternal energy U(T) including the zero-point integral, per formula unit.
thermochemistry.entropy_j_per_mol_knumberJ·mol⁻¹·K⁻¹With thermochemistryPhonon entropy S(T) per formula unit.
thermochemistry.helmholtz_energy_evnumbereVWith thermochemistryHelmholtz free energy F(T) = U − T·S per formula unit.
thermochemistry.sweepobjectWith thermochemistrytemperatures_k, helmholtz_energy_ev, and entropy_j_per_mol_k arrays over 50–1000 K.
phonon_bandobjectPeriodic result only when path construction and band evaluation succeed; otherwise omittedFrequencies evaluated along a custom or SeekPath high-symmetry path.
phonon_band.bravais_latticestringWith phonon_bandSeekPath Bravais-lattice label for the standardized primitive cell.
phonon_band.path_stringstringWith phonon_bandEffective special-point path.
phonon_band.path_source”custom” | “seekpath”With phonon_bandWhether a nonempty user path or the SeekPath recommendation was used.
phonon_band.qpoints[number, number, number][]fractional reciprocal coordinatesWith phonon_bandOrdered q points in the standardized primitive reciprocal basis.
phonon_band.frequencies_cm_invnumber[qpoint][mode]cm^-1With phonon_bandSigned band frequencies at every returned q point.
phonon_band.x_axisnumber[]With phonon_band when path metadata is attachedCumulative linear plot coordinate; not a Cartesian reciprocal component.
phonon_band.label_positionsnumber[]With phonon_band when path metadata is attachedPlot-coordinate positions for special-point labels.
phonon_band.labelsstring[]With phonon_band when path metadata is attachedDisplay labels aligned with label_positions.
phonon_band.special_points{ label: string, coordinates: [number, number, number] }[]fractional reciprocal coordinatesWith phonon_band when path metadata is attachedSpecial-point dictionary serialized as ordered records.
phonon_band.segments{ start: integer, end: integer }[]With phonon_band when path metadata is attachedIndex bounds of connected path segments; preserves discontinuities.

Errors and Promise Behavior

  • Rejects when a periodic input cannot be standardized to a SeekPath primitive cell or a displaced calculator evaluation fails.
  • Band-path parsing/evaluation failures are logged and omit phonon_band after Gamma data and the Gamma histogram have already succeeded.
  • A nonperiodic input resolves through the molecular fallback branch rather than rejecting; require phonon_cell === “primitive” when periodic semantics are mandatory.
  • Cancellation has no public restart cache; a later call repeats displaced evaluations.