Template Function deepmd::prod_force_a_cpu(FPTYPE *, const FPTYPE *, const FPTYPE *, const int *, const int, const int, const int, const int, const int, const int)

Function Documentation

template<typename FPTYPE>
void deepmd::prod_force_a_cpu(FPTYPE *force, const FPTYPE *net_deriv, const FPTYPE *in_deriv, const int *nlist, const int nloc, const int nall, const int nnei, const int nframes, const int thread_nloc, const int thread_start_index)

Produce force from net_deriv and in_deriv.

This function is used for multi-threading. Only part of atoms are computed in this thread. They will be comptued in parallel.

Template Parameters

FPTYPE – float or double

Parameters
  • force[out] Atomic forces.

  • net_deriv[in] Net derivative.

  • in_deriv[in] Environmental derivative.

  • nlist[in] Neighbor list.

  • nloc[in] The number of local atoms.

  • nall[in] The number of all atoms, including ghost atoms.

  • nnei[in] The number of neighbors.

  • nframes[in] The number of frames.

  • thread_nloc[in] The number of local atoms to be computed in this thread.

  • thread_start_index[in] The start index of local atoms to be computed in this thread. The index should be in [0, nloc).