pmx package

Submodules

pmx.analyse module

Module containing the PMX analyse class and the command line interface.

class pmx.pmxanalyse.Pmxanalyse(input_a_xvg_zip_path: str, input_b_xvg_zip_path: str, output_result_path: str, output_work_plot_path: str, properties: Mapping[KT, VT_co] = None, **kwargs)[source]

Bases: biobb_common.generic.biobb_object.BiobbObject

biobb_pmx Pmxanalyse
Wrapper class for the PMX analyse module.
Parameters:
  • input_a_xvg_zip_path (str) – Path the zip file containing the dgdl.xvg files of the A state. File type: input. Sample file. Accepted formats: zip (edam:format_3987).
  • input_b_xvg_zip_path (str) –

    Path the zip file containing the dgdl.xvg files of the B state. File type: input. Sample file. Accepted formats: zip (edam:format_3987).

  • output_result_path (str) –

    Path to the TXT results file. File type: output. Sample file. Accepted formats: txt (edam:format_2330).

  • output_work_plot_path (str) –

    Path to the PNG plot results file. File type: output. Sample file. Accepted formats: png (edam:format_3603).

  • properties (dic) –
    • method (str) - (“CGI BAR JARZ”) Choose one or more estimators to use. Values: CGI (Crooks Gaussian Intersection), BAR (Bennet Acceptance Ratio), JARZ (Jarzynski’s estimator).
    • temperature (float) - (298.15) [0~1000|0.05] Temperature in Kelvin.
    • nboots (int) - (0) [0~1000|1] Number of bootstrap samples to use for the bootstrap estimate of the standard errors.
    • nblocks (int) - (1) [0~1000|1] Number of blocks to divide the data into for an estimate of the standard error.
    • integ_only (bool) - (False) Whether to do integration only.
    • reverseB (bool) - (False) Whether to reverse the work values for the backward (B->A) transformation.
    • skip (int) - (1) [0~1000|1] Skip files.
    • slice (str) - (None) Subset of trajectories to analyze. Provide list slice, e.g. “10 50” will result in selecting dhdl_files[10:50].
    • rand (int) - (None) [0~1000|1] Take a random subset of trajectories. Default is None (do not take random subset).
    • index (str) - (None) Zero-based index of files to analyze (e.g. “0 10 20 50 60”). It keeps the dhdl.xvg files according to their position in the list, sorted according to the filenames.
    • prec (int) - (2) [0~100|1] The decimal precision of the screen/file output.
    • units (str) - (“kJ”) The units of the output. Values: kJ (Kilojoules), kcal (Kilocalories), kT (the product of the Boltzmann constant k and the temperature).
    • no_ks (bool) - (False) Whether to do a Kolmogorov-Smirnov test to check whether the Gaussian assumption for CGI holds.
    • nbins (int) - (20) [0~1000|1] Number of histograms bins for the plot.
    • dpi (int) - (300) [72~2048|1] Resolution of the plot.
    • pmx_path (str) - (“pmx”) Path to the PMX command line interface.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Path to the binary executable of your container.
    • container_image (str) - (“gromacs/gromacs:latest”) Container Image identifier.
    • container_volume_path (str) - (“/data”) Path to an internal directory in the container.
    • container_working_dir (str) - (None) Path to the internal CWD in the container.
    • container_user_id (str) - (None) User number id to be mapped inside the container.
    • container_shell_path (str) - (“/bin/bash”) Path to the binary executable of the container shell.

Examples

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

from biobb_pmx.pmx.pmxanalyse import pmxanalyse
prop = {
    'method': 'CGI BAR JARZ',
    'temperature': 298.15,
    'dpi': 600
}
pmxanalyse(input_a_xvg_zip_path='/path/to/myAStateFiles.zip',
           input_b_xvg_zip_path='/path/to/myBStateFiles.zip',
           output_result_path='/path/to/newResults.txt',
           output_work_plot_path='/path/to/newResults.png',
           properties=prop)
Info:
launch() → int[source]

Execute the Pmxanalyse pmx.pmxanalyse.Pmxanalyse object.

pmx.pmxanalyse.main()[source]

Command line execution of this building block. Please check the command line documentation.

pmx.pmxanalyse.pmxanalyse(input_a_xvg_zip_path: str, input_b_xvg_zip_path: str, output_result_path: str, output_work_plot_path: str, properties: dict = None, **kwargs) → int[source]

Execute the Pmxanalyse class and execute the :meth:`launch() <pmx.pmxanalyse.Pmxanalyse.launch> method.

pmx.gentop module

Module containing the PMX gentop class and the command line interface.

class pmx.pmxgentop.Pmxgentop(input_top_zip_path: str, output_top_zip_path: str, properties: Mapping[KT, VT_co] = None, **kwargs)[source]

Bases: biobb_common.generic.biobb_object.BiobbObject

biobb_pmx Pmxgentop
Wrapper class for the PMX gentop module.
Parameters:
  • input_top_zip_path (str) –

    Path the input GROMACS topology TOP and ITP files in zip format. File type: input. Sample file. Accepted formats: zip (edam:format_3987).

  • output_top_zip_path (str) –

    Path the output TOP topology in zip format. File type: output. Sample file. Accepted formats: zip (edam:format_3987).

  • properties (dic) –
    • force_field (str) - (“amber99sb-star-ildn-mut”) Force field to use. If input_top_zip_path is a top file, it’s not necessary to specify the forcefield, as it will be determined automatically. If input_top_zip_path is an itp file, then it’s needed.
    • split (bool) - (False) Write separate topologies for the vdW and charge transformations.
    • scale_mass (bool) - (False) Scale the masses of morphing atoms so that dummies have a mass of 1.
    • gmx_lib (str) - (“$CONDA_PREFIX/lib/python3.7/site-packages/pmx/data/mutff45/”) Path to the GMXLIB folder in your computer.
    • pmx_path (str) - (“pmx”) Path to the PMX command line interface.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Path to the binary executable of your container.
    • container_image (str) - (“gromacs/gromacs:latest”) Container Image identifier.
    • container_volume_path (str) - (“/inout”) Path to an internal directory in the container.
    • container_working_dir (str) - (None) Path to the internal CWD in the container.
    • container_user_id (str) - (None) User number id to be mapped inside the container.
    • container_shell_path (str) - (“/bin/bash”) Path to the binary executable of the container shell.

Examples

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

from biobb_pmx.pmx.pmxgentop import pmxgentop
prop = {
    'gmx_lib': '/path/to/myGMXLIB/',
    'force_field': 'amber99sb-star-ildn-mut'
}
pmxgentop(input_top_zip_path='/path/to/myTopology.zip',
        output_top_zip_path='/path/to/newTopology.zip',
        properties=prop)
Info:
launch() → int[source]

Execute the Pmxgentop pmx.pmxgentop.Pmxgentop object.

pmx.pmxgentop.main()[source]

Command line execution of this building block. Please check the command line documentation.

pmx.pmxgentop.pmxgentop(input_top_zip_path: str, output_top_zip_path: str, properties: dict = None, **kwargs) → int[source]

Execute the Pmxgentop class and execute the :meth:`launch() <pmx.pmxgentop.Pmxgentop.launch> method.

pmx.mutate module

Module containing the PMX mutate class and the command line interface.

class pmx.pmxmutate.Pmxmutate(input_structure_path: str, output_structure_path: str, input_b_structure_path: str = None, properties: Mapping[KT, VT_co] = None, **kwargs)[source]

Bases: biobb_common.generic.biobb_object.BiobbObject

biobb_pmx Pmxmutate
Wrapper class for the PMX mutate module.
Parameters:
  • input_structure_path (str) –

    Path to the input structure file. File type: input. Sample file. Accepted formats: pdb (edam:format_1476), gro (edam:format_2033).

  • output_structure_path (str) –

    Path to the output structure file. File type: output. Sample file. Accepted formats: pdb (edam:format_1476), gro (edam:format_2033).

  • input_b_structure_path (str) (Optional) – Path to the mutated input structure file. File type: input. Accepted formats: pdb (edam:format_1476), gro (edam:format_2033).
  • properties (dic) –
    • mutation_list (str) - (“2Ala”) Mutation list in the format “Chain:Resnum MUT_AA_Code” or “Chain:Resnum MUT_NA_Code” (no spaces between the elements) separated by commas. If no chain is provided as chain code all the chains in the pdb file will be mutated. ie: “A:15CYS”. Possible MUT_AA_Code: ‘ALA’, ‘ARG’, ‘ASN’, ‘ASP’, ‘ASPH’, ‘ASPP’, ‘ASH’, ‘CYS’, ‘CYS2’, ‘CYN’, ‘CYX’, ‘CYM’, ‘CYSH’, ‘GLU’, ‘GLUH’, ‘GLUP’, ‘GLH’, ‘GLN’, ‘GLY’, ‘HIS’, ‘HIE’, ‘HISE’, ‘HSE’, ‘HIP’, ‘HSP’, ‘HISH’, ‘HID’, ‘HSD’, ‘ILE’, ‘LEU’, ‘LYS’, ‘LYSH’, ‘LYP’, ‘LYN’, ‘LSN’, ‘MET’, ‘PHE’, ‘PRO’, ‘SER’, ‘SP1’, ‘SP2’, ‘THR’, ‘TRP’, ‘TYR’, ‘VAL’. Possible MUT_NA_Codes: ‘A’, ‘T’, ‘C’, ‘G’, ‘U’.
    • force_field (str) - (“amber99sb-star-ildn-mut”) Forcefield to use.
    • resinfo (bool) - (False) Show the list of 3-letter -> 1-letter residues.
    • gmx_lib (str) - (“$CONDA_PREFIX/lib/python3.7/site-packages/pmx/data/mutff45/”) Path to the GMXLIB folder in your computer.
    • pmx_path (str) - (“pmx”) Path to the PMX command line interface.
    • remove_tmp (bool) - (True) [WF property] Remove temporal files.
    • restart (bool) - (False) [WF property] Do not execute if output files exist.
    • container_path (str) - (None) Path to the binary executable of your container.
    • container_image (str) - (None) Container Image identifier.
    • container_volume_path (str) - (“/inout”) Path to an internal directory in the container.
    • container_working_dir (str) - (None) Path to the internal CWD in the container.
    • container_user_id (str) - (None) User number id to be mapped inside the container.
    • container_shell_path (str) - (“/bin/bash”) Path to the binary executable of the container shell.

Examples

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

from biobb_pmx.pmx.pmxmutate import pmxmutate
prop = {
    'mutation_list': '2Ala, 3Val',
    'gmx_lib': '/path/to/myGMXLIB/',
    'force_field': 'amber99sb-star-ildn-mut'
}
pmxmutate(input_structure_path='/path/to/myStructure.pdb',
        output_structure_path='/path/to/newStructure.pdb',
        input_b_structure_path='/path/to/myStructureB.pdb'
        properties=prop)
Info:
launch() → int[source]

Execute the Pmxmutate pmx.pmxmutate.Pmxmutate object.

pmx.pmxmutate.main()[source]

Command line execution of this building block. Please check the command line documentation.

pmx.pmxmutate.pmxmutate(input_structure_path: str, output_structure_path: str, input_b_structure_path: str = None, properties: dict = None, **kwargs) → int[source]

Execute the Pmxmutate class and execute the :meth:`launch() <pmx.pmxmutate.Pmxmutate.launch> method.