ambertools package

Submodules

ambertools.cpptraj_density module

Module containing the Cpptraj Density class and the command line interface.

class ambertools.cpptraj_density.CpptrajDensity(input_top_path, input_traj_path, output_cpptraj_path, output_traj_path=None, properties=None, **kwargs)[source]

Bases: BiobbObject

biobb_mem CpptrajDensity
Wrapper of the Ambertools Cpptraj module for calculating density profile along an axis of a given cpptraj compatible trajectory.
Cpptraj (the successor to ptraj) is the main program in Ambertools for processing coordinate trajectories and data files. The parameter names and defaults are the same as the ones in the official Cpptraj manual.
Parameters:
  • input_top_path (str) – Path to the input structure or topology file. File type: input. Sample file. Accepted formats: top (edam:format_3881), pdb (edam:format_1476), prmtop (edam:format_3881), parmtop (edam:format_3881), zip (edam:format_3987).

  • input_traj_path (str) –

    Path to the input trajectory to be processed. File type: input. Sample file. Accepted formats: mdcrd (edam:format_3878), crd (edam:format_3878), cdf (edam:format_3650), netcdf (edam:format_3650), nc (edam:format_3650), restart (edam:format_3886), ncrestart (edam:format_3886), restartnc (edam:format_3886), dcd (edam:format_3878), charmm (edam:format_3887), cor (edam:format_2033), pdb (edam:format_1476), mol2 (edam:format_3816), trr (edam:format_3910), gro (edam:format_2033), binpos (edam:format_3885), xtc (edam:format_3875), cif (edam:format_1477), arc (edam:format_2333), sqm (edam:format_2033), sdf (edam:format_3814), conflib (edam:format_2033).

  • output_cpptraj_path (str) –

    Path to the output processed density analysis. File type: output. Sample file. Accepted formats: dat (edam:format_1637), agr (edam:format_2033), xmgr (edam:format_2033), gnu (edam:format_2033).

  • output_traj_path (str) (Optional) –

    Path to the output processed trajectory. File type: output. Sample file. Accepted formats: mdcrd (edam:format_3878), crd (edam:format_3878), cdf (edam:format_3650), netcdf (edam:format_3650), nc (edam:format_3650), restart (edam:format_3886), ncrestart (edam:format_3886), restartnc (edam:format_3886), dcd (edam:format_3878), charmm (edam:format_3887), cor (edam:format_2033), pdb (edam:format_1476), mol2 (edam:format_3816), trr (edam:format_3910), gro (edam:format_2033), binpos (edam:format_3885), xtc (edam:format_3875), cif (edam:format_1477), arc (edam:format_2333), sqm (edam:format_2033), sdf (edam:format_3814), conflib (edam:format_2033).

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

    • start (int) - (1) [1~100000|1] Starting frame for slicing

    • end (int) - (-1) [-1~100000|1] Ending frame for slicing

    • steps (int) - (1) [1~100000|1] Step for slicing

    • density_type (str) - (“number”) Number, mass, partial charge (q) or electron (Ne - q) density. Electron density will be converted to e-/Å3 by dividing the average area spanned by the other two dimensions.

    • mask (str) - (“*”) Arbitrary number of masks for atom selection; a dataset is created and the output will contain entries for each mask.. Default: all atoms.

    • delta (float) - (0.25) Resolution, i.e. determines number of slices (i.e. histogram bins).

    • axis (str) - (“z”) Coordinate (axis) for density calculation. Vales: x, y, z.

    • bintype (str) - (“bincenter”) Determine whether histogram bin coordinates will be based on bin center (default) or bin edges. Values: bicenter, binedge.

    • restrict (str) - (None) If specified, only calculate the density within a cylinder or square shape from the specified axis as defined by a distance cutoff. Values: cylinder, square.

    • cutoff (float) - (None) The distance cutoff for ‘restrict’. Required if ‘restrict’ is specified.

    • 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.

    • sandbox_path (str) - (“./”) [WF property] Parent path to the sandbox directory.

Examples

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

from biobb_mem.ambertools.cpptraj_density import cpptraj_density
prop = {
    'density_type': 'number'
}
cpptraj_density(input_top_path='/path/to/myTopology.top',
            input_traj_path='/path/to/myTrajectory.xtc',
            output_cpptraj_path='/path/to/newAnalysis.dat',
            properties=prop)
Info:
create_instructions_file(stage_io_dict, out_log, err_log)[source]

Creates an input file using the properties file settings.

launch() int[source]

Execute the CpptrajDensity object.

ambertools.cpptraj_density.cpptraj_density(input_top_path: str, input_traj_path: str, output_cpptraj_path: str, output_traj_path: str = None, properties: dict = None, **kwargs) int[source]
biobb_mem CpptrajDensity
Wrapper of the Ambertools Cpptraj module for calculating density profile along an axis of a given cpptraj compatible trajectory.
Cpptraj (the successor to ptraj) is the main program in Ambertools for processing coordinate trajectories and data files. The parameter names and defaults are the same as the ones in the official Cpptraj manual.
Parameters:
  • input_top_path (str) –

    Path to the input structure or topology file. File type: input. Sample file. Accepted formats: top (edam:format_3881), pdb (edam:format_1476), prmtop (edam:format_3881), parmtop (edam:format_3881), zip (edam:format_3987).

  • input_traj_path (str) –

    Path to the input trajectory to be processed. File type: input. Sample file. Accepted formats: mdcrd (edam:format_3878), crd (edam:format_3878), cdf (edam:format_3650), netcdf (edam:format_3650), nc (edam:format_3650), restart (edam:format_3886), ncrestart (edam:format_3886), restartnc (edam:format_3886), dcd (edam:format_3878), charmm (edam:format_3887), cor (edam:format_2033), pdb (edam:format_1476), mol2 (edam:format_3816), trr (edam:format_3910), gro (edam:format_2033), binpos (edam:format_3885), xtc (edam:format_3875), cif (edam:format_1477), arc (edam:format_2333), sqm (edam:format_2033), sdf (edam:format_3814), conflib (edam:format_2033).

  • output_cpptraj_path (str) –

    Path to the output processed density analysis. File type: output. Sample file. Accepted formats: dat (edam:format_1637), agr (edam:format_2033), xmgr (edam:format_2033), gnu (edam:format_2033).

  • output_traj_path (str) (Optional) –

    Path to the output processed trajectory. File type: output. Sample file. Accepted formats: mdcrd (edam:format_3878), crd (edam:format_3878), cdf (edam:format_3650), netcdf (edam:format_3650), nc (edam:format_3650), restart (edam:format_3886), ncrestart (edam:format_3886), restartnc (edam:format_3886), dcd (edam:format_3878), charmm (edam:format_3887), cor (edam:format_2033), pdb (edam:format_1476), mol2 (edam:format_3816), trr (edam:format_3910), gro (edam:format_2033), binpos (edam:format_3885), xtc (edam:format_3875), cif (edam:format_1477), arc (edam:format_2333), sqm (edam:format_2033), sdf (edam:format_3814), conflib (edam:format_2033).

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

    • start (int) - (1) [1~100000|1] Starting frame for slicing

    • end (int) - (-1) [-1~100000|1] Ending frame for slicing

    • steps (int) - (1) [1~100000|1] Step for slicing

    • density_type (str) - (“number”) Number, mass, partial charge (q) or electron (Ne - q) density. Electron density will be converted to e-/Å3 by dividing the average area spanned by the other two dimensions.

    • mask (str) - (“*”) Arbitrary number of masks for atom selection; a dataset is created and the output will contain entries for each mask.. Default: all atoms.

    • delta (float) - (0.25) Resolution, i.e. determines number of slices (i.e. histogram bins).

    • axis (str) - (“z”) Coordinate (axis) for density calculation. Vales: x, y, z.

    • bintype (str) - (“bincenter”) Determine whether histogram bin coordinates will be based on bin center (default) or bin edges. Values: bicenter, binedge.

    • restrict (str) - (None) If specified, only calculate the density within a cylinder or square shape from the specified axis as defined by a distance cutoff. Values: cylinder, square.

    • cutoff (float) - (None) The distance cutoff for ‘restrict’. Required if ‘restrict’ is specified.

    • 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.

    • sandbox_path (str) - (“./”) [WF property] Parent path to the sandbox directory.

Examples

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

from biobb_mem.ambertools.cpptraj_density import cpptraj_density
prop = {
    'density_type': 'number'
}
cpptraj_density(input_top_path='/path/to/myTopology.top',
            input_traj_path='/path/to/myTrajectory.xtc',
            output_cpptraj_path='/path/to/newAnalysis.dat',
            properties=prop)
Info: