Quick runs¶
md ¶
md(
structure: Any,
*,
model: Any,
head: str | None = None,
charge: int | None = None,
spin_multiplicity: int | None = None,
sha256: str | None = None,
trusted: bool = False,
ensemble: str = "NVT",
temperature_K: float | None = None,
schedule: Any = None,
pressure_GPa: float = 0.0,
cell_mode: str = "hydrostatic",
timestep_fs: float = 0.5,
steps: int | None = None,
mc: Any = None,
min_mc_temperature_K: float | None = None,
dispersion: Any = None,
repeat: tuple[int, int, int] = (1, 1, 1),
output: Any = None,
seed: int | None = None,
initial_velocities: Any = "keep",
check: str = "skip",
integrator: Any = None,
mode: str | None = None,
allow_reference: bool = False,
fallback: Any = None,
gate: Any = None,
runner: Any = None,
engine: Any = None,
neighbours: Any = None,
calibrate: bool = False,
) -> RunResult
Run MD on structure (path or Atoms) with model and return a RunResult.
Arguments as SPEC §7.7 level 2:
model: a label, path or URL, withhead,charge,spin_multiplicityandsha256/trustedasfm.load; or anfm.loadresult (then without those);ensemble:"NVT"(Langevin),"NPT"(BAOAB withpressure_GPaandcell_mode) or"NVE"(velocity Verlet from the structure's momenta, notemperature_K).integrator=chooses anyfm.integratorsrecord explicitly;temperature_Korschedule(anfm.protocolsschedule);steps(optional with a schedule: the whole schedule);mcandmin_mc_temperature_K: onefm.mcrecord or a sequence of them, checked as §7.7 says, attached where the target is at or abovemin_mc_temperature_K;dispersion:None,"d3bj"or anfm.D3: the complete record goes into the force field (MACE plus D3, SPEC §11.2) and is shown in the report; a functional other than the training one is a report warning;repeat: the supercell,(1, 1, 1)by default (never expanded silently);output: a directory or anfm.Output; default./<structure stem>.fastmace/, or./fastmace-run/for anAtoms;seed: the noise seed;Nonedraws one, recorded inmetadata.json;initial_velocities: what a structure at rest (zero kinetic energy) starts with."keep"(default): its momenta as they are, so it starts at rest (as ASE; CSVR refuses that)."maxwell_boltzmann": seeded Maxwell-Boltzmann momenta at the run's starting target (temperature_K, the integrator's, or the schedule's first); refused when that is 0 K and for NVE. A temperature in K (a float above 0): Maxwell-Boltzmann momenta at it, also for NVE and for a schedule that starts at 0 K. The draw usesseed(its own stream, not the thermostat's), is not made when the structure already moves (its momenta are kept), and either way the report andmetadata.json's warnings say what happened. Opt-in;check: asSimulation(the gate is opt-in,check="gate");mode,allow_reference,fallback,gate,runner,engine,neighbours: the planner inputs, passed toSimulationas they are (simulation.PlannerOptions);calibrate:Truemeasures the backends the rules rank equal (hybrid against plain cuEq) on this structure before the run and takes plain cuEq only if it is faster by more than 5 % in every pair (SPEC §9.1, decision 55;CalibrationConfig,planner.calibrate). Off by default: it costs four child builds. Refused with MC moves.
Every ValueError and refusal comes before the model is loaded.
RunResult
dataclass
¶
What fm.md returns: the report and the expert objects it built.
summary: the one-screen report (§7.7, 1b-T15),simulation.report.text()after the run;plan,gate: thePlanand gate records (§9.5, §12.3);simulation: theSimulation, for restarts and the expert API; its output is flushed and it can run on (simulation.run);metadata: the dict written tometadata.json(§13);output: the output directory.