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
Metadata
Release files for lipid-plots 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lipid_plots-0.1.0.tar.gz | 12.6 kB | Without provenance | Details for lipid_plots-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lipid_plots-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for lipid_plots-0.1.0-py3-none-any.whl |
Total release size: 26.9 kB
Release files / lipid_plots-0.1.0.tar.gz
| Download URL | lipid_plots-0.1.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
215820e42da69f81ca390a57bc975c18d84ac578c4a4a3d4505e513feaeae981
|
|
BLAKE2b-256 checksum How to use checksums |
939b23447b137e73b0b776339bc51e16f592407af83ab315cd8557587899f3df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / lipid_plots-0.1.0-py3-none-any.whl
| Download URL | lipid_plots-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a837e5f7ca8ef2197579638f07fcda4856ff77980b8bbfa7e4d45686ee46b40f
|
|
BLAKE2b-256 checksum How to use checksums |
11115906298c65d7450827e7fb5048145afe68a373fcece7d2f41252f954c23d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for lipid-plots 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.