[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ESPResSo] Re: Radius of Gyration
[ESPResSo] Re: Radius of Gyration
Tue, 11 Dec 2007 18:47:50 +0100
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:
? 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].
> 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
> 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 gyration. 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.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> -----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 :
> ESPResSo mailing list
> End of ESPResSo Digest, Vol 7, Issue 5
- [ESPResSo] Re: Radius of Gyration,
Lorenzo Isella <=