pantea.descriptors.acsf package#
Submodules#
pantea.descriptors.acsf.acsf module#
- pantea.descriptors.acsf.acsf.ACSF#
alias of
AtomCenteredSymmetryFunction
- class pantea.descriptors.acsf.acsf.AtomCenteredSymmetryFunction(central_element, radial_symmetry_functions, angular_symmetry_functions)[source]#
Bases:
BaseJaxPytreeDataClassAtom-centered Symmetry Function (ACSF) descriptor captures information about the distribution of neighboring atoms around a central atom by considering both radial (two-body) and angular (three-body) symmetry functions within a cutoff distance. Radial symmetry functions describe the distances, while angular symmetry functions hold information about the angles formed by the central atom with pairs of neighboring atoms.
The ACSF represents a fingerprint of the local atomic environment and can be used in various machine learning potentials.
- angular_symmetry_functions: Tuple[Tuple[AngularSymmetryFunction, NeighborElements], ...]#
- central_element: str#
- grad(structure, atom_index=None)[source]#
Compute gradient of the ACSF descriptor respect to the atom position.
- Parameters
structure (
Structure) – input Structure instanceatom_index (
Optional[ArrayImpl]) – atom index in Structure [0, natoms)
- Return type
ArrayImpl- Returns
gradient of the descriptor value respect to the atom position
Please note that grad_per_element method is way much faster than the current implementation of this method method.
- property num_angular_symmetry_functions: int#
Return number of three-body (angular) symmetry functions.
- Return type
int
- property num_radial_symmetry_functions: int#
Return number of two-body (radial) symmetry functions.
- Return type
int
- property num_symmetry_functions: int#
Return the total (two-body and tree-body) number of symmetry functions.
- Return type
int
- property r_cutoff: float#
Return the maximum cutoff radius for list of the symmetry functions.
- Return type
float
- radial_symmetry_functions: Tuple[Tuple[RadialSymmetryFunction, NeighborElements], ...]#
pantea.descriptors.acsf.angular module#
- class pantea.descriptors.acsf.angular.AngularSymmetryFunction(cfn)[source]#
Bases:
BaseSymmetryFunctionA base class for three body (angular) symmetry functions.
- class pantea.descriptors.acsf.angular.G3(cfn, eta, zeta, lambda0, r_shift)[source]#
Bases:
AngularSymmetryFunctionAngular symmetry function.
- cfn: CutoffFunction#
- eta: float#
- lambda0: float#
- r_shift: float#
- zeta: float#
- class pantea.descriptors.acsf.angular.G9(cfn, eta, zeta, lambda0, r_shift)[source]#
Bases:
AngularSymmetryFunctionModified angular symmetry function.
Behler, J. Chem. Phys. 134, 074106 (2011).
- cfn: CutoffFunction#
- eta: float#
- lambda0: float#
- r_shift: float#
- zeta: float#
pantea.descriptors.acsf.cutoff module#
- class pantea.descriptors.acsf.cutoff.CutoffFunction(r_cutoff, cutoff_function)[source]#
Bases:
BaseJaxPytreeDataClassCutoff function for ACSF descriptor.
Cutoff functions are utilized in the calculation of Atom-centered Symmetry Function (ACSF) descriptors. These functions serve to limit the influence of atoms located beyond a specified distance from the central atom.
The ACSF descriptors employ cutoff functions to determine the range within which neighboring atoms contribute to the descriptor calculation. In fact, cutoff function assigns a weight to each neighbor atom based on its distance from the central atom. Typically, a smooth cutoff function is employed to smoothly taper off the contribution of atoms as they move away from the central atom.
The choice of cutoff function can vary depending on the specific application. Examples of commonly used cutoff functions include the hyperbolic tangent (tanh) cutoff, exponential, or exponential.
See cutoff function and cutoff type for more details.
- cutoff_function: Callable#
- classmethod from_type(cutoff_type, r_cutoff)[source]#
Create a cutoff function from the input cutoff type.
- Return type
- r_cutoff: float#
pantea.descriptors.acsf.radial module#
- class pantea.descriptors.acsf.radial.G1(cfn)[source]#
Bases:
RadialSymmetryFunctionPlain cutoff function as symmetry function.
- cfn: CutoffFunction#
- class pantea.descriptors.acsf.radial.G2(cfn, r_shift, eta)[source]#
Bases:
RadialSymmetryFunctionRadial exponential symmetry function.
- cfn: CutoffFunction#
- eta: float#
- r_shift: float#
- class pantea.descriptors.acsf.radial.RadialSymmetryFunction(cfn)[source]#
Bases:
BaseSymmetryFunctionA base class for two body (radial) symmetry functions.
pantea.descriptors.acsf.symmetry module#
- class pantea.descriptors.acsf.symmetry.BaseSymmetryFunction(cfn)[source]#
Bases:
BaseJaxPytreeDataClassA base class for symmetry functions. All symmetry functions (i.e. radial and angular) must derive from this base class.
- property r_cutoff: float#
- Return type
float
- class pantea.descriptors.acsf.symmetry.NeighborElements(neighbor_j: str, neighbor_k: Optional[str] = None)[source]#
Bases:
tupleRepresent the chemical environment including neighbor elements.
Create new instance of NeighborElements(neighbor_j, neighbor_k)
- neighbor_j: str#
Alias for field number 0
- neighbor_k: Optional[str]#
Alias for field number 1
Module contents#
- pantea.descriptors.acsf.ACSF#
alias of
AtomCenteredSymmetryFunction
- class pantea.descriptors.acsf.AngularSymmetryFunction(cfn)[source]#
Bases:
BaseSymmetryFunctionA base class for three body (angular) symmetry functions.
- class pantea.descriptors.acsf.AtomCenteredSymmetryFunction(central_element, radial_symmetry_functions, angular_symmetry_functions)[source]#
Bases:
BaseJaxPytreeDataClassAtom-centered Symmetry Function (ACSF) descriptor captures information about the distribution of neighboring atoms around a central atom by considering both radial (two-body) and angular (three-body) symmetry functions within a cutoff distance. Radial symmetry functions describe the distances, while angular symmetry functions hold information about the angles formed by the central atom with pairs of neighboring atoms.
The ACSF represents a fingerprint of the local atomic environment and can be used in various machine learning potentials.
- angular_symmetry_functions: Tuple[Tuple[AngularSymmetryFunction, NeighborElements], ...]#
- central_element: str#
- grad(structure, atom_index=None)[source]#
Compute gradient of the ACSF descriptor respect to the atom position.
- Parameters
structure (
Structure) – input Structure instanceatom_index (
Optional[ArrayImpl]) – atom index in Structure [0, natoms)
- Return type
ArrayImpl- Returns
gradient of the descriptor value respect to the atom position
Please note that grad_per_element method is way much faster than the current implementation of this method method.
- property num_angular_symmetry_functions: int#
Return number of three-body (angular) symmetry functions.
- Return type
int
- property num_radial_symmetry_functions: int#
Return number of two-body (radial) symmetry functions.
- Return type
int
- property num_symmetry_functions: int#
Return the total (two-body and tree-body) number of symmetry functions.
- Return type
int
- property r_cutoff: float#
Return the maximum cutoff radius for list of the symmetry functions.
- Return type
float
- radial_symmetry_functions: Tuple[Tuple[RadialSymmetryFunction, NeighborElements], ...]#
- class pantea.descriptors.acsf.CutoffFunction(r_cutoff, cutoff_function)[source]#
Bases:
BaseJaxPytreeDataClassCutoff function for ACSF descriptor.
Cutoff functions are utilized in the calculation of Atom-centered Symmetry Function (ACSF) descriptors. These functions serve to limit the influence of atoms located beyond a specified distance from the central atom.
The ACSF descriptors employ cutoff functions to determine the range within which neighboring atoms contribute to the descriptor calculation. In fact, cutoff function assigns a weight to each neighbor atom based on its distance from the central atom. Typically, a smooth cutoff function is employed to smoothly taper off the contribution of atoms as they move away from the central atom.
The choice of cutoff function can vary depending on the specific application. Examples of commonly used cutoff functions include the hyperbolic tangent (tanh) cutoff, exponential, or exponential.
See cutoff function and cutoff type for more details.
- cutoff_function: Callable#
- classmethod from_type(cutoff_type, r_cutoff)[source]#
Create a cutoff function from the input cutoff type.
- Return type
- r_cutoff: float#
- class pantea.descriptors.acsf.G1(cfn)[source]#
Bases:
RadialSymmetryFunctionPlain cutoff function as symmetry function.
- cfn: CutoffFunction#
- class pantea.descriptors.acsf.G2(cfn, r_shift, eta)[source]#
Bases:
RadialSymmetryFunctionRadial exponential symmetry function.
- cfn: CutoffFunction#
- eta: float#
- r_shift: float#
- class pantea.descriptors.acsf.G3(cfn, eta, zeta, lambda0, r_shift)[source]#
Bases:
AngularSymmetryFunctionAngular symmetry function.
- cfn: CutoffFunction#
- eta: float#
- lambda0: float#
- r_shift: float#
- zeta: float#
- class pantea.descriptors.acsf.G9(cfn, eta, zeta, lambda0, r_shift)[source]#
Bases:
AngularSymmetryFunctionModified angular symmetry function.
Behler, J. Chem. Phys. 134, 074106 (2011).
- cfn: CutoffFunction#
- eta: float#
- lambda0: float#
- r_shift: float#
- zeta: float#
- class pantea.descriptors.acsf.NeighborElements(neighbor_j: str, neighbor_k: Optional[str] = None)[source]#
Bases:
tupleRepresent the chemical environment including neighbor elements.
Create new instance of NeighborElements(neighbor_j, neighbor_k)
- neighbor_j: str#
Alias for field number 0
- neighbor_k: Optional[str]#
Alias for field number 1
- class pantea.descriptors.acsf.RadialSymmetryFunction(cfn)[source]#
Bases:
BaseSymmetryFunctionA base class for two body (radial) symmetry functions.