Merge pull request #1783 from ares201005/fix_dynmat

add force modifications in dynamical_matrix.cpp
This commit is contained in:
Axel Kohlmeyer 2020-01-06 15:08:35 -05:00 committed by GitHub
commit 00dfde2952
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -19,6 +19,7 @@
#include "improper.h"
#include "kspace.h"
#include "update.h"
#include "modify.h"
#include "neighbor.h"
#include "pair.h"
#include "timer.h"
@ -385,6 +386,7 @@ void DynamicalMatrix::displace_atom(int local_idx, int direction, int magnitude)
void DynamicalMatrix::update_force()
{
force_clear();
int n_post_force = modify->n_post_force;
if (pair_compute_flag) {
force->pair->compute(eflag,vflag);
@ -405,6 +407,11 @@ void DynamicalMatrix::update_force()
comm->reverse_comm();
timer->stamp(Timer::COMM);
}
// force modifications,
if (n_post_force) modify->post_force(vflag);
timer->stamp(Timer::MODIFY);
++ update->nsteps;
}