[gmx-users] how to center the molecule with trjconv

Justin Lemkul jalemkul at vt.edu
Wed Jul 15 15:32:15 CEST 2015

On 7/14/15 11:20 PM, Zhenyu Meng wrote:
> Dear GROMACS users,
> I want to simulate DNA in a cubic box with water as solvent and visualize
> it.
> By using -pbc mol I can see part of the DNA is out of the box so I want to
> center the DNA in box.
> But using -center seems destruct the DNA into several parts. I tried to use
> -pbc mol followed by -center or -center followed by -pbc mol but both
> cannot center the DNA (the DNA doesn't fall apart but it's still not in the
> center).
> I'm curious about the algorithm about -center option. e.g. if I have a pbc
> cubic box with length of 5, and the COM of the DNA is at (3,3,3), in that
> way, if I use -center I think all the atoms of the system(including DNA and
> water) will shift with a vector(-0.5,-0.5,-0.5) to make sure the COM of DNA
> is now at(2.5,2.5,2.5) (the default boxcenter). Am I correct?
> Your help will be highly appreciated!

For multi-chain molecules it is often helpful/necessary to center on one chain 
using an index group.



Justin A. Lemkul, Ph.D.
Ruth L. Kirschstein NRSA Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 629
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalemkul at outerbanks.umaryland.edu | (410) 706-7441


More information about the gromacs.org_gmx-users mailing list