Download script: memgen-0.0.2.tar.gz

System requirements: python 2 (2.6 and higher), python openbabel library, python numpy library.

Updates in new version (2016 sep): supports multi-residual lipids, numerates lipids correctly.

If you are looking for topologies and structure files for lipids please read this post.

The memgen script makes a bilayer membrane from different phospholipids and other lipid compounds (e.g. cholesterol). Molecules are positioned according to hexagonal packing grid. Also script tries to avoid atomic overlap maximizing atom-atom distance between probing and settled lipids. Molecule suited for the script should be in the most «linear» conformation and saved in PDB format, top vertex atoms ID should be defined:

 nmol = openbabel.OBMol()
 obC.ReadFile(nmol, "dppsnew.pdb")
 mols.append( nmol )
 verts.append( 56 ) # vertex atom ID
 probs.append( 0.6 ) # proportion of the lipid in result bilayer

Also initial values for lipid grid and Bilayer structure can be set up:

n = 9 # x (direct axis) lipid number
 m = 10 # y (skewed axis) lipid number
 step = 7.7 # lipid-lipid distance in monolayer
 zdist = 30.0 # lipid-lipid distance between monolayers
 outfile = "60s.pdb" # output file name
 numconformers = 0 # number of conformers (slightly differs from origin in atom positions) for probe
 angle_confs = 10 # number of angles to probe (angle around Z axis, longest axis of the molecule)
 grid = 'hexagonal' # type of grid; now only 'hexagonal' is supported

Periodic boundaries should be set after script finished its work. You can set (step*n) for x-box and (step*m*sin(pi/3)) for y-box. In the archive you can find 3 lipid structure files: DPPS, DPPC and cholesterol and GROMACS topologies for each lipid in OPLS-AA forcefield. Of course, you can feed to script any of your own molecules. You can view an example of script work in the figure.

20% DPPS 80% DPPC mixture membrane

You can try command-line operated version of this script: memgen.py.

If you shall use our script or topologies, please cite the following work:

Nesterenko A.M., Ermakov Yu. A. Molecular-dynamic simulation of phospholipid bilayers: Ion distribution at the surface of neutral and charged bilayer in the liquid crystalline state. Biochemistry (Moscow) Supplement Series A: Membrane and Cell Biology. 2013, 6 (4), 320-328. doi: 10.1134/S1990747812050145