Re: system density

From: Peter Freddolino (
Date: Tue Sep 04 2007 - 10:51:20 CDT

Hi Adam,
certainly, these operations can be done in vmd; for example:

set sel [atomselect top all]
measure center $sel ;# returns the geometric center
measure center $sel weight mass ;# returns the center of mass
$sel moveby [vecscale -1 [measure center $sel] ] ;# move the geometric
center to {0 0 0}
measure minmax $sel ;# get the minimum and maximum coordinates

Please note that the extrema returned by measure minmax may not exactly
correspond to the boundaries of your simulated system, because there can
be some overlap.

However, the kind of problem you're describing is exactly what constant
pressure equilibration can be useful for; the volume of the system will
be adjusted to obtain the desired pressure without the need for manual


Adam Fraser wrote:
> Hello namd group,
> I have a bunch of systems that I need to run simulations on, but I've
> noticed that their densities are too low. I've been using some
> fortran code to center and compact the systems to the proper density
> but it's a very cumbersome process that requires me to do a lot of
> math by hand.
> Does anyone know if this sort of thing can be done via Tcl scripting
> in VMD?
> Are there any other ways that people have found convenient to adjust a
> system's density?
> Thanks so much for your time,
> Adam

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:45:11 CST