fatslim package
Submodules
fatslim.fatslim_membranes module
Module containing the FATSLiM Membranes class and the command line interface.
- class fatslim.fatslim_membranes.FatslimMembranes(input_top_path, output_ndx_path, input_traj_path=None, properties=None, **kwargs)[source]
Bases:
BiobbObjectbiobb_mem FatslimMembranesWrapper of the FATSLiM membranes module for leaflet and membrane identification.FATSLiM is designed to provide efficient and robust analysis of physical parameters from MD trajectories, with a focus on processing large trajectory files quickly.- Parameters:
input_top_path (str) – Path to the input topology file. File type: input. Sample file. Accepted formats: tpr (edam:format_2333), gro (edam:format_2033), g96 (edam:format_2033), pdb (edam:format_1476), brk (edam:format_2033), ent (edam:format_1476).
input_traj_path (str) (Optional) –
Path to the GROMACS trajectory file. File type: input. Sample file. Accepted formats: xtc (edam:format_3875), trr (edam:format_3910), cpt (edam:format_2333), gro (edam:format_2033), g96 (edam:format_2033), pdb (edam:format_1476), tng (edam:format_3876).
output_ndx_path (str) –
Path to the output index NDX file. File type: output. Sample file. Accepted formats: ndx (edam:format_2033).
properties (dic - Python dictionary object containing the tool parameters, not input/output files) –
selection (str) - (“resname DPPC and element P”) Molecules used in the identification using MDAnalysis selection language.
cutoff (float) - (2) Cutoff distance (in nm) to be used when leaflet identification is performed.
begin_frame (int) - (-1) First frame index to be used for analysis.
end_frame (int) - (-1) Last frame index to be used for analysis.
ignore_no_box (bool) - (False) Ignore the absence of box information in the topology. If the topology does not contain box information, the box will be set to the minimum and maximum positions of the atoms.
binary_path (str) - (“fatslim”) Path to the fatslim executable binary.
remove_tmp (bool) - (True) [WF property] Remove temporal files.
restart (bool) - (False) [WF property] Do not execute if output files exist.
sandbox_path (str) - (“./”) [WF property] Parent path to the sandbox directory.
Examples
This is a use example of how to use the building block from Python:
from biobb_mem.fatslim.fatslim_membranes import fatslim_membranes prop = { 'selection': '(resname DPPC and name P8)', 'cutoff': 2.2 } fatslim_membranes(input_top_path='/path/to/myTopology.tpr', input_traj_path='/path/to/myTrajectory.xtc', output_ndx_path='/path/to/newIndex.ndx', properties=prop)
- Info:
- wrapped_software:
name: FATSLiM
version: 0.2.2
license: GNU
- ontology:
name: EDAM
schema: http://edamontology.org/EDAM.owl
- launch() int[source]
Execute the
FatslimMembranesfatslim.fatslim_membranes.FatslimMembranes object.
- fatslim.fatslim_membranes.display_fatslim(input_top_path: str, lipid_sel: str, input_traj_path: str | None = None, output_ndx_path='leaflets.ndx', leaflets=True, colors=['blue', 'cyan', 'yellow', 'orange', 'purple', 'magenta'], non_mem_color='red')[source]
Visualize the leaflets of a membrane using NGLView. The lipids in the membrane are colored according to their leaflet. The ones not in the membrane are colored in red.
- Parameters:
input_top_path (str) – Path to the input topology file.
input_traj_path (str, optional) – Path to the input trajectory file. Default is None.
output_ndx_path (str, optional) – Path to the output index file containing leaflet information. Default is “leaflets.ndx”.
leaflets (bool, optional) – If True, visualize individual leaflets. If False, visualize entire membranes. Default is True.
colors (list of str, optional) – List of colors to use for visualizing the leaflets or membranes. Default is [‘blue’, ‘cyan’, ‘yellow’, ‘orange’, ‘purple’, ‘magenta’].
non_mem_color (str, optional) – Color to use for visualizing lipids not in the membrane. Default is ‘red’.
- Returns:
An NGLView widget displaying the membrane leaflets.
- Return type:
nglview.NGLWidget
- fatslim.fatslim_membranes.fatslim_membranes(input_top_path: str, output_ndx_path: str, input_traj_path: str | None = None, properties: dict | None = None, **kwargs) int[source]
Execute the
FatslimMembranesclass and execute thelaunch()method.
- fatslim.fatslim_membranes.main()[source]
Command line execution of this building block. Please check the command line documentation.
- fatslim.fatslim_membranes.parse_index(ndx)[source]
Parses a GROMACS index file (.ndx) to extract leaflet groups.
- Parameters:
ndx (str) – Path to the GROMACS index file (.ndx).
- Returns:
A dictionary where keys are group names and values are lists of integers representing atom indices.
- Return type:
dict