How we can generate center of mass?

Hi all,

I have a amorphous cell with two different molecule type.

How we generate center of mess for all of molecule in amorphous cell for each type of molecules?