From e06b72a5824032e2c4a0b4fc78ae945f446cb777 Mon Sep 17 00:00:00 2001 From: Pau Andrio Date: Thu, 17 Oct 2024 13:45:08 +0200 Subject: [PATCH] [TYPING](ALL): Fix typing errors --- biobb_gromacs/gromacs/common.py | 8 ++++---- biobb_gromacs/gromacs/editconf.py | 7 ++++--- biobb_gromacs/gromacs/genion.py | 7 ++++--- biobb_gromacs/gromacs/genrestr.py | 7 ++++--- biobb_gromacs/gromacs/gmxselect.py | 7 ++++--- biobb_gromacs/gromacs/grompp.py | 5 +++-- biobb_gromacs/gromacs/grompp_mdrun.py | 9 +++++---- biobb_gromacs/gromacs/make_ndx.py | 7 ++++--- biobb_gromacs/gromacs/mdrun.py | 9 +++++---- biobb_gromacs/gromacs/pdb2gmx.py | 7 ++++--- biobb_gromacs/gromacs/solvate.py | 7 ++++--- biobb_gromacs/gromacs/trjcat.py | 10 +++++----- biobb_gromacs/gromacs_extra/append_ligand.py | 7 ++++--- biobb_gromacs/gromacs_extra/ndx2resttop.py | 9 +++++---- 14 files changed, 59 insertions(+), 47 deletions(-) diff --git a/biobb_gromacs/gromacs/common.py b/biobb_gromacs/gromacs/common.py index 9ed1226..0222490 100644 --- a/biobb_gromacs/gromacs/common.py +++ b/biobb_gromacs/gromacs/common.py @@ -4,7 +4,7 @@ from pathlib import Path from biobb_common.tools import file_utils as fu from biobb_common.command_wrapper import cmd_wrapper -from typing import Dict, Mapping, Optional +from typing import Mapping, Optional def get_gromacs_version(gmx: str = "gmx", minimum_version: int = 512) -> int: @@ -108,7 +108,7 @@ def gmx_rms(file_a: str, file_b: str, file_tpr: str, gmx: str = 'gmx', tolerance return True -def read_mdp(input_mdp_path: str) -> Dict[str, str]: +def read_mdp(input_mdp_path: str) -> dict[str, str]: # Credit for these two reg exps to: # https://github.com/Becksteinlab/GromacsWrapper/blob/master/gromacs/fileformats/mdp.py parameter_re = re.compile(r"\s*(?P[^=]+?)\s*=\s*(?P[^;]*)(?P\s*;.*)?", re.VERBOSE) @@ -125,8 +125,8 @@ def read_mdp(input_mdp_path: str) -> Dict[str, str]: return mdp_dict -def mdp_preset(sim_type: str) -> Dict[str, str]: - mdp_dict: Dict[str, str] = {} +def mdp_preset(sim_type: str) -> dict[str, str]: + mdp_dict: dict[str, str] = {} if not sim_type or sim_type == 'index': return mdp_dict diff --git a/biobb_gromacs/gromacs/editconf.py b/biobb_gromacs/gromacs/editconf.py index fe06f0d..a6408fc 100755 --- a/biobb_gromacs/gromacs/editconf.py +++ b/biobb_gromacs/gromacs/editconf.py @@ -2,12 +2,13 @@ """Module containing the Editconf class and the command line interface.""" import argparse +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu from biobb_common.tools.file_utils import launchlogger from biobb_gromacs.gromacs.common import get_gromacs_version -from typing import Optional, Dict +from typing import Optional class Editconf(BiobbObject): @@ -56,7 +57,7 @@ class Editconf(BiobbObject): * schema: http://edamontology.org/EDAM.owl """ - def __init__(self, input_gro_path: str, output_gro_path: str, properties: Optional[Dict] = None, **kwargs) -> None: + def __init__(self, input_gro_path: str, output_gro_path: str, properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -139,7 +140,7 @@ def launch(self) -> int: return self.return_code -def editconf(input_gro_path: str, output_gro_path: str, properties: Optional[Dict] = None, **kwargs) -> int: +def editconf(input_gro_path: str, output_gro_path: str, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Editconf ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs/genion.py b/biobb_gromacs/gromacs/genion.py index 4a6e7ce..2683bbb 100755 --- a/biobb_gromacs/gromacs/genion.py +++ b/biobb_gromacs/gromacs/genion.py @@ -3,13 +3,14 @@ """Module containing the Genion class and the command line interface.""" import shutil import argparse +from typing import Optional from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu from biobb_common.tools.file_utils import launchlogger from biobb_gromacs.gromacs.common import get_gromacs_version -from typing import Optional, Dict, Union +from typing import Optional, Union class Genion(BiobbObject): @@ -64,7 +65,7 @@ class Genion(BiobbObject): """ def __init__(self, input_tpr_path: Union[str, Path], output_gro_path: Union[str, Path], input_top_zip_path: Union[str, Path], - output_top_zip_path: Union[str, Path], input_ndx_path: Optional[Union[str, Path]] = None, properties: Optional[Dict] = None, **kwargs) -> None: + output_top_zip_path: Union[str, Path], input_ndx_path: Optional[Union[str, Path]] = None, properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -173,7 +174,7 @@ def launch(self) -> int: def genion(input_tpr_path: Union[str, Path], output_gro_path: Union[str, Path], input_top_zip_path: Union[str, Path], - output_top_zip_path: Union[str, Path], input_ndx_path: Optional[Union[str, Path]] = None, properties: Optional[Dict] = None, **kwargs) -> int: + output_top_zip_path: Union[str, Path], input_ndx_path: Optional[Union[str, Path]] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Genion ` class and execute the :meth:`launch() ` method.""" return Genion(input_tpr_path=input_tpr_path, output_gro_path=output_gro_path, diff --git a/biobb_gromacs/gromacs/genrestr.py b/biobb_gromacs/gromacs/genrestr.py index 86bf8da..5215ecb 100755 --- a/biobb_gromacs/gromacs/genrestr.py +++ b/biobb_gromacs/gromacs/genrestr.py @@ -2,13 +2,14 @@ """Module containing the Genrestr class and the command line interface.""" import argparse +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu from biobb_common.tools.file_utils import launchlogger from biobb_gromacs.gromacs.common import get_gromacs_version from pathlib import Path -from typing import Union, Optional, Dict +from typing import Union, Optional class Genrestr(BiobbObject): @@ -57,7 +58,7 @@ class Genrestr(BiobbObject): """ def __init__(self, input_structure_path: Union[str, Path], output_itp_path: Union[str, Path], - input_ndx_path: Optional[Union[str, Path]] = None, properties: Optional[Dict] = None, **kwargs) -> None: + input_ndx_path: Optional[Union[str, Path]] = None, properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -137,7 +138,7 @@ def launch(self) -> int: def genrestr(input_structure_path: Union[str, Path], output_itp_path: Union[str, Path], - input_ndx_path: Optional[Union[str, Path]] = None, properties: Optional[Dict] = None, **kwargs) -> int: + input_ndx_path: Optional[Union[str, Path]] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Genrestr ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs/gmxselect.py b/biobb_gromacs/gromacs/gmxselect.py index 934db5c..4ccd0ee 100755 --- a/biobb_gromacs/gromacs/gmxselect.py +++ b/biobb_gromacs/gromacs/gmxselect.py @@ -2,8 +2,9 @@ """Module containing the Select class and the command line interface.""" import argparse +from typing import Optional from pathlib import Path -from typing import Optional, Dict +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -56,7 +57,7 @@ class Gmxselect(BiobbObject): """ def __init__(self, input_structure_path: str, output_ndx_path: str, input_ndx_path: Optional[str] = None, - properties: Optional[Dict] = None, **kwargs) -> None: + properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -138,7 +139,7 @@ def launch(self) -> int: def gmxselect(input_structure_path: str, output_ndx_path: str, - input_ndx_path: Optional[str] = None, properties: Optional[Dict] = None, + input_ndx_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Gmxselect ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs/grompp.py b/biobb_gromacs/gromacs/grompp.py index 80022e8..33b7d87 100755 --- a/biobb_gromacs/gromacs/grompp.py +++ b/biobb_gromacs/gromacs/grompp.py @@ -2,8 +2,9 @@ """Module containing the Grompp class and the command line interface.""" import argparse +from typing import Optional import shutil -from typing import Optional, Dict +from typing import Optional from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings @@ -70,7 +71,7 @@ class Grompp(BiobbObject): def __init__(self, input_gro_path: str, input_top_zip_path: str, output_tpr_path: str, input_cpt_path: Optional[str] = None, input_ndx_path: Optional[str] = None, input_mdp_path: Optional[str] = None, - properties: Optional[Dict] = None, **kwargs) -> None: + properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor diff --git a/biobb_gromacs/gromacs/grompp_mdrun.py b/biobb_gromacs/gromacs/grompp_mdrun.py index 9c2fa76..3635d88 100755 --- a/biobb_gromacs/gromacs/grompp_mdrun.py +++ b/biobb_gromacs/gromacs/grompp_mdrun.py @@ -2,7 +2,8 @@ """Module containing the GromppMDrun class and the command line interface.""" import argparse -from typing import Optional, Dict +from typing import Optional +from typing import Optional from pathlib import Path from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings @@ -44,8 +45,8 @@ class GromppMdrun(BiobbObject): * **num_threads_omp** (*int*) - (0) [0-1000|1] Let GROMACS guess. The number of GROMACS OPENMP threads that are going to be used. * **num_threads_omp_pme** (*int*) - (0) [0-1000|1] Let GROMACS guess. The number of GROMACS OPENMP_PME threads that are going to be used. * **use_gpu** (*bool*) - (False) Use settings appropriate for GPU. Adds: -nb gpu -pme gpu - * **gpu_id** (*str*) - (None) List of unique GPU device IDs available to use. - * **gpu_tasks** (*str*) - (None) List of GPU device IDs, mapping each PP task on each node to a device. + * **gpu_id** (*str*) - (None) list of unique GPU device IDs available to use. + * **gpu_tasks** (*str*) - (None) list of GPU device IDs, mapping each PP task on each node to a device. * **gmx_lib** (*str*) - (None) Path set GROMACS GMXLIB environment variable. * **binary_path** (*str*) - ("gmx") Path to the GROMACS executable binary. * **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files. @@ -166,7 +167,7 @@ def grompp_mdrun(input_gro_path: str, input_top_zip_path: str, output_trr_path: output_gro_path: str, output_edr_path: str, output_log_path: str, input_cpt_path: Optional[str] = None, input_ndx_path: Optional[str] = None, input_mdp_path: Optional[str] = None, output_xtc_path: Optional[str] = None, output_cpt_path: Optional[str] = None, output_dhdl_path: Optional[str] = None, - output_tpr_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: + output_tpr_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int: return GromppMdrun(input_gro_path=input_gro_path, input_top_zip_path=input_top_zip_path, output_trr_path=output_trr_path, output_gro_path=output_gro_path, output_edr_path=output_edr_path, output_log_path=output_log_path, diff --git a/biobb_gromacs/gromacs/make_ndx.py b/biobb_gromacs/gromacs/make_ndx.py index 764d96e..3d9108c 100755 --- a/biobb_gromacs/gromacs/make_ndx.py +++ b/biobb_gromacs/gromacs/make_ndx.py @@ -2,8 +2,9 @@ """Module containing the MakeNdx class and the command line interface.""" import argparse +from typing import Optional from pathlib import Path -from typing import Optional, Dict +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -55,7 +56,7 @@ class MakeNdx(BiobbObject): """ def __init__(self, input_structure_path: str, output_ndx_path: str, input_ndx_path: Optional[str] = None, - properties: Optional[Dict] = None, **kwargs) -> None: + properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -132,7 +133,7 @@ def launch(self) -> int: def make_ndx(input_structure_path: str, output_ndx_path: str, - input_ndx_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: + input_ndx_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`MakeNdx ` class and execute the :meth:`launch() ` method.""" return MakeNdx(input_structure_path=input_structure_path, diff --git a/biobb_gromacs/gromacs/mdrun.py b/biobb_gromacs/gromacs/mdrun.py index 76dbf56..a58054b 100755 --- a/biobb_gromacs/gromacs/mdrun.py +++ b/biobb_gromacs/gromacs/mdrun.py @@ -3,6 +3,7 @@ """Module containing the MDrun class and the command line interface.""" import argparse from typing import Optional +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -36,8 +37,8 @@ class Mdrun(BiobbObject): * **num_threads_omp** (*int*) - (0) [0~1000|1] Let GROMACS guess. The number of GROMACS OPENMP threads that are going to be used. * **num_threads_omp_pme** (*int*) - (0) [0~1000|1] Let GROMACS guess. The number of GROMACS OPENMP_PME threads that are going to be used. * **use_gpu** (*bool*) - (False) Use settings appropriate for GPU. Adds: -nb gpu -pme gpu - * **gpu_id** (*str*) - (None) List of unique GPU device IDs available to use. - * **gpu_tasks** (*str*) - (None) List of GPU device IDs, mapping each PP task on each node to a device. + * **gpu_id** (*str*) - (None) list of unique GPU device IDs available to use. + * **gpu_tasks** (*str*) - (None) list of GPU device IDs, mapping each PP task on each node to a device. * **gmx_lib** (*str*) - (None) Path set GROMACS GMXLIB environment variable. * **binary_path** (*str*) - ("gmx") Path to the GROMACS executable binary. * **remove_tmp** (*bool*) - (True) [WF property] Remove temporal files. @@ -198,11 +199,11 @@ def launch(self) -> int: fu.log('Adding GPU specific settings adds: -nb gpu -pme gpu', self.out_log) self.cmd += ["-nb", "gpu", "-pme", "gpu"] if self.gpu_id: - fu.log(f'List of unique GPU device IDs available to use: {self.gpu_id}', self.out_log) + fu.log(f'list of unique GPU device IDs available to use: {self.gpu_id}', self.out_log) self.cmd.append('-gpu_id') self.cmd.append(self.gpu_id) if self.gpu_tasks: - fu.log(f'List of GPU device IDs, mapping each PP task on each node to a device: {self.gpu_tasks}', self.out_log) + fu.log(f'list of GPU device IDs, mapping each PP task on each node to a device: {self.gpu_tasks}', self.out_log) self.cmd.append('-gputasks') self.cmd.append(self.gpu_tasks) diff --git a/biobb_gromacs/gromacs/pdb2gmx.py b/biobb_gromacs/gromacs/pdb2gmx.py index 54784f4..4c6b6c9 100755 --- a/biobb_gromacs/gromacs/pdb2gmx.py +++ b/biobb_gromacs/gromacs/pdb2gmx.py @@ -3,7 +3,8 @@ """Module containing the Pdb2gmx class and the command line interface.""" import os import argparse -from typing import Optional, Dict +from typing import Optional +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -59,7 +60,7 @@ class Pdb2gmx(BiobbObject): * schema: http://edamontology.org/EDAM.owl """ - def __init__(self, input_pdb_path: str, output_gro_path: str, output_top_zip_path: str, properties: Optional[Dict] = None, + def __init__(self, input_pdb_path: str, output_gro_path: str, output_top_zip_path: str, properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} @@ -158,7 +159,7 @@ def launch(self) -> int: def pdb2gmx(input_pdb_path: str, output_gro_path: str, output_top_zip_path: str, - properties: Optional[Dict] = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Pdb2gmx ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs/solvate.py b/biobb_gromacs/gromacs/solvate.py index e1a300b..f117ac3 100755 --- a/biobb_gromacs/gromacs/solvate.py +++ b/biobb_gromacs/gromacs/solvate.py @@ -3,8 +3,9 @@ """Module containing the Editconf class and the command line interface.""" import shutil import argparse +from typing import Optional from pathlib import Path -from typing import Optional, Dict +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -61,7 +62,7 @@ class Solvate(BiobbObject): """ def __init__(self, input_solute_gro_path: str, output_gro_path: str, input_top_zip_path: str, - output_top_zip_path: str, input_solvent_gro_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> None: + output_top_zip_path: str, input_solvent_gro_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -151,7 +152,7 @@ def launch(self) -> int: def solvate(input_solute_gro_path: str, output_gro_path: str, input_top_zip_path: str, - output_top_zip_path: str, input_solvent_gro_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: + output_top_zip_path: str, input_solvent_gro_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Solvate ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs/trjcat.py b/biobb_gromacs/gromacs/trjcat.py index 4136648..bc28420 100755 --- a/biobb_gromacs/gromacs/trjcat.py +++ b/biobb_gromacs/gromacs/trjcat.py @@ -1,11 +1,11 @@ #!/usr/bin/env python3 """Module containing the Trjcat class and the command line interface.""" -import typing import shutil import argparse +from typing import Optional from pathlib import Path -from typing import Optional, Dict +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -55,7 +55,7 @@ class Trjcat(BiobbObject): * schema: http://edamontology.org/EDAM.owl """ - def __init__(self, input_trj_zip_path: str, output_trj_path: str, properties: Optional[Dict] = None, **kwargs) -> None: + def __init__(self, input_trj_zip_path: str, output_trj_path: str, properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -101,7 +101,7 @@ def launch(self) -> int: # Unzip trajectory bundle trj_dir: str = fu.create_unique_dir() - trj_list: typing.List[str] = fu.unzip_list(self.input_trj_zip_path, trj_dir, self.out_log) + trj_list: list[str] = fu.unzip_list(self.input_trj_zip_path, trj_dir, self.out_log) # Copy trajectories to container if self.container_path: @@ -135,7 +135,7 @@ def launch(self) -> int: return self.return_code -def trjcat(input_trj_zip_path: str, output_trj_path: str, properties: Optional[Dict] = None, **kwargs) -> int: +def trjcat(input_trj_zip_path: str, output_trj_path: str, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Trjcat ` class and execute the :meth:`launch() ` method.""" diff --git a/biobb_gromacs/gromacs_extra/append_ligand.py b/biobb_gromacs/gromacs_extra/append_ligand.py index df8f510..ce78977 100755 --- a/biobb_gromacs/gromacs_extra/append_ligand.py +++ b/biobb_gromacs/gromacs_extra/append_ligand.py @@ -3,9 +3,10 @@ """Module containing the AppendLigand class and the command line interface.""" import re import argparse +from typing import Optional import shutil from pathlib import Path -from typing import Optional, Dict +from typing import Optional from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -49,7 +50,7 @@ class AppendLigand(BiobbObject): """ def __init__(self, input_top_zip_path: str, input_itp_path: str, output_top_zip_path: str, - input_posres_itp_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> None: + input_posres_itp_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -156,7 +157,7 @@ def launch(self) -> int: def append_ligand(input_top_zip_path: str, input_itp_path: str, output_top_zip_path: str, - input_posres_itp_path: Optional[str] = None, properties: Optional[Dict] = None, **kwargs) -> int: + input_posres_itp_path: Optional[str] = None, properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`AppendLigand ` class and execute the :meth:`launch() ` method.""" return AppendLigand(input_top_zip_path=input_top_zip_path, diff --git a/biobb_gromacs/gromacs_extra/ndx2resttop.py b/biobb_gromacs/gromacs_extra/ndx2resttop.py index 1b73117..6e10f29 100755 --- a/biobb_gromacs/gromacs_extra/ndx2resttop.py +++ b/biobb_gromacs/gromacs_extra/ndx2resttop.py @@ -3,8 +3,9 @@ """Module containing the Ndx2resttop class and the command line interface.""" import fnmatch import argparse +from typing import Optional from pathlib import Path -from typing import Optional, Dict, Any +from typing import Optional, Any from biobb_common.generic.biobb_object import BiobbObject from biobb_common.configuration import settings from biobb_common.tools import file_utils as fu @@ -45,7 +46,7 @@ class Ndx2resttop(BiobbObject): """ def __init__(self, input_ndx_path: str, input_top_zip_path: str, output_top_zip_path: str, - properties: Optional[Dict] = None, **kwargs) -> None: + properties: Optional[dict] = None, **kwargs) -> None: properties = properties or {} # Call parent class constructor @@ -76,7 +77,7 @@ def launch(self) -> int: top_file = fu.unzip_top(zip_file=self.io_dict['in'].get("input_top_zip_path", ""), out_log=self.out_log) # Create index list of index file :) - index_dic: Dict[str, Any] = {} + index_dic: dict[str, Any] = {} lines = open(self.io_dict['in'].get("input_ndx_path", "")).read().splitlines() for index, line in enumerate(lines): if line.startswith('['): @@ -132,7 +133,7 @@ def launch(self) -> int: def ndx2resttop(input_ndx_path: str, input_top_zip_path: str, output_top_zip_path: str, - properties: Optional[Dict] = None, **kwargs) -> int: + properties: Optional[dict] = None, **kwargs) -> int: """Create :class:`Ndx2resttop ` class and execute the :meth:`launch() ` method.""" return Ndx2resttop(input_ndx_path=input_ndx_path,