diff --git a/src/atom.cpp b/src/atom.cpp index 94dd425afa..14d1d1e740 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -207,6 +207,15 @@ Atom::~Atom() delete [] primes; } +/* ---------------------------------------------------------------------- + copy modify settings from old Atom class to current Atom class +------------------------------------------------------------------------- */ + +void Atom::settings(Atom *old) +{ + map_style = old->map_style; +} + /* ---------------------------------------------------------------------- create an AtomVec style called from input script, restart file, replicate diff --git a/src/atom.h b/src/atom.h index 56562afe53..fd9bd0f84f 100644 --- a/src/atom.h +++ b/src/atom.h @@ -97,6 +97,7 @@ class Atom : protected Pointers { Atom(class LAMMPS *); ~Atom(); + void settings(class Atom *); void create_avec(const char *, int, char **); class AtomVec *new_avec(const char *, int, char **); void init(); diff --git a/src/replicate.cpp b/src/replicate.cpp index 401d994f9e..b5e4ae162f 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -113,6 +113,7 @@ void Replicate::command(int narg, char **arg) Atom *old = atom; atom = new Atom(lmp); + atom->settings(old); int nstyles = 0; char **keywords = NULL;