[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ESPResSo] Re: Radius of Gyration
Limbach, Hans Joerg, LAUSANNE, NRC-FS
RE: [ESPResSo] Re: Radius of Gyration
Wed, 12 Dec 2007 09:15:17 +0100
1 Espresso is a molecular DYNAMICS program, that's one of the reasons it gives
back the real coordinate (and not the folded one) by default. This is important
for example when you want to calculate a mean square displacement.
2 The rg has been implemented for polymers (e.g. all particles are connected by
bonds). Also here for a correct calculation you need the unfolded coordinates.
3 FYI: As far as I remember the primary simulation box is defined by the
corners (0,0,0) (L,L,L) and is not centered at (0,0,0). This is an arbitrary
convention. So you would have to change your rules accordingly.
4 For your case I have the impression that the standard periodic boundaries are
not appropriate. One option would be to confine everything in a box (either
spherical or with help of wall constraints). The other option, which can be
used with periodic boundaries, is to write a routine to calculate rg where the
minimal image distance (see scripts/ABHmath.tcl: bond_length_min) is used
rather than the physical distance. With your rules you would still get strange
results as soon a cluster is on the edge of the box.
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf Of
> Lorenzo Isella
> Sent: mardi, 11. décembre 2007 18:48
> To: Olaf Lenz
> Cc: address@hidden
> Subject: [ESPResSo] Re: Radius of Gyration
> I am a bit surprised to have started this discussion.
> I am convinced that Espresso can handle properly periodic
> boundary conditions, but I do not understand why it does not
> return by default particle positions as lying inside the box.
> I mean, if my box stretches along [-10,10] in x, y, z, why
> should it return e.g. x=-18?
> I read somewhere that it is important that the code
> internally stores this info amounting to how many times a
> particle crossed the boundary, but probably it is not what it
> should be returned by default, or is there a reason I cannot
> see right now?
> However, as a temporary workaround, I think I can "fold" the
> coordinates returned by Espresso back into the original box
> after saving the configurations, but there are a few details
> that I need to know, so apologies if the following is rather tedious.
> Say that in 1D, the box stretches along [-10,10] then am I
> right to establish these correspondences between particles
> positions returned by Espresso and their position in the box, e.g:
> 11----> -9
> 20----> 0
> 31----> -9
> and similarly:
> ? If so, for a general box [-L,L] this is how I would
> re-conduct a general x position into the box (4 cases overall):
> (1) if x> L and mod(x/2L)<L then x=mod(x/L) (2)if x> L and
> mod(x/2L)>=L then x=mod(x/L)-L (3)if x< - L and mod(x/(-2L))<
-L then x=mod(x/(-L))+L (4)if x< - L and mod(x/(-2L))>= -L then > x=mod(x/(-L))
> This is what I implemented in some code of mine to
> post-process the data stored in Expresso configurations, but
> I cannot see why it would not be doable in Espresso at a TCL level.
> As to the suggestions 1 and 2 put forward in the email I am
> replying to, I would like to have more details if possible at
> some stage [my attempts to follow those pieces of advice
> failed miserably, and I am positive the problem is on my side].
> Many thanks
> > Date: Mon, 10 Dec 2007 09:07:09 +0100
> > From: Olaf Lenz <address@hidden>
> > Subject: Re: [ESPResSo] Re: Radius of Gyration
> > To: address@hidden
> > Cc: address@hidden
> > Message-ID: <address@hidden>
> > Content-Type: text/plain; charset="iso-8859-1"
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > Hi!
> > Axel Arnold wrote:
> > > Apart from that, calculating a meaningful radius of gyration is
> > > non-trivial in your case. You cannot simply use the folded
> > > coordinates to calculate the rg, because your cluster
> could also be
> > > located across a boundary. With folded coordinates, that
> would look like two smaller clusters at the box boundaries.
> > I don't think that the problem is that hard. I see at least three
> > possible ways to solve the problem with not too much effort: on the
> > VMD level, on the ESPResSo level, or a combination using both.
> > 1. Within VMD, you can use the pbctools plugin (which is
> part of VMD
> > since 1.8.6). Using the plugin, you can easily wrap all coordinates
> > into a unit cell which is centered around a particle (index
> 13 in this case):
> > pbc wrap -sel "index 13"
> > If the compound does not stretch more than half the system
> size, this
> > will solve your problem.
> > When you have done that, you need to compute the radius of
> > To do that, you can either implement it within VMD
> (shouldn't be too
> > hard), or you can try to somehow write the coordinates to a
> file, read
> > them into ESPResSo and use it to compute the radius of gyration.
> > 2. Alternatively, you can do the wrapping within ESPResSo
> and directly
> > use the analyze-command to compute the radius of gyration. To
> > implement the wrapping, you can try to go along the lines of the
> > "pbcwrap" command in the file "pbcwrap.tcl" in the attached
> plugin archive.
> > I think it would be pretty useful, if we had a Tcl proc
> that does the
> > wrapping in ESPResSo, therefore: if you implement it in ESPResSo,
> > please send us the resulting code that we can include it!
> > After December 15th, I would be willing to help.
> > Olaf
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.6 (GNU/Linux)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> > iD8DBQFHXPOttQ3riQ3oo/oRAgt7AJ4qyWziHn2jj3jPOrAXVjw7Ov8Y8ACgiTwd
> > 4vMZpKavWza8ZkPqiSjeZ2k=
> > =Uty3
> > -----END PGP SIGNATURE-----
> > -------------- next part -------------- A non-text attachment was
> > scrubbed...
> > Name: pbctools-2.1.tar.gz
> > Type: application/x-gzip
> > Size: 19088 bytes
> > Desc: not available
> > Url :
> > 210/eea3aaec/pbctools-2.1.tar.bin
> > ------------------------------
> > _______________________________________________
> > ESPResSo mailing list
> > address@hidden
> > https://fias.uni-frankfurt.de/mailman/listinfo/espresso
> > End of ESPResSo Digest, Vol 7, Issue 5
> > **************************************
> ESPResSo mailing list