Membrane Builder
- class MembraneBuilderProject(client=None)
Bases:
BaseProjectA class for creating and manipulating membrane builder projects.
This class extends BaseProject and provides methods for various stages of membrane building, including project creation, protein alignment, lipid packing, and system generation.
- align_membrane_protein(option={}, options=[], interSpace=22.5)
Align the membrane protein within the project.
- Parameters:
option (dict, optional) – The alignment option to use in non-double bilayer cases. Defaults to {}.
options (list[dict], optional) – The alignment options to use in double bilayer cases. Defaults to [].
interSpace (float, optional) – Intermembrane water distance for double bilayer. Defaults to 22.5.
- Returns:
True if alignment was successful, False otherwise.
- Return type:
bool
Example
mbuilder.align_membrane_protein(option={“align”: “ppm”})
- create_project(title, ff='charmmff', membrane_type=MembraneType.BILAYER, pdbreader_project_id=None, amberOptions=None)
Create a new membrane builder project.
- Parameters:
title (str) – The title of the new project.
ff (str) – Project force field type (charmmff, amberff, martiniff, drudeff).
membrane_type (MembraneType) – Membrane type.
pdbreader_project_id (str | list[str]) – The ID(s) of the associated PDBreader project(s).
amberOptions (dict[str, str], optional) – AMBER force field options when ff=’amberff’. Defaults to None.
- Returns:
True if project creation was successful, False otherwise.
- Return type:
bool
Example
mbuilder.create_project(title=”my_membrane_project”, pdbreader_project_id=pdbreader_project_id)
- download_dummy(filename='dummy.pdb')
Download the dummy PDB file.
- Parameters:
filename (str) – Name of the file to save the dummy PDB as. Defaults to ‘dummy.pdb’.
- Returns:
None
- download_packing(filename='packing.pdb')
Download the lipid packing PDB file.
- Parameters:
filename (str) – Name of the file to save the packing PDB as. Defaults to ‘packing.pdb’.
- Returns:
None
- download_project(filename='membrane.tar.gz')
Download the entire project as a compressed file.
- Parameters:
filename (str) – Name of the file to save the project as. Defaults to ‘membrane.tar.gz’.
- Returns:
None
- download_system(filename='system.pdb')
Download the complete system PDB file.
- Parameters:
filename (str) – Name of the file to save the system PDB as. Defaults to ‘system.pdb’.
- Returns:
None
- generate_lipid_packing(lipids, box_margin, composition_option='ratio', fill_space=True, tight_packing=True, tight_packing_scale=0.8, useInterHydration=False, inter_hydration=10, interSpace=22.5, nanodisc=None)
Generate lipid packing for the membrane.
- Parameters:
lipids (list) – List of lipid components to use.
box_margin (dict or any) – Margin parameters for the simulation box; either a dictionary or value depending on membrane type.
composition_option (str, optional) – Option for lipid composition, e.g., “ratio”. Defaults to “ratio”.
fill_space (bool, optional) – Whether to fill available space with lipids. Defaults to True.
tight_packing (bool, optional) – Whether to use tight packing for lipids. Defaults to True.
tight_packing_scale (float, optional) – Scaling factor for tight packing. Defaults to 0.8.
useInterHydration (bool, optional) – Used only for Double Bilayer membrane-only systems; enables inner hydration-number mode. Defaults to False.
inter_hydration (float, optional) – Used only for Double Bilayer membrane-only systems when useInterHydration=True; inner hydration number per lipid. Defaults to 10.
interSpace (float, optional) – Used only for Double Bilayer membrane-only systems; inner water margin in Angstrom. Defaults to 22.5.
nanodisc (MSP, optional) – MSP type for Nanodisc membrane. Defaults to None.
- Returns:
True if lipid packing generation was successful, False otherwise.
- Return type:
bool
Example
mbuilder.generate_lipid_packing(lipids, box_margin)
- generate_system(waterMargin=22.5, useHydration=False, hydration_number=50, ions='kcl', ionConc=0.15, useHmr=False, temperature=310.0, mdEngines=['openmm'], interIons='kcl', interIonConc=0.15, lipaIons='CAL', coreIons='CAL')
Generate the complete membrane system.
- Parameters:
waterMargin (float, optional) – Water margin of membrane system. Defaults to 22.5.
useHydration (bool, optional) – Whether to use hydration number mode. Defaults to False.
hydration_number (int, optional) – Number of waters per lipid when hydration mode is enabled. Defaults to 50.
ions (str, optional) – Type of ions to use. Defaults to “kcl”.
ionConc (float, optional) – Ion concentration. Defaults to 0.15.
useHmr (bool, optional) – Whether to use hydrogen mass repartitioning. Defaults to False.
temperature (float, optional) – Temperature in Kelvin. Defaults to 310.0.
mdEngines (list[str], optional) – Molecular dynamics engines. Defaults to [‘openmm’].
interIons (str, optional) – Ion type for intermembrane space (double bilayer). Defaults to “kcl”.
interIonConc (float, optional) – Ion concentration for intermembrane space. Defaults to 0.15.
lipaIons (str, optional) – LPS lipid A counter ion type. Defaults to “CAL”.
coreIons (str, optional) – LPS core counter ion type. Defaults to “CAL”.
- Returns:
True if system generation was successful, False otherwise.
- Return type:
bool
Example
mbuilder.generate_system(ions=’kcl’, mdEngines=[‘openmm’, ‘gromacs’])
- get_msp_types()
Print available MSP types for nanodisc membrane packing.
- Parameters:
None
- Returns:
None
- get_packing_data_form(composition_option='ratio')
Return template inputs for lipid packing.
- Parameters:
composition_option (str) – ratio or number.
- Returns:
Lipid template list and box-margin template.
- Return type:
tuple[list[dict], dict]
- replace_packing()
Replace the current lipid packing.
- Returns:
True if packing replacement was successful, False otherwise.
- Return type:
bool
Schemata
molcube.membrane_builder.conf
molcube.membrane_builder.enum
- class GLIP_GROUP(*values)
Bases:
StrEnum- GALACTOCEREBROSIDES = 'Galactocerebrosides'
- GANGLIO_SERIES = 'Ganglio-series'
- GLOBO_SERIES = 'Globo-series'
- GLUCOCEREBROSIDES = 'Glucocerebrosides'
- GLYCOGLYCEROLIPIDS = 'Glycoglycerolipids'
- GLYCOPHOSPHATIDYLINOSITOLS = 'Glycophosphatidylinositols'
- ISO_GLOBO_SERIES = 'Iso-globo-series'
- LACTO_SERIES = 'Lacto-series'
- NEO_LACTO_SERIES = 'Neo-lacto-series'
- SULFOGLYCOLIPIDS = 'Sulfoglycolipids'
- class GLIP_SUBGROUP(*values)
Bases:
StrEnum- A_SERIES = 'a-series'
- B_SERIES = 'b-series'
- C_SERIES = 'c-series'
- OTHERS = 'others'
- ZERO_SERIES = '0-series'
- class GLIP_TAIL(*values)
Bases:
StrEnum- CER160 = 'CER160'
- CER180 = 'CER180'
- CER181 = 'CER181'
- CER200 = 'CER200'
- CER220 = 'CER220'
- CER240 = 'CER240'
- CER241 = 'CER241'
- CER3E = 'CER3E'
- DAG_DA = 'DAG-DA'
- DAG_DE = 'DAG-DE'
- DAG_DG = 'DAG-DG'
- DAG_DI = 'DAG-DI'
- DAG_DL = 'DAG-DL'
- DAG_DM = 'DAG-DM'
- DAG_DN = 'DAG-DN'
- DAG_DO = 'DAG-DO'
- DAG_DP = 'DAG-DP'
- DAG_DS = 'DAG-DS'
- DAG_DT = 'DAG-DT'
- DAG_DY = 'DAG-DY'
- DAG_LL = 'DAG-LL'
- DAG_PA = 'DAG-PA'
- DAG_PL = 'DAG-PL'
- DAG_PLE = 'DAG-PLE'
- DAG_PO = 'DAG-PO'
- DAG_PS = 'DAG-PS'
- DAG_SA = 'DAG-SA'
- DAG_SD = 'DAG-SD'
- DAG_SL = 'DAG-SL'
- DAG_SO = 'DAG-SO'
- DAG_TI = 'DAG-TI'
- DAG_YO = 'DAG-YO'
- PI_CER160 = 'PI-CER160'
- PI_CER180 = 'PI-CER180'
- PI_CER181 = 'PI-CER181'
- PI_CER200 = 'PI-CER200'
- PI_CER220 = 'PI-CER220'
- PI_CER240 = 'PI-CER240'
- PI_CER241 = 'PI-CER241'
- PI_CER3E = 'PI-CER3E'
- PI_DAG_DA = 'PI-DAG-DA'
- PI_DAG_DE = 'PI-DAG-DE'
- PI_DAG_DG = 'PI-DAG-DG'
- PI_DAG_DI = 'PI-DAG-DI'
- PI_DAG_DL = 'PI-DAG-DL'
- PI_DAG_DM = 'PI-DAG-DM'
- PI_DAG_DN = 'PI-DAG-DN'
- PI_DAG_DO = 'PI-DAG-DO'
- PI_DAG_DP = 'PI-DAG-DP'
- PI_DAG_DS = 'PI-DAG-DS'
- PI_DAG_DT = 'PI-DAG-DT'
- PI_DAG_DY = 'PI-DAG-DY'
- PI_DAG_LL = 'PI-DAG-LL'
- PI_DAG_PA = 'PI-DAG-PA'
- PI_DAG_PL = 'PI-DAG-PL'
- PI_DAG_PLE = 'PI-DAG-PLE'
- PI_DAG_PO = 'PI-DAG-PO'
- PI_DAG_PS = 'PI-DAG-PS'
- PI_DAG_SA = 'PI-DAG-SA'
- PI_DAG_SD = 'PI-DAG-SD'
- PI_DAG_SL = 'PI-DAG-SL'
- PI_DAG_SO = 'PI-DAG-SO'
- PI_DAG_TI = 'PI-DAG-TI'
- PI_DAG_YO = 'PI-DAG-YO'
- class LIPID_TYPE(*values)
Bases:
StrEnum- COMBI = 'lip'
- GLYCOLIPID = 'glycolipid'
- LPS = 'lps'
- PEGL = 'pegl'
- STANDARD = 'standard'
- class LPS(*values)
Bases:
StrEnum- ACINETOBACTER_BAUMANNII = 'ab'
- ACYLATED_PHOSPHATIDYLINOSITOL_DIMANNOSIDES_ACPIM2 = 'pim'
- BURKHOLDERIA_CEPACIA = 'bc'
- CAMPYLOBACTER_JEJUNI = 'cj'
- CHLAMYDIA_TRACHOMATIS = 'ct'
- ESCHERICHIA_COLI = 'ec'
- HELICOBACTER_PYLORI = 'hp'
- KLEBSIELLA_PNEUMONIA = 'kp'
- MORAXELLA_CATARRHALIS = 'mc'
- NEISSERIA_GONORRHOEAE = 'ng'
- NEISSERIA_MENINGITIDIS = 'nm'
- PSEUDOMONAS_AERUGINOSA = 'pa'
- SALMONELLA_ENTERICA = 'se'
- SHIGELLA_FLEXNERI = 'sf'
- VIBRIO_CHOLERAE = 'vc'
- YERSINIA_PESTIS = 'yp'
- class MSP(*values)
Bases:
StrEnum- CNW11 = 'CNW11'
- CNW9 = 'CNW9'
- MSP1 = 'MSP1'
- MSP1D1 = 'MSP1D1'
- MSP1D122 = 'MSP1D122'
- MSP1D133 = 'MSP1D133'
- MSP1D144 = 'MSP1D144'
- MSP1D1Dh5 = 'MSP1D1Dh5'
- MSP1E1D1 = 'MSP1E1D1'
- MSP1E2D1 = 'MSP1E2D1'
- MSP1E3D1 = 'MSP1E3D1'
- MSP2N2 = 'MSP2N2'