cpptraj package

Submodules

cpptraj.cpptraj_randomize_ions module

Module containing the CpptrajRandomizeIons class and the command line interface.

class cpptraj.cpptraj_randomize_ions.CpptrajRandomizeIons(input_top_path: str, input_crd_path: str, output_pdb_path: str, output_crd_path: str, properties, **kwargs)[source]

Bases: BiobbObject

biobb_amber.cpptraj.cpptraj_randomize_ions CpptrajRandomizeIons
Swap specified ions with randomly selected solvent molecules using cpptraj tool from the AmberTools MD package.
Parameters:
  • input_top_path (str) – Input topology file (AMBER ParmTop). File type: input. Sample file. Accepted formats: top (edam:format_3881), parmtop (edam:format_3881), prmtop (edam:format_3881).

  • input_crd_path (str) –

    Input coordinates file (AMBER crd). File type: input. Sample file. Accepted formats: crd (edam:format_3878), mdcrd (edam:format_3878), inpcrd (edam:format_3878).

  • output_pdb_path (str) –

    Structure PDB file with randomized ions. File type: output. Sample file. Accepted formats: pdb (edam:format_1476).

  • output_crd_path (str) –

    Structure CRD file with coordinates including randomized ions. File type: output. Sample file. Accepted formats: crd (edam:format_3878), mdcrd (edam:format_3878), inpcrd (edam:format_3878).

  • properties (dic - Python dictionary object containing the tool parameters, not input/output files) –

    • ion_mask (str) - (“:K+,Cl-,Na+”) Ions to be randomized. Cpptraj mask syntax can be found at the official Cpptraj manual.

    • solute_mask (str) - (“:DA,DC,DG,DT,D?3,D?5”) Solute (or set of atoms) around which the ions can get no closer than the distance specified. Cpptraj mask syntax can be found at the official Cpptraj manual.

    • distance (float) - (5.0) Minimum distance cutoff for the ions around the defined solute.

    • overlap (float) - (3.5) Minimum distance between ions.

    • binary_path (str) - (“cpptraj”) Path to the cpptraj executable binary.

    • 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) Container path definition.

    • container_image (str) - (‘afandiadib/ambertools:serial’) Container image definition.

    • container_volume_path (str) - (‘/tmp’) Container volume path definition.

    • container_working_dir (str) - (None) Container working directory definition.

    • container_user_id (str) - (None) Container user_id definition.

    • container_shell_path (str) - (‘/bin/bash’) Path to default shell inside the container.

Examples

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

from biobb_amber.cpptraj.cpptraj_randomize_ions import cpptraj_randomize_ions
prop = {
    'remove_tmp': True
}
cpptraj_randomize_ions(input_top_path='/path/to/topology.top',
              input_crd_path='/path/to/coordinates.crd',
              output_pdb_path='/path/to/newStructure.pdb',
              output_crd_path='/path/to/newCoordinates.crd',
              properties=prop)
Info:
check_data_params(out_log, err_log)[source]

Checks input/output paths correctness

launch()[source]

Launches the execution of the CpptrajRandomizeIons module.

cpptraj.cpptraj_randomize_ions.cpptraj_randomize_ions(input_top_path: str, input_crd_path: str, output_pdb_path: str, output_crd_path: str, properties: dict | None = None, **kwargs) int[source]

Create CpptrajRandomizeIons method

cpptraj.cpptraj_randomize_ions.main()[source]