pestifer.tasks.make_membrane_system module¶
Definition of the MakeMembraneSystemTask class for handling embedding proteins into bilayers.
Usage is described in the make_membrane_system documentation.
- class pestifer.tasks.make_membrane_system.MakeMembraneSystemTask(specs: dict = None, **kwargs)[source]¶
Bases:
BaseTaskA class for handling embedding proteins into bilayers
- build_patch()[source]¶
Build the bilayer patch or patches based on the specifications provided in the configuration. This method retrieves the bilayer specifications, including solution conditions, rotation parameters, and other relevant settings. It then constructs the patch or patches, packs them using Packmol, generates the PSF file, and then does a short series of equilibration MD simulations.
- do_psfgen(patch: Bilayer, bilayer_name: str)[source]¶
Perform the psfgen operation to generate the PSF and PDB files for the bilayer patch from the packmol output.
- embed_protein()[source]¶
Embed the protein into the bilayer patch or quilt. This method uses the psfgen scripter to create a script that embeds the protein into the bilayer based on the provided specifications. It retrieves the embedding specifications, such as head and tail groups, reference groups, and orientation settings, and runs the script to perform the embedding. The resulting state variables are updated with the new PSF, PDB, and coordinate files.
- equilibrate_bilayer(bilayer: Bilayer, bilayer_name: str, relaxation_protocol: list[dict] = None)[source]¶
Equilibrates the bilayer patch using the specified user dictionary and relaxation protocol.
- Parameters:
bilayer (Bilayer) – The bilayer object to be equilibrated.
bilayer_name (str) – A string identifier of this bilayer used for keeping track of artifacts.
relaxation_protocol (list, optional) – A list of dictionaries specifying the stages of the relaxation protocol. If not provided, a hard-coded relaxation protocol will be used.
- initialize()[source]¶
Initialize the MakeMembraneSystemTask by building the bilayer patch and quilt. This method sets up the bilayer patch based on the specifications provided in the configuration. If the bilayer is asymmetric, it builds two symmetric patches. It also sets up the quilt from the bilayer patch, which will be used for embedding proteins. If a prebuilt bilayer is specified, it uses that instead of building a new one.
- make_quilt_from_patch()[source]¶
Create a quilt from the bilayer patch or patches. This method generates a quilt that combines the bilayer patches into a single structure. It uses the psfgen scripter to create a script that builds the quilt based on the provided patches. The quilt is then equilibrated and saved with the appropriate state variables.
- orient_protein()[source]¶
Orient the protein so that its principal axis is aligned with the z-axis (membrane normal). This method uses the Orient package in VMD to perform the orientation based on specified atom selections. The oriented protein structure is then saved as a new PDB file and registered as an artifact.
- pack_patch(patch: Bilayer, patch_name: str = None, seed=None, tolerance=None, nloop_all=200, nloop=200, half_mid_zgap=1.0, rotation_pm=20)[source]¶
Packs the bilayer patch using Packmol.
- Parameters:
seed (int, optional) – The random seed for the packing process. Default is None.
tolerance (float, optional) – The tolerance for the packing process. Default is None.
nloop_all (int, optional) – The total number of loops for the packing process. Default is 200.
nloop (int, optional) – The number of loops for each individual structure in the packing process. Default is 200.
half_mid_zgap (float, optional) – The half mid-plane gap in Å. Default is 1.0 Å.
rotation_pm (float, optional) – The rotation angle in degrees for the patch. Default is 20.0 degrees.
- provision(packet: dict)[source]¶
Provision the task with necessary resources. This method is called to set up the task with the required resources and context. It can be overridden by subclasses to provide additional provisioning logic.
- Parameters:
packet (dict, optional) – A dictionary of provisions to be used for the task. If not provided, the existing provisions will be used.