(git:5e7fe52)
Loading...
Searching...
No Matches
skala_gpw_features Module Reference

Build SKALA TorchScript feature dictionaries from CP2K GPW real-space grids. More...

Data Types

type  skala_gpw_feature_type

Functions/Subroutines

subroutine, public skala_gpw_feature_build (features, rho_set, rho_r, particle_set, cell, requires_grad, weights, requires_coordinate_grad, requires_stress_grad, use_atom_chunks, route_atom_chunks, atom_partition)
 Build a flat SKALA molecular feature dictionary from a local GPW grid.
subroutine, public skala_gpw_feature_release (features)
 Release Torch objects and backing arrays owned by a feature bundle.
integer function, public skala_gpw_atom_subchunk_count (max_rows)
 Return how many atom-contiguous subchunks the cached rank chunk needs.
subroutine, public skala_gpw_atom_subchunk_layout (max_rows, atom_begin, atom_count, row_begin, row_count)
 Build atom and row bounds for all atom-contiguous subchunks in one pass.
subroutine, public skala_gpw_feature_build_atom_subchunk (parent, features, subchunk_index, max_rows, requires_grad)
 Build an atom-contiguous subchunk feature bundle from a rank-local atom chunk.
subroutine, public skala_gpw_feature_build_atom_subchunk_bounds (parent, features, atom_begin, atom_count, row_begin, row_count, requires_grad)
 Build an atom-contiguous subchunk feature bundle from precomputed bounds.
subroutine, public smooth_atom_partition (grid_point, atom_coords, cell, weights, partition_atom_coords, distances, pair_distances)
 Build Becke-like smooth atom weights for one native-grid point.
subroutine, public build_periodic_atom_image_layout (atom_coords, cell, target_atom, image_periodicity, image_coords, target_image)
 Build the image coordinates shared by all points of one target-atom block.
subroutine, public periodic_atom_image_partition_from_layout (grid_point, image_coords, target_image, weight)
 Return an image-complete periodic atom weight for a prebuilt image layout.
subroutine, public periodic_atom_image_partition (grid_point, atom_coords, cell, target_atom, weight, dweight_datom, dweight_dstrain, image_periodicity)
 Return the smooth weight of one reference-cell atom in an image-complete periodic atom partition. Each atom's fixed image shell is centered on the image nearest to the target atom. The list is constant over the target atom block and covariant under lattice translations of individual atoms.
subroutine, public skala_gpw_smooth_partition_derivatives (grid_point, atom_coords, cell, weights, included, dweights_datom, dweights_dstrain)
 Build smooth atom weights and their atom/cell deformation derivatives.
pure real(kind=dp) function, public smooth_partition_atomic_weight_scale (weight)
 Smoothly suppress a sparse atom row's internal quadrature weight at the layout cutoff.
pure real(kind=dp) function, public smooth_partition_atomic_weight_scale_derivative (weight)
 Derivative of the sparse atom-row quadrature taper with respect to partition weight.

Variables

integer, parameter, public skala_gpw_atom_partition_hard = 1
integer, parameter, public skala_gpw_atom_partition_smooth = 2
type(skala_gpw_layout_cache_type), target, save cached_layout

Detailed Description

Build SKALA TorchScript feature dictionaries from CP2K GPW real-space grids.

Function/Subroutine Documentation

◆ skala_gpw_feature_build()

subroutine, public skala_gpw_features::skala_gpw_feature_build ( type(skala_gpw_feature_type), intent(inout) features,
type(xc_rho_set_type), intent(in) rho_set,
type(pw_r3d_rs_type), dimension(:), intent(in) rho_r,
type(particle_type), dimension(:), pointer particle_set,
type(cell_type), pointer cell,
logical, intent(in), optional requires_grad,
type(pw_r3d_rs_type), optional, pointer weights,
logical, intent(in), optional requires_coordinate_grad,
logical, intent(in), optional requires_stress_grad,
logical, intent(in), optional use_atom_chunks,
logical, intent(in), optional route_atom_chunks,
integer, intent(in), optional atom_partition )

Build a flat SKALA molecular feature dictionary from a local GPW grid.

Parameters
features...
rho_set...
rho_r...
particle_set...
cell...
requires_grad...
weights...
requires_coordinate_grad...
requires_stress_grad...
use_atom_chunks...
route_atom_chunks...
atom_partition...

Definition at line 200 of file skala_gpw_features.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ skala_gpw_feature_release()

subroutine, public skala_gpw_features::skala_gpw_feature_release ( type(skala_gpw_feature_type), intent(inout) features)

Release Torch objects and backing arrays owned by a feature bundle.

Parameters
features...

Definition at line 1747 of file skala_gpw_features.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ skala_gpw_atom_subchunk_count()

integer function, public skala_gpw_features::skala_gpw_atom_subchunk_count ( integer, intent(in) max_rows)

Return how many atom-contiguous subchunks the cached rank chunk needs.

Parameters
max_rows...
Returns
...

Definition at line 1830 of file skala_gpw_features.F.

Here is the caller graph for this function:

◆ skala_gpw_atom_subchunk_layout()

subroutine, public skala_gpw_features::skala_gpw_atom_subchunk_layout ( integer, intent(in) max_rows,
integer, dimension(:), intent(out), allocatable atom_begin,
integer, dimension(:), intent(out), allocatable atom_count,
integer, dimension(:), intent(out), allocatable row_begin,
integer, dimension(:), intent(out), allocatable row_count )

Build atom and row bounds for all atom-contiguous subchunks in one pass.

Parameters
max_rows...
atom_begin...
atom_count...
row_begin...
row_count...

Definition at line 1866 of file skala_gpw_features.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ skala_gpw_feature_build_atom_subchunk()

subroutine, public skala_gpw_features::skala_gpw_feature_build_atom_subchunk ( type(skala_gpw_feature_type), intent(in) parent,
type(skala_gpw_feature_type), intent(inout) features,
integer, intent(in) subchunk_index,
integer, intent(in) max_rows,
logical, intent(in) requires_grad )

Build an atom-contiguous subchunk feature bundle from a rank-local atom chunk.

Parameters
parent...
features...
subchunk_index...
max_rows...
requires_grad...

Definition at line 1961 of file skala_gpw_features.F.

Here is the call graph for this function:

◆ skala_gpw_feature_build_atom_subchunk_bounds()

subroutine, public skala_gpw_features::skala_gpw_feature_build_atom_subchunk_bounds ( type(skala_gpw_feature_type), intent(in) parent,
type(skala_gpw_feature_type), intent(inout) features,
integer, intent(in) atom_begin,
integer, intent(in) atom_count,
integer, intent(in) row_begin,
integer, intent(in) row_count,
logical, intent(in) requires_grad )

Build an atom-contiguous subchunk feature bundle from precomputed bounds.

Parameters
parent...
features...
atom_begin...
atom_count...
row_begin...
row_count...
requires_grad...

Definition at line 1989 of file skala_gpw_features.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ smooth_atom_partition()

subroutine, public skala_gpw_features::smooth_atom_partition ( real(kind=dp), dimension(3), intent(in) grid_point,
real(kind=dp), dimension(:, :), intent(in) atom_coords,
type(cell_type), pointer cell,
real(kind=dp), dimension(:), intent(out) weights,
real(kind=dp), dimension(:, :), intent(out) partition_atom_coords,
real(kind=dp), dimension(:), intent(out) distances,
real(kind=dp), dimension(:, :), intent(in), optional pair_distances )

Build Becke-like smooth atom weights for one native-grid point.

Parameters
grid_point...
atom_coords...
cell...
weights...
partition_atom_coords...
distances...
pair_distances...

Definition at line 2430 of file skala_gpw_features.F.

Here is the caller graph for this function:

◆ build_periodic_atom_image_layout()

subroutine, public skala_gpw_features::build_periodic_atom_image_layout ( real(kind=dp), dimension(:, :), intent(in) atom_coords,
type(cell_type), pointer cell,
integer, intent(in) target_atom,
integer, dimension(3), intent(in), optional image_periodicity,
real(kind=dp), dimension(:, :), intent(out), allocatable image_coords,
integer, intent(out) target_image )

Build the image coordinates shared by all points of one target-atom block.

Parameters
atom_coords...
cell...
target_atom...
image_periodicityoptional image directions used by the auxiliary-grid partition
image_coords...
target_image...

Definition at line 2695 of file skala_gpw_features.F.

Here is the caller graph for this function:

◆ periodic_atom_image_partition_from_layout()

subroutine, public skala_gpw_features::periodic_atom_image_partition_from_layout ( real(kind=dp), dimension(3), intent(in) grid_point,
real(kind=dp), dimension(:, :), intent(in) image_coords,
integer, intent(in) target_image,
real(kind=dp), intent(out) weight )

Return an image-complete periodic atom weight for a prebuilt image layout.

Parameters
grid_point...
image_coords...
target_image...
weight...

Definition at line 2767 of file skala_gpw_features.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ periodic_atom_image_partition()

subroutine, public skala_gpw_features::periodic_atom_image_partition ( real(kind=dp), dimension(3), intent(in) grid_point,
real(kind=dp), dimension(:, :), intent(in) atom_coords,
type(cell_type), pointer cell,
integer, intent(in) target_atom,
real(kind=dp), intent(out) weight,
real(kind=dp), dimension(:, :), intent(out), optional dweight_datom,
real(kind=dp), dimension(:, :), intent(out), optional dweight_dstrain,
integer, dimension(3), intent(in), optional image_periodicity )

Return the smooth weight of one reference-cell atom in an image-complete periodic atom partition. Each atom's fixed image shell is centered on the image nearest to the target atom. The list is constant over the target atom block and covariant under lattice translations of individual atoms.

Parameters
grid_point...
atom_coords...
cell...
target_atom...
weight...
dweight_datomoptional derivative at fixed grid point with respect to base atoms
dweight_dstrainoptional derivative due to lattice-image translations
image_periodicityoptional image directions used by the auxiliary-grid partition

Definition at line 2836 of file skala_gpw_features.F.

Here is the caller graph for this function:

◆ skala_gpw_smooth_partition_derivatives()

subroutine, public skala_gpw_features::skala_gpw_smooth_partition_derivatives ( real(kind=dp), dimension(3), intent(in) grid_point,
real(kind=dp), dimension(:, :), intent(in) atom_coords,
type(cell_type), pointer cell,
real(kind=dp), dimension(:), intent(out) weights,
logical, dimension(:), intent(out) included,
real(kind=dp), dimension(:, :, :), intent(out) dweights_datom,
real(kind=dp), dimension(:, :, :), intent(out) dweights_dstrain )

Build smooth atom weights and their atom/cell deformation derivatives.

Parameters
grid_point...
atom_coords...
cell...
weights...
included...
dweights_datom...
dweights_dstrain...

Definition at line 3041 of file skala_gpw_features.F.

Here is the caller graph for this function:

◆ smooth_partition_atomic_weight_scale()

pure real(kind=dp) function, public skala_gpw_features::smooth_partition_atomic_weight_scale ( real(kind=dp), intent(in) weight)

Smoothly suppress a sparse atom row's internal quadrature weight at the layout cutoff.

Parameters
weightnormalized smooth-partition weight
Returns
scale in the interval [0, 1]

Definition at line 3216 of file skala_gpw_features.F.

Here is the caller graph for this function:

◆ smooth_partition_atomic_weight_scale_derivative()

pure real(kind=dp) function, public skala_gpw_features::smooth_partition_atomic_weight_scale_derivative ( real(kind=dp), intent(in) weight)

Derivative of the sparse atom-row quadrature taper with respect to partition weight.

Parameters
weightnormalized smooth-partition weight
Returns
derivative of the internal quadrature-weight scale

Definition at line 3239 of file skala_gpw_features.F.

Here is the caller graph for this function:

Variable Documentation

◆ skala_gpw_atom_partition_hard

integer, parameter, public skala_gpw_features::skala_gpw_atom_partition_hard = 1

Definition at line 38 of file skala_gpw_features.F.

◆ skala_gpw_atom_partition_smooth

integer, parameter, public skala_gpw_features::skala_gpw_atom_partition_smooth = 2

Definition at line 38 of file skala_gpw_features.F.

◆ cached_layout

type(skala_gpw_layout_cache_type), target, save skala_gpw_features::cached_layout

Definition at line 181 of file skala_gpw_features.F.