endstate_correction.neq.perform_switching

endstate_correction.neq.perform_switching(sim: Simulation, lambdas: list, samples: Trajectory, nr_of_switches: int = 50, save_trajs: bool = False, save_endstates: bool = False, workdir: str = '.') Tuple[list, list][source]

Perform NEQ or instantaneous switching using the provided lambda schema on the passed simulation instance.

Args:

sim (Simulation): simulation instance lambdas (list): list of lambda values samples (Trajectory): samples from which the starting points fo the NEQ switching simulation are drawn nr_of_switches (int, optional): number of switches. Defaults to 50. save_trajs (bool, optional): save switching trajectories. Defaults to False. save_endstates (bool, optional): save endstate of switching trajectory. Defaults to False.

Raises:

RuntimeError: if the number of lambda states is less than 2

Returns:

Tuple[list, list]: work or dE values, endstate samples