Re: how to calculate the box size

From: Axel Kohlmeyer (
Date: Tue Mar 06 2012 - 08:52:59 CST

On Tue, Mar 6, 2012 at 9:44 AM, Aron Broom <> wrote:
> What if for the water molecules in your system you calculate from the center
> of mass of the waters rather than just the atomic coordinates?  I don't know
> what the real answer is, but that would shrink your box ever so slightly.

that is nonsense. you cannot reconstruct the box size from
the positions of the atoms. full stop. but the box dimensions
are usually stored in the dcd trajectory file. those are the only
ones you can use or those in a proper .xsc file.


> On Tue, Mar 6, 2012 at 2:48 AM, mjyang <> wrote:
>> Dear NAMD users,
>>     I performed a simulation by NAMD for a protein system solvated by a
>> cubic water box. Now I extracted the snapshots from NAMD trajectory for
>> postpone analysis, in which the protein should be centered in the box. The
>> box size was calculated by (max_x-min_x, max_y-min_y, max_z-min_z), where
>> max_x,y,z and min_x, y, z are the maximum and minimum coordinate values of
>> the extracted frame. However, the box size calculated in this way is a
>> little larger than the real one, resulting in gaps in the recentered box. It
>> seems that the box size written out by NAMD in the *.xsc file is better than
>> what I calculated. But the NAMD output size (in *.xsc file) only corresponds
>> to the last frame of a segment of trajectory file and I need the size for
>> each frame in the traj. Could someone please tell me how NAMD calculate the
>> box along MD simulations?
>> Many thanks.
>> Mingjun
> --
> Aron Broom M.Sc
> PhD Student
> Department of Chemistry
> University of Waterloo

Dr. Axel Kohlmeyer
College of Science and Technology
Temple University, Philadelphia PA, USA.

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2012 - 23:21:17 CST