pace_fitting

Contents

pace_fitting#

autoplex.fitting.common.utils.pace_fitting(db_dir, species_list=None, hyperparameters=PACEMAKER_HYPERS, fit_kwargs=None, isolated_atom_energies=None, ref_energy_name='REF_energy', ref_force_name='REF_forces', ref_virial_name='REF_virial', num_processes_fit=32, train_name='train.extxyz', test_name='test.extxyz')[source]#

Perform the ACE potential fitting using Pacemaker.

It creates the input.yaml configuration file for Pacemaker using the provided hyperparameters and executes the fitting process via the ‘pacemaker’ command line tool.

Parameters:
  • db_dir (Path or str) – Directory containing the training and testing data files.

  • species_list (list[str] | None = None) – List of chemical symbols (strings) involved in the system.

  • hyperparameters (PacemakerSettings) – Fit hyperparameters defined in autoplex settings.

  • fit_kwargs (dict) – Additional keyword arguments to override hyperparameters.

  • ref_energy_name (str) – Name of the energy property in the dataset.

  • ref_force_name (str) – Name of the force property in the dataset.

  • ref_virial_name (str) – Name of the virial property in the dataset.

  • num_processes_fit (int) – Number of processes/threads to use.

  • train_name (str) – Name of the training dataset file.

  • test_name (str) – Name of the test dataset file.

  • isolated_atom_energies (dict | None)

Returns:

A dictionary containing ‘train_error’, ‘test_error’, and ‘mlip_path’.

Return type:

dict