ensemble.py¶
Ensemble
¶
Ensemble(info_path: Sequence[str], do_verbose: bool = False)
Multiprocessing wrapper class to batch run Langevin integrations.
Parameters:
-
(info_path¶Sequence[str]) –file path to
Info.jsonbroken up into tuple/list of strings -
(do_verbose¶bool, default:False) –flag whether to use
tqdmprogress bar, and report operations
Methods:
-
create–Generate list of
Simulationinstances. -
exec–Execute an ensemble of sims in parallel using
multiprocessing. -
exec_multiple_sims–Carry out the
multiprocessingparallelization of the ensemble of sims. -
initialize–Carry out initialization of each
-
multi_plot–Generate graphs of the ensemble results.
-
plot–Generate graphs for results from a single sim.
-
save–Export Outfo.json, graphs, and data files.
-
sim_exec_wrapper–Pool wrapper to execute a specific sim instance.
Source code in .venv/lib/python3.14/site-packages/langevin/dp/ensemble.py
create
¶
Generate list of Simulation instances.
Source code in .venv/lib/python3.14/site-packages/langevin/dp/ensemble.py
exec
¶
Execute an ensemble of sims in parallel using multiprocessing.
Source code in .venv/lib/python3.14/site-packages/langevin/dp/ensemble.py
exec_multiple_sims
¶
Carry out the multiprocessing parallelization of the ensemble of sims.
Parameters:
Returns:
Source code in .venv/lib/python3.14/site-packages/langevin/dp/ensemble.py
initialize
¶
Carry out initialization of each
Simulation instance.
multi_plot
¶
Generate graphs of the ensemble results.
Source code in .venv/lib/python3.14/site-packages/langevin/dp/ensemble.py
plot
¶
save
¶
Export Outfo.json, graphs, and data files.
Parameters:
Depending on Info.json settings, output also may be carried out for all simulations into separate folders.
Source code in .venv/lib/python3.14/site-packages/langevin/dp/ensemble.py
sim_exec_wrapper
staticmethod
¶
sim_exec_wrapper(sim: Simulation) -> Sequence[tuple]
Pool wrapper to execute a specific sim instance.
Parameters:
-
(sim¶Simulation) –simulation instance
Returns: