pestifer.molecule.bilayer module¶
A module for handling bilayer structures in molecular simulations.
- class pestifer.molecule.bilayer.Bilayer(composition_dict: dict = {}, leaflet_nlipids: dict[str, int] = {'lower': 100, 'upper': 100}, solvent_to_key_lipid_ratio: float = 32.0, neutralizing_salt: list[str] = ['POT', 'CLA'], salt_concentration: float = 0.0, solution_gcc: float = 1.0, charmmffcontent: CHARMMFFContent = None, solvent_specstring: str = 'TIP3', solvent_ratio_specstring: str = '1.0')[source]¶
Bases:
objectA class for handling bilayer structures in molecular simulations. This class represents a bilayer composed of lipids and solvent, with specifications for each leaflet and chamber.
- Parameters:
composition_dict (dict, optional) – A dictionary containing the composition of the bilayer, including leaflets and chambers.
leaflet_nlipids (dict, optional) – A dictionary specifying the number of lipids per leaflet in a patch. Default is {‘upper’: 100, ‘lower’: 100}.
solvent_to_key_lipid_ratio (float, optional) – The ratio of solvent molecules to key lipid molecules in the bilayer. Default is 32.0.
neutralizing_salt (list, optional) – A list containing the names of the cation and anion used for neutralizing the bilayer. Default is [‘POT’, ‘CLA’].
salt_concentration (float, optional) – The concentration of salt in the bilayer solution, in molarity (M). Default is 0.0.
solution_gcc (float, optional) – The density of the solution in grams per cubic centimeter (gcc). Default is 1.0.
charmmffcontent (CHARMMFFContent object) – The CHARMM force field content object that allows access to PDB structures and RESI/PATCH information.
solvent_specstring (str, optional) – The specification string for the solvent in the bilayer. Default is ‘TIP3’.
solvent_ratio_specstring (str, optional) – The mole-fraction specification string for the solvent. Default is ‘1.0’.
- spec_out(SAPL=75.0, xy_aspect_ratio=1.0, half_mid_zgap=1.0, solution_gcc=1.0, rotation_pm=10.0)[source]¶
Specs out a patch of the bilayer with specified parameters.
- Parameters:
SAPL (float, optional) – The surface area per lipid in Ų. Default is 75.0.
xy_aspect_ratio (float, optional) – The aspect ratio of the patch in the x and y dimensions. Default is 1.0.
half_mid_zgap (float, optional) – The half mid-plane gap in Å. Default is 1.0 Å.
solution_gcc (float, optional) – The density of the solution in grams per cubic centimeter (gcc). Default is 1.0.
rotation_pm (float, optional) – The rotation angle in degrees for the patch. Default is 10.0 degrees.
- write_packmol(pm: PackmolScripter, half_mid_zgap=2.0, rotation_pm=0.0, nloop=100)[source]¶
Writes the packmol input for the bilayer patch to the provided Packmol object.
- Parameters:
pm (Packmol) – The Packmol ScriptWriter object to which the bilayer patch specifications will be written.
half_mid_zgap (float, optional) – The half mid-plane gap in Å. Default is 2.0 Å.
rotation_pm (float, optional) – The rotation angle in degrees for the patch. Default is 0.0 degrees.
nloop (int, optional) – The number of loops for packing the bilayer. Default is 100.
- class pestifer.molecule.bilayer.BilayerSpecString(specstring='', fracstring='', leaflet_delimiter='//', species_delimiter=':')[source]¶
Bases:
objectA class for handling bilayer specification strings in memgen format. The specification string is a string that describes the composition of the bilayer in terms of species and their fractions.
- Parameters:
specstring (str, optional) – The packmol-memgen-format specification string for the bilayer.
fracstring (str, optional) – The mole-fraction specification string for the bilayer.
leaflet_delimiter (str, optional) – The delimiter used to separate the left and right leaflets in the specification string.
species_delimiter (str, optional) – The delimiter used to separate species in the specification string.
- pestifer.molecule.bilayer.orthohexagonal_cell(a: float, L_star: float, origin: tuple[float, float] = (0.0, 0.0))[source]¶
- pestifer.molecule.bilayer.specstrings_builddict(lipid_specstring='', lipid_ratio_specstring='', lipid_conformers_specstring='0', solvent_specstring='TIP3', solvent_ratio_specstring='')[source]¶
Builds a dictionary of bilayer specifications from the provided specification strings.
- Parameters:
lipid_specstring (str, optional) – The specification string for the lipid bilayer.
lipid_ratio_specstring (str, optional) – The mole-fraction specification string for the lipid bilayer.
lipid_conformers_specstring (str, optional) – The conformer specification string for the lipid bilayer.
solvent_specstring (str, optional) – The specification string for the solvent.
solvent_ratio_specstring (str, optional) – The mole-fraction specification string for the solvent.
- Returns:
A dictionary containing the bilayer specifications.
- Return type: