help with cyllayer and cyzone selection

69 views
Skip to first unread message

yann claveau

unread,
Jul 15, 2021, 2:01:12 PM7/15/21
to MDnalysis discussion

Hello everyone,

Here is my system : water in a pore. I would like to select a cylindric layer, around the interface.

If I understant correctly
  • cylayer innerRadius externalRadius zMax zMin selection
selects a cylindric layer centered in the center of geometry of the "selection"

However, how can I specify a center which is not the COG of other species ? For instance (0,0) ?

Thanks,
Yann

yann claveau

unread,
Jul 15, 2021, 3:36:45 PM7/15/21
to MDnalysis discussion
I add something to my question:
I want to calculate the MSD. I was planning to use an "updating" selection but it is not possible with the MSD function (too bad). For that, I use unwrap coordinates in z direction. I am surprised that using

cyzone radius zmax zmin sel

with zmax and zmin = the size f the box, it actually selects the unwrap particles. (I tried first with zmin and zmax the actual zmin of zmax of my particles but MDA complains that it should be lesser or equal of the box size) It is great !
How does it work ? The selection command wraps all the particles inside the unit cell ?

Hugo Macdermott-Opeskin

unread,
Jul 26, 2021, 10:26:23 PM7/26/21
to MDnalysis discussion
Hi Yann, 

Sorry for the slow reply, for some reason I am not getting your mailing list posts to my inbox.

Yes the MSD module does not allow updating atom groups as it does not allow "ragged" arrays of positions. Personally, I am a little doubtful of the theoretical soundness of so called "ragged" or local MSDs where the particles are not tracked over the full time duration and particles leave and enter the selection at will, however I understand it is done in the literature. I have thought about adding ragged MSD but was worried about its possible misuse, as it is much easier to get a rubbish MSD with updating selections. However if there is demand, perhaps I will reconsider. It is worth discussing at least :).  

 I think what you are seeing for your selection is that the distance for `cyzone` is calculated under the minimum image convention, which means that they are within the selection radius even if not in the primary box image. 

Cheers 

Hugo 

yann claveau

unread,
Jul 27, 2021, 5:15:56 AM7/27/21
to MDnalysis discussion
Thank you for your explanation. Actually, my results are what I was expected and I have enough statistics with the way it works now, so everything is fine.
Cheers

yann claveau

unread,
Jun 8, 2022, 10:22:25 AM6/8/22
to MDnalysis discussion
I was wondering if the update selection has been planned ? I would be still interested in it.

Le mardi 27 juillet 2021 à 04:26:23 UTC+2, hugomac...@gmail.com a écrit :

Hugo Macdermott-Opeskin

unread,
Jun 8, 2022, 6:38:19 PM6/8/22
to MDnalysis discussion
Hi Yann, 

So far no plans for a ragged MSD algorithm. 
These papers provide a bit of info on how one might calculate a local diffusion coefficient if one is interested. 


Hopefully this helps. If you want to compute and MSD from a ragged array you can always implement it yourself using `ts.positions` and computing the MSD that way.
Cheers

yann claveau

unread,
Jun 9, 2022, 3:52:29 AM6/9/22
to MDnalysis discussion
thanks a lot for your answer !
Reply all
Reply to author
Forward
0 new messages