leap package

Submodules

leap.leap_add_ions module

Module containing the LeapAddIons class and the command line interface.

class leap.leap_add_ions.LeapAddIons(input_pdb_path: str, output_pdb_path: str, output_top_path: str, output_crd_path: str, input_lib_path: str | None = None, input_frcmod_path: str | None = None, input_params_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs)[source]

Bases: BiobbObject

biobb_amber LeapAddIons
Adds counterions to a system box for an AMBER MD system using tLeap tool from the AmberTools MD package.
Parameters:
  • input_pdb_path (str) – Input 3D structure PDB file. File type: input. Sample file. Accepted formats: pdb (edam:format_1476).

  • input_lib_path (str) (Optional) –

    Input ligand library parameters file. File type: input. Sample file. Accepted formats: lib (edam:format_3889), zip (edam:format_3987).

  • input_frcmod_path (str) (Optional) –

    Input ligand frcmod parameters file. File type: input. Sample file. Accepted formats: frcmod (edam:format_3888), zip (edam:format_3987).

  • input_params_path (str) (Optional) –

    Additional leap parameter files to load with loadAmberParams Leap command. File type: input. Sample file. Accepted formats: in (edam:format_2330), leapin (edam:format_2330), txt (edam:format_2330), zip (edam:format_3987).

  • input_source_path (str) (Optional) –

    Additional leap command files to load with source Leap command. File type: input. Sample file. Accepted formats: in (edam:format_2330), leapin (edam:format_2330), txt (edam:format_2330), zip (edam:format_3987).

  • output_pdb_path (str) –

    Output 3D structure PDB file matching the topology file. File type: output. Sample file. Accepted formats: pdb (edam:format_1476).

  • output_top_path (str) –

    Output topology file (AMBER ParmTop). File type: output. Sample file. Accepted formats: top (edam:format_3881), parmtop (edam:format_3881), prmtop (edam:format_3881).

  • output_crd_path (str) –

    Output coordinates file (AMBER crd). 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) –

    • forcefield (list) - ([“protein.ff14SB”,”DNA.bsc1”,”gaff”]) Forcefield to be used for the structure generation. Values: protein.ff14SB, protein.ff19SB, DNA.bsc1, DNA.OL15, RNA.OL3, gaff.

    • water_type (str) - (“TIP3PBOX”) Water molecule parameters to be used for the topology. Values: POL3BOX, QSPCFWBOX, SPCBOX, SPCFWBOX, TIP3PBOX, TIP3PFBOX, TIP4PBOX, TIP4PEWBOX, OPCBOX, OPC3BOX, TIP5PBOX.

    • box_type (str) - (“truncated_octahedron”) Type for the MD system box. Values: cubic, truncated_octahedron.

    • ions_type (str) - (“ionsjc_tip3p”) Ions type. Values: ionsjc_tip3p, ionsjc_spce, ionsff99_tip3p, ions_charmm22, ionsjc_tip4pew, None.

    • neutralise (bool) - (“True”) Energetically neutralise the system adding the necessary counterions.

    • ionic_concentration (float) - (50) Additional ionic concentration to include in the system box. Units in Mol/L.

    • positive_ions_number (int) - (0) Number of additional positive ions to include in the system box.

    • negative_ions_number (int) - (0) Number of additional negative ions to include in the system box.

    • positive_ions_type (str) - (“Na+”) Type of additional positive ions to include in the system box. Values: Na+,K+.

    • negative_ions_type (str) - (“Cl-”) Type of additional negative ions to include in the system box. Values: Cl-.

    • binary_path (str) - (“tleap”) Path to the tleap 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.leap.leap_add_ions import leap_add_ions
prop = {
    'forcefield': ['protein.ff14SB'],
    'water_type': 'TIP3PBOX',
    'neutralise' : True
}
leap_add_ions(input_pdb_path='/path/to/structure.pdb',
              output_pdb_path='/path/to/newStructure.pdb',
              output_top_path='/path/to/newTopology.top',
              output_crd_path='/path/to/newCoordinates.crd',
              properties=prop)
Info:
check_data_params(out_log, err_log)[source]

Checks input/output paths correctness

find_out_number_of_ions()[source]

Computes the number of positive and negative ions from the input ionic concentration and the number of water molecules in the system box.

launch()[source]

Launches the execution of the LeapAddIons module.

leap.leap_add_ions.leap_add_ions(input_pdb_path: str, output_pdb_path: str, output_top_path: str, output_crd_path: str, input_lib_path: str | None = None, input_frcmod_path: str | None = None, input_params_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs) int[source]

Create LeapAddIons method

leap.leap_add_ions.main()[source]

leap.leap_build_linear_structure module

Module containing the LeapBuildLinearStructure class and the command line interface.

class leap.leap_build_linear_structure.LeapBuildLinearStructure(output_pdb_path, properties, **kwargs)[source]

Bases: BiobbObject

biobb_amber.leap.leap_build_linear_structure LeapBuildLinearStructure
Builds a linear (unfolded) 3D structure from an AA sequence using tLeap tool from the AmberTools MD package.
Parameters:
  • output_pdb_path (str) –

    Linear (unfolded) 3D structure PDB file. File type: output. Sample file. Accepted formats: pdb (edam:format_1476).

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

    • sequence (str) - (“ALA GLY SER PRO ARG ALA PRO GLY”) Aminoacid sequence to convert to a linear 3D structure. Aminoacids should be written in 3-letter code, with a blank space between them.

    • forcefield (list) - ([“protein.ff14SB”,”DNA.bsc1”,”gaff”]) Forcefield to be used for the structure generation. Values: protein.ff14SB, protein.ff19SB, DNA.bsc1, DNA.OL15, RNA.OL3, gaff.

    • build_library (bool) - (False) Generate AMBER lib file for the structure.

    • binary_path (str) - (“tleap”) Path to the tleap 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.leap.leap_build_linear_structure import leap_build_linear_structure
prop = {
    'sequence' : 'ALA PRO SER ARG LYS ASP GLU GLY GLY ALA',
    'build_library': False,
    'forcefield': ['protein.ff14SB']
}
leap_build_linear_structure(output_pdb_path='/path/to/newStructure.pdb',
              properties=prop)
Info:
check_data_params(out_log, err_log)[source]

Checks input/output paths correctness

launch()[source]

Launches the execution of the LeapBuildLinearStructure module.

leap.leap_build_linear_structure.leap_build_linear_structure(output_pdb_path: str, properties: dict | None = None, **kwargs) int[source]

Create LeapBuildLinearStructure method

leap.leap_build_linear_structure.main()[source]

leap.leap_gen_top module

Module containing the LeapGenTop class and the command line interface.

class leap.leap_gen_top.LeapGenTop(input_pdb_path: str, output_pdb_path: str, output_top_path: str, output_crd_path: str, input_lib_path: str | None = None, input_frcmod_path: str | None = None, input_params_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs)[source]

Bases: BiobbObject

biobb_amber.leap.leap_gen_top LeapGenTop
Generates a MD topology from a molecule structure using tLeap tool from the AmberTools MD package.
Parameters:
  • input_pdb_path (str) –

    Input 3D structure PDB file. File type: input. Sample file. Accepted formats: pdb (edam:format_1476).

  • input_lib_path (str) (Optional) –

    Input ligand library parameters file. File type: input. Sample file. Accepted formats: lib (edam:format_3889), zip (edam:format_3987).

  • input_frcmod_path (str) (Optional) –

    Input ligand frcmod parameters file. File type: input. Sample file. Accepted formats: frcmod (edam:format_3888), zip (edam:format_3987).

  • input_params_path (str) (Optional) –

    Additional leap parameter files to load with loadAmberParams Leap command. File type: input. Sample file. Accepted formats: in (edam:format_2330), leapin (edam:format_2330), txt (edam:format_2330), zip (edam:format_3987).

  • input_source_path (str) (Optional) –

    Additional leap command files to load with source Leap command. File type: input. Sample file. Accepted formats: in (edam:format_2330), leapin (edam:format_2330), txt (edam:format_2330), zip (edam:format_3987).

  • output_pdb_path (str) –

    Output 3D structure PDB file matching the topology file. File type: output. Sample file. Accepted formats: pdb (edam:format_1476).

  • output_top_path (str) –

    Output topology file (AMBER ParmTop). File type: output. Sample file. Accepted formats: top (edam:format_3881), parmtop (edam:format_3881), prmtop (edam:format_3881).

  • output_crd_path (str) –

    Output coordinates file (AMBER crd). 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) –

    • forcefield (list) - ([“protein.ff14SB”,”DNA.bsc1”,”gaff”]) Forcefield to be used for the structure generation. Values: protein.ff14SB, protein.ff19SB, DNA.bsc1, DNA.OL15, RNA.OL3, gaff.

    • binary_path (str) - (“tleap”) Path to the tleap 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.leap.leap_gen_top import leap_gen_top
prop = {
    'forcefield': ['protein.ff14SB']
}
leap_gen_top(input_pdb_path='/path/to/structure.pdb',
              output_pdb_path='/path/to/newStructure.pdb',
              output_top_path='/path/to/newTopology.top',
              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 LeapGenTop module.

leap.leap_gen_top.leap_gen_top(input_pdb_path: str, output_pdb_path: str, output_top_path: str, output_crd_path: str, input_lib_path: str | None = None, input_frcmod_path: str | None = None, input_params_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs) int[source]

Create LeapGenTop method

leap.leap_gen_top.main()[source]

leap.leap_solvate module

Module containing the LeapSolvate class and the command line interface.

class leap.leap_solvate.LeapSolvate(input_pdb_path: str, output_pdb_path: str, output_top_path: str, output_crd_path: str, input_lib_path: str | None = None, input_frcmod_path: str | None = None, input_params_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs)[source]

Bases: BiobbObject

biobb_amber LeapSolvate
Creates and solvates a system box for an AMBER MD system using tLeap tool from the AmberTools MD package.
Parameters:
  • input_pdb_path (str) –

    Input 3D structure PDB file. File type: input. Sample file. Accepted formats: pdb (edam:format_1476).

  • input_lib_path (str) (Optional) –

    Input ligand library parameters file. File type: input. Sample file. Accepted formats: lib (edam:format_3889), zip (edam:format_3987).

  • input_frcmod_path (str) (Optional) –

    Input ligand frcmod parameters file. File type: input. Sample file. Accepted formats: frcmod (edam:format_3888), zip (edam:format_3987).

  • input_params_path (str) (Optional) –

    Additional leap parameter files to load with loadAmberParams Leap command. File type: input. Sample file. Accepted formats: in (edam:format_2330), leapin (edam:format_2330), txt (edam:format_2330), zip (edam:format_3987).

  • input_source_path (str) (Optional) –

    Additional leap command files to load with source Leap command. File type: input. Sample file. Accepted formats: in (edam:format_2330), leapin (edam:format_2330), txt (edam:format_2330), zip (edam:format_3987).

  • output_pdb_path (str) –

    Output 3D structure PDB file matching the topology file. File type: output. Sample file. Accepted formats: pdb (edam:format_1476).

  • output_top_path (str) –

    Output topology file (AMBER ParmTop). File type: output. Sample file. Accepted formats: top (edam:format_3881), parmtop (edam:format_3881), prmtop (edam:format_3881).

  • output_crd_path (str) –

    Output coordinates file (AMBER crd). 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) –

    • forcefield (list) - ([“protein.ff14SB”,”DNA.bsc1”,”gaff”]) Forcefield to be used for the structure generation. Values: protein.ff14SB, protein.ff19SB, DNA.bsc1, DNA.OL15, RNA.OL3, gaff.

    • water_type (str) - (“TIP3PBOX”) Water molecule parameters to be used for the topology. Values: POL3BOX, QSPCFWBOX, SPCBOX, SPCFWBOX, TIP3PBOX, TIP3PFBOX, TIP4PBOX, TIP4PEWBOX, OPCBOX, OPC3BOX, TIP5PBOX.

    • box_type (str) - (“truncated_octahedron”) Type for the MD system box. Values: cubic, truncated_octahedron.

    • ions_type (str) - (“ionsjc_tip3p”) Ions type. Values: ionsjc_tip3p, ionsjc_spce, ionsff99_tip3p, ions_charmm22, ionsjc_tip4pew, None.

    • neutralise (bool) - (“False”) Energetically neutralise the system adding the necessary counterions.

    • iso (bool) - (“False”) Make the box isometric.

    • positive_ions_number (int) - (0) Number of additional positive ions to include in the system box.

    • negative_ions_number (int) - (0) Number of additional negative ions to include in the system box.

    • positive_ions_type (str) - (“Na+”) Type of additional positive ions to include in the system box. Values: Na+,K+.

    • negative_ions_type (str) - (“Cl-”) Type of additional negative ions to include in the system box. Values: Cl-.

    • distance_to_molecule (float) - (“8.0”) Size for the MD system box -in Angstroms-, defined such as the minimum distance between any atom originally present in solute and the edge of the periodic box is given by this distance parameter.

    • closeness (float) - (“1.0”) How close, in Å, solvent ATOMs may come to solute ATOMs.

    • binary_path (str) - (“tleap”) Path to the tleap 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.leap.leap_solvate import leap_solvate prop = {

‘forcefield’: [‘protein.ff14SB’], ‘water_type’: ‘TIP3PBOX’, ‘box_type’: ‘truncated_octahedron’, ‘neutralise’ : True

} leap_solvate(input_pdb_path=’/path/to/structure.pdb’,

output_pdb_path=’/path/to/newStructure.pdb’, output_top_path=’/path/to/newTopology.top’, 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 LeapSolvate module.

leap.leap_solvate.leap_solvate(input_pdb_path: str, output_pdb_path: str, output_top_path: str, output_crd_path: str, input_lib_path: str | None = None, input_frcmod_path: str | None = None, input_params_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs) int[source]

Create LeapSolvate method

leap.leap_solvate.main()[source]