forked from lijiext/lammps
need to update exclusions with the new atom IDs in case of molecular systems
This commit is contained in:
parent
1ed25d195b
commit
1f1447c3ac
|
@ -16,6 +16,7 @@
|
|||
#include "atom_vec.h"
|
||||
#include "domain.h"
|
||||
#include "comm.h"
|
||||
#include "special.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
|
@ -44,7 +45,7 @@ void ResetIDs::command(int narg, char **arg)
|
|||
}
|
||||
|
||||
// create an atom map if one doesn't exist already
|
||||
|
||||
|
||||
int mapflag = 0;
|
||||
if (atom->map_style == 0) {
|
||||
mapflag = 1;
|
||||
|
@ -93,7 +94,7 @@ void ResetIDs::command(int narg, char **arg)
|
|||
// forward_comm_array acquires new IDs for ghost atoms
|
||||
|
||||
double **newIDs;
|
||||
memory->create(newIDs,nall,1,"reset_ids:newIDs");
|
||||
memory->create(newIDs,nall,1,"reset_ids:newIDs");
|
||||
|
||||
for (int i = 0; i < nlocal; i++) {
|
||||
newIDs[i][0] = tag[i];
|
||||
|
@ -105,7 +106,7 @@ void ResetIDs::command(int narg, char **arg)
|
|||
// loop over bonds, angles, etc and reset IDs in stored topology arrays
|
||||
// only necessary for molecular = 1, not molecular = 2
|
||||
// badcount = atom IDs that could not be found
|
||||
|
||||
|
||||
int badcount = 0;
|
||||
|
||||
if (atom->molecular == 1) {
|
||||
|
@ -232,8 +233,15 @@ void ResetIDs::command(int narg, char **arg)
|
|||
atom->map_init();
|
||||
atom->map_set();
|
||||
|
||||
// need to update exclusions with new atom IDs
|
||||
|
||||
if (atom->molecular == 1) {
|
||||
Special special(lmp);
|
||||
special.build();
|
||||
}
|
||||
|
||||
// delete temporary atom map
|
||||
|
||||
|
||||
if (mapflag) {
|
||||
atom->map_delete();
|
||||
atom->map_style = 0;
|
||||
|
|
Loading…
Reference in New Issue