gap_fitting#
- autoplex.fitting.common.utils.gap_fitting(db_dir, species_list=None, path_to_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', glue_file_path='glue.xml', fit_kwargs=None)[source]#
Perform the GAP (Gaussian approximation potential) model fitting.
- Parameters:
db_dir (str or path) – Path to database directory.
species_list (list) – List of element names (strings)
path_to_hyperparameters (str or Path.) – Path to JSON file containing the GAP hyperparameters.
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) – Reference energy name.
ref_force_name (str) – Reference force name.
ref_virial_name (str) – Reference virial name.
train_name (str) – Name of the training set file.
test_name (str) – Name of the test set file.
glue_file_path (str) – Name of the glue.xml file path.
fit_kwargs (dict) – Additional keyword arguments for GAP fitting with keys same as those in gap-defaults.json.
- Returns:
A dictionary with train_error, test_error, path_to_mlip
- Return type:
dict