fatslim package
Submodules
fatslim.fatslim_apl module
Module containing the FATSLiM Area per Lipid class and the command line interface.
- class fatslim.fatslim_apl.FatslimAPL(input_top_path, output_csv_path, input_traj_path=None, input_ndx_path=None, properties=None, **kwargs)[source]
Bases:
BiobbObjectbiobb_mem FatslimAPLWrapper of the FATSLiM area per lipid module for area per lipid calculation.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).
input_ndx_path (str) (Optional) –
Path to the input index NDX file for lipid headgroups and the interacting group. File type: input. Sample file. Accepted formats: ndx (edam:format_2033).
output_csv_path (str) –
Path to the output CSV file. File type: output. Sample file. Accepted formats: csv (edam:format_3752).
properties (dic - Python dictionary object containing the tool parameters, not input/output files) –
lipid_selection (str) - (“not protein and element P”) Headgroups MDAnalysis selection.
protein_selection (str) - (“protein and not element H”) Protein selection interacting with the membrane.
cutoff (float) - (3) This option allows user to specify the cutoff distance (in nm) to be used when performing the neighbor search needed by the APL calculation algorithm
limit (float) - (10) This option allows user to specify the upper limit (in nm2) for a valid area per lipid value.
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.
return_hydrogen (bool) - (False) Include hydrogen atoms in the output index file.
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_apl import fatslim_apl prop = { 'lipid_selection': '(resname DPPC and name P8)', 'cutoff': 3 } fatslim_apl(input_top_path='/path/to/myTopology.tpr', input_traj_path='/path/to/myTrajectory.xtc', output_csv_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
FatslimAPLfatslim.fatslim_apl.FatslimAPL object.
- fatslim.fatslim_apl.fatslim_apl(input_top_path: str, output_csv_path: str, input_traj_path: str | None = None, input_ndx_path: str | None = None, properties: dict | None = None, **kwargs) int[source]
Execute the
FatslimAPLclass and execute thelaunch()method.
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, input_ndx_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).
input_ndx_path (str) (Optional) –
Path to the input lipid headgroups index NDX file. File type: input. Sample file. Accepted formats: ndx (edam:format_2033).
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) - (“not protein and element P”) Alternative ot the NDX file for choosing the Headgroups 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.
return_hydrogen (bool) - (False) Include hydrogen atoms in the output index file.
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, input_ndx_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 for each leaflet in format “membrane_1_leaflet_1” and values are lists of integers representing atom indices starting from 1.
- Return type:
dict