Command Line Interface¶
MACE Inference provides a command-line interface for common tasks.
Installation¶
The CLI is automatically installed with the package:
Usage¶
Commands¶
single-point¶
Calculate energy, forces, and stress for a structure.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--model |
str | medium |
Model name or path |
--device |
str | auto |
Device (auto/cpu/cuda) |
--d3 |
flag | False | Enable D3 correction |
--d3-xc |
str | pbe |
D3 functional |
Example:
Output:
optimize¶
Optimize atomic positions and cell.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--model |
str | medium |
Model name or path |
--device |
str | auto |
Device |
--fmax |
float | 0.05 |
Force convergence (eV/Å) |
--steps |
int | 500 |
Maximum steps |
--optimizer |
str | BFGS |
BFGS or FIRE |
--relax-cell |
flag | False | Also optimize cell |
--output |
str | None | Output file |
Example:
md¶
Run molecular dynamics simulation.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--model |
str | medium |
Model name or path |
--device |
str | auto |
Device |
--ensemble |
str | nvt |
nvt or npt |
--temperature |
float | 300 |
Temperature (K) |
--pressure |
float | None | Pressure (GPa, NPT only) |
--timestep |
float | 1.0 |
Time step (fs) |
--steps |
int | 1000 |
Number of steps |
--output |
str | None | Trajectory output file |
Example:
phonon¶
Calculate phonon properties.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--model |
str | medium |
Model name or path |
--device |
str | auto |
Device |
--supercell |
int int int | 2 2 2 |
Supercell dimensions |
--delta |
float | 0.01 |
Displacement (Å) |
--temperature |
float | 300 |
Temperature for thermal props |
Example:
bulk-modulus¶
Calculate bulk modulus.
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--model |
str | medium |
Model name or path |
--device |
str | auto |
Device |
--n-points |
int | 7 |
Number of E-V points |
--eos |
str | birchmurnaghan |
Equation of state |
Example:
adsorption¶
Calculate adsorption energy.
Arguments:
framework.cif- Path to framework structureadsorbate- Gas molecule name (e.g., CO2, H2O, CH4)
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--model |
str | medium |
Model name or path |
--device |
str | auto |
Device |
--site |
float float float | required | Adsorption site [x, y, z] |
--fmax |
float | 0.05 |
Force convergence |
--fix-framework |
flag | True | Keep framework fixed |
Example:
Global Options¶
These options are available for all commands:
| Option | Description |
|---|---|
--help |
Show help message |
--version |
Show version |
--verbose |
Verbose output |
--quiet |
Minimal output |
Examples¶
Batch Processing with Shell¶
# Process multiple structures
for f in structures/*.cif; do
mace-inference single-point "$f" --model medium >> results.txt
done