Tleap
Prepare Amber simulations with tleap.
FF_WATER_SOLVENT_BOX_MAP: dict[str, Any] = {'tip3p': 'TIP3PBOX', 'tip4p': 'TIP4PBOX', 'tip4pew': 'TIP4PEWBOX', 'tip5p': 'TIP5PBOX', 'opc': 'OPCBOX', 'opc3': 'OPC3BOX', 'pol3': 'POL3BOX', 'spce': 'SPCBOX'}
module-attribute
¶
Maps ff_water
in simulation contexts to tleap box types.
TLEAP_PATH = os.environ.get('TLEAP_PATH', 'tleap')
module-attribute
¶
cli_run_tleap()
¶
Command-line interface to running tleap
get_prelim_sim_info(pdb_path, simulation_context, add_lines=None)
¶
Run a preliminary tleap preparation to get information about the system.
PARAMETER | DESCRIPTION |
---|---|
pdb_path |
Path to PDB file to load into tleap.
TYPE:
|
simulation_context |
A simulation context for system preparation.
TYPE:
|
add_lines |
Additional tleap lines to add before loading the PDB file. |
RETURNS | DESCRIPTION |
---|---|
dict[str, Any]
|
Parsed information from the tleap log. |
Examples:
The base tleap
input file is shown below with
AMBER_PROTEIN_STANDARD_CONTEXT
.
get_source_ff_lines(simulation_context)
¶
Prepare tleap commands for loading force fields.
PARAMETER | DESCRIPTION |
---|---|
simulation_context |
A simulation context for system preparation.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[str]
|
|
Examples:
amber_context = {
"ff_protein": "ff14SB", "ff_water": "tip3p", "ff_small_molecule": "gaff2"
}
simulation_context = SimulationContextManager(**amber_context)
tleap_lines = get_source_ff_lines(simulation_context)
would result in
parse_tleap_log(log_lines)
¶
Parse information from tleap log file.
PARAMETER | DESCRIPTION |
---|---|
log_lines |
Lines of the |
RETURNS | DESCRIPTION |
---|---|
dict[str, Any]
|
Parsed information from the log file. |
Information:
-
duplicate_atoms
: list[dict[str, str]]
Each atom in a residue should have a unique type. This list collects information of duplicated atom types.
prepare_amber_files(pdb_path, prmtop_path, inpcrd_path, simulation_context, pdb_output_path=None, cations=0, anions=0, add_lines=None)
¶
Prepare amber input files.
PARAMETER | DESCRIPTION |
---|---|
pdb_path |
Path to PDB file to load into tleap.
TYPE:
|
prmtop_path |
Path to save topology file.
TYPE:
|
inpcrd |
Path to save coordinate file.
|
simulation_context |
A simulation context for system preparation.
TYPE:
|
pdb_output_path |
Path to save final system.
TYPE:
|
cations |
Number of cations to add.
TYPE:
|
anions |
Number of anions to add.
TYPE:
|
add_lines |
Additional tleap lines to add before generating parameters. |
RETURNS | DESCRIPTION |
---|---|
dict[str, Any]
|
Parsed information from the tleap log. |
Examples:
The base tleap
input file is shown below with
AMBER_PROTEIN_STANDARD_CONTEXT
.
run_tleap(pdb_path, topo_path, coord_path, yaml_paths, work_dir=None)
¶
Run tleap preparation of a system.
PARAMETER | DESCRIPTION |
---|---|
pdb_path |
Path to PDB file to prepare.
TYPE:
|
topo_path |
Path to save topology file.
TYPE:
|
coord_path |
Path to save coordinate file.
TYPE:
|
yaml_paths |
YAML file paths context. You can include a list under |
work_dir |
Working directory to run tleap and specifying relative paths.
TYPE:
|