tako.phonon Settings
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-phonoor another force model validated for phonons when possible; force noise directly pollutes frequencies. - The normalized default is
[3, 3, 3]fornequix-phonoand[2, 2, 2]for other levels. Use larger supercells only when the added force evaluations fit the workflow budget.
Settings
| Setting | Type | Default | Values | Unit | Validation | Description |
|---|---|---|---|---|---|---|
calculator | calculator | Required for calculator-backed operations; validate the operation, structure element coverage, and requested properties before execution | Calculator 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. | |||
properties | properties | level-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, elf | Unknown 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. | |
phononSupercell | array | level-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. | |||
phononDisplacementAngstrom | number | 0.01 | Displacement amplitude in A. Too small amplifies numerical noise; too large samples anharmonic forces. 0.01 A is the standard starting point. | |||
phononBandPointsPerSegment | integer | 16 | Interpolation points per band-path segment. Higher values smooth plots without changing underlying force constants. | |||
phononBandPath | string | '' | 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. | |||
thermoTemperatureK | number | 298.15 | Evaluation temperature for the crystal thermochemistry payload (U/S/F from the phonon DOS). | |||
thermoFormulaUnits | integer | 1 | Formula 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.
| Field | Type | Unit | Availability | Description |
|---|---|---|---|---|
kind | ”phonon” | Every successful result, including nonperiodic fallback | Runtime result discriminator. | |
level_of_theory | string | Every successful result | Normalized calculator level used for displaced evaluations. | |
engine | ”gfn2” | “mlip” | Every successful result | Calculator engine family. | |
phonon_cell | ”primitive” | Periodic result only; absent for nonperiodic fallback | States that SeekPath primitive-cell standardization preceded the phonon calculation. | |
supercell | [integer, integer, integer] | Every successful result | Effective repeat counts after clamping each direction to 1–6. | |
band_points_per_segment | integer | Every successful result | Effective points per segment after clamping to 1–64. | |
frequencies_cm_inv | number[] | cm^-1 | Every successful result | Top-level duplicate of the Gamma signed frequency list. |
modes | number[mode][atom][3] | Every successful result | Top-level duplicate of Gamma Cartesian mode vectors; periodic results contain every reconstructed primitive atom because input constraints are not transferred. | |
phonon | object | Every successful result | Gamma-point vibration payload formed by summing image-resolved force constants. | |
phonon.frequencies_cm_inv | number[] | cm^-1 | Every successful result | Signed Gamma frequencies; negative values represent imaginary modes. |
phonon.frequency_components | { real: number, imaginary: number }[] | cm^-1 | Every successful result | Separate real and imaginary frequency components. |
phonon.energies_hartree | { real: number, imaginary: number }[] | Hartree | Every successful result | Complex harmonic energy components for Gamma modes. |
phonon.zero_point_energy_hartree | number | Hartree | Every successful result | Gamma-mode harmonic zero-point sum; not crystal thermochemistry. |
phonon.zero_point_energy_ev | number | eV | Every successful result | The same Gamma-mode harmonic zero-point sum in electronvolts. |
phonon.modes | number[mode][atom][3] | Every successful result | Gamma 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_dos | object | Every successful result after the histogram stage | Positive-mode Gamma histogram, not a q-mesh-integrated crystal DOS. | |
phonon_dos.energies_hartree | number[] | Hartree | With phonon_dos | Histogram bin-center harmonic energies. |
phonon_dos.energies_cm_inv | number[] | cm^-1 | With phonon_dos | The same bin centers converted to inverse centimeters. |
phonon_dos.weights | number[] | With phonon_dos | Count of positive Gamma modes in each bin. | |
thermochemistry | object | When 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_ev | number | eV | With thermochemistry | Internal energy U(T) including the zero-point integral, per formula unit. |
thermochemistry.entropy_j_per_mol_k | number | J·mol⁻¹·K⁻¹ | With thermochemistry | Phonon entropy S(T) per formula unit. |
thermochemistry.helmholtz_energy_ev | number | eV | With thermochemistry | Helmholtz free energy F(T) = U − T·S per formula unit. |
thermochemistry.sweep | object | With thermochemistry | temperatures_k, helmholtz_energy_ev, and entropy_j_per_mol_k arrays over 50–1000 K. | |
phonon_band | object | Periodic result only when path construction and band evaluation succeed; otherwise omitted | Frequencies evaluated along a custom or SeekPath high-symmetry path. | |
phonon_band.bravais_lattice | string | With phonon_band | SeekPath Bravais-lattice label for the standardized primitive cell. | |
phonon_band.path_string | string | With phonon_band | Effective special-point path. | |
phonon_band.path_source | ”custom” | “seekpath” | With phonon_band | Whether a nonempty user path or the SeekPath recommendation was used. | |
phonon_band.qpoints | [number, number, number][] | fractional reciprocal coordinates | With phonon_band | Ordered q points in the standardized primitive reciprocal basis. |
phonon_band.frequencies_cm_inv | number[qpoint][mode] | cm^-1 | With phonon_band | Signed band frequencies at every returned q point. |
phonon_band.x_axis | number[] | With phonon_band when path metadata is attached | Cumulative linear plot coordinate; not a Cartesian reciprocal component. | |
phonon_band.label_positions | number[] | With phonon_band when path metadata is attached | Plot-coordinate positions for special-point labels. | |
phonon_band.labels | string[] | With phonon_band when path metadata is attached | Display labels aligned with label_positions. | |
phonon_band.special_points | { label: string, coordinates: [number, number, number] }[] | fractional reciprocal coordinates | With phonon_band when path metadata is attached | Special-point dictionary serialized as ordered records. |
phonon_band.segments | { start: integer, end: integer }[] | With phonon_band when path metadata is attached | Index 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.