![]() |
(git:98357aa)
|
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. | |
Functionality for atom centered symmetry functions for neural network potentials.
| 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.
| nnp | NNP environment with persistent neighbour caches populated by nnp_prepare_neighbor_cache (must be called once before the per-atom loop). |
| i | central-atom index in the global atom ordering; selects nnpele_ind(i) for per-element scratch routing. |
| calc_forces | if .TRUE., populate the per-element dGdr workspaces for caller-side force assembly via nnp_scatter_dgdr_to_forces. |
| stress | optional per-input-node stress accumulator (only valid when calc_forces). |
Definition at line 83 of file nnp_acsf.F.
| 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.
| nnp | NNP environment whose persistent caches are to be (re)built. |
Definition at line 878 of file nnp_acsf.F.
| 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.
| ele | element-symbol array, sorted in place to match nuc_ele. |
| nuc_ele | per-element atomic number, sorted in place. |
Definition at line 1502 of file nnp_acsf.F.
| 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.
| nnp | NNP environment whose rad/ang SF arrays will be reordered in place. |
Definition at line 1541 of file nnp_acsf.F.
| 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.
| nnp | NNP environment with rad/ang SF metadata already populated by nnp_init_model. |
Definition at line 1773 of file nnp_acsf.F.
| 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.
| nnp | NNP environment whose SF metadata is to be printed. |
| para_env | parallel environment; only the source rank emits output. |
| printtag | log-line prefix (typically "NNP" or "HELIUM_NNP"). |
Definition at line 1944 of file nnp_acsf.F.