Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
FeatureCalculators are one of the most integral parts of RuNNer.
They orchestrate the calculation of feature vectors and their derivatives for
atomic environments, which serve as the input to machine-learning models.
We usually initialize a single FeatureCalculator object for all atoms
in the entire dataset. This allows us to efficiently parallelize over
atoms using OpenMP, which is crucial to obtain linear scaling with the
number of threads (feature (derivative) evaluation is THE single most
costly operation in RuNNer for typical model sizes).
The nomenclature employed throughout the code is:
- feature map: a single function mapping an atomic environment to one
or multiple values (e.g. one symmetry function)
- features : the vector all values calculated by the feature maps
assigned to an atom.
- descriptor : an object holding the feature vector of a single atom
(or structure in the case of a global descriptor),
its derivative, and associated properties.
Often, many or all models share the same feature calculator (input.nn setting
feature_map_default). Therefore, one model is always assigned to a
single unique feature calculator, while feature_calculators can be
assigned to multiple models. This mapping is expressed on the
featcalc_idx variable carried by all AbstractPropertyModels, and the
corresponding model_indices array carried by all feature calculators.
The size of this array does not correspond to the number of requested
cutoff functions (which is the number of requested neighbor lists).
Several different types of calculations are provided, some of which are
useful required for predictions, others for training.
The general principle is the same in all cases:
1) The FeatureCalculator is created from a file or from a list of
feature maps.
2) The FeatureCalculator is initialized with a list of structures.
This creates a list of AtomicDescriptor objects, one for
each atom in the structure. We usually initialize one feature calculator
for all atoms in the dataset.
3) In a workflow, a calculation routine is called. For this, the
the id_on_process of the atoms which will be calculated is
given as input. The FeatureCalculator contains an internal map to
translate between its atomic_list and the id_on_process.
4.1) One often needs a matrix containing the feature values
(or gradients) for a list of atoms. The FeatureCalculator
provides pack_* routines for that purpose. This is a copy
operation.
4.2) When speed is of the essence, one may directly access the
values that are stored within the AtomicDescriptor objects
in atomic_list.
5) In the workflow, free is called to deallocate the features
and. derivative values that are not needed anymore. This can
happen at the end of a single structure calculation or at
the end of a whole chunk of structures.
Components
elements :
type(Element) (dim: (MAX_ELEM_NUM))– Per-element information, most importantly about feature maps.
atomic_list :
type(AtomicDescriptor) (dim: (:))– A flat list containing the atomic descriptors for each atom in a list
of structures.
id_map :
integer (dim: (:))– Maps id_on_process of each atom to its index in `atomic_list`.
This is required as not all atoms in a structure have to be actual
atoms. In MD runs, we often carry additional ghost atoms, which
contribute to the forces of the actual atoms as neighbors, but are
evaluated themselves.
scaling_file_prefix :
character– Prefix of the scaling.data file for this feature calculator. For example,
when fitting a 3G-HDNNP, there will be two feature calculators with the
prefixes 'scaling' and 'scalinge'.
use_old_scaling :
logical– Whether to read scaling information from a file.
idx_neighbor_list_max_cutoff :
integer– The index of the neighborlist with the largest cutoff radius.
lprecalculated_all_features :
logical– Whether all features were precalculated. If this is `True`, the
calculator will immediately return from the `evaluate` call. The flag
is reset upon reinitialization.
lprecalculated_all_feature_derivatives :
logical– Whether all feature gradients were precalculated. If this is `True`, the
calculator will immediately return from the `evaluate` call. The flag
is reset upon reinitialization.
lread_features :
logical– Whether features should be loaded from binary file
lread_feature_derivs :
logical– Whether feature derivatives should be loaded from binary file
scale_feature_maps :
logical– Whether we apply the scaling factor to the feature maps of all elements.
center_feature_maps :
logical– Whether we center the feature maps of all elements.
extrapolation_threshold :
real(DP)– Threshold at which extrapolation warnings are issued.
model_indices :
integer (dim: (:))
linitialized :
logical
neighbor_list_indices :
integer (dim: (:))– Indices of the neighbor lists (in the neighbor_lists array), that are
used by this feature calculator.
Nodes of different colours represent the following:
Solid arrows point from a derived type to the parent type which it
extends. Dashed arrows point from a derived type to the other
types it contains as a components, with a label listing the name(s) of
said component(s).
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a derived type to the parent type which it
extends. Dashed arrows point from a derived type to the other
types it contains as a components, with a label listing the name(s) of
said component(s).
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
function get_upper_bound_num_feature_maps_per_element¶
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
function constructor_from_file_feature_calculator¶
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
function constructor_from_elements_feature_calculator¶
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
functionneighbor_row_positions( & reference, & subset, & atom & )
Map a subset row to positions in a reference row. Neighbor order is not
part of the neighbor-list contract; atom IDs alone also do not identify
periodic images. Hash by atom ID, then compare image displacements within
that bucket. Scratch scales with the row, not the whole structure/dataset.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
subroutinereset_feature_calculator( & self, & force & )
Turn the feature calculator back into its uninitialized state.
This forces the deallocation of all information stored inside
self%atomic_list. By default, this routine does nothing if all features
and feature derivatives have been precalculated. That behavior can be
overruled by setting force to true.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Initialize AtomicDescriptor objects in self%atomic_list
based on a given list of structures.
Only atoms, whose indices are contained in atomic_list are
initialized.
structures :
type(Structure) (dim: (:)) [in]– The list of structures. One `AtomicDescriptor` object
will be created for each local atom in `structures`. This means
that we loop over `num_local_atoms` and all atoms beyond that are
treated as ghost atoms.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Initialize AtomicDescriptor objects in self%atomic_list
based on a given list of structures and local atom indices.
Only atoms, whose indices are contained in atomic_list are
initialized.
struct :
type(Structure) [in]– Single structure. One `AtomicDescriptor` object
will be created for each local atom in `struct`. This means
that we loop over `num_local_atoms` and all atoms beyond that are
treated as ghost atoms.
local_atom_indices :
integer (dim: (struct%num_local_atoms))– Indices of local atoms in respective structure
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Calculate the values of all feature maps that are requested.
The values are calculated for all central atoms whose ids
on process are handed over. The values are stored in the features
array of the corresponding AtomicDescriptor objects.
The order of storage in desc%features is sequentially from
feat_idx_lowest of the first feature map in elem%feature_maps to
feat_idx_highest of the final feature map in elem%feature_maps.
This is in contrast to the correct idx_sorted_features of the element.
Sorting is only taken into account when packing or writeing features
to file for performance reasons.
neighbor_lists :
type(FeatureMapNeighborList) (dim: (:)) [in]– A list of all neighbor lists.
ids_on_process :
integer (dim: (:)) [in]– The id on process of all atoms for which calculations will be done.
Whether these atoms are treated as target atoms or central atoms
depends on the given `calc_*` flags (see there for details).
calc_features :
logical [in]– If True, the features for the central atoms atoms defined by `ids_on_process`
will be calculated.
calc_feature_derivatives_from_atom :
logical [in]– If True, the derivatives from all central atoms defined by `ids_on_process`
towards all their neighbors are calculated.
calc_feature_derivatives_towards_atom :
logical [in]– If True, the derivatives towards all target atoms defined by `ids_on_process`
starting from their neighbors will be calculated.
feature_map_indices :
integer (dim: (:,:)) [in]– For each element, the index of the feature maps which are supposed to be
calculated.
Dimensions: (num_fms, MAX_ELEM_NUM)
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Calculate the values of all feature maps that are requested.
The values are calculated for all central atoms whose ids
on process are handed over. The values are stored in the features
array of the corresponding AtomicDescriptor objects.
The order of storage in desc%features is sequentially from
feat_idx_lowest of the first feature map in elem%feature_maps to
feat_idx_highest of the final feature map in elem%feature_maps.
This is in contrast to the correct idx_sorted_features of the element.
Sorting is only taken into account when packing or writeing features
to file for performance reasons.
feature_map_indices :
integer (dim: (:,:)) [in]– For each element, the index of the feature maps which are supposed to be
calculated.
Dimensions: (num_fms, MAX_ELEM_NUM)
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Collect all features of the requested atoms into a continuous, unallocated
array.
This copies the feature values from the AtomicDescriptor
objects of all requested atoms into a matrix. The atoms do not
need to have the same element and the indices do not need to be
continuous.
The features must have been calculated before this routine is
called, otherwise the arrays are not allocated leading to a
segfault.
During packing, the features are reordered from their sequential order
(see calc_features for details) to the correct ordering given by
elem%idx_sorted_features.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the central atoms whose features will be
copied.
features :
real(DP) (dim: (:,:)) [out]– The feature values of the requested central atoms.
Dimension(max_num_features_of_central_atoms, size(central_atom_ids_on_process))
atomic_numbers :
integer (dim: (:)) [out]– The atomic numbers of the requested central atoms in the same order
as `central_atom_ids_on_process`.
This is a convenience "service" provided by the routine, as usually
when the features are requested the atomic numbers are needed as well.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Collect all features of the requested atoms into a continuous, allocated,
array.
This copies the feature values from the AtomicDescriptor
objects of all requested atoms into a matrix. The atoms do not
need to have the same element and the indices do not need to be
continuous.
The matrix can be larger and will by filled continously starting at (1, 1)
Scaling and centering factors are applied to all features.
The features must have been calculated before this routine is
called, otherwise the arrays are not allocated leading to a
segfault.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the central atoms whose features will be
copied.
features :
real(DP) (dim: (:,:)) [out]– The feature values of the requested central atoms.
Dimension (nfeat, size(central_atom_ids_on_process))
where nfeat must be at least max_num_features_of_central_atoms
(without extra_features)
atomic_numbers :
integer (dim: (:)) [out]– The atomic numbers of the requested central atoms in the same order
as `central_atom_ids_on_process`.
This is a convenience "service" provided by the routine, as usually
when the features are requested the atomic numbers are needed as well.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Collect all features derivatives dGi/dxj originating at the requested
atoms i into a continuous array.
This copies the feature_derivative values from the AtomicDescriptor
objects of all requested atoms into a matrix
("central atoms", because the derivatives of their feature maps
are calculated) with respect to all their neighbors.
In mathematical terms, we pack a dense array of \(dG_i/dxyz_j\)
from all central atoms \(i\) towards their neighbors \(j\).
The final packed array has dimensions
(3 x max_num_features_of_central_atoms x sum_num_neighbors_central_atoms) or
(3 x max_num_features_of_central_atoms x sum_num_atoms_in_structures_of_central_atoms).
During packing, the features are sorted from their sequential ordering
(see calculate_* routines for details) to the correct ordering given
by elem%idx_sorted_features.
As evident from the dimensions, the routine can pack atoms
of different elements into one array. Therefore, the atomic
numbers and id_on_processs of all neighbors are returned
as additional output arrays.
The requested indices do not need to have the same element and
do not need to be continuous.
The gradients must have been calculated before this routine is
called, otherwise the arrays are not allocated leading to a
segfault.
neighbor_lists :
type(FeatureMapNeighborList) (dim: (:)) [in]– A list of all initialized neighbor lists.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the atoms whose derivatives should be copied.
sum_images :
logical [in]– Whether to sum the contributions of periodic neighbors ("image atoms").
If sum_images is True, feature derivatives will have dimension
(3 x max_num_features_of_central_atoms x sum_num_atoms_in_structures_of_central_atoms)
Otherwise, it will have dimension
(3 x max_num_features_of_central_atoms x sum_num_neighbors_of_central_atoms)
feature_derivatives :
real(DP) (dim: (:,:,:)) [out]– The derivatives of the feature maps of the requested central atoms
wrt the Cartesian coordinates of all their respective neighbors.
Depending on the setting of `sum_images`, the dimensions vary.
target_atoms_ids_on_process :
integer (dim: (:)) [out]– The id_on_process of the target atoms (the j in dGi/dxj) in the
same order as the final dimension of feature_derivatives.
Depending on the setting of `sum_images`, the dimensions vary.
atomic_numbers :
integer (dim: (:)) [out]– The atomic numbers of target_atoms_ids_on_process.
Depending on the setting of `sum_images`, the dimensions vary.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the atoms which are taken into account.
max_num_features_of_central_atoms :
integer [out]– The maximum number of features for any atom in
`central_atom_ids_on_process`.
num_atoms_in_structure :
integer (dim: (size(central_atom_ids_on_process))) [out]– The number of atoms in the structure for each atom in
`central_atom_ids_on_process`.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
neighbor_lists :
type(FeatureMapNeighborList) (dim: (:)) [in]– A list of all initialized neighbor lists.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the atoms which are taken into account.
max_num_features_of_central_atoms :
integer [out]– The maximum number of features for any atom in
`central_atom_ids_on_process`.
num_neighbors :
integer (dim: (size(central_atom_ids_on_process))) [out]– The number of atoms in the structure for each atom in
`central_atom_ids_on_process`.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
neighbor_lists :
type(FeatureMapNeighborList) (dim: (:)) [in]– A list of all initialized neighbor lists.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the atoms whose derivatives should be copied.
feature_derivatives :
real(DP) (dim: (:,:,:)) [out]– The derivatives of the feature maps of the requested central atoms
wrt the Cartesian coordinates of all the atoms in their structure
that have at least one periodic image in the cutoff radius of the
central atom.
Dimension (3 x max_num_features_of_central_atoms x sum_num_atoms_in_structures_of_central_atoms).
atoms_in_structure_ids_on_process :
integer (dim: (:)) [out]– The id_on_process of the target atoms (the j in dGi/dxj) in the
same order as the final dimension of feature_derivatives.
atomic_numbers :
integer (dim: (:)) [out]– The atomic numbers of atoms_in_structure_ids_on_process.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
neighbor_lists :
type(FeatureMapNeighborList) (dim: (:)) [in]– A list of all initialized neighbor lists.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the atoms whose derivatives should be copied.
feature_derivatives :
real(DP) (dim: (:,:,:)) [out]– The derivatives of the feature maps of the requested central atoms
wrt the Cartesian coordinates of all neighbors.
Dimension (3 x max_num_features_of_central_atoms x sum_num_neighbors_of_central_atoms).
neighbor_atom_ids_on_process :
integer (dim: (:)) [out]– The id_on_process of the target atoms (the j in dGi/dxj) in the
same order as the final dimension of feature_derivatives.
atomic_numbers :
integer (dim: (:)) [out]– The atomic numbers of neighbor_atom_ids_on_process.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
neighbor_lists :
type(FeatureMapNeighborList) (dim: (:)) [in]– A list of all initialized neighbor lists.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the atoms whose derivatives should be copied.
num_neighbors :
integer (dim: (:)) [in]– The number of neighbors of each central atom
feature_derivatives :
real(DP) (dim: (:,:,:)) [out]– The derivatives of the feature maps of the requested central atoms
wrt the Cartesian coordinates of all neighbors.
Dimension (3 x max_num_features_of_central_atoms x sum_num_neighbors_of_central_atoms).
neighbor_atom_ids_on_process :
integer (dim: (:)) [out]– The id_on_process of the target atoms (the j in dGi/dxj) in the
same order as the final dimension of feature_derivatives.
atomic_numbers :
integer (dim: (:)) [out]– The atomic numbers of neighbor_atom_ids_on_process.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
neighbor_lists :
type(FeatureMapNeighborList) (dim: (:)) [in]– A list of all initialized neighbor lists.
central_atom_ids_on_process :
integer (dim: (:)) [in]– The id_on_process of the atoms whose derivatives should be copied.
feature_derivatives :
real(DP) (dim: (:,:,:)) [in]– The derivatives of the feature maps of the requested central atoms
wrt the Cartesian coordinates of all neighbors.
Dimension (3 x max_num_features_of_central_atoms x sum_num_neighbors_of_central_atoms).
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Collect all features derivatives towards the given atoms.
This collects the derivatives of all atoms in a structure
("central atoms", because the derivavatives of their feature maps
are calculated) towards the given list of target atoms.
In mathematical terms, we pack a dense array of \(dG_i/dxyz_j\)
for all central atoms \(i\) who have a non-zero derivative towards any
of the target atoms \(j\).
The final packed array has dimensions
(3 x max_num_features_of_central_atoms x sum_max_num_neighbors_target_atoms).
As evident from the dimensions, the routine can pack atoms
of different elements into one array. Therefore, the atomic
numbers and id_on_processs of the central atoms that have
the target atoms as their neighbors
are returned as additional output arrays.
Additionally, the user may request to collect the features of
the central atoms (not the target atoms) as well.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Collect all features derivatives towards the given atoms.
This collects the derivatives of all atoms in a structure
("central atoms", because the derivavatives of their feature maps
are calculated) towards the given list of target atoms.
In mathematical terms, we pack a dense array of \(dG_i/dxyz_j\)
for all central atoms \(i\) who have a non-zero derivative towards any
of the target atoms \(j\).
The final packed array has dimensions
(3 x max_num_features_of_central_atoms x sum_max_num_neighbors_target_atoms).
As evident from the dimensions, the routine can pack atoms
of different elements into one array. Therefore, the atomic
numbers and id_on_processs of the central atoms that have
the target atoms as their neighbors
are returned as additional output arrays.
Additionally, the user may request to collect the features of
the central atoms (not the target atoms) as well.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Deallocate features and feature derivatives arrays for all given atoms.
In contrast to reset this does not set self%initialized to False,
so the list of AtomicDescriptor objects is not constructed again
when the next initialize call happens. Use reset to achieve that
outcome.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Calculate the derivatives \(dG_i/dxyz_j\) for all i that have the
given target atoms \(j\) as their neighbor.
Also calculates the derivative with respect to all images of the given
target atoms.
feature_map_indices :
integer (dim: (:,:)) [in]– For each element, the index of the feature maps which are supposed to be
calculated.
Dimensions: (num_fms, MAX_ELEM_NUM)
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Assumes that the internal arrays self%atomic_list(...)%features and
their derivatives have already been allocated and set to zero before
the routine is called.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Check whether any feature map value in self%atomic_list lies
outside of the statistical values for the respective element.
Extrapoloation threshold is set by the feature_extrapolation_threshold
keyword.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.