[gmx-developers] Viral for Walls

Berk Hess hessb at mpip-mainz.mpg.de
Mon Mar 16 15:10:55 CET 2009


Alexander Herz wrote:
> 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?
>   
This is a matter of definition only, see the virial definition in the 
Gromacs manual.
> 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?
>   
The expression does not change for triclinic boxes (this has nothing to 
do with symmetry).

Berk
> Thx,
> Alex
>
>
>
>
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-developers-request at gromacs.org.
>   




More information about the gromacs.org_gmx-developers mailing list