git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13103 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -33,9 +33,9 @@ ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
// ID of compute chunk/atom
|
// ID of compute chunk/atom
|
||||||
|
|
||||||
int n = strlen(arg[6]) + 1;
|
int n = strlen(arg[3]) + 1;
|
||||||
idchunk = new char[n];
|
idchunk = new char[n];
|
||||||
strcpy(idchunk,arg[6]);
|
strcpy(idchunk,arg[3]);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
|||||||
@ -38,9 +38,9 @@ ComputeInertiaChunk::ComputeInertiaChunk(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
// ID of compute chunk/atom
|
// ID of compute chunk/atom
|
||||||
|
|
||||||
int n = strlen(arg[6]) + 1;
|
int n = strlen(arg[3]) + 1;
|
||||||
idchunk = new char[n];
|
idchunk = new char[n];
|
||||||
strcpy(idchunk,arg[6]);
|
strcpy(idchunk,arg[3]);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
|||||||
@ -38,9 +38,9 @@ ComputeMSDChunk::ComputeMSDChunk(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
// ID of compute chunk/atom
|
// ID of compute chunk/atom
|
||||||
|
|
||||||
int n = strlen(arg[6]) + 1;
|
int n = strlen(arg[3]) + 1;
|
||||||
idchunk = new char[n];
|
idchunk = new char[n];
|
||||||
strcpy(idchunk,arg[6]);
|
strcpy(idchunk,arg[3]);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
@ -84,13 +84,14 @@ void ComputeMSDChunk::init()
|
|||||||
void ComputeMSDChunk::setup()
|
void ComputeMSDChunk::setup()
|
||||||
{
|
{
|
||||||
if (!firstflag) return;
|
if (!firstflag) return;
|
||||||
|
compute_array();
|
||||||
firstflag = 0;
|
firstflag = 0;
|
||||||
|
|
||||||
compute_array();
|
|
||||||
for (int i = 0; i < nchunk; i++) {
|
for (int i = 0; i < nchunk; i++) {
|
||||||
cominit[i][0] = comall[i][0];
|
cominit[i][0] = comall[i][0];
|
||||||
cominit[i][1] = comall[i][1];
|
cominit[i][1] = comall[i][1];
|
||||||
cominit[i][2] = comall[i][2];
|
cominit[i][2] = comall[i][2];
|
||||||
|
msd[i][0] = msd[i][1] = msd[i][2] = msd[i][3] = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +162,7 @@ void ComputeMSDChunk::compute_array()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MSD is difference between current and initial COM
|
// MSD is difference between current and initial COM
|
||||||
// cominit does not yet exist when called from constructor
|
// cominit does not yet exist when called first time from setup()
|
||||||
|
|
||||||
if (firstflag) return;
|
if (firstflag) return;
|
||||||
|
|
||||||
|
|||||||
@ -38,9 +38,9 @@ ComputeTorqueChunk::ComputeTorqueChunk(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
// ID of compute chunk/atom
|
// ID of compute chunk/atom
|
||||||
|
|
||||||
int n = strlen(arg[6]) + 1;
|
int n = strlen(arg[3]) + 1;
|
||||||
idchunk = new char[n];
|
idchunk = new char[n];
|
||||||
strcpy(idchunk,arg[6]);
|
strcpy(idchunk,arg[3]);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
|||||||
@ -40,9 +40,9 @@ ComputeVCMChunk::ComputeVCMChunk(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
// ID of compute chunk/atom
|
// ID of compute chunk/atom
|
||||||
|
|
||||||
int n = strlen(arg[6]) + 1;
|
int n = strlen(arg[3]) + 1;
|
||||||
idchunk = new char[n];
|
idchunk = new char[n];
|
||||||
strcpy(idchunk,arg[6]);
|
strcpy(idchunk,arg[3]);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user