Membrane thickness 2D grid issues #142
-
Hi, My membrane is a symmetric bilayer comprising only LPS ("RAMP"), 64 per leaflet. The phosphate atoms in RAMP are P, P1 and P2 (one of each per RAMP molecule). I can assign lipids to leaflets (and have checked that this has worked correctly), and I can calculate the thickness using the default method that provides a single value per frame (which I have checked against rough measurements). However, when I run the membrane thickness calculation using the setup below (technically I probably don't need to interpolate, I was just trying everything in case it helped!), I still just get one thickness value per frame. I cannot figure out how to access the surface I have asked for, which I'm guessing is how you access the 2D grid of membrane thickness values. memb_thickness = MembThickness( I've read all the documentation and online interactive tutorials and googled extensively but I cannot find anything about how to access the output of the membrane thickness calculation other than memb_thickness.memb_thickness, which even with the code above, remains a 1D array of length equal to the number of frames. I saw in the tutorial example for making 2D colour maps that membrane thickness data from FatSlim was used rather than data calculated using LiPyPhilic. I considered switching to FatSlim for this one calculation, but it is no longer being maintained and the pip3 installation doesn't work and I don't really want to have to trouble-shoot the installation given LiPyPhilic says it can calculate what I want. Any help on accessing the 2D (in the xy plane) membrane thickness grid would be greatly appreciated! Jane |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @janerallison, good to hear you're finding LiPyphilic useful! The 2D grid will be stored in As you mentioned the transformations, if you're using the nojump transformation I would recommend using the new MDAnalysis nojump transformation instead (as I will remove the one in LiPyphilic in a later release). And I would avoid using the triclinic-to-orthorhombic transformation due to issues with the transformation - I'm sorry if this impacts your current work. And thanks again for pointing out the missing documentation. |
Beta Was this translation helpful? Give feedback.
-
Thanks so much! Just did a quick test and accessing the data that way works for me :-) And thanks for the heads up re the transformation - I'm just using the center_membrane transformation, but will add a note to my code to switch to MDAnalysis if we ever use anything else. |
Beta Was this translation helpful? Give feedback.
-
I have another question sorry! In the self.memb_thickness_grid, how are the data arranged: that is, how do the array dimensions correspond to the membrane dimensions? Generally, for an array of shape (M, N), the first index runs along the vertical, the second index runs along the horizontal (quoted directly from the Python matplotlib imshow documentation). But because the grid for membrane thickness analysis is by default of size M=N=n_bins, I cannot tell from the membrane thickness grid size whether M corresponds to the x- or y-axis of the membrane (ditto for N) and I would like to be certain about this so I can correctly label the 2D plot of membrane thickness (which I'm doing using matplotlib so it is comparable to my other plots, and, if I'm honest, because I'm having issues with the plotting functionality in LiPyPhilic). As an aside, it would be great to be able to select different bin numbers (or bin sizes) for each axis, because a membrane isn't necessarily square (the one I'm working with is close to square but not quite). Apologies if I've missed this somewhere in the documentation. Jane |
Beta Was this translation helpful? Give feedback.
Hi @janerallison, good to hear you're finding LiPyphilic useful! The 2D grid will be stored in
self.memb_thickness_grid
. Thank you for pointing out that this is not documented - I'll raise an issue to add it to the documentation.As you mentioned the transformations, if you're using the nojump transformation I would recommend using the new MDAnalysis nojump transformation instead (as I will remove the one in LiPyphilic in a later release). And I would avoid using the triclinic-to-orthorhombic transformation due to issues with the transformation - I'm sorry if this impacts your current work. And thanks again for pointing out the missing documentation.