GAP¶
This is an implementation of the sparse Gaussian Approximation Potential (GAP) [1] using Smooth Overlap of Atomic Positions (SOAP) [2] implemented in featomic.
The GAP model in metatrain can only train on CPU, but evaluation is also supported on GPU.
Installation¶
To install this architecture along with the metatrain package, run:
pip install metatrain[gap]
where the square brackets indicate that you want to install the optional
dependencies required for gap.
Default Hyperparameters¶
The description of all the hyperparameters used in gap is provided
further down this page. However, here we provide you with a yaml file containing all
the default hyperparameters, which might be convenient as a starting point to
create your own hyperparameter files:
architecture:
name: gap
model:
soap:
cutoff:
radius: 5.0
smoothing:
type: ShiftedCosine
width: 1.0
density:
type: Gaussian
center_atom_weight: 1.0
width: 0.3
scaling:
type: Willatt2018
rate: 1.0
scale: 2.0
exponent: 7.0
basis:
type: TensorProduct
max_angular: 6
radial:
type: Gto
max_radial: 7
krr:
degree: 2
num_sparse_points: 500
zbl: false
training:
regularizer: 0.001
regularizer_forces: null
Model hyperparameters¶
The parameters that go under the architecture.model section of the config file
are the following:
- ModelHypers.soap: SOAPHypers = {'basis': {'max_angular': 6, 'radial': {'max_radial': 7, 'type': 'Gto'}, 'type': 'TensorProduct'}, 'cutoff': {'radius': 5.0, 'smoothing': {'type': 'ShiftedCosine', 'width': 1.0}}, 'density': {'center_atom_weight': 1.0, 'scaling': {'exponent': 7.0, 'rate': 1.0, 'scale': 2.0, 'type': 'Willatt2018'}, 'type': 'Gaussian', 'width': 0.3}}¶
with the following definitions needed to fully understand some of the parameters:
- class metatrain.gap.documentation.KRRHypers[source]¶
Hyperparameters for the KRR model.
- num_sparse_points: int = 500¶
Number of sparse points to use during the training, it select the number of actual samples to use during the training. The selection is done with the Further Point Sampling (FPS) algorithm. The optimal number of sparse points depends on the system. Increasing it might impreve the accuracy, but it also increase the memory and time required for training.
- class metatrain.gap.documentation.SOAPHypers[source]¶
Configuration for the SOAP descriptors.
- cutoff: SOAPCutoffHypers = {'radius': 5.0, 'smoothing': {'type': 'ShiftedCosine', 'width': 1.0}}¶
Spherical cutoff (Å) to use for atomic environments.
- density: SOAPDensityHypers = {'center_atom_weight': 1.0, 'scaling': {'exponent': 7.0, 'rate': 1.0, 'scale': 2.0, 'type': 'Willatt2018'}, 'type': 'Gaussian', 'width': 0.3}¶
- basis: SOAPBasisHypers = {'max_angular': 6, 'radial': {'max_radial': 7, 'type': 'Gto'}, 'type': 'TensorProduct'}¶
- class metatrain.gap.documentation.SOAPCutoffHypers[source]¶
Cutoff configuration for the SOAP descriptor.
- radius: float = 5.0¶
This should be set to a value after which most of the interactions between atoms is expected to be negligible.
- smoothing: SOAPCutoffSmoothingHypers = {'type': 'ShiftedCosine', 'width': 1.0}¶
- class metatrain.gap.documentation.SOAPCutoffSmoothingHypers[source]¶
Smoothing configuration for the SOAP descriptor cutoff.
- class metatrain.gap.documentation.SOAPDensityHypers[source]¶
Density configuration for the SOAP descriptor.
- type: Literal['Gaussian'] = 'Gaussian'¶
Currently, we only support a Gaussian type orbitals (GTO) as radial basis functions and radial integrals.
- center_atom_weight: float = 1.0¶
Weight of the central atom contribution to the features. If 1.0 the center atom contribution is weighted the same as any other contribution. If 0.0 the central atom does not contribute to the features at all.
- scaling: SOAPDensityScalingHypers = {'exponent': 7.0, 'rate': 1.0, 'scale': 2.0, 'type': 'Willatt2018'}¶
Radial scaling can be used to reduce the importance of neighbor atoms further away from the center, usually improving the performance of the model.
- class metatrain.gap.documentation.SOAPDensityScalingHypers[source]¶
Density scaling configuration for the SOAP descriptor.
- class metatrain.gap.documentation.SOAPBasisHypers[source]¶
Basis configuration for the SOAP descriptor.
- max_angular: int = 6¶
Maximum angular channels of the spherical harmonics when computing the SOAP descriptors. In general, increasing this hyperparameter might lead to better accuracy, especially on larger datasets, at the cost of increased training and evaluation time.
- radial: SOAPBasisRadialHypers = {'max_radial': 7, 'type': 'Gto'}¶
Trainer hyperparameters¶
The parameters that go under the architecture.trainer section of the config file
are the following: