[gmx-developers] virial symmetry
Berk Hess
hessb at mpip-mainz.mpg.de
Mon Mar 30 17:54:51 CEST 2009
Hi,
At the end of do_walls it says:
/* Since the lower wall is at z=0 it does not contribute
* to the single sum virial.
*/
if (nwall == 2)
fr->vir_wall_zz = -0.5*box_zz*Fwall[1];
This line should ensure that the virial only depends on the distance
between the particles and the upper wall.
I don't understand what you mean with asymmetric.
The wall only acts on the z-component of the forces and both the force
and distance have no x and y
components, therefore the wall forces only occur in the zz element of
the virial tensor.
Have you modified the code such that this correction no longer holds?
Berk
Alexander Herz wrote:
> Having looked a bit closer into this, it seams that the definition of
> the virial used in gromacs
> (using absolute particle coords) is obviously only translation invariant
> as long newtons 3rd law
> is obeyed inside the system and no external forces act on the system (so
> all forces sum to zero).
> Apparently this condition is violated when using 2 walls with different
> parameters like density???
>
> Alex
>
> Alexander Herz wrote:
>
>> Hi guys,
>>
>> I'm having some problems with the walls feature (new in gromacs 4.0).
>>
>> If I understand correctly then I do get a symmetric virial tensor even for
>> systems which are inhomogenous as long only pair potentials are used
>>
>> (Theta=-0.5*sum(r_ij*F_ij) where r_ij is r_j-r_i (so the distance
>> between to particles acting on each other)
>> and F_ij is the force acting on them;with F_ij=-F_ji the contributions
>> cancel out and the viral is symmetric )
>>
>> Now if I use 2 walls with different density I get an asymmetric virial
>> and looking at the wall's source
>> it seams that for walls not r_ij is used but absolute wall coordinate
>> (box_zz for wall2 and 0 for wall 1
>> giving a zero contribution to the viral for wall1). Also for the
>> individual atoms it seams the absolute position
>> is used rather than r_ij (looking at calc_vir() in calcvir.c).
>>
>> So why do the walls use the absolute z coordinate instead of
>> particle_z-wall_z and why
>> do I get an asymmetric virial for walls with different density but not
>> for the same
>> system without walls which is still asymmetric in z (some crystal
>> occupies the lower z half off the system, the upper
>> half is filled with water).
>>
>> 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.
>>
>>
>
> _______________________________________________
> 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