Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dplr: set the positions of WCs to those of the real atoms in end_of_step #4084

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/deepmodeling/deepmd-kit
images: ghcr.io/Yi-FanLi/deepmd-kit

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: source/install/docker
push: ${{ github.repository_owner == 'deepmodeling' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
push: ${{ github.repository_owner == 'Yi-FanLi' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }}
tags: ${{ steps.meta.outputs.tags }}${{ matrix.variant }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
Expand Down
14 changes: 11 additions & 3 deletions source/lmp/fix_dplr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
// THERMO_ENERGY removed in lammps/lammps#2560
mask |= THERMO_ENERGY;
#endif
mask |= POST_INTEGRATE;
mask |= PRE_EXCHANGE;

Check warning on line 229 in source/lmp/fix_dplr.cpp

View check run for this annotation

Codecov / codecov/patch

source/lmp/fix_dplr.cpp#L229

Added line #L229 was not covered by tests
mask |= PRE_FORCE;
mask |= POST_FORCE;
mask |= MIN_PRE_EXCHANGE;
Expand Down Expand Up @@ -301,18 +301,26 @@
}
}

void FixDPLR::setup_pre_exchange() {
printf("FixDPLR::setup_pre_exchange\n");
pre_exchange();
printf("FixDPLR::setup_pre_exchange\n");

Check warning on line 307 in source/lmp/fix_dplr.cpp

View check run for this annotation

Codecov / codecov/patch

source/lmp/fix_dplr.cpp#L304-L307

Added lines #L304 - L307 were not covered by tests
}

/* ---------------------------------------------------------------------- */

void FixDPLR::setup_pre_force(int vflag) { pre_force(vflag); }

/* ---------------------------------------------------------------------- */

void FixDPLR::setup(int vflag) {
printf("FixDPLR::setup\n");

Check warning on line 317 in source/lmp/fix_dplr.cpp

View check run for this annotation

Codecov / codecov/patch

source/lmp/fix_dplr.cpp#L317

Added line #L317 was not covered by tests
// if (strstr(update->integrate_style,"verlet"))
post_force(vflag);
// else {
// error->all(FLERR, "respa is not supported by this fix");
// }
printf("FixDPLR::setup\n");

Check warning on line 323 in source/lmp/fix_dplr.cpp

View check run for this annotation

Codecov / codecov/patch

source/lmp/fix_dplr.cpp#L323

Added line #L323 was not covered by tests
}

/* ---------------------------------------------------------------------- */
Expand Down Expand Up @@ -399,7 +407,7 @@

/* ---------------------------------------------------------------------- */

void FixDPLR::post_integrate() {
void FixDPLR::pre_exchange() {

Check warning on line 410 in source/lmp/fix_dplr.cpp

View check run for this annotation

Codecov / codecov/patch

source/lmp/fix_dplr.cpp#L410

Added line #L410 was not covered by tests
double **x = atom->x;
double **v = atom->v;
int *type = atom->type;
Expand Down Expand Up @@ -717,7 +725,7 @@

/* ---------------------------------------------------------------------- */

void FixDPLR::min_pre_exchange() { post_integrate(); }
void FixDPLR::min_pre_exchange() { pre_exchange(); }

Check warning on line 728 in source/lmp/fix_dplr.cpp

View check run for this annotation

Codecov / codecov/patch

source/lmp/fix_dplr.cpp#L728

Added line #L728 was not covered by tests

/* ---------------------------------------------------------------------- */

Expand Down
3 changes: 2 additions & 1 deletion source/lmp/fix_dplr.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ class FixDPLR : public Fix {
int setmask() override;
void init() override;
void setup(int) override;
void setup_pre_exchange() override;
void setup_pre_force(int) override;
void min_setup(int) override;
void post_integrate() override;
void pre_exchange() override;
void pre_force(int) override;
void post_force(int) override;
void min_pre_exchange() override;
Expand Down
Loading