[gmx-developers] Viral for Walls

Alexander Herz aherz.kazan at arcor.de
Mon Mar 16 14:01:54 CET 2009


Hi Guys,

Looking at wall.c where the forces acting on the atoms caused by the lj
walls are calculated one finds:

viral_zz=-0.5*wall_z_pos*Fwall;

I've added something similar where the walls are segments of z slabs (so
they have finite width).
As wall z position I use the center of mass of the wall segs. So i do:

viral_zz=-0.5*wall_segment_cm_z*Fwall;

Now I wonder about two things:

1. where is the factor "-0.5" comeing from?
2. how can I calculate the box's x-y surface area for non rectangular boxes?
To calculate the volume of a z_slab I currently use:
Vol=box[XX][XX]*box[YY][YY]*slab_height;
How can I calc the volume if I have a different box symmetry?

Thx,
Alex







More information about the gromacs.org_gmx-developers mailing list