Bain Path

Group: Lattice | Class: BainPathCard

What the card does

Apply a tetragonal distortion along a selected cell axis to generate cells with different c/a ratios. The operation preserves atom count and composition and changes only the lattice vectors. Use it to sample bcc/fcc/fct transformations, tetragonal transition paths, and approximate martensitic deformations.

This is not a random perturbation card. It scans cell-shape degrees of freedom. Choose x, y, or z as the c axis and vary its length with ca_range. constant_volume compensates with the other two axes, scale_volume adds a volume scan, and free_c changes only the selected axis.

Example workflow

Scenario: A jagged energy curve along a bcc-to-fct path

A NEP model has low force error near equilibrium bcc Fe, but its energy curve develops unphysical spikes along the Bain path. The training set contains equilibrium bcc and a few random strains but no systematic tetragonal distortions, leaving the transition path as extrapolation.

Input: A relaxed bcc or near-bcc supercell.

Objective: Scan c/a = 0.8, 1.0, 1.2 at approximately constant volume so the model sees both oblate and elongated cells.

Parameters:

  • axis = "z"

  • ca_range = [0.8, 1.2, 0.2]

  • mode = "constant_volume"

  • scale_atoms = true

Output: Three structures labeled Bain(ax=z,ca=...,V=...,mode=constant_volume).

How to verify the improvement: After retraining, rescan the same Bain path. The energy curve should be smoother and peak positions should not jump after small changes in sampling points. If it remains unstable, reduce the step to 0.05 or use scale_volume to add volume ratios 0.95, 1.00, and 1.05 at every c/a.

Parameters

Axis(axis)

str, default "z". Selects the lattice vector used as the c axis of the Bain path.

z is common because many inputs place the transition or film direction along the third lattice vector. Choose x or y directly when appropriate. Avoid manually permuting axes first, which makes later labels easier to misinterpret.

Options

Meaning

When to choose it

x

Scale the first lattice vector

Distort along the a axis

y

Scale the second lattice vector

Distort along the b axis

z

Scale the third lattice vector

Distort along the c axis; the default

CA Range(ca_range)

tuple[float, float, float], default (1.0, 1.0, 1.0). A [start, stop, step] scan of the relative scale factor for the selected axis.

1.0 keeps the original cell, 0.9 shortens the selected axis by 10%, and 1.1 lengthens it by 10%. For near-equilibrium response, 0.95-1.05 is usually sufficient. A bcc/fcc/fct study may extend to 0.7-1.4, but check nearest-neighbor distances and volumes in every batch before committing DFT resources.

Mode(mode)

str, default "constant_volume". Controls how the other two axes and total volume respond when the selected axis changes.

Options

Meaning

When to choose it

constant_volume

Multiply the selected axis by r and the other two by 1/sqrt(r)

Isolate shape effects without introducing volume changes

scale_volume

Apply a constant-volume Bain distortion, then scale volume according to volume_scale_range

Cover tetragonal distortion and volume response together

free_c

Scale only the selected axis

Approximate epitaxial constraints or uniaxial loading

Volume Scale Range(volume_scale_range)

tuple[float, float, float], default (1.0, 1.0, 1.0). A [start, stop, step] scan of output volume relative to the original volume.

This parameter is used only when mode = "scale_volume". For example, [0.95, 1.05, 0.05] produces volume ratios 0.95, 1.00, and 1.05 for each c/a; five ca_range points therefore produce 15 structures. Start with a narrow range because simultaneous shape and volume scans grow quickly.

Active only when mode is scale_volume.

Scale Atoms(scale_atoms)

bool, default true. When enabled, atoms follow the cell at fixed fractional coordinates. When disabled, Cartesian coordinates remain fixed while only the cell changes.

Keep this enabled for normal training-set generation so the entire structure undergoes the lattice distortion. Disabling it changes periodic boundaries more than internal geometry and is appropriate only for special epitaxial-box or debugging cases. Inspect boundary proximity and nearest neighbors afterward.

Recommended presets

Near-equilibrium tetragonal response

Use to test whether the model responds smoothly to small distortions; produces three structures.

{
  "class": "BainPathCard",
  "check_state": true,
  "params": {
    "axis": "z",
    "ca_range": [0.95, 1.05, 0.05],
    "mode": "constant_volume",
    "volume_scale_range": [1.0, 1.0, 1.0],
    "scale_atoms": true
  }
}

Coarse transition-path scan

Use for a first look at the bcc/fct energy curve; produces seven structures.

{
  "class": "BainPathCard",
  "check_state": true,
  "params": {
    "axis": "z",
    "ca_range": [0.7, 1.3, 0.1],
    "mode": "constant_volume",
    "volume_scale_range": [1.0, 1.0, 1.0],
    "scale_atoms": true
  }
}

Combined shape and volume coverage

Use when both volume and tetragonal response appear undersampled. Output count is the number of ca_range points times the number of volume points.

{
  "class": "BainPathCard",
  "check_state": true,
  "params": {
    "axis": "z",
    "ca_range": [0.9, 1.1, 0.1],
    "mode": "scale_volume",
    "volume_scale_range": [0.95, 1.05, 0.05],
    "scale_atoms": true
  }
}

Recommended combinations

  • Bain Path -> Atomic Perturb: sample systematic tetragonal distortions, then add small coordinate perturbations at each point for finite-temperature local environments.

  • Super Cell -> Bain Path: expand first so a defect or magnetic period is not artificially confined by a small cell.

  • Bain Path -> Lattice Strain: cover the main transition path, then add ordinary axial strains to stabilize elastic response.

Common questions

More structures than expected. scale_volume combines every c/a with every volume point; the total is the product of both scan sizes.

Volume is not constant. Confirm that mode is constant_volume. free_c changes volume, while scale_volume varies it according to volume_scale_range.

Structures are excessively distorted. Narrow ca_range, validate model response over 0.95-1.05, and only then decide whether a wider transition path is justified.

Output labels

Bain(ax={axis},ca={r},V={V/V0},mode={mode})

Reproducibility

Deterministic: the same input structure and parameters produce exactly the same structure list.