Template Function deepmd::hpp::select_by_type

Function Documentation

template<typename VALUETYPE>
void deepmd::hpp::select_by_type(std::vector<int> &fwd_map, std::vector<int> &bkw_map, int &nghost_real, const std::vector<VALUETYPE> &dcoord_, const std::vector<int> &datype_, const int &nghost, const std::vector<int> &sel_type_)

Get forward and backward map of selected atoms by atom types.

  • fwd_map[out] The forward map with size natoms.

  • bkw_map[out] The backward map with size nreal.

  • nghost_real[out] The number of selected ghost atoms.

  • dcoord_[in] The coordinates of all atoms. Reserved for compatibility.

  • datype_[in] The atom types of all atoms.

  • nghost[in] The number of ghost atoms.

  • sel_type_[in] The selected atom types.