Skip to content

Commit 2d672a5

Browse files
committed
Fix an issue with keyword SAVE-FORCE
1 parent 8e4868a commit 2d672a5

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.clang-tidy

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# for f in $(find src test -type f -name '*.cpp'); do clang-tidy --quiet --config-file=.clang-tidy -p BUILD_DIR $f; done
2+
3+
---
4+
Checks: '-*,readability-implicit-bool-conversion'
5+
WarningsAsErrors: ''
6+
HeaderFilterRegex: ''
7+
FormatStyle: none
8+
CheckOptions:
9+
- key: readability-implicit-bool-conversion.AllowIntegerConditions
10+
value: true
11+
- key: readability-implicit-bool-conversion.AllowPointerConditions
12+
value: true
13+
...

include/ff/egvop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void sumGradient(double scale, grad_prec* g0x, grad_prec* g0y, grad_prec* g0z, /
2121
const grad_prec* g1x, const grad_prec* g1y, const grad_prec* g1z);
2222

2323
/// Copies the energy gradients from device to host.
24-
void copyGradient(int vers, double* grdx, double* grdy, double* grdz, //
24+
void copyGradientSync(int vers, double* grdx, double* grdy, double* grdz, //
2525
const grad_prec* gx_src, const grad_prec* gy_src, const grad_prec* gz_src, int queue);
2626

2727
/// Copies the energy gradients from device to host.

src/egvop.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void sumGradient(double s, grad_prec* g0x, grad_prec* g0y, grad_prec* g0z, const
5757
}
5858

5959
namespace tinker {
60-
void copyGradient(int vers, double* grdx, double* grdy, double* grdz, //
60+
void copyGradientSync(int vers, double* grdx, double* grdy, double* grdz, //
6161
const grad_prec* gx_src, const grad_prec* gy_src, const grad_prec* gz_src, int queue)
6262
{
6363
if (vers & calc::grad) {
@@ -99,7 +99,7 @@ void copyGradient(int vers, double* grdx, double* grdy, double* grdz, //
9999
void copyGradient(int vers, double* grdx, double* grdy, double* grdz, //
100100
const grad_prec* gx_src, const grad_prec* gy_src, const grad_prec* gz_src)
101101
{
102-
copyGradient(vers, grdx, grdy, grdz, gx_src, gy_src, gz_src, g::q0);
102+
copyGradientSync(vers, grdx, grdy, grdz, gx_src, gy_src, gz_src, g::q0);
103103
}
104104

105105
void copyGradient(int vers, double* grdx, double* grdy, double* grdz)

src/mdsave.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ static void mdsaveDupThenWrite(int istep, time_prec dt)
119119

120120
{
121121
std::vector<double> arrx(n), arry(n), arrz(n);
122-
copyGradient(calc::grad, arrx.data(), arry.data(), arrz.data(), dup_buf_gx, dup_buf_gy,
123-
dup_buf_gz, false);
122+
copyGradientSync(calc::grad, arrx.data(), arry.data(), arrz.data(), dup_buf_gx, dup_buf_gy,
123+
dup_buf_gz, g::q1);
124124
// convert gradient to acceleration
125125
const double ekcal = units::ekcal;
126126
for (int i = 0; i < n; ++i) {

0 commit comments

Comments
 (0)