git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10408 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -412,20 +412,17 @@ void ComputeBasalAtom::compute_peratom()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if there are less than two ~180 degree bond angles, the algorithm returns null
|
//if there are less than two ~180 degree bond angles, the algorithm returns null
|
||||||
else {
|
else BPV[i][0] = BPV[i][1] = BPV[i][2] = 0.0;
|
||||||
BPV[i][0] = 0.0;
|
|
||||||
BPV[i][1] = 0.0;
|
|
||||||
BPV[i][2] = 0.0;
|
|
||||||
}
|
|
||||||
//normalize BPV:
|
//normalize BPV:
|
||||||
double Mag = sqrt(BPV[i][0]*BPV[i][0] +
|
double Mag = sqrt(BPV[i][0]*BPV[i][0] +
|
||||||
BPV[i][1]*BPV[i][1] + BPV[i][2]*BPV[i][2]);
|
BPV[i][1]*BPV[i][1] + BPV[i][2]*BPV[i][2]);
|
||||||
if (Mag > 0){
|
if (Mag > 0){
|
||||||
BPV[i][0] = BPV[i][0]/Mag;
|
BPV[i][0] = BPV[i][0]/Mag;
|
||||||
BPV[i][1] = BPV[i][1]/Mag;
|
BPV[i][1] = BPV[i][1]/Mag;
|
||||||
BPV[i][2] = BPV[i][2]/Mag;
|
BPV[i][2] = BPV[i][2]/Mag;
|
||||||
}
|
}
|
||||||
}
|
} else BPV[i][0] = BPV[i][1] = BPV[i][2] = 0.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user