gap_fitting

Contents

gap_fitting#

autoplex.fitting.common.utils.gap_fitting(db_dir, species_list=None, path_to_default_hyperparameters=MLIP_PHONON_DEFAULTS_FILE_PATH, num_processes_fit=32, auto_delta=True, glue_xml=False, ref_energy_name='REF_energy', ref_force_name='REF_forces', ref_virial_name='REF_virial', train_name='train.extxyz', test_name='test.extxyz', fit_kwargs=None)[source]#

GAP fit and validation job.

Parameters:
  • db_dir (str or path.) – Path to database directory.

  • species_list (list.) – List of element names (str)

  • path_to_default_hyperparameters (str or Path.) – Path to mlip-phonon-defaults.json.

  • num_processes_fit (int.) – Number of processes used for gap_fit

  • auto_delta (bool) – automatically determine delta for 2b, 3b and soap terms.

  • glue_xml (bool) – use the glue.xml core potential instead of fitting 2b terms.

  • ref_energy_name (str, optional) – Reference energy name.

  • ref_force_name (str, optional) – Reference force name.

  • ref_virial_name (str, optional) – Reference virial name.

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

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

  • fit_kwargs (dict.) – optional dictionary with parameters for gap fitting with keys same as mlip-phonon-defaults.json.

Returns:

A dictionary with train_error, test_error

Return type:

dict[str, float]