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_prep_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs)[source]
Bases:
BiobbObject
biobb_amber LeapAddIonsWrapper of the AmberTools (AMBER MD Package) leap tool module.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_prep_path (str) (Optional) –
Additional leap parameter files to load with loadAmberPrep 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”]) Forcefields to be used for the structure generation. Each item should be either a path to a leaprc file or a string with the leaprc file name if the force field is included with Amber (e.g. “/path/to/leaprc.protein.ff14SB” or “protein.ff14SB”). Default values: [“protein.ff14SB”,”DNA.bsc1”,”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.
sandbox_path (str) - (“./”) [WF property] Parent path to the sandbox directory.
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:
- wrapped_software:
name: AmberTools tLeap
version: >20.9
license: LGPL 2.1
- ontology:
name: EDAM
schema: http://edamontology.org/EDAM.owl
- find_leaprc_paths(forcefields: List[str]) List[str] [source]
Find the leaprc paths for the force fields provided.
For each item in the forcefields list, the function checks if the str is a path to an existing file. If not, it tries to find the file in the $AMBERHOME/dat/leap/cmd/ directory or the $AMBERHOME/dat/leap/cmd/oldff/ directory with and without the leaprc prefix.
- Parameters:
forcefields (List[str]) – List of force fields to find the leaprc files for.
- Returns:
List of leaprc file paths.
- Return type:
List[str]
- 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_prep_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs) int [source]
Create
LeapAddIons
method
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 LeapBuildLinearStructureWrapper of the AmberTools (AMBER MD Package) leap tool module.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”]) Forcefields to be used for the structure generation. Each item should be either a path to a leaprc file or a string with the leaprc file name if the force field is included with Amber (e.g. “/path/to/leaprc.protein.ff14SB” or “protein.ff14SB”). Default values: [“protein.ff14SB”,”DNA.bsc1”,”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.
sandbox_path (str) - (“./”) [WF property] Parent path to the sandbox directory.
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:
- wrapped_software:
name: AmberTools tLeap
version: >20.9
license: LGPL 2.1
- ontology:
name: EDAM
schema: http://edamontology.org/EDAM.owl
- find_leaprc_paths(forcefields: List[str]) List[str] [source]
Find the leaprc paths for the force fields provided.
For each item in the forcefields list, the function checks if the str is a path to an existing file. If not, it tries to find the file in the $AMBERHOME/dat/leap/cmd/ directory or the $AMBERHOME/dat/leap/cmd/oldff/ directory with and without the leaprc prefix.
- Parameters:
forcefields (List[str]) – List of force fields to find the leaprc files for.
- Returns:
List of leaprc file paths.
- Return type:
List[str]
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_prep_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs)[source]
Bases:
BiobbObject
biobb_amber.leap.leap_gen_top LeapGenTopWrapper of the AmberTools (AMBER MD Package) leap tool module.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_prep_path (str) (Optional) –
Additional leap parameter files to load with loadAmberPrep 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”]) Forcefields to be used for the structure generation. Each item should be either a path to a leaprc file or a string with the leaprc file name if the force field is included with Amber (e.g. “/path/to/leaprc.protein.ff14SB” or “protein.ff14SB”). Default values: [“protein.ff14SB”,”DNA.bsc1”,”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.
sandbox_path (str) - (“./”) [WF property] Parent path to the sandbox directory.
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:
- wrapped_software:
name: AmberTools tLeap
version: >20.9
license: LGPL 2.1
- ontology:
name: EDAM
schema: http://edamontology.org/EDAM.owl
- find_leaprc_paths(forcefields: List[str]) List[str] [source]
Find the leaprc paths for the force fields provided.
For each item in the forcefields list, the function checks if the str is a path to an existing file. If not, it tries to find the file in the $AMBERHOME/dat/leap/cmd/ directory or the $AMBERHOME/dat/leap/cmd/oldff/ directory with and without the leaprc prefix.
- Parameters:
forcefields (List[str]) – List of force fields to find the leaprc files for.
- Returns:
List of leaprc file paths.
- Return type:
List[str]
- 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_prep_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs) int [source]
Create
LeapGenTop
method
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_prep_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs)[source]
Bases:
BiobbObject
biobb_amber LeapSolvateWrapper of the AmberTools (AMBER MD Package) leap tool module.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_prep_path (str) (Optional) –
Additional leap parameter files to load with loadAmberPrep 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”]) Forcefields to be used for the structure generation. Each item should be either a path to a leaprc file or a string with the leaprc file name if the force field is included with Amber (e.g. “/path/to/leaprc.protein.ff14SB” or “protein.ff14SB”). Default values: [“protein.ff14SB”,”DNA.bsc1”,”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.
sandbox_path (str) - (“./”) [WF property] Parent path to the sandbox directory.
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:
- wrapped_software:
name: AmberTools tLeap
version: >20.9
license: LGPL 2.1
- ontology:
name: EDAM
schema: http://edamontology.org/EDAM.owl
- find_leaprc_paths(forcefields: List[str]) List[str] [source]
Find the leaprc paths for the force fields provided.
For each item in the forcefields list, the function checks if the str is a path to an existing file. If not, it tries to find the file in the $AMBERHOME/dat/leap/cmd/ directory or the $AMBERHOME/dat/leap/cmd/oldff/ directory with and without the leaprc prefix.
- Parameters:
forcefields (List[str]) – List of force fields to find the leaprc files for.
- Returns:
List of leaprc file paths.
- Return type:
List[str]
- 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_prep_path: str | None = None, input_source_path: str | None = None, properties: dict | None = None, **kwargs) int [source]
Create
LeapSolvate
method