3.3.2. Leaflet identification — MDAnalysis.analysis.leaflet

Author:Oliver Beckstein
Year:2010
Copyright:GNU Public License v3
Algorithm:
  1. build a graph of all phosphate distances < cutoff
  2. identify the largest connected subgraphs
  3. analyse first and second largest graph, which correspond to the leaflets

One can use this information to identify

  • the upper and lower leaflet of a planar membrane by comparing the the center_of_geometry() of the leaflet groups, or
  • the outer and inner leaflet of a vesicle by comparing histograms of distances from the centre of geometry (or possibly simply the radius_of_gyration()).

See example scripts in the examples/ directory on how to use LeafletFinder. The function optimize_cutoff() implements a (slow) heuristic method to find the best cut off for the LeafletFinder algorithm.

class MDAnalysis.analysis.leaflet.LeafletFinder(universe, selectionstring, cutoff=15.0, pbc=False, sparse=None)[source]

Identify atoms in the same leaflet of a lipid bilayer.

The components of the graph are stored in the list LeafletFinder.components; the atoms in each component are numbered consecutively, starting at 0. To obtain the atoms in the input structure use LeafletFinder.groups():

L = LeafletFinder(PDB, 'name P*')
leaflet0 = L.groups(0)
leaflet1 = L.groups(1)

The residues can be accessed through the standard MDAnalysis mechanism:

leaflet0.residues

provides a ResidueGroup instance. Similarly, all atoms in the first leaflet are then

leaflet0.residues.atoms

Initialize from a universe or pdb file.

Parameters:
  • *universe*MDAnalysis.Universe or a PDB file name.
  • *selection*MDAnalysis.core.AtomGroup.AtomGroup or a MDAnalysis.Universe.select_atoms() selection string for atoms that define the lipid head groups, e.g. universe.atoms.PO4 or “name PO4” or “name P*”
Keywords:
cutoff

head group-defining atoms within a distance of cutoff Angstroms are deemed to be in the same leaflet [15.0]

pbc

take periodic boundary conditions into account (only works for orthorhombic boxes) [False]

sparse

None: use fastest possible routine; True: use slow sparse matrix implementation (for large systems); False: use fast distance_array() implementation [None].

group(component_index)[source]

Return a MDAnalysis.core.AtomGroup.AtomGroup for component_index.

groups(component_index=None)[source]

Return a MDAnalysis.core.AtomGroup.AtomGroup for component_index.

If no argument is supplied, then a list of all leaflet groups is returned.

groups_iter()[source]

Iterator over all leaflet groups()

sizes()[source]

Dict of component index with size of component.

update(cutoff=None)[source]

Update components, possibly with a different cutoff

write_selection(filename, **kwargs)[source]

Write selections for the leaflets to filename.

The format is typically determined by the extension of filename (e.g. “vmd”, “pml”, or “ndx” for VMD, PyMol, or Gromacs).

See MDAnalysis.selections.base.SelectionWriter for all options.

MDAnalysis.analysis.leaflet.optimize_cutoff(universe, selection, dmin=10.0, dmax=20.0, step=0.5, max_imbalance=0.2, **kwargs)[source]

Find cutoff that minimizes number of disconnected groups.

Applies heuristics to find best groups:

  1. at least two groups (assumes that there are at least 2 leaflets)

  2. reject any solutions for which:

    |N0 - N1|/|N0 + N1| > *max_imbalance*

    Ni = number of lipids in group i. This heuristic picks groups with balanced numbers of lipids.

Parameters:
  • *universe*MDAnalysis.Universe instance
  • *selection* – selection string as used for LeafletFinder
  • dmax, step (*dmin*,) – scan cutoffs from dmin to dmax at stepsize*step (in Angstroms)
  • *max_imbalance* – tuning parameter for the balancing heuristic (2) [0.2]
  • *kwargs* – other arguments for LeafletFinder
Returns:

(cutoff,N) optimum cutoff and number of groups found

Raises:

can die in various ways if really no appropriate number of groups can be found; needs to be made more robust