diff --git a/src/atom.cpp b/src/atom.cpp index cb65eabbc2..16f21748f0 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -254,6 +254,15 @@ void Atom::create_avec(const char *style, int narg, char **arg) delete [] atom_style; if (avec) delete avec; + // unset atom array existence flags that may have been set by old avec + // customize by adding new flag + + molecule_flag = 0; + q_flag = mu_flag = 0; + quat_flag = omega_flag = angmom_flag = torque_flag = 0; + radius_flag = density_flag = rmass_flag = vfrac_flag = 0; + spin_flag = eradius_flag = ervel_flag = erforce_flag = 0; + avec = new_avec(style,narg,arg); int n = strlen(style) + 1; atom_style = new char[n]; diff --git a/src/fix_shake.cpp b/src/fix_shake.cpp index ab38ee793b..96aecdf77c 100644 --- a/src/fix_shake.cpp +++ b/src/fix_shake.cpp @@ -18,6 +18,7 @@ #include "stdio.h" #include "fix_shake.h" #include "atom.h" +#include "atom_vec.h" #include "update.h" #include "respa.h" #include "modify.h" @@ -622,6 +623,8 @@ void FixShake::find_clusters() int **special = atom->special; int nlocal = atom->nlocal; + int angles_allow = atom->avec->angles_allow; + // setup ring of procs int next = me + 1; @@ -1005,7 +1008,7 @@ void FixShake::find_clusters() } } - if (nshake[i] == 2) { + if (nshake[i] == 2 && angles_allow) { n = anglefind(i,shake_atom[i][1],shake_atom[i][2]); if (n < 0) continue; if (angle_type[i][n] < 0) continue; diff --git a/src/region.cpp b/src/region.cpp index e67a2b71c5..988209d180 100644 --- a/src/region.cpp +++ b/src/region.cpp @@ -37,6 +37,7 @@ Region::Region(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) strcpy(style,arg[1]); time_origin = update->ntimestep; + dt = update->dt; } /* ---------------------------------------------------------------------- */