Function deepmd::applyPairExcludeNlistVec#
Defined in File common.h
Function Documentation#
- inline void deepmd::applyPairExcludeNlistVec(std::vector<std::int64_t> &nlist, const std::vector<int> &atype, const std::vector<int> &type_mask_table, const int ntypes, const int nloc, const int max_size)#
Dense-nlist pair-type exclusion on a plain flat
int64neighbour list: erase excluded-type neighbours to-1in place.Torch-free twin of
applyPairExclusionNlist(commonPT.h, which works ontorch::Tensor); used by the TF-C-APIDeepPotJAXingestion seam, which cannot depend on libtorch. Same keep-table convention asbuildPairExcludeTable/applyPairExclusionNlist: keep indexcenter_type * (ntypes+1) + neighbour_type. An emptytype_mask_tableis identity (no-op), mirroring thepair_excl is Noneearly-exit.Exclusion is a BUILD-time transform (decision #18/A4): the exported
call_lower_*consumes a pre-excluded nlist and never re-applies it, so this is the single application site for the JAX/tf2 SavedModel LAMMPS path.- Parameters:
nlist – Flat
nloc * max_sizeneighbour list (extended-space indices;-1== empty slot), modified in place.atype – Extended atom types;
atype[i] >= 0for real atoms. Indexed by the centre idii < nlocand by each neighbour id innlist.type_mask_table – Flat
(ntypes+1)^2keep table frombuildPairExcludeTable. Empty => identity.ntypes – Number of real atom types.
nloc – Number of local (centre) atoms.
max_size – Neighbours per centre (row stride of
nlist).