Skip to content

Run

AmberRunPrep()

Bases: SimulationRunPrep

Prepares files for Amber simulations

get_stage_input_lines(context) classmethod

Prepare input file lines for a single stage.

PARAMETER DESCRIPTION
context

Specifies options and parameters.

TYPE: dict[str, Any]

RETURNS DESCRIPTION
list[str]

Input file lines for a single simulations. The lines do not end in \n.

get_stage_run_command(context) classmethod

Prepare bash command to run a single Amber simulation using pmemd.

PARAMETER DESCRIPTION
context

Specifies options and parameters.

TYPE: dict[str, Any]

RETURNS DESCRIPTION
list[str]

Bash commands in a list to run one stage of a simulation.

Notes:

prepare_context should be ran before this.

Uses:

The following attributes are possibly used here and should be specified in simulation_context.

  • stage_name: Unique label for this simulation stage. This will be used to build file paths.
  • input_path: Path to input file for this Amber simulations.
  • output_dir: Path to final output directory.
  • scratch_dir: Path to scratch directory if desired. Will run the calculations here and then copy to output_dir.
  • compute_platform: Computational platform to run the simulation on.
  • cpu_cores: Number of cores to use for mpi simulations if requested.

prepare(simulation_context) classmethod

Run all steps to prepare simulations.

PARAMETER DESCRIPTION
simulation_context

Context manager for simulations.

TYPE: SimulationContextManager

prepare_context(simulation_context) staticmethod

Preprocessing and validating of context for Amber simulations.

PARAMETER DESCRIPTION
simulation_context

Context manager for simulations.

TYPE: SimulationContextManager

prepare_stage(context, run_commands=None, write=True) classmethod

Write input files for a simulation stage and builds bash commands to run all splits.

PARAMETER DESCRIPTION
context

Specifies options and parameters.

TYPE: dict[str, Any]

run_commands

Cumulative run commands for all desired stages.

TYPE: list[str] | None DEFAULT: None

write

Write input file to disk.

TYPE: bool DEFAULT: True

RETURNS DESCRIPTION
list[str]

Input file lines for this stage.

list[str]

Updated run_commands including this stage.

Notes:

prepare_context should be ran before this.