User Guide
Reference for CLI, Python API, and backends.
Core Concepts
Target |
Strategy |
Description |
|---|---|---|
|
|
Direct local optimization |
|
|
Minima from interpolated path |
|
|
Local transition-state (TS) search |
|
|
TS guess from Image-Dependent Pair Potential (IDPP) interpolation + local refinement |
|
|
IDPP path, energy-weighted Climbing-Image Nudged Elastic Band (CI-NEB; looser band |
|
|
Dewar–Healy–Stewart (DHS) two-image bracket + local TS refinement |
|
|
Double-ended growing string method (DE-GSM) |
|
|
Nudged Elastic Band (NEB) path optimization |
|
|
CI-NEB path optimization |
|
|
Intrinsic Reaction Coordinate (IRC) path from transition state |
|
|
Generate path only (no optimization) |
Installation
pip install famex
# Or from source:
git clone https://github.com/rlaplaza-lab/famex.git && cd famex && pip install -e .
# UMA backend (recommended default):
pip install famex[uma]
# equivalent to: pip install "fairchem-core>=2.25.0"
# Development / testing:
pip install -e ".[dev,uma]"
See README.md for the install table (with default checkpoints) and Default models below.
Note: Python 3.11+ required. See Dependency Conflicts for UMA/MACE environment separation.
Default backend: CLI and Explorer default to uma with checkpoint uma-s-1p2 and task head omol. For a conflict-free quick start, pass --backend aimnet2 (loads aimnet2_wb97m_0) or install only torch. See Default models for every backend keyword.
CLI Reference
Structure inputs for minima, ts, and path can be a geometry file, a SMILES string (a text encoding of molecular connectivity), pubchem:NAME, cid:, or a bare numeric CID. A bare non-numeric name on those commands is treated as SMILES. Use --embedder pysmiles (default, pip install famex[smiles]) or --embedder rdkit (pip install famex[rdkit]) when coordinates are built from SMILES.
Global Options
minima, ts, and path share these options. famex cache does not take them. --freq, --temperature, --cleanup-frequencies, and the vibrational-mode animation flags apply to minima and ts only.
Option |
Default |
Description |
|---|---|---|
|
|
Backend: |
|
backend default |
Override model (see Default models when omitted) |
|
|
Path to model file (if applicable) |
|
|
Device: |
|
|
UMA task head: |
|
|
Optional FairChem DFT-D3(BJ) wrap for UMA: |
|
|
Default molecular charge |
|
|
Default spin multiplicity (use |
|
|
Local optimizer: |
|
|
Optimizer kwargs as key=value, repeatable |
|
|
TS optimizer kwargs as key=value, repeatable |
|
|
Constraints spec string; e.g., |
|
|
|
|
|
|
|
|
Validate inputs and show strategy selection without running |
|
|
|
|
|
|
|
|
|
|
|
Vibrational mode index to write. Repeatable. Overrides |
|
|
Frames in each mode animation |
|
|
Largest atomic displacement in each animation, in angstroms |
|
|
|
|
|
Force finite-difference Hessians for TS optimizers and frequency calculations. When disabled (default), backends with analytical Hessian support ( |
Minima Optimization
Optimize molecular structures to find energy minima.
Options
Option |
Default |
Description |
|---|---|---|
|
required |
Geometry file, SMILES, |
|
|
Optimization strategy: |
|
|
Product geometry, SMILES, or PubChem ( |
|
|
SMILES 3D method: |
|
auto |
Output optimized XYZ path. Replaces only the default file |
|
|
Also write the optimizer step history |
|
|
Convergence threshold |
|
|
Max optimization steps |
|
|
Number of interpolation points (interpolate strategy only) |
|
|
Interpolation method: |
Examples
# Basic local optimization
famex minima --strategy local molecule.xyz
# With specific backend and convergence
famex minima --strategy local molecule.xyz --backend aimnet2 --fmax 0.01
# Two-ended minima search via interpolation
famex minima --strategy interpolate reactant.xyz --product product.xyz --npoints 21
# With constraints
famex minima --strategy local molecule.xyz --constraints "fix 0,1,2"
# Dry run to check strategy selection
famex minima --strategy local molecule.xyz --dry-run
# Animate every vibrational mode (also runs the frequency analysis)
famex minima --strategy local molecule.xyz --write-modes
Output Files
The default file follows the target. local omits the strategy name.
Local optimization:
{input}.minima.xyz(one structure)Interpolate optimization:
{input}.minima.interpolate.xyz(one optimized minimum per image)
--history also writes optimizer steps: {input}.minima_trajectory.xyz or {input}.minima.interpolate_trajectory.xyz. Frames from an interpolated minima search are tagged with image and step in the XYZ comment.
--write-modes writes one multi-frame XYZ per mode under {output_stem}_modes/ (e.g. water.minima_modes/mode_000_1234.5cm-1.xyz). Frame 0 is the optimized geometry; peak displacement is --mode-amplitude. Interpolated minima use an image{i}_ prefix and skip images without frequency analysis.
Transition State Optimization
Find and optimize transition state structures.
Options
Option |
Default |
Description |
|---|---|---|
|
required |
Geometry file, SMILES, |
|
|
Optimization strategy: |
|
|
Product geometry, SMILES, or PubChem ( |
|
|
SMILES 3D method: |
|
auto |
Output TS XYZ path. Replaces only the default file |
|
|
Also write the search path and the local TS optimizer history |
|
|
Convergence threshold for local TS refinement |
|
strategy default |
Max optimization steps. |
|
strategy default |
Images: |
|
|
Interpolation method (interpolate/cineb; default IDPP) |
|
|
Upper spring constant for energy-weighted CI-NEB ( |
|
|
Growing-string image count. Overrides |
|
strategy default |
growing_string: 0.1; dhs |
|
strategy default |
growing_string: 0.1; dhs |
|
|
DHS small step when images are close |
|
|
DHS distance below which small_step is used |
|
|
For all |
Examples
# Basic local TS optimization
famex ts --strategy local ts_guess.xyz
# With frequency analysis
famex ts --strategy local ts_guess.xyz --freq
# Animate the imaginary mode
famex ts --strategy local ts_guess.xyz --write-modes --modes imaginary
# With custom optimizer
famex ts --strategy local ts_guess.xyz --local-optimizer rfo --fmax 0.02
# TS from IDPP interpolation
famex ts --strategy interpolate reactant.xyz --product product.xyz
# With custom settings
famex ts --strategy interpolate reactant.xyz --product product.xyz --npoints 15 --interp idpp
# CI-NEB TS guess (IDPP + energy-weighted springs, looser band fmax)
famex ts --strategy cineb reactant.xyz --product product.xyz
# Dewar–Healy–Stewart bracket
famex ts --strategy dhs reactant.xyz --product product.xyz
# Growing string method
famex ts --strategy growing_string reactant.xyz --product product.xyz --npoints 20 --step-size 0.1
# Strict validation (raises unless vibrationally a first-order saddle)
famex ts --strategy local ts_guess.xyz --require-ts
famex ts --strategy growing_string reactant.xyz --product product.xyz --require-ts
# Interpolated TS with frequency analysis
famex ts --strategy interpolate reactant.xyz --product product.xyz --freq
Output Files
The default file is always the single optimized saddle.
Local TS:
{input}.ts.xyzInterpolated TS:
{input}.ts.interpolate.xyzCI-NEB TS:
{input}.ts.cineb.xyzDHS TS:
{input}.ts.dhs.xyzGrowing string TS:
{input}.ts.growing_string.xyz
--history also writes:
Local optimizer steps:
{input}.ts_trajectory.xyz, or{input}.ts.{strategy}_trajectory.xyzfor the refinement inside another TS methodThe search geometry that is not the default file:
{input}.ts.{strategy}_path.xyz(interpolation guess, CI-NEB band, DHS bracket images, or the growing-string path from reactant to product)
--write-modes writes the same mode animations as minima, in a directory beside the TS geometry file ({output_stem}_modes/).
Reaction Path Optimization
Generate and optimize reaction pathways.
Options
Option |
Default |
Description |
|---|---|---|
|
required |
One or more endpoints. Each may be a geometry file, a SMILES string, |
|
|
Path optimization strategy: |
|
|
SMILES 3D method: |
|
auto |
Output trajectory XYZ path. Replaces only the default file |
|
|
Also write the NEB or CI-NEB iteration history, or IRC forward and reverse branches |
|
|
Convergence threshold |
|
strategy default |
Max optimization steps. |
|
|
Number of images in path |
|
|
Initial interpolation method |
|
|
Spring constant for NEB/CI-NEB (same default as the Python strategies) |
|
|
IRC step size (IRC strategy only) |
|
|
Direction: |
Examples
# Raw interpolation (two structures)
famex path --strategy interpolate reactant.xyz product.xyz
# NEB path optimization (two structures)
famex path --strategy neb reactant.xyz product.xyz
# NEB with multiple intermediate structures
famex path --strategy neb reactant.xyz intermediate.xyz product.xyz --npoints 11
# CI-NEB path optimization
famex path --strategy cineb reactant.xyz product.xyz
# IRC from transition state (single structure)
famex path --strategy irc ts.xyz --direction both
Output Files
The default file is the path from one end to the other. NEB, CI-NEB, and interpolation run from reactant to product. IRC with --direction both is the reversed backward branch, then the transition state, then the forward branch. A one-sided IRC writes that side plus the transition state under the same default name.
Interpolation:
{input}.path.interpolate.xyzNEB:
{input}.path.neb.xyzCI-NEB:
{input}.path.cineb.xyzIRC:
{input}.path.irc.xyz
--history also writes {input}.path.neb_trajectory.xyz or {input}.path.cineb_trajectory.xyz (one frame per image per iteration, with iteration and image in the XYZ comment), and {input}.path.irc_forward.xyz / {input}.path.irc_reverse.xyz for the IRC branches that were followed.
Cache Management
Manages the on-disk model cache (downloaded checkpoints for any backend that uses it). Calculator instances are cached separately in memory for the session.
famex cache info # Show cache directory, size, and cached models
famex cache verify # Checksum-verify cached model files
famex cache clear # Clear entire cache (prompts for confirmation)
famex cache clear --model M # Clear one model entry
famex cache clear --yes # Skip confirmation prompt
Structure Inputs (File, SMILES, PubChem)
famex minima, famex ts, and famex path accept a geometry file, a SMILES string, pubchem:NAME, cid:2244, or a bare numeric CID anywhere a structure is expected (including --product and path endpoints). A bare non-numeric name is SMILES, not a PubChem lookup. Endpoints of one calculation must have the same number of atoms.
When the input is SMILES (or PubChem has no 3D conformer), coordinates are built internally. --embedder selects the method:
Embedder |
Install |
What it does |
|---|---|---|
|
|
Universal Force Field (UFF) distance geometry, then a short UFF-like cleanup |
|
|
RDKit ETKDGv3 distance-geometry embedder |
Either result is a starting geometry: pass it straight into optimization (for example famex minima).
famex minima --strategy local "CCO" --backend aimnet2 --embedder pysmiles
famex minima --strategy local "CCO" --embedder rdkit --backend aimnet2
famex minima --strategy local pubchem:aspirin --backend aimnet2
famex minima --strategy local cid:2244 --backend aimnet2
from famex import Explorer, smiles_to_atoms
from famex.io.geometry import Geometry
geom = smiles_to_atoms("CCO")
rdkit_geom = smiles_to_atoms("CCO", embedder="rdkit")
explorer = Explorer.from_smiles(
"CCO", backend="uma", target="minima", strategy="local", embedder="pysmiles"
)
pubchem_geom = Geometry.from_pubchem("aspirin")
explorer = Explorer.from_pubchem("aspirin", backend="uma", target="minima", strategy="local")
Limits of the pysmiles embedder:
Four-coordinate centers are embedded as tetrahedral. Square-planar versus tetrahedral, and octahedral chirality, are not in ordinary SMILES.
Write metal charges and ligand bonds explicitly. Dative
A->Bis not OpenSMILES; use a normal bond, with charge separation when you need it ([C-]#[O+]).No periodic crystals. Dot-disconnected fragments (salts) are embedded separately and placed at a van der Waals contact.
1–4 distances use generic cis/gauche/trans windows, not element-specific torsion terms.
@/@@and/\stereo are enforced when the SMILES contains them.
RDKit ETKDGv3 follows RDKit’s own valence and UFF atom types. It can reject metal SMILES that the pysmiles path embeds, including [Ni](C#[O])4. Disconnected salts can be left on top of each other. The PubChem conformer is a computed model, not a crystal structure.
Python API
Explorer Class
from famex import Explorer
explorer = Explorer(
atoms, # Atoms or Sequence[Atoms]
backend="uma", # Backend name
target="minima", # Target: minima|ts|path
strategy="local", # Strategy: local|neb|cineb|interpolate|growing_string|dhs|irc
device=None, # Device: cpu|cuda (auto-detected if None)
local_optimizer="default", # Optimizer (auto-selects based on target)
default_charge=0,
default_spin=1,
)
Targets/Strategies: see Core Concepts
Optimizers: default selects lbfgs for minima and path, and rfo for TS. First-order: lbfgs, bfgs, fire. Second-order: sella, sella-analytical, trust-krylov, trust-ncg, trust-exact, newton-cg, rfo. newton-cg is minima-only.
Key Methods
# Run optimization
result = explorer.run(fmax=0.05, steps=1000, calculate_frequencies=False)
# Keep optimizer steps and search paths on the result. Write them with
# famex.io.run_output.write_run_outputs(..., history=True).
result = explorer.run(record_history=True)
# Load from file
explorer = Explorer.from_file("molecule.xyz", backend="uma", target="minima")
explorer = Explorer.from_smiles("CCO", backend="uma", target="minima", strategy="local")
# Calculate frequencies (after optimization or on any structure)
freq_result = explorer.calculate_frequencies(atoms=None, delta=0.01, method="auto")
# TS check: freq_result["is_ts"] or freq_result["ts_analysis"]["n_imaginary_frequencies"] == 1
# Save results
explorer.save_structure(result["optimized_atoms"], "output.xyz")
path = result.get("trajectory", result["optimized_atoms"])
explorer.save_trajectory(path, "path.xyz")
# One multi-frame XYZ per mode. which="imaginary" keeps frequencies below -50 cm⁻¹.
# famex.io.write_vibrational_modes writes the same files without an Explorer.
explorer.save_vibrational_modes(freq_result, "water.minima_modes")
Run Result Keys
Strategy results always include optimized_atoms and strategy. Common optional keys:
Key |
When present |
|---|---|
|
Single |
|
End-to-end path for |
|
Optimizer steps, or NEB/CI-NEB iteration frames, when |
|
TS search band or string when |
|
IRC branches |
|
After optimization. Path NEB/CI-NEB: the band reached |
|
When |
|
When |
Frequencies and Thermochemistry
--freq and calculate_frequencies=True attach frequency_analysis. Frequencies are in cm⁻¹, with imaginary modes negative. zero_point_energy is the harmonic value in eV. Imaginary and zero modes are omitted from the vibrational sums.
from famex.analysis import ThermodynamicProperties
thermo = ThermodynamicProperties(
freq["frequencies"],
optimized,
temperature=298.15,
pressure=101325.0,
method="rrho",
solvent="none",
)
props = thermo.calculate_complete_thermodynamics(energy=energy)
pressure is in pascal (default 1 atm). method is rrho, grimme, or truhlar. freq_scale_factor (default 1) is applied before the zero-point energy, vibrational entropy, and heat capacity. gibbs_free_energy is the enthalpy minus temperature times entropy, in eV. free_energy_correction is that value minus the electronic energy.
|
Vibrational treatment |
|---|---|
|
Harmonic oscillator. |
|
Same energy as |
|
Low modes are damped toward a free rotor (cutoff 100 cm⁻¹). |
Gas phase uses the ideal-gas concentration at pressure. Solution defaults to 1.0 mol/L. A set concentration overrides both. Solvents: none, H2O, toluene, DMF, AcOH, chloroform. The symmetry number comes from the geometry unless symmetry_number is set. A linear molecule uses one rotational temperature. See examples/thermochemistry.py.
Default Models
When --model-name / model_name is omitted, each backend keyword loads this checkpoint (or method / DFT level):
Backend keyword |
Default |
Checkpoint / method loaded |
|---|---|---|
|
|
fairchem UMA-S 1.2 (task head default |
|
|
|
|
|
MACE omol pretrained (molecules / TMs) |
|
|
PET-MAD small |
|
|
Orb-v3 conservative molecular |
|
|
SO3LR small pretrained |
|
|
xTB method (also e.g. |
|
|
DFT as |
|
|
Built-in harmonic mock (testing) |
OrbMol-v2 is selected with --model-name orbmol-v2. That checkpoint ships in orb-models>=0.7.0, which requires Python 3.12.
UMA and related backends also read atoms.info["charge"] and atoms.info["spin"] when set, overriding --default-charge / --default-spin. For non-omol UMA tasks, prefer --default-spin 0.
UMA Task Heads and Fine-Tunes
UMA routes through a Mixture-of-Linear-Experts head selected by --task-name / task_name (default omol). Requires fairchem-core>=2.25.0.
Task |
Typical use |
Notes |
|---|---|---|
|
Molecules, organics, homogeneous catalysis |
Needs charge/spin; FAMEX default |
|
Inorganic materials |
Prefer spin |
|
Molecular crystals / organic electronics |
Prefer spin |
|
Heterogeneous catalysis |
Prefer spin |
|
(Electro)catalysis (UMA-1.2+) |
Prefer spin |
|
Oxide catalysis (UMA-1.2+) |
Prefer spin |
|
MOFs / direct air capture |
Prefer spin |
Optional newer checkpoints (defaults stay uma-s-1p2 + omol):
# Patch release of UMA-S 1.2 (multi-task)
famex minima --strategy local mol.xyz --model-name uma-s-1p2p1 --task-name omol
# Fine-tune: ωB97M-D4rev molecules (dispersion included — do not add D3)
famex minima --strategy local mol.xyz \
--model-name uma-s-1p2p1-ft-d4rev --task-name omol
# Fine-tune: r²SCAN materials + recommended D3(BJ)
famex minima --strategy local crystal.xyz \
--model-name uma-s-1p2p1-ft-r2scan --task-name omat \
--dftd3-functional r2scan --default-spin 0
Python equivalents: Explorer(..., task_name="omat", dftd3_functional="r2scan", default_spin=0) or get_uma_calculator(task_name=..., dftd3_functional=...).
Backend Guide
FAMEX is built around machine learning potentials. Classical quantum-chemistry backends are optional for checks or small systems. Default checkpoints match Default models.
Backend |
Installation |
Default checkpoint |
Use when |
Notes |
|---|---|---|---|---|
|
|
|
Molecules; simplest install |
No |
|
|
|
Materials and molecules (CLI default; task |
Conflicts with MACE; analytical Hessian; see UMA task heads |
|
|
|
Molecules |
Conflicts with UMA; analytical Hessian |
|
|
|
Molecules ( |
Python 3.12+; analytical Hessian for conservative models; finite-difference otherwise |
|
|
|
Custom / research models |
Analytical Hessian via JAX |
|
|
|
PET-MAD potential |
Python 3.11+; analytical Hessian |
|
|
|
Semi-empirical xTB |
|
|
|
|
Small-system DFT |
|
|
Built-in |
|
Testing |
Development only |
Dependency Conflicts
UMA and MACE conflict due to incompatible e3nn versions. Use separate environments:
# UMA environment
conda create -n famex-uma python=3.12
conda activate famex-uma && pip install famex[uma]
# MACE environment
conda create -n famex-mace python=3.12
conda activate famex-mace && pip install famex mace-torch
Interpolation Methods
Method |
Description |
Use when |
|---|---|---|
|
Distance-preserving with bond refinement |
Default path guesses |
|
Image-Dependent Pair Potential |
Large geometry changes |
|
Straight-line interpolation in Cartesian coordinates |
Quick initial guesses |
Examples
See examples/README.md for the catalog of workflow scripts and benchmarks (optimize_minimum.py, thermochemistry.py, irc.py, timing_benchmark.py, bh28_benchmark/, zimmermann93_benchmark/, and others).
Last updated: November 2026