Dear all,
I want choice some cluster by lammps command:
compute YYcluster YYgAl cluster/atom 3.0
variable MaxCluster atom “c_YYcluster>=1000”
then I can dump the data as:
dump YYpos3 all custom 10 04.lammpstrj id type x y z v_MaxCluster c_YYcluster
everythin is fine. but when I
There is endless loop.
I add printf() function in compute_cluster_atom.cpp as:
while (1) {
done = 1;
for (ii = 0; ii < inum; ii++) {
i = ilist[ii];
if (!(mask[i] & groupbit)) continue;
xtmp = x[i][0];
ytmp = x[i][1];
ztmp = x[i][2];
jlist = firstneigh[i];
jnum = numneigh[i];
for (jj = 0; jj < jnum; jj++) {
j = jlist[jj];
j &= NEIGHMASK;
if (!(mask[j] & groupbit)) continue;
if (clusterID[i] == clusterID[j]) continue;
delx = xtmp - x[j][0];
dely = ytmp - x[j][1];
delz = ztmp - x[j][2];
rsq = delxdelx + delydely + delz*delz;
if (rsq < cutsq) {
printf("%d %d %lf %lf 1111\n",i,j,clusterID[i],clusterID[j]);
clusterID[i] = clusterID[j] = MIN(clusterID[i],clusterID[j]);
printf("%d %d %lf %lf 2222\n",i,j,clusterID[i],clusterID[j]);
done = 0;
}
}
}
if (!done) change = 1;
if (done) break;
}
then get data as:
1638 4400 1639.000000 2001.000000 1111
1638 4400 1639.000000 1639.000000 2222
1638 4400 1639.000000 2001.000000 1111
1638 4400 1639.000000 1639.000000 2222
1638 4400 1639.000000 2001.000000 1111
1638 4400 1639.000000 1639.000000 2222
the while(1) can not break in compute_cluster_atom.cpp.
I do not know why? can some one help me ? Thanks
02.in (1.61 KB)
AlPb.eam.alloy (83.1 KB)