NMRLipids / NMRlipidsIVPEandPG

NMRlipids IV project, PE and PG lipids
GNU General Public License v2.0
0 stars 7 forks source link

Code to calculate P-N vector angle with respect to membrane normal #11

Closed ohsOllila closed 3 years ago

ohsOllila commented 4 years ago

Calculation of P-N vector angle with respect to membrane normal is now proposed in two issues (https://github.com/NMRLipids/NMRlipidsIVPEandPG/issues/10 and https://github.com/NMRLipids/NMRlipidsIVPEandPG/issues/9). Therefore, a easily usable code for this, preferable made by python, would be very useful.

jmelcr commented 4 years ago

Hi, such a feature is readily available in the calcOrderParameters.py script (e.g. deposited in MATCH): https://github.com/NMRLipids/MATCH/blob/master/scripts/calcOrderParameters.py

It is unfortunately not described in the script at the beginning in the simple "documentation", but you can find its entry-point to the calculations on the following line: https://github.com/jmelcr/MATCH/blob/a448e2d11a6a526ba11430e50e4df2dfd2d48c2f/scripts/calcOrderParameters.py#L217 -- i.e., if the "order parameter name" contains "vec", angle instead of an order parameter is calculated.

Example of such a definition for a P-N angle (and also other angles from ECC-lipids POPS) can be found here: https://github.com/jmelcr/ecc_lipids/blob/b457466633d55cb1306967f6971757c8a8ae329f/scripts/order_parameter_definitions_ECC-POPS_all.def#L23

Hope this solves this issue!

ohsOllila commented 3 years ago

We have now a code that goes through the databank and calculates P-N vector angles: https://github.com/NMRLipids/NMRlipidsIVPEandPG/blob/master/scripts/calcPNvectors.ipynb

I will close this issue.