Coverage for biobb_mem/gorder/gorder_ua.py: 91%
11 statements
« prev ^ index » next coverage.py v7.18.0, created at 2026-11-30 14:15 +0000
« prev ^ index » next coverage.py v7.18.0, created at 2026-11-30 14:15 +0000
1#!/usr/bin/env python3
3"""Module containing the gorder united atom class and the command line interface."""
4from biobb_common.generic.biobb_object import launcher
5from biobb_mem.gorder.common import GorderBase
6import gorder
9class GorderUA(GorderBase):
10 """
11 | biobb_mem GorderUA
12 | Wrapper of the gorder united atom module for computing lipid order parameters per atom for carbon tails.
13 | `gorder <https://ladme.github.io/gorder-manual/uaorder_basics.html>`_ uses `GSL <https://ladme.github.io/gsl-guide/>`_ for all its selections.
15 Args:
16 input_top_path (str): Path to the input structure or topology file. File type: input. `Sample file <https://github.com/bioexcel/biobb_mem/raw/main/biobb_mem/test/data/A01JD/A01JD.tpr>`_. Accepted formats: tpr (edam:format_2333).
17 input_traj_path (str): Path to the input trajectory to be processed. File type: input. `Sample file <https://github.com/bioexcel/biobb_mem/raw/main/biobb_mem/test/data/A01JD/A01JD.xtc>`_. Accepted formats: xtc (edam:format_3875), trr (edam:format_3910), gro (edam:format_2033).
18 output_order_path (str): Path to results of the order analysis. File type: output. `Sample file <https://github.com/bioexcel/biobb_mem/raw/main/biobb_mem/test/reference/gorder/order_ua.yaml>`_. Accepted formats: yaml (edam:format_3570), xvg (edam:format_2330), csv (edam:format_3752).
19 properties (dic - Python dictionary object containing the tool parameters, not input/output files):
20 * **saturated** (*str*) - ("@membrane") Selection query specifying the saturated carbons.
21 * **unsaturated** (*str*) - (None) Selection query specifying the unsaturated carbons.
22 * **handle_pbc** (*bool*) - (True) If False, ignores periodic boundary conditions (PBC).
23 * **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files.
24 * **restart** (*bool*) - (False) [WF property] Do not execute if output files exist.
25 * **sandbox_path** (*str*) - ("./") [WF property] Parent path to the sandbox directory.
27 Examples:
28 This is a use example of how to use the building block from Python::
30 from biobb_mem.gorder.gorder_ua import gorder_ua
31 prop = {
32 'handle_pbc': False
33 }
34 gorder_ua(input_top_path='/path/to/myTopology.tpr',
35 input_traj_path='/path/to/myTrajectory.xtc',
36 output_order_path='/path/to/orderAnalysis.yaml',
37 properties=prop)
39 Info:
40 * wrapped_software:
41 * name: gorder
42 * version: 1.1.0
43 * license: MIT
44 * ontology:
45 * name: EDAM
46 * schema: http://edamontology.org/EDAM.owl
48 """
50 def __init__(self,
51 input_top_path: str,
52 input_traj_path: str,
53 output_order_path: str,
54 properties: dict | None = None,
55 **kwargs) -> None:
56 super().__init__(**locals())
58 def analysis_type(self) -> "gorder.analysis_types.UAOrder":
59 """Go from the saturated and unsaturated carbons to the united atom analysis type of gorder."""
60 return gorder.analysis_types.UAOrder(self.saturated, self.unsaturated)
63gorder_ua = launcher(GorderUA)
65if __name__ == '__main__':
66 GorderUA.main()