[gmx-developers] pbc and virial problem

hessb at mpip-mainz.mpg.de hessb at mpip-mainz.mpg.de
Mon Apr 6 21:47:15 CEST 2009


Hi,

What you are saying seems a bit contradictory.
Do I understand it correctly that you only add something
to the z component of the force (and not to the shift force)
and then the components of the shift forces change, which
affect only the xx and yy components of the virial?
That seems very strange.
This almost must mean that somehow the position of atoms
along x and y changes due to your extra force.

For your force you have taken care of the correction that was missing
in the wall potentials that caused the asymmetry?

Berk

> Hi,
>
> I've added a force similar to the walls. Now I'm trying to calculate
> surface tensions using this new correction via the virial.
> We used to do these calculations with pbc=xyz with an older gromacs
> version so I'm trying to do the same in order to be able compare the
> results before going to pbc=xy.
>
> The problem is that I get non sense for the virial xx and yy components.
> To figure out why, I compared the averaged virials for the same sim with
> and without the new correction.
>
> The virial contribution from the non-shifted particles is pretty much
> identical but the virial from the shifted
> particles:
>   (calc_virial in sim_util.c):
>   clear_mat(vir_part);
>
> calc_vir(fplog,SHIFTS,fr->shift_vec,fr->fshift,vir_part,ePBC==epbcSCREW,box);
>   inc_nrnb(nrnb,eNR_VIRIAL,SHIFTS);
>
> differs by almost exactly the amount which I'd expect.
>
> The correction I apply only adds forces in z direction and the
> simulation is setup such that no pbc in z is applied because of the cut
> off (there is a water slab of ca. 6 nm thickness in the middle of the
> box (z direction) surrounded by ca. 3 nm of nothing in both z
> directions). Debugging through the code I can see that no images for
> z!=0 are created.
> The correction force is quite small compared to the forces applied by
> gromacs non_bonded
> (correction: avrg. force=0.03, max. force=8.0, gromacs: avrg.:456.0 ,
> max.: 4831.0).
>
> The force is calculated just after the walls right before do_nonbonded.
>
> Finally, the question:
> Any ideas how the small additional force in z direction can have such a
> strong effect on the virial xx and yy components
> (apparently fshifted[XX] and fshifted[YY] are influenced significantly
> whereas the virial ZZ value remains virtually identical
> no matter if the correction is applied or not, as fshifted[ZZ]==0 in
> both cases).
>
> 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