Input Keys Reference

Magesty.jl uses TOML configuration files. Below is an annotated example for a BCC Fe supercell, followed by a full reference for every supported key.

Annotated Example

[general]
name = "bccfe"
kd   = ["Fe"]           # list of element names
nat  = 16               # total number of atoms in the supercell
periodicity = [true, true, true]  # apply periodic boundary to all (x, y, z) directions

[symmetry]
tolerance = 1e-5        # symmetry detection tolerance (optional, default 1e-3)
isotropy = true

[interaction]
nbody = 2               # maximum interaction body
[interaction.body1]
lmax.Fe = 0             # 1-body maximum angular momentum per element, i.e. this represents on-site anisotropy
[interaction.body2]
lsum = 2                # cutoff summation of l values for basis functions
cutoff."Fe-Fe" = -1     # pairwise cutoff radius in Å (-1 uses all possible pairs)

[regression]
datafile = "EMBSET" # path to training data
weight   = 0.5          # 0 = torque only, 1 = energy only, 0.5 = balanced
alpha    = 0.0          # elastic-net mixing (0 = ridge)
lambda   = 0.0          # regularization strength (0 = no regularization)

[structure]
kd_list  = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]  # element index per atom
lattice  = [            # lattice parameters
  [5.66, 0.0, 0.0],
  [0.0, 5.66, 0.0],
  [0.0, 0.0, 5.66],
]
position = [            # fractional coordinates
  [0.00, 0.00, 0.00],
  [0.25, 0.25, 0.25],
  [0.00, 0.00, 0.50],
  [0.50, 0.00, 0.00],
  [0.00, 0.50, 0.00],
  [0.25, 0.25, 0.75],
  [0.75, 0.25, 0.25],
  [0.25, 0.75, 0.25],
  [0.00, 0.50, 0.50],
  [0.50, 0.00, 0.50],
  [0.50, 0.50, 0.00],
  [0.25, 0.75, 0.75],
  [0.75, 0.25, 0.75],
  [0.75, 0.75, 0.25],
  [0.50, 0.50, 0.50],
  [0.75, 0.75, 0.75],
]

Key Reference

[general]

KeyTypeRequiredDescription
nameStringyesSystem name
kdVector{String}yesElement names
natIntyesNumber of atoms in supercell
periodicityVector{Bool}noPeriodic boundary conditions (default: [true,true,true])

[symmetry]

KeyTypeRequiredDescription
toleranceFloat64noSymmetry detection tolerance (default: 1e-3)
isotropyBoolnoOnly include isotropic (L=0) terms (default: false)

[interaction]

KeyTypeRequiredDescription
nbodyIntyesMaximum interaction order
body1.lmax.<elem>IntnoOn-site max angular momentum per element
body<n>.lsumIntyes (n≥2)Max L sum for n-body basis
body<n>.cutoff."<e1>-<e2>"Float64yes (n≥2)Pairwise cutoff radius in Å

[regression]

KeyTypeRequiredDescription
datafileStringyesPath to EMBSET training data
ndataIntnoNumber of data points to use (default: -1 = all)
weightFloat64noEnergy/torque balance: 0=torque only, 1=energy only (default: 0.0)
alphaFloat64noElastic-net mixing parameter (default: 0.0)
lambdaFloat64noRegularization strength (default: 0.0)

[structure]

KeyTypeRequiredDescription
kd_listVector{Int}yesElement index (1-based, into kd) per atom
lattice3×3 Float64yesLattice vectors in Å; each of the three rows in the TOML array defines one lattice vector (a₁, a₂, a₃)
positionVector of 3-vectorsyesFractional atomic coordinates