Skip to main content

MD analysis tools for lipid membrane geometry: packing defects, depth-disorder, tilt-torsion.

Project description

lipid-plots

A Python package for analysing lipid membrane geometry from MD simulations using MDAnalysis.

Three complementary analyses in one package:

Command Analysis X-axis Y-axis
lipid-packing Packing defects Voronoi area per lipid (Ų) Chain splay angle (°)
lipid-disorder Depth–disorder Z-depth relative to centre (Å) Tail order parameter SCC
lipid-torsion Tilt–torsion Headgroup α-torsion (°) P-N vector tilt (°)

Install

pip install lipid-plots

Or from source:

git clone https://github.com/karagol-alper/lipid-plots
cd lipid-plots
pip install -e .

CLI — quick reference

Packing defects (Voronoi area vs. splay angle)

# Single structure file only (no trajectory):
lipid-packing -t system.gro

# With trajectory — default step=1 analyses every frame (recommended):
lipid-packing -t system.tpr -x traj.xtc

# --step N only for sub-sampling very long trajectories (trades accuracy for speed):
lipid-packing -t system.tpr -x traj.xtc --step 5   # every 5th frame only

# Custom lipid / chain atom names:
lipid-packing -t system.gro -x traj.xtc \
    --resname DPPC \
    --chain1-start C22 --chain1-end C29 \
    --chain2-start C32 --chain2-end C39 \
    --leaflet-z 0 \
    --output dppc_packing.png

Depth–disorder (Z-position vs. SCC)

lipid-disorder -t system.gro
lipid-disorder -t system.gro -x traj.xtc --resname POPC -o disorder.png

# Custom tail atom list:
lipid-disorder -t system.gro \
    --tail-atoms C22,C23,C24,C25,C26,C27,C28,C29,C210,C211,C212,C213,C214,C215,C216

Tilt–torsion map

lipid-torsion -t system.gro
lipid-torsion -t system.tpr -x fixed.trr -o tilt_torsion.png

# Custom dihedral atoms:
lipid-torsion -t system.gro --torsion-atoms O12,P,O13,C11

Umbrella command (all three via one entry point)

lipid-plots packing  -t system.gro -x traj.xtc --step 5
lipid-plots disorder -t system.gro
lipid-plots torsion  -t system.gro -x traj.xtc --step 5
lipid-plots --help

Python API

from lipid_plots.utils import load_universe
from lipid_plots import (
    analyze_packing_defects, plot_packing_defect,
    calculate_depth_disorder, plot_depth_disorder,
    get_torsion_and_tilt, plot_tilt_torsion,
)

# Trajectory is optional — omit for single-frame analysis
u = load_universe("system.gro")                  # single frame
u = load_universe("system.tpr", "traj.xtc")     # with trajectory

# --- Packing defects ---
areas, splays = analyze_packing_defects(u, step=5)
plot_packing_defect(areas, splays, output="packing.png")

# --- Depth–disorder ---
depths, orders = calculate_depth_disorder(u)
plot_depth_disorder(depths, orders, output="disorder.png")

# --- Tilt–torsion ---
torsions, tilts = get_torsion_and_tilt(u)
plot_tilt_torsion(torsions, tilts, output="tilt_torsion.png")

Supported input formats

The --topology and --trajectory arguments accept any format supported by MDAnalysis:

Type Common formats
Topology .tpr, .gro, .pdb, .psf, .mol2
Trajectory .trr, .xtc, .dcd, .nc, .lammpstrj

The trajectory (-x) is always optional. If omitted, only the single frame in the topology is analysed.


Configuration

All atom names, residue names, and chain definitions can be overridden via CLI flags or keyword arguments in the Python API. The defaults follow CHARMM36 / GROMACS POPC nomenclature.


License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lipid_plots-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lipid_plots-0.1.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file lipid_plots-0.1.0.tar.gz.

File metadata

  • Download URL: lipid_plots-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for lipid_plots-0.1.0.tar.gz
Algorithm Hash digest
SHA256 215820e42da69f81ca390a57bc975c18d84ac578c4a4a3d4505e513feaeae981
MD5 8184010392ddf6331f69711a91de72fd
BLAKE2b-256 939b23447b137e73b0b776339bc51e16f592407af83ab315cd8557587899f3df

See more details on using hashes here.

File details

Details for the file lipid_plots-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lipid_plots-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for lipid_plots-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a837e5f7ca8ef2197579638f07fcda4856ff77980b8bbfa7e4d45686ee46b40f
MD5 3d6980b3f231e6002b38ecb3347dab85
BLAKE2b-256 11115906298c65d7450827e7fb5048145afe68a373fcece7d2f41252f954c23d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page