Center specified coordinates to box center or onto reference structure.

center [<mask>] [origin] [mass] [ reference | ref <name> | refindex <#> [<refmask>]]

[<mask>] Center based on atoms in mask; default is all atoms.
[origin] Center to origin (0, 0, 0); default is center to box center (X/2, Y/2, Z/2).
[mass] Use center of mass instead of geometric center.
[reference | ref <name> | refindex <#> [<refmask]] Center using coordinates in specified reference structure selected by <refmask> (<mask> if not specified).

Move all atoms so that the center of the atoms in <mask> is centered at the specified location: box center (default), coordinate origin, or reference coordinates.

For example, to move all coordinates so that the center of mass of residue 1 is at the center of the box:

center :1 mass