Franken Inference Wrappers

A learned franken model can be used directly for simple MD simulations via the FrankenCalculator() calculator based on ASE. To run more complex simulations, for example with LAMMPS, we first need to export the model. This will both:

  • speed up calculations since exported models are usually JIT compiled,

  • allow to call the model from external programs such as LAMMPS.

We provide two inference wrappers which can be saved with the command line utilities described below.

MACE LAMMPS Wrapper

Convert a franken model to be able to use it with the MACE fork of LAMMPS. The wrapped model can be based on MACE or PET based GNNs.

usage: franken.wrap_mace_lammps [-h] [--model_path MODEL_PATH]
                                [--rf_weight_id RF_WEIGHT_ID]
                                [--backbone_path_or_id BACKBONE_PATH_OR_ID]

Named Arguments

--model_path

Path to the model to be converted to LAMMPS

--rf_weight_id

Head of the model to be converted to LAMMPS

--backbone_path_or_id

Override the backbone checkpoint path stored in the Franken checkpoint.

Metatomic Wrapper

Convert a franken model to for use with Metatomic-compatible calculators. This includes calculators based on LAMMPS and ASE. The wrapped model can be based on MACE or PET based GNNs.

usage: franken.wrap_metatomic [-h] [--model_path MODEL_PATH]
                              [--rf_weight_id RF_WEIGHT_ID] --dtype
                              {float32,float64}
                              [--backbone_path_or_id BACKBONE_PATH_OR_ID]

Named Arguments

--model_path

Path to the model to be converted to LAMMPS

--rf_weight_id

Head of the model to be converted to LAMMPS

--dtype

Possible choices: float32, float64

Data-type in which the model will run

--backbone_path_or_id

Override the backbone checkpoint path or registry ID stored in the Franken checkpoint.