Skip to content

Topo

simulation.amber.topo.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.

simulation.amber.topo.TLEAP_PATH = os.environ.get('TLEAP_PATH', 'tleap') module-attribute

Path to tleap executable.

You can specify this by setting the path to the TLEAP_PATH environmental variable. For example:

export TLEAP_PATH="~/miniconda3/envs/metalflare-dev/bin/tleap

simulation.amber.topo.AmberTopoGen()

Bases: TopoGen

Standardized framework for generating topology files.

dry_run(path_structure, simlify_config) classmethod

Perform a dry run to obtain any preliminary information.

PARAMETER DESCRIPTION
path_structure

Path structure file for topology generation. For Amber, this must be a PDB file.

TYPE: str

simlify_config

Simlify configuration.

TYPE: SimlifyConfig

RETURNS DESCRIPTION
dict[str, Any]

Keyword arguments to be passed into run.

Examples:

The base tleap input file is shown below with [AMBER_PROTEIN_STANDARD_CONTEXT][simulation.amber.contexts.AMBER_PROTEIN_STANDARD_CONTEXT].

source leaprc.protein.ff19SB
source leaprc.water.opc3
<add_lines>
mol = loadpdb <path_structure>
solvatebox mol OPC3BOX 10.0
savepdb mol <temp file>
charge mol
quit

ff_lines(simlify_config) classmethod

Prepare to use force fields in the topology file.

PARAMETER DESCRIPTION
simlify_config

A simulation context for system preparation.

TYPE: SimlifyConfig

RETURNS DESCRIPTION
Iterable[str]

source leaprc. commands for tleap.

Examples:

amber_context = {
    "ff_protein": "ff14SB", "ff_water": "tip3p", "ff_small_molecule": "gaff2"
}
simlify_config = SimulationContextManager(**amber_context)
tleap_lines = get_source_ff_lines(simlify_config)

would result in

["source leaprc.protein.ff14SB", "source leaprc.water.tip3p", "source leaprc.gaff2"]

run(path_structure, simlify_config, **kwargs) classmethod

Run tleap preparation of a system.

PARAMETER DESCRIPTION
path_structure

Path structure file for topology generation. For Amber, this must be a PDB file.

TYPE: str

path_topo_write

Where to write topology file.

path_coord_write

Where to write coordinate file.

simlify_config

Simlify configuration.

TYPE: SimlifyConfig

dir_work

Working directory to generate topology. Useful for specifying relative paths.

kwargs

Keyword arguments used for this specific package.

Required

  • charge_anion_num
  • charge_cation_num

Optional

  • path_tleap_pdb: Specify the prepared system as a PDB file after tleap is finished.

TYPE: dict[str, Any] DEFAULT: {}