GenerateTrainingDataForTesting#

class autoplex.data.common.flows.GenerateTrainingDataForTesting(name='generate_training_data_for_testing', bulk_relax_maker=None, static_energy_maker=None)[source]#

Bases: Maker

Maker for generating training data to test it and check the forces.

This Maker will first generate training data based on the chosen ML model (default is GAP) by randomizing (ase rattle) atomic displacements in supercells of the provided input structures. Then it will proceed with MLIP-based Phonon calculations (based on atomate2 PhononMaker), collect all structure data in extended xyz files and plot the forces in histograms (per rescaling cell_factor and total).

Parameters:
  • name (str) – Name of the flow.

  • bulk_relax_maker (ForceFieldRelaxMaker | None) – Maker for the relax jobs.

  • static_energy_maker (ForceFieldStaticMaker | ForceFieldRelaxMaker | None) – Maker for the static jobs.

make(train_structure_list, cell_factor_sequence=None, potential_filename='gap.xml', n_structures=50, rattle_std=0.01, relax_cell=True, steps=1000, supercell_matrix=None, config_type='train', x_min=0, x_max=5, bin_width=0.125, **relax_kwargs)[source]#

Generate ase.rattled structures from the training data and returns histogram plots of the forces.

Parameters:
  • train_structure_list (list[Structure].) – List of pymatgen structures object.

  • cell_factor_sequence (list[float]) – list of factor to resize cell parameters.

  • potential_filename (str) – param_file_name for quippy.potential.Potential()'.

  • n_structures (int.) – Total number of randomly displaced structures to be generated.

  • rattle_std (float.) – Rattle amplitude (standard deviation in normal distribution). Default=0.01.

  • relax_cell (bool) – Whether to allow the cell shape/volume to change during relaxation.

  • steps (int) – Maximum number of ionic steps allowed during relaxation.

  • supercell_matrix (Matrix3D | None) – The matrix to generate the supercell.

  • config_type (str) – configuration type of the data.

  • x_min (int) – minimum value for the plot x-axis.

  • x_max (int) – maximum value for the plot x-axis.

  • bin_width (float) – width of the plot bins.

  • relax_kwargs (dict) – Keyword arguments that will get passed to Relaxer.relax.

Return type:

matplotlib plots “count vs. forces”.

static_run_and_convert(structure_list, cell_factor, config_type, potential_filename, **relax_kwargs)[source]#

Job for the static runs and the data conversion to the extxyz format.

Parameters:
  • structure_list (list[Structure].) – List of pymatgen structures object.

  • cell_factor (float) – factor to resize cell parameters.

  • config_type (str) – configuration type of the data.

  • potential_filename (str) – param_file_name for quippy.potential.Potential()'.

  • relax_kwargs (dict) – Keyword arguments that will get passed to Relaxer.relax.