Cunliang,

There is a script available on the PyMOL-Wiki that calculates either the center-of-mass OR the center-of-geometry.

Please see http://www.pymolwiki.org/index.php/Center_Of_Mass

It uses the "pseudoatom" function to generate a sphere at the desired center of mass.

Hope this answers your question.

Sean