(git:98357aa)
Loading...
Searching...
No Matches
nnp_acsf Module Reference

Functionality for atom centered symmetry functions for neural network potentials. More...

Functions/Subroutines

subroutine, public nnp_calc_acsf (nnp, i, calc_forces, stress)
 Calculate atom centered symmetry functions for given atom i.
 
subroutine, public nnp_prepare_neighbor_cache (nnp)
 Prepare or update the linked-cell / Verlet cache for the current geometry. Lazily allocates nnpcell_list_cache and nnpneighbor_interface_state, then delegates to nnp_prepare_cell_list_cache and nnp_neighbor_interface_prepare. Call once per force eval before the per-atom loop; cheap on re-entry when nothing has changed.
 
subroutine, public nnp_sort_ele (ele, nuc_ele)
 Sort an (ele, nuc_ele) pair of arrays in ascending order of atomic number. Used to canonicalise element ordering inside the NNP environment so the same model file produces the same per-element index layout regardless of input ordering.
 
subroutine, public nnp_sort_acsf (nnp)
 Sort radial and angular symmetry functions in canonical order. Radial SFs are sorted by eta (ascending) then rcut; angular SFs by eta, lambda, zeta. This is the order downstream code in nnp_init_acsf_groups relies on for run-length-style group packing.
 
subroutine, public nnp_init_acsf_groups (nnp)
 Pack symmetry functions into groups that share input parameters. Builds nnprad(i)symfgrp(:) and nnpang(i)symfgrp(:) so that all radial / angular SFs with identical (eta, rcut [, lambda, zeta]) live in one group; downstream the descriptor pass evaluates each group's shared cutoff/exponent once and applies it across the per-element neighbour slab.
 
subroutine, public nnp_write_acsf (nnp, para_env, printtag)
 Print a summary of the active symmetry-function set on the source rank. Emits one line per element listing the per-element n_rad / n_ang counts and the per-group breakdown; used at NNP init time and after sort/group passes for traceability.
 

Detailed Description

Functionality for atom centered symmetry functions for neural network potentials.

Author
Christoph Schran (chris.nosp@m.toph.nosp@m..schr.nosp@m.an@r.nosp@m.ub.de)
Dhruv Sharma (ds217.nosp@m.3@ca.nosp@m.m.ac..nosp@m.uk)
Date
2020-10-10

Function/Subroutine Documentation

◆ nnp_calc_acsf()

subroutine, public nnp_acsf::nnp_calc_acsf ( type(nnp_type), intent(inout), pointer  nnp,
integer, intent(in)  i,
logical, intent(in)  calc_forces,
real(kind=dp), dimension(:, :, :), intent(inout), optional  stress 
)

Calculate atom centered symmetry functions for given atom i.

Per-atom symmetry-function gradients live in the per-element neighbour workspace as sparse per-group arrays: self_dGdr (atom i), dGdr_rad (radial group s), and dGdr_ang_jj / dGdr_ang_kk (angular group s, j- and k-side), each addressed by the neighbour's slot in workspace(ind)neighbor. No global (3, n_sf, num_atoms) slab is needed: only atoms in atom i's neighbour lists get derivatives.

Parameters
nnpNNP environment with persistent neighbour caches populated by nnp_prepare_neighbor_cache (must be called once before the per-atom loop).
icentral-atom index in the global atom ordering; selects nnpele_ind(i) for per-element scratch routing.
calc_forcesif .TRUE., populate the per-element dGdr workspaces for caller-side force assembly via nnp_scatter_dgdr_to_forces.
stressoptional per-input-node stress accumulator (only valid when calc_forces).
Date
2020-10-10
Author
Christoph Schran (chris.nosp@m.toph.nosp@m..schr.nosp@m.an@r.nosp@m.ub.de)
Dhruv Sharma (ds217.nosp@m.3@ca.nosp@m.m.ac..nosp@m.uk)

Definition at line 83 of file nnp_acsf.F.

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

◆ nnp_prepare_neighbor_cache()

subroutine, public nnp_acsf::nnp_prepare_neighbor_cache ( type(nnp_type), intent(inout), pointer  nnp)

Prepare or update the linked-cell / Verlet cache for the current geometry. Lazily allocates nnpcell_list_cache and nnpneighbor_interface_state, then delegates to nnp_prepare_cell_list_cache and nnp_neighbor_interface_prepare. Call once per force eval before the per-atom loop; cheap on re-entry when nothing has changed.

Parameters
nnpNNP environment whose persistent caches are to be (re)built.
Author
Dhruv Sharma (ds217.nosp@m.3@ca.nosp@m.m.ac..nosp@m.uk)

Definition at line 878 of file nnp_acsf.F.

Here is the caller graph for this function:

◆ nnp_sort_ele()

subroutine, public nnp_acsf::nnp_sort_ele ( character(len=2), dimension(:), intent(inout)  ele,
integer, dimension(:), intent(inout)  nuc_ele 
)

Sort an (ele, nuc_ele) pair of arrays in ascending order of atomic number. Used to canonicalise element ordering inside the NNP environment so the same model file produces the same per-element index layout regardless of input ordering.

Parameters
eleelement-symbol array, sorted in place to match nuc_ele.
nuc_eleper-element atomic number, sorted in place.
Author
Christoph Schran (chris.nosp@m.toph.nosp@m..schr.nosp@m.an@r.nosp@m.ub.de)

Definition at line 1502 of file nnp_acsf.F.

Here is the caller graph for this function:

◆ nnp_sort_acsf()

subroutine, public nnp_acsf::nnp_sort_acsf ( type(nnp_type), intent(inout)  nnp)

Sort radial and angular symmetry functions in canonical order. Radial SFs are sorted by eta (ascending) then rcut; angular SFs by eta, lambda, zeta. This is the order downstream code in nnp_init_acsf_groups relies on for run-length-style group packing.

Parameters
nnpNNP environment whose rad/ang SF arrays will be reordered in place.
Author
Christoph Schran (chris.nosp@m.toph.nosp@m..schr.nosp@m.an@r.nosp@m.ub.de)

Definition at line 1541 of file nnp_acsf.F.

Here is the caller graph for this function:

◆ nnp_init_acsf_groups()

subroutine, public nnp_acsf::nnp_init_acsf_groups ( type(nnp_type), intent(inout)  nnp)

Pack symmetry functions into groups that share input parameters. Builds nnprad(i)symfgrp(:) and nnpang(i)symfgrp(:) so that all radial / angular SFs with identical (eta, rcut [, lambda, zeta]) live in one group; downstream the descriptor pass evaluates each group's shared cutoff/exponent once and applies it across the per-element neighbour slab.

Parameters
nnpNNP environment with rad/ang SF metadata already populated by nnp_init_model.
Author
Christoph Schran (chris.nosp@m.toph.nosp@m..schr.nosp@m.an@r.nosp@m.ub.de)

Definition at line 1773 of file nnp_acsf.F.

Here is the caller graph for this function:

◆ nnp_write_acsf()

subroutine, public nnp_acsf::nnp_write_acsf ( type(nnp_type), intent(inout)  nnp,
type(mp_para_env_type), pointer  para_env,
character(len=*), intent(in)  printtag 
)

Print a summary of the active symmetry-function set on the source rank. Emits one line per element listing the per-element n_rad / n_ang counts and the per-group breakdown; used at NNP init time and after sort/group passes for traceability.

Parameters
nnpNNP environment whose SF metadata is to be printed.
para_envparallel environment; only the source rank emits output.
printtaglog-line prefix (typically "NNP" or "HELIUM_NNP").
Author
Christoph Schran (chris.nosp@m.toph.nosp@m..schr.nosp@m.an@r.nosp@m.ub.de)

Definition at line 1944 of file nnp_acsf.F.

Here is the caller graph for this function: