forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4927 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
d514f55bb6
commit
abb9e1c963
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue