Learning GAP¶
Python wrapper for the teach_sparse program
Gaussian Approximation Potentials¶
-
class
gap.
GAP
(gap, default_sigma, config_type_sigma=None, core_ip_args=None, core_param_file='quip_params.xml', do_e0_avg=True, do_ip_timing=False, e0='0', e0_offset=0.0, hessian_delta=1.0, sigma_parameter_name='sigma', sigma_per_atom=True, sparse_jitter=1.0, sparse_use_actual_gpcov=False, template_file='template.xml', verbosity=<Verbose.Normal: 'NORMAL'>)¶ GAP Wrapper This subroutine parses the main command line options.
Parameters: - gap (list of Descriptors) – Initialisation string for GAPs
- default_sigma (float) – Error in [energies forces virials hessians]
- config_type_sigma (str) – What sigma values to choose for each type of data. Format: {type:energy:force:virial:hessian}
- core_ip_args (str) – QUIP init string for a potential to subtract from data (and added back after prediction)
- core_param_file (str) – QUIP XML file for a potential to subtract from data (and added back after prediction)
- do_e0_avg (bool) – Method of calculating e0 if not explicitly specified. If true, computes the average atomic energy in input data. If false, sets e0 to the lowest atomic energy in the input data.
- do_ip_timing (bool) – To enable or not timing of the interatomic potential.
- e0 (str) – Atomic energy value to be subtracted from energies before fitting (and added back on after prediction). Specifiy a single number (used for all species) or by species: {Ti:-150.0:O:-320}. energy = core + GAP + e0
- e0_offset (float) – Offset of baseline. If zero, the offset is the average atomic energy of the input data or the e0 specified manually.
- hessian_delta (float) – Delta to use in numerical differentiation when obtaining second derivative for the Hessian covariance
- sigma_parameter_name (str) – Sigma parameters (error hyper) for a given configuration in the database. Overrides the command line sigmas. In the XYZ, it must be prepended by energy_, force_, virial_ or hessian_
- sigma_per_atom (bool) – Interpretation of the energy and virial sigmas specified in >>default_sigma<< and >>config_type_sigma<<. If >>T<<, they are interpreted as per-atom errors, and the variance will be scaled according to the number of atoms in the configuration. If >>F<< they are treated as absolute errors and no scaling is performed. NOTE: sigmas specified on a per-configuration basis (see >>sigma_parameter_name<<) are always absolute.
- sparse_jitter (float) – Intrisic error of atomic/bond energy, used to regularise the sparse covariance matrix
- sparse_use_actual_gpcov (bool) – Use actual GP covariance for sparsification methods
- template_file (str) – Template XYZ file for initialising object
- verbosity (Verbose) – Verbosity control.
-
teach
(at_file, gp_file='gp_new.xml', config_type_parameter_name='config_type', energy_parameter_name='energy', force_parameter_name='force', hessian_parameter_name='hessian', virial_parameter_name='virial', do_copy_at_file=True, sparse_separate_file=True, rnd_seed=-1)¶ Parameters: - at_file (str) – XYZ file with teaching configurations
- gp_file (str) – Output XML file
- config_type_parameter_name (str) – Identifier of property determining the type of input data in the at_file
- do_copy_at_file (bool) – Do copy the at_file into the GAP XML file (should be set to False for NetCDF input).
- energy_parameter_name (str) – Name of energy property in the at_file that describes the data
- force_parameter_name (str) – Name of force property in the at_file that describes the data
- hessian_parameter_name (str) – Name of hessian property in the at_file that describes the data
- rnd_seed (int) – Random seed.
- sparse_separate_file (bool) – Save sparse coordinates data in separate file
- virial_parameter_name (str) – Name of virial property in the at_file that describes the data