uppittu11 / analysis

Analysis scripts for molecular dynamics simulations of stratum corneum lipid multilayers.
MIT License
0 stars 3 forks source link

Analyze each leaflet separately #55

Closed uppittu11 closed 4 years ago

uppittu11 commented 4 years ago

Since tails in different leaflets may orient themselves at slightly differing angles, we should calculate the S2 and tilt angle for each leaflet separately. This PR will use the COMs of each tail to determine the center of each leaflet and then calculate the S2 and tilt for each leaflet found.

uppittu11 commented 4 years ago

One issue is that we're not guaranteed to have the same number of lipids in each leaflet. This makes the resulting tilt angle array (which returns the tilt angle for each lipid) a jagged array, which isn't very convenient to manipulate.

A next step would be to flesh out the analysis.data module to handle the data manipulation (like calculating averages/block averages, standard deviations, etc. of properties for each leaflet) so that the user doesn't have to deal with the results.p data structure directly.

codecov[bot] commented 4 years ago

Codecov Report

Merging #55 into master will increase coverage by 0.58%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   76.77%   77.35%   +0.58%     
==========================================
  Files          11       11              
  Lines         521      530       +9     
==========================================
+ Hits          400      410      +10     
+ Misses        121      120       -1     
Impacted Files Coverage Δ
analysis/height.py 87.80% <100.00%> (+3.42%) :arrow_up:
analysis/frame.py 84.48% <0.00%> (+1.72%) :arrow_up:
uppittu11 commented 4 years ago

Here is an example of how you would load up the S2 and tilt data and get the average values per leaflet: https://gist.github.com/uppittu11/70e9d645d658befa2a8ff3ebfc8bafba

chrisiacovella commented 4 years ago

Do we want to have the code perform a layer-by-layer analysis automatically by default? I don't see any reason to have that not be the default behavior. The code also easily output a system wide average analysis at the same time.

uppittu11 commented 4 years ago

Yep, layer-by-layer is the default. You can calculate averages for each layer and overall averages since all of the data is in the results.p data structure. An example of that is in the gist I posted above.