GP From AIMD

Tool to enable the development of a GP model based on an AIMD trajectory with many customizable options for fine control of training. Contains methods to transfer the model to an OTF run or MD engine run.

Seed frames

The various parameters in the TrajectoryTrainer class related to “Seed frames” are to help you train a model which does not yet have a training set. Uncertainty- and force-error driven training will go better with a somewhat populated training set, as force and uncertainty estimates are better behaveed with more data.

You may pass in a set of seed frames or atomic environments. All seed environments will be added to the GP model; seed frames will be iterated through and atoms will be added at random. There are a few reasons why you would want to pay special attention to an individual species.

If you are studying a system where the dynamics of one species are particularly important and so you want a good representation in the training set, then you would want to include as many as possible in the training set during the seed part of the training.

Inversely, if a system has high representation of a species well-described by a simple 2+3 body kernel, you may want it to be less well represented in the seeded training set.

By specifying the pre_train_atoms_per_element, you can limit the number of atoms of a given species which are added in. You can also limit the number of atoms which are added from a given seed frame.

flare.gp_from_aimd.parse_trajectory_trainer_output(file: str, return_gp_data: bool = False, compute_errors: bool = True) → Union[List[dict], Tuple[List[dict], dict]]

Reads output of a TrajectoryTrainer run by frame. return_gp_data returns data about GP model growth useful for visualizing progress of model training.

Parameters:
  • file – filename of output
  • return_gp_data – flag for returning extra GP data
  • compute_errors – Compute deviation from GP and DFT forces.
Returns:

List of dictionaries with keys ‘species’, ‘positions’, ‘gp_forces’, ‘dft_forces’, ‘gp_stds’, ‘added_atoms’, and ‘maes_by_species’, optionally, gp_data dictionary

flare.gp_from_aimd.structures_from_gpfa_output(frame_dictionaries: List[dict]) → List[flare.struc.Structure]

Takes as input the first output from the parse_trajectory_trainer_output function and turns it into a series of FLARE structures, with DFT forces mapped onto the structures.

Parameters:frame_dictionaries – The list of dictionaries which describe each GPFA frame.
Returns: