compute centroid is used to calculate the centroid of a group of particles.
This compute will calculate the centroid of a group of particles along x, y and z coordinates:
xc = ∑
i=1Nx
i |
The output is in the form of array. Results can be accessed by c_id[dim] in the thermo_modify custom command, where id is the compute id and dim ranges from 0 to 2, eg. c_5[0].