Hi Kanika and Tsjerk,
if you use the commands below:
pseudoatom coms, chain a
pseudoatom coms, chain b
bond coms, coms
you create the center of geometry rather than the center of mass.
I'd like to know how to create the center of mass.
Alternatively you can use the command distance to draw a line between 2 points or selections,
Hope it helps,