htmd.membranebuilder.build_membrane module#

htmd.membranebuilder.build_membrane.buildMembrane(xysize, ratioupper, ratiolower, waterbuff=20, minimplatform='CPU', equilibrate=True, equilplatform='CUDA', outdir=None, lipidf=None)#

Construct a membrane containing arbitrary lipids and ratios of them.

  • xysize (list) – A list containing the size in x and y dimensions of the membrane in Angstroms

  • ratioupper (dict) – A dict with keys the molecule names and the ratio of that molecule for the upper layer

  • ratiolower (dict) – Same as ratioupper but for the lower layer

  • waterbuff (float) – The z-dimension size of the water box above and below the membrane

  • minimplatform (str) – The platform on which to run the minimization (‘CUDA’ or ‘CPU’)

  • equilibrate (bool) – If True it equilibrates the membrane

  • equilplatform (str) – The platform on which to run the equilibration (‘CUDA’ or ‘CPU’)

  • outdir (str) – A folder in which to store the psf and pdb files

  • lipidf (str) – The path to the folder containing the single-lipid PDB structures as well as the lipid DB file


mol – The resulting membrane including surrounding waters

Return type

Molecule <moleculekit.molecule.Molecule


>>> lipidratioupper = {'popc': 10, 'chl1': 1}
>>> lipidratiolower = {'popc': 8, 'chl1': 2}
>>> width = [50, 100]
>>> res = buildMembrane(width, lipidratioupper, lipidratiolower)

Lists all available lipids


>>> from htmd.membranebuilder.build_membrane import buildMembrane
>>> build_membrane.listLipids()
---- Lipids list: ...
htmd.membranebuilder.build_membrane.wrapping_dist_python(coor1, coor2, box)#