Skip to content

Run

SimulationRunPrep()

Bases: ABC

Standardized framework for preparing molecular simulation runs.

get_stage_input_lines(context) abstractmethod classmethod

Prepare input file lines for a single stage.

PARAMETER DESCRIPTION
context

Specifies options and parameters.

TYPE: dict[str, Any]

RETURNS DESCRIPTION
Collection[str]

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

get_stage_run_command(context) abstractmethod classmethod

Prepare bash command to run a single simulation.

PARAMETER DESCRIPTION
context

Specifies options and parameters.

TYPE: dict[str, Any]

RETURNS DESCRIPTION
Collection[str]

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

Notes:

prepare_context should be ran before this.

prepare(simulation_context) classmethod

Run all steps to prepare simulations.

PARAMETER DESCRIPTION
simulation_context

Context manager for simulations.

TYPE: SimulationContextManager

prepare_context(simulation_context) abstractmethod staticmethod

Prepare bash command to run a single simulation. This is unique to each simulation package and can be customized based on the context.

PARAMETER DESCRIPTION
simulation_context

Specifies options and parameters for preparing run bash command.

TYPE: SimulationContextManager

RETURNS DESCRIPTION
SimulationContextManager

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

Examples:

TODO:

prepare_slurm_lines(context, write=True) classmethod

Prepare slurm submission script lines.

PARAMETER DESCRIPTION
context

Specifies options and parameters.

TYPE: dict[str, Any]

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

cli_run_simulation_slurm_prep()

Command-line interface preparing files for running simulations using slurm.

run_simulation_slurm_prep(job_name, write_dir, run_path, slurm_path, prep_class_string, simulation_context)

Run tleap preparation of a system.

PARAMETER DESCRIPTION
job_name

Unique label for these simulations.

TYPE: str

write_dir

Path to local directory where we will write the simulation files.

TYPE: str

run_path

Path to write a bash file that runs all simulations prepared here.

TYPE: str

slurm_path

Path to write slurm submission script.

TYPE: str

prep_class_string

String to a simulation preparation class. For example, "metalflare.simulation.amber.run.AmberRunPrep".

TYPE: str

simulation_context

Context manager for simulations.

TYPE: SimulationContextManager