Skip to content
Snippets Groups Projects
Commit 1f1447c3 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

need to update exclusions with the new atom IDs in case of molecular systems

parent 1ed25d19
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment