Coverage for biobb_pdb_tools/pdb_tools/biobb_pdb_uniqname.py: 89%

9 statements  

« prev     ^ index     » next       coverage.py v7.18.0, created at 2026-12-03 15:44 +0000

1#!/usr/bin/env python3 

2 

3"""Module containing the Delhetatm class and the command line interface.""" 

4 

5from typing import Optional 

6from biobb_common.generic.biobb_object import launcher 

7from biobb_pdb_tools.pdb_tools.common import PdbToolsBase 

8 

9 

10class Pdbuniqname(PdbToolsBase): 

11 """ 

12 | biobb_pdb_tools Pdbuniqname 

13 | Renames atoms sequentially (C1, C2, O1, ...) for each HETATM residue. 

14 | This tool renames atoms sequentially (C1, C2, O1, ...) for each HETATM residue in a PDB file. It can be used to rename atoms sequentially for each HETATM residue in a PDB file. 

15 

16 Args: 

17 input_file_path (str): Input PDB file. File type: input. `Sample file <https://raw.githubusercontent.com/bioexcel/biobb_pdb_tools/master/biobb_pdb_tools/test/data/pdb_tools/1AKI.pdb>`_. Accepted formats: pdb (edam:format_1476). 

18 output_file_path (str): PDB file with all HETATM atoms renamed. File type: output. `Sample file <https://raw.githubusercontent.com/bioexcel/biobb_pdb_tools/master/biobb_pdb_tools/test/reference/pdb_tools/ref_pdb_delhetatm.pdb>`_. Accepted formats: pdb (edam:format_1476). 

19 properties (dic): 

20 * **binary_path** (*str*) - ("pdb_uniqname") Path to the pdb_uniqname executable binary. 

21 * **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files. 

22 * **restart** (*bool*) - (False) [WF property] Do not execute if output files exist. 

23 

24 Examples: 

25 This is a use example of how to use the building block from Python:: 

26 

27 from biobb_pdb_tools.pdb_tools.biobb_pdb_uniqname import biobb_pdb_uniqname 

28 

29 biobb_pdb_uniqname(input_file_path='/path/to/input.pdb', 

30 output_file_path='/path/to/output.pdb') 

31 

32 Info: 

33 * wrapped_software: 

34 * name: pdb_tools 

35 * version: >=2.5.0 

36 * license: Apache-2.0 

37 * ontology: 

38 * name: EDAM 

39 * schema: http://edamontology.org/EDAM.owl 

40 

41 """ 

42 

43 def __init__( 

44 self, input_file_path: str, output_file_path: str, properties: Optional[dict] = None, **kwargs 

45 ) -> None: 

46 super().__init__(**locals()) 

47 

48 

49biobb_pdb_uniqname = launcher(Pdbuniqname) 

50 

51if __name__ == "__main__": 

52 Pdbuniqname.main()