htmd.membranebuilder.build_membrane module#
- htmd.membranebuilder.build_membrane.buildMembrane(xysize, ratioupper, ratiolower, waterbuff=20, platform='CUDA', minimize=0, equilibrate=0, outdir=None, lipidf=None, forcefield_files=None, seed=None, solute=None, timestep_fs=2.0, head_z=15.0, head_restraint_k=0.0)#
Construct a membrane containing arbitrary lipids and ratios of them.
- Parameters:
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
platform (str) – OpenMM platform on which to run the minimization/equilibration (‘CUDA’, ‘OpenCL’, ‘CPU’, or ‘Reference’)
minimize (int) – If not 0 it minimizes the membrane for the given number of steps
equilibrate (float) – If not 0 it equilibrates the membrane for the given number of nanoseconds
outdir (str) – A folder in which to store the output PDB files
lipidf (str) – The path to the folder containing the single-lipid PDB structures as well as the lipid DB file
forcefield_files (list[str] or None) – OpenMM ForceField XML files used to parameterize the membrane during minimization/equilibration. Defaults to AMBER Lipid17 + TIP3P (
["amber14/lipid17.xml", "amber14/tip3p.xml"]).seed (int or None) – Seed for the numpy global RNG. If provided, the build is reproducible (lipid conformer choice, initial rotations, and the LJ-fluid Halton shuffle). The OpenMM minimization/dynamics step is not seeded here.
solute (
Moleculeor None) – Optional pre-positioned solute (typically a protein) around which the membrane is built. The solute must be aligned with bilayer center at z=0; the membrane is shifted in XY to follow the solute’s membrane-embedded COM. The user’s Molecule is not modified.timestep_fs (float) – Integrator timestep in femtoseconds for the OpenMM equilibration. Default 2.0 (compatible with
constraints=HBonds).head_z (float) – Half-bilayer head-plane Z (Angstrom). Every lipid head is placed at
+head_z(upper leaflet) or-head_z(lower) regardless of species, so a mixed bilayer starts with a flat head plane that NPT relaxes to per-species depths. Default 15.0.head_restraint_k (float) – If > 0, apply a harmonic z-restraint of strength
head_restraint_k(kJ/mol/A^2) to each lipid head atom toward its initial head plane during minimization and equilibration. Default 0.0 (no restraint).
- Returns:
mol – The resulting membrane including surrounding waters
- Return type:
Molecule <moleculekit.molecule.Molecule
Examples
>>> lipidratioupper = {'popc': 10, 'chl1': 1} >>> lipidratiolower = {'popc': 8, 'chl1': 2} >>> width = [50, 100] >>> res = buildMembrane(width, lipidratioupper, lipidratiolower)
- htmd.membranebuilder.build_membrane.listLipids()#
Lists all available lipids
Examples
>>> from htmd.membranebuilder.build_membrane import buildMembrane >>> build_membrane.listLipids() ---- Lipids list: ...
- htmd.membranebuilder.build_membrane.wrapping_dist_python(coor1, coor2, box)#