Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 7, 2024
1 parent d20d668 commit e09bf5a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
26 changes: 13 additions & 13 deletions source/api_c/include/c_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ extern void DP_DeepPotCompute2(DP_DeepPot* dp,
double* atomic_virial);

/**
* @brief Evaluate the energy, force, magnetic force and virial by using a DP
* @brief Evaluate the energy, force, magnetic force and virial by using a DP
* spin model. (double version)
* @version 2
* @param[in] dp The DP spin model to use.
Expand All @@ -401,7 +401,7 @@ extern void DP_DeepPotCompute2(DP_DeepPot* dp,
* natoms x dim_aparam.
* @param[out] energy Output energy.
* @param[out] force Output force. The array should be of size natoms x 3.
* @param[out] force_mag Output magnetic force on each atom. The array should be
* @param[out] force_mag Output magnetic force on each atom. The array should be
* of size natoms x 3.
* @param[out] virial Output virial. The array should be of size 9.
* @param[out] atomic_energy Output atomic energy. The array should be of size
Expand Down Expand Up @@ -487,7 +487,7 @@ extern void DP_DeepPotComputef2(DP_DeepPot* dp,
* natoms x dim_aparam.
* @param[out] energy Output energy.
* @param[out] force Output force. The array should be of size natoms x 3.
* @param[out] force_mag Output magnetic force on each atom. The array should be
* @param[out] force_mag Output magnetic force on each atom. The array should be
* of size natoms x 3.
* @param[out] virial Output virial. The array should be of size 9.
* @param[out] atomic_energy Output atomic energy. The array should be of size
Expand Down Expand Up @@ -561,7 +561,7 @@ extern void DP_DeepPotComputeNList2(DP_DeepPot* dp,
double* atomic_virial);

/**
* @brief Evaluate the energy, force and virial by using a DP spin model
* @brief Evaluate the energy, force and virial by using a DP spin model
* with the neighbor list. (double version)
* @version 2
* @param[in] dp The DP spin model to use.
Expand All @@ -583,7 +583,7 @@ extern void DP_DeepPotComputeNList2(DP_DeepPot* dp,
* natoms x dim_aparam.
* @param[out] energy Output energy.
* @param[out] force Output force. The array should be of size natoms x 3.
* @param[out] force_mag Output magnetic force on each atom. The array should be
* @param[out] force_mag Output magnetic force on each atom. The array should be
* of size natoms x 3.
* @param[out] virial Output virial. The array should be of size 9.
* @param[out] atomic_energy Output atomic energy. The array should be of size
Expand Down Expand Up @@ -660,7 +660,7 @@ extern void DP_DeepPotComputeNListf2(DP_DeepPot* dp,
float* atomic_virial);

/**
* @brief Evaluate the energy, force and virial by using a DP spin model
* @brief Evaluate the energy, force and virial by using a DP spin model
* with the neighbor list. (float version)
* @version 2
* @param[in] dp The DP spin model to use.
Expand All @@ -682,7 +682,7 @@ extern void DP_DeepPotComputeNListf2(DP_DeepPot* dp,
* natoms x dim_aparam.
* @param[out] energy Output energy.
* @param[out] force Output force. The array should be of size natoms x 3.
* @param[out] force_mag Output magnetic force on each atom. The array should be
* @param[out] force_mag Output magnetic force on each atom. The array should be
* of size natoms x 3.
* @param[out] virial Output virial. The array should be of size 9.
* @param[out] atomic_energy Output atomic energy. The array should be of size
Expand Down Expand Up @@ -1138,8 +1138,8 @@ void DP_DeepPotModelDeviComputeNList2(DP_DeepPotModelDevi* dp,
double* atomic_virial);

/**
* @brief Evaluate the energy, force and virial by using a DP spin model deviation
* with neighbor list. (double version)
* @brief Evaluate the energy, force and virial by using a DP spin model
*deviation with neighbor list. (double version)
* @version 2
* @param[in] dp The DP model deviation to use.
* @param[in] nframes The number of frames. Only support 1 for now.
Expand All @@ -1160,7 +1160,7 @@ void DP_DeepPotModelDeviComputeNList2(DP_DeepPotModelDevi* dp,
*natoms x dim_aparam.
* @param[out] energy Output energy.
* @param[out] force Output force. The array should be of size natoms x 3.
* @param[out] force_mag Output magnetic force on each atom. The array should be
* @param[out] force_mag Output magnetic force on each atom. The array should be
* of size natoms x 3.
* @param[out] virial Output virial. The array should be of size 9.
* @param[out] atomic_energy Output atomic energy. The array should be of size
Expand Down Expand Up @@ -1236,8 +1236,8 @@ void DP_DeepPotModelDeviComputeNListf2(DP_DeepPotModelDevi* dp,
float* atomic_virial);

/**
* @brief Evaluate the energy, force and virial by using a DP spin model deviation
* with neighbor list. (float version)
* @brief Evaluate the energy, force and virial by using a DP spin model
*deviation with neighbor list. (float version)
* @version 2
* @param[in] dp The DP model deviation to use.
* @param[in] nframes The number of frames. Only support 1 for now.
Expand All @@ -1258,7 +1258,7 @@ void DP_DeepPotModelDeviComputeNListf2(DP_DeepPotModelDevi* dp,
*natoms x dim_aparam.
* @param[out] energy Output energy.
* @param[out] force Output force. The array should be of size natoms x 3.
* @param[out] force_mag Output magnetic force on each atom. The array should be
* @param[out] force_mag Output magnetic force on each atom. The array should be
* of size natoms x 3.
* @param[out] virial Output virial. The array should be of size 9.
* @param[out] atomic_energy Output atomic energy. The array should be of size
Expand Down
9 changes: 6 additions & 3 deletions source/lmp/pair_deepmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ void PairDeepMD::compute(int eflag, int vflag) {
int newton_pair = force->newton_pair;

if (atom->sp_flag) {
error->all(FLERR,
error->all(
FLERR,
"Pair style 'deepmd' does not support spin atoms, please use pair "
"style 'deepspin' instead.");
}
Expand Down Expand Up @@ -850,7 +851,8 @@ int PairDeepMD::pack_reverse_comm(int n, int first, double *buf) {
m = 0;
last = first + n;
if (atom->sp_flag) {
error->all(FLERR,
error->all(
FLERR,
"Pair style 'deepmd' does not support spin atoms, please use pair "
"style 'deepspin' instead.");
} else {
Expand All @@ -872,7 +874,8 @@ void PairDeepMD::unpack_reverse_comm(int n, int *list, double *buf) {

m = 0;
if (atom->sp_flag) {
error->all(FLERR,
error->all(
FLERR,
"Pair style 'deepmd' does not support spin atoms, please use pair "
"style 'deepspin' instead.");
} else {
Expand Down
9 changes: 6 additions & 3 deletions source/lmp/pair_deepspin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ void PairDeepSpin::compute(int eflag, int vflag) {
}
}
} else {
error->all(FLERR,
error->all(
FLERR,
"Pair style 'deepspin' only supports spin atoms, please use pair style "
"'deepmd' instead.");
}
Expand Down Expand Up @@ -891,7 +892,8 @@ int PairDeepSpin::pack_reverse_comm(int n, int first, double *buf) {
m = 0;
last = first + n;
if (!atom->sp_flag) {
error->all(FLERR,
error->all(
FLERR,
"Pair style 'deepspin' only supports spin atoms, please use pair style "
"'deepmd' instead.");
} else {
Expand All @@ -916,7 +918,8 @@ void PairDeepSpin::unpack_reverse_comm(int n, int *list, double *buf) {

m = 0;
if (!atom->sp_flag) {
error->all(FLERR,
error->all(
FLERR,
"Pair style 'deepspin' only supports spin atoms, please use pair style "
"'deepmd' instead.");
} else {
Expand Down

0 comments on commit e09bf5a

Please sign in to comment.