ensembler.visualisation package

Submodules

ensembler.visualisation.animationSimulation module

ensembler.visualisation.animationSimulation.animation_EDS_trajectory(system: system, limits_coordinate_space=None, limits_potential_system_energy: Tuple[float, float] = None, title: str = None, out_path: str = None, hide_legend: bool = True, s_values: List[float] = [1.0], step_size: float = 1, out_writer: str = 'pillow', dpi: int = 100, total_potential_resolution_points: int = 100) -> (<class 'matplotlib.animation.Animation'>, <class 'str'>)[source]

this function is generating a animation out of an eds-simulation.

Parameters
  • system (systemCls) – the system, that carried out a simulation to be visualized

  • limits_coordinate_space (Tuple[float, float], optional) – the plot limits of the coordinate space

  • limits_potential_system_energy (Tuple[float, float], optional) – the plot limits of the potential energies

  • title (str, optional) – the plot title

  • out_path (str, optional) – the out path storing the animation.

  • hide_legend (bool, optional) – should the plot legend be hidden?

  • s_values (List[float], optional) – s-values for the eds-potential

  • step_size (int, optional) – size of the steps trough the trajectory

  • out_writer (str, optional) – the animation render.

  • dpi (int, optional) – the resolution of the animation.

  • total_potential_resolution_points (int, optional) – the number of points for the visualization of the analytical reference potential.

Returns

returns the animation object and the output path if saved.

Return type

Tuple[animation.Animation, Union[str, None]]

ensembler.visualisation.animationSimulation.animation_trajectory(simulated_system: system, limits_coordinate_space: Tuple[float, float] = None, limits_potential_system_energy: Tuple[float, float] = None, resolution_of_analytic_potential: int = 1000, title: str = None, out_path: str = None, out_writer: str = 'pillow', dpi: int = 100, every_n_frame: int = 1) → Tuple[matplotlib.animation.Animation, Optional[str]][source]

this function is generating a animation out of a simulation.

Parameters
  • simulated_system (systemCls) – the system, that carried out a simulation to be visualized

  • limits_coordinate_space (Tuple[float, float], optional) – the plot limits of the coordinate space

  • limits_potential_system_energy (Tuple[float, float], optional) – the plot limits of the potential energies

  • title (str, optional) – the plot title

  • out_path (str, optional) – the out path storing the animation.

  • out_writer (str, optional) – the animation render.

  • dpi (int, optional) – the resolution of the animation.

  • every_n_frame (int, optional) – use every n-th frame

Returns

returns the animation object and the output path if saved.

Return type

Tuple[animation.Animation, Union[str, None]]

ensembler.visualisation.interactive_plots module

ensembler.visualisation.interactive_plots.interactive_conveyor_belt(conveyorBelt=None, numsys: int = 8, nbins: int = 100, steps: int = 100)[source]

This provides a nice widget for jupyter notebooks to play around with the conveyor belt.

Parameters
  • conveyorBelt

  • numsys

  • nbins

  • steps

class ensembler.visualisation.interactive_plots.interactive_eds(nstates=2, s=100, Eoff=None, figsize=[12, 6])[source]

Bases: object

This provides a nice widget for jupyter notebooks to play around with the eds reference potetnial.

Eoffs = []
V_is = []
make_eoff_sliders(nstates)[source]
nstates = 2
redraw()[source]
redraw_eoff(eoff_event)[source]
redraw_s(s)[source]
redraw_states(nstates_event)[source]
s = 1.35

ensembler.visualisation.plotConveyorBelt module

ensembler.visualisation.plotConveyorBelt.calc_lam(CapLam, i=0, numsys=8, w=0.1)[source]
ensembler.visualisation.plotConveyorBelt.drawCirc(ax, radius, centX, centY, angle_, theta2_, lineWidth=3, color_='black')[source]
ensembler.visualisation.plotConveyorBelt.drawFunicular(x, y, CapLam=0.1, M=2, drawArrows=False)[source]
ensembler.visualisation.plotConveyorBelt.plotEnsembler(x, y, CapLam=0.1, M=8, drawArrows=False)[source]
ensembler.visualisation.plotConveyorBelt.updateEnsembler(x, y, ax, CapLam=0.1, M=8, drawArrows=False)[source]

ensembler.visualisation.plotPotentials module

ensembler.visualisation.plotPotentials.envPot_diffS_2stateMap_compare(eds_potential: ensembler.potentials.OneD.envelopedPotential, s_values: list, positions: list, V_max: float = 500, V_min: float = None, title: str = None, out_path: str = None)[source]
ensembler.visualisation.plotPotentials.envPot_diffS_compare(eds_potential: ensembler.potentials.OneD.envelopedPotential, s_values: list, positions: list, y_range: tuple = None, title: str = None, out_path: str = None)[source]
ensembler.visualisation.plotPotentials.envPot_differentS_overlay_min0_plot(eds_potential: ensembler.potentials.OneD.envelopedPotential, s_values: list, positions: list, y_range: tuple = None, hide_legend: bool = False, title: str = None, out_path: str = None)[source]
ensembler.visualisation.plotPotentials.envPot_differentS_overlay_plot(eds_potential: ensembler.potentials.OneD.envelopedPotential, s_values: list, positions: list, y_range: tuple = None, hide_legend: bool = False, title: str = None, out_path: str = None, axes=None)[source]
ensembler.visualisation.plotPotentials.multiState_overlays(states: list, positions: list = array([- 8.0, - 7.96793587, - 7.93587174, - 7.90380762, - 7.87174349, - 7.83967936, - 7.80761523, - 7.7755511, - 7.74348697, - 7.71142285, - 7.67935872, - 7.64729459, - 7.61523046, - 7.58316633, - 7.5511022, - 7.51903808, - 7.48697395, - 7.45490982, - 7.42284569, - 7.39078156, - 7.35871743, - 7.32665331, - 7.29458918, - 7.26252505, - 7.23046092, - 7.19839679, - 7.16633267, - 7.13426854, - 7.10220441, - 7.07014028, - 7.03807615, - 7.00601202, - 6.9739479, - 6.94188377, - 6.90981964, - 6.87775551, - 6.84569138, - 6.81362725, - 6.78156313, - 6.749499, - 6.71743487, - 6.68537074, - 6.65330661, - 6.62124248, - 6.58917836, - 6.55711423, - 6.5250501, - 6.49298597, - 6.46092184, - 6.42885772, - 6.39679359, - 6.36472946, - 6.33266533, - 6.3006012, - 6.26853707, - 6.23647295, - 6.20440882, - 6.17234469, - 6.14028056, - 6.10821643, - 6.0761523, - 6.04408818, - 6.01202405, - 5.97995992, - 5.94789579, - 5.91583166, - 5.88376754, - 5.85170341, - 5.81963928, - 5.78757515, - 5.75551102, - 5.72344689, - 5.69138277, - 5.65931864, - 5.62725451, - 5.59519038, - 5.56312625, - 5.53106212, - 5.498998, - 5.46693387, - 5.43486974, - 5.40280561, - 5.37074148, - 5.33867735, - 5.30661323, - 5.2745491, - 5.24248497, - 5.21042084, - 5.17835671, - 5.14629259, - 5.11422846, - 5.08216433, - 5.0501002, - 5.01803607, - 4.98597194, - 4.95390782, - 4.92184369, - 4.88977956, - 4.85771543, - 4.8256513, - 4.79358717, - 4.76152305, - 4.72945892, - 4.69739479, - 4.66533066, - 4.63326653, - 4.6012024, - 4.56913828, - 4.53707415, - 4.50501002, - 4.47294589, - 4.44088176, - 4.40881764, - 4.37675351, - 4.34468938, - 4.31262525, - 4.28056112, - 4.24849699, - 4.21643287, - 4.18436874, - 4.15230461, - 4.12024048, - 4.08817635, - 4.05611222, - 4.0240481, - 3.99198397, - 3.95991984, - 3.92785571, - 3.89579158, - 3.86372745, - 3.83166333, - 3.7995992, - 3.76753507, - 3.73547094, - 3.70340681, - 3.67134269, - 3.63927856, - 3.60721443, - 3.5751503, - 3.54308617, - 3.51102204, - 3.47895792, - 3.44689379, - 3.41482966, - 3.38276553, - 3.3507014, - 3.31863727, - 3.28657315, - 3.25450902, - 3.22244489, - 3.19038076, - 3.15831663, - 3.12625251, - 3.09418838, - 3.06212425, - 3.03006012, - 2.99799599, - 2.96593186, - 2.93386774, - 2.90180361, - 2.86973948, - 2.83767535, - 2.80561122, - 2.77354709, - 2.74148297, - 2.70941884, - 2.67735471, - 2.64529058, - 2.61322645, - 2.58116232, - 2.5490982, - 2.51703407, - 2.48496994, - 2.45290581, - 2.42084168, - 2.38877756, - 2.35671343, - 2.3246493, - 2.29258517, - 2.26052104, - 2.22845691, - 2.19639279, - 2.16432866, - 2.13226453, - 2.1002004, - 2.06813627, - 2.03607214, - 2.00400802, - 1.97194389, - 1.93987976, - 1.90781563, - 1.8757515, - 1.84368737, - 1.81162325, - 1.77955912, - 1.74749499, - 1.71543086, - 1.68336673, - 1.65130261, - 1.61923848, - 1.58717435, - 1.55511022, - 1.52304609, - 1.49098196, - 1.45891784, - 1.42685371, - 1.39478958, - 1.36272545, - 1.33066132, - 1.29859719, - 1.26653307, - 1.23446894, - 1.20240481, - 1.17034068, - 1.13827655, - 1.10621242, - 1.0741483, - 1.04208417, - 1.01002004, - 0.97795591, - 0.94589178, - 0.91382766, - 0.88176353, - 0.8496994, - 0.81763527, - 0.78557114, - 0.75350701, - 0.72144289, - 0.68937876, - 0.65731463, - 0.6252505, - 0.59318637, - 0.56112224, - 0.52905812, - 0.49699399, - 0.46492986, - 0.43286573, - 0.4008016, - 0.36873747, - 0.33667335, - 0.30460922, - 0.27254509, - 0.24048096, - 0.20841683, - 0.17635271, - 0.14428858, - 0.11222445, - 0.08016032, - 0.04809619, - 0.01603206, 0.01603206, 0.04809619, 0.08016032, 0.11222445, 0.14428858, 0.17635271, 0.20841683, 0.24048096, 0.27254509, 0.30460922, 0.33667335, 0.36873747, 0.4008016, 0.43286573, 0.46492986, 0.49699399, 0.52905812, 0.56112224, 0.59318637, 0.6252505, 0.65731463, 0.68937876, 0.72144289, 0.75350701, 0.78557114, 0.81763527, 0.8496994, 0.88176353, 0.91382766, 0.94589178, 0.97795591, 1.01002004, 1.04208417, 1.0741483, 1.10621242, 1.13827655, 1.17034068, 1.20240481, 1.23446894, 1.26653307, 1.29859719, 1.33066132, 1.36272545, 1.39478958, 1.42685371, 1.45891784, 1.49098196, 1.52304609, 1.55511022, 1.58717435, 1.61923848, 1.65130261, 1.68336673, 1.71543086, 1.74749499, 1.77955912, 1.81162325, 1.84368737, 1.8757515, 1.90781563, 1.93987976, 1.97194389, 2.00400802, 2.03607214, 2.06813627, 2.1002004, 2.13226453, 2.16432866, 2.19639279, 2.22845691, 2.26052104, 2.29258517, 2.3246493, 2.35671343, 2.38877756, 2.42084168, 2.45290581, 2.48496994, 2.51703407, 2.5490982, 2.58116232, 2.61322645, 2.64529058, 2.67735471, 2.70941884, 2.74148297, 2.77354709, 2.80561122, 2.83767535, 2.86973948, 2.90180361, 2.93386774, 2.96593186, 2.99799599, 3.03006012, 3.06212425, 3.09418838, 3.12625251, 3.15831663, 3.19038076, 3.22244489, 3.25450902, 3.28657315, 3.31863727, 3.3507014, 3.38276553, 3.41482966, 3.44689379, 3.47895792, 3.51102204, 3.54308617, 3.5751503, 3.60721443, 3.63927856, 3.67134269, 3.70340681, 3.73547094, 3.76753507, 3.7995992, 3.83166333, 3.86372745, 3.89579158, 3.92785571, 3.95991984, 3.99198397, 4.0240481, 4.05611222, 4.08817635, 4.12024048, 4.15230461, 4.18436874, 4.21643287, 4.24849699, 4.28056112, 4.31262525, 4.34468938, 4.37675351, 4.40881764, 4.44088176, 4.47294589, 4.50501002, 4.53707415, 4.56913828, 4.6012024, 4.63326653, 4.66533066, 4.69739479, 4.72945892, 4.76152305, 4.79358717, 4.8256513, 4.85771543, 4.88977956, 4.92184369, 4.95390782, 4.98597194, 5.01803607, 5.0501002, 5.08216433, 5.11422846, 5.14629259, 5.17835671, 5.21042084, 5.24248497, 5.2745491, 5.30661323, 5.33867735, 5.37074148, 5.40280561, 5.43486974, 5.46693387, 5.498998, 5.53106212, 5.56312625, 5.59519038, 5.62725451, 5.65931864, 5.69138277, 5.72344689, 5.75551102, 5.78757515, 5.81963928, 5.85170341, 5.88376754, 5.91583166, 5.94789579, 5.97995992, 6.01202405, 6.04408818, 6.0761523, 6.10821643, 6.14028056, 6.17234469, 6.20440882, 6.23647295, 6.26853707, 6.3006012, 6.33266533, 6.36472946, 6.39679359, 6.42885772, 6.46092184, 6.49298597, 6.5250501, 6.55711423, 6.58917836, 6.62124248, 6.65330661, 6.68537074, 6.71743487, 6.749499, 6.78156313, 6.81362725, 6.84569138, 6.87775551, 6.90981964, 6.94188377, 6.9739479, 7.00601202, 7.03807615, 7.07014028, 7.10220441, 7.13426854, 7.16633267, 7.19839679, 7.23046092, 7.26252505, 7.29458918, 7.32665331, 7.35871743, 7.39078156, 7.42284569, 7.45490982, 7.48697395, 7.51903808, 7.5511022, 7.58316633, 7.61523046, 7.64729459, 7.67935872, 7.71142285, 7.74348697, 7.7755511, 7.80761523, 7.83967936, 7.87174349, 7.90380762, 7.93587174, 7.96793587, 8.0]), y_range: tuple = 0, 10, title: str = 'Multiple state overlay', label_prefix: str = 'State', out_path: str = None)[source]
ensembler.visualisation.plotPotentials.plot_1DPotential(potential: ensembler.potentials._basicPotentials._potential1DCls, positions: list, out_path: str = None, x_range=None, y_range=None, title: str = None, ax=None)[source]
ensembler.visualisation.plotPotentials.plot_1DPotential_Termoverlay(potential: ensembler.potentials._basicPotentials._potential1DCls, positions: list, x_range=None, y_range=None, title: str = None, ax=None)[source]
ensembler.visualisation.plotPotentials.plot_1DPotential_V(potential: ensembler.potentials._basicPotentials._potential1DCls, positions: list, color=None, x_range=None, y_range=None, title: str = None, ax=None, y_label: str = '$V\\ [k_B T]$')[source]
ensembler.visualisation.plotPotentials.plot_1DPotential_dhdpos(potential: ensembler.potentials._basicPotentials._potential1DCls, positions: list, color=1.0, 0.4980392156862745, 0.054901960784313725, 1.0, x_range=None, y_range=None, title: str = None, ax=None, yUnit: str = 'kT')[source]
ensembler.visualisation.plotPotentials.plot_2DPotential(potential: ensembler.potentials._basicPotentials._potential2DCls, positions: List[Tuple[numbers.Number, numbers.Number]] = None, title: str = None, out_path: str = None, x1_range=None, x2_range=None) -> (<class 'matplotlib.figure.Figure'>, <class 'matplotlib.axes._axes.Axes'>)[source]

This function plots the potential energy landscape of a 2D - Potential Function

Parameters
  • V

  • positions2D

  • title

  • out_path

  • x_label

  • y_label

  • space_range

  • point_resolution

  • ax

  • show_plot

  • dpi

  • cmap

ensembler.visualisation.plotPotentials.plot_2D_2State_EDS_potential(eds_pot, out_path: str = None, traj=None, s=100, positions2D=None, space_range=[[- 3.141592653589793, 3.141592653589793], [- 3.141592653589793, 3.141592653589793]], point_resolution=500, x_label='$\\phi/[^{\\circ}$]', y_label='$\\psi/[^{\\circ}$]', verbose=False)[source]

Used in publication :Parameters: * eds_pot

  • out_path

  • traj

  • s

  • positions2D

  • space_range

  • point_resolution

  • x_label

  • y_label

  • verbose

ensembler.visualisation.plotPotentials.plot_2D_2State_EDS_potential_sDependency(sVal_traj_Dict: (<class 'dict'>, typing.List), eds_pot, out_path: str = None, plot_trajs=False, space_range=[[-3.141592653589793, 3.141592653589793], [-3.141592653589793, 3.141592653589793]], point_resolution=500, positions2D=None, x_label='$\\phi/[^{\\circ}$]', y_label='$\\psi/[^{\\circ}$]', verbose=False)[source]
ensembler.visualisation.plotPotentials.plot_2D_2states(V1, V2, space_range: Tuple[numbers.Number, numbers.Number] = None, point_resolution=500)[source]
ensembler.visualisation.plotPotentials.plot_2D_potential_V(potential: ensembler.potentials._basicPotentials._potential2DCls, positions2D: List[Tuple[numbers.Number, numbers.Number]] = None, title: str = None, out_path: str = None, x_label: str = None, y_label: str = None, space_range: Tuple[Tuple[numbers.Number, numbers.Number], Tuple[numbers.Number, numbers.Number]] = (-10, 10), point_resolution: int = 1000, ax=None, dpi: int = 300, cmap=<matplotlib.colors.ListedColormap object>) -> (<class 'matplotlib.figure.Figure'>, <class 'matplotlib.axes._axes.Axes'>, <built-in function array>)[source]
ensembler.visualisation.plotPotentials.plot_2perturbedEnergy_landscape(potential: ensembler.potentials._basicPotentials._potential1DClsPerturbed, positions: list, lambdas: list, cmap=<matplotlib.colors.ListedColormap object>, x_range=None, lam_range=None, title: str = None, colbar: bool = False, ax=None)[source]
ensembler.visualisation.plotPotentials.plot_envelopedPotential_2State_System(eds_potential: ensembler.potentials.OneD.envelopedPotential, positions: list, s_value: float = None, Eoffi: list = None, title: str = None, out_path: str = None, V_max: float = 600, V_min: float = None)[source]
ensembler.visualisation.plotPotentials.plot_envelopedPotential_system(eds_potential: ensembler.potentials.OneD.envelopedPotential, positions: list, s_value: float = None, Eoffi: list = None, y_range: tuple = None, title: str = None, out_path: str = None)[source]
ensembler.visualisation.plotPotentials.plot_potential(potential: ensembler.potentials._basicPotentials._potentialNDCls, positions: list, out_path: str = None, x_range=None, y_range=None, title: str = None, ax=None)[source]
ensembler.visualisation.plotPotentials.significant_decimals(s: float) → float[source]

ensembler.visualisation.plotSimulations module

ensembler.visualisation.plotSimulations.oneD_biased_simulation_analysis_plot(system: system, out_path: str = None, title: str = '', limits_coordinate_space: Tuple[float, float] = None, limits_potential_system_energy: Tuple[float, float] = None, limits_force: Tuple[float, float] = None, resolution_full_space: int = 1000, figsize: Tuple[float, float] = array([8.3702241, 2.09255602])) → str[source]

Plot giving the sampled space, position distribution and forces

Parameters
  • sys (system Type) – The simulated system

  • limits_potential_system_energy (tuple) – Defines the range of the x axis of the first plot

  • limits_potential_system_energy (tuple) – Defines the range of the y axis of the first plot

  • title (String) – Title for the plot

  • out_path (str) – If specified, figure will be saved to this location

  • resolution_full_space (int) – Number of points used for visualizing the potential space

Returns

  • out_path (str) – Location the figure is saved to

  • fig (Figure object)

ensembler.visualisation.plotSimulations.oneD_simulation_analysis_plot(system: system, title: str = '', out_path: str = None, limits_coordinate_space: Tuple[float, float] = None, limits_potential_system_energy: Tuple[float, float] = None, limits_force: Tuple[float, float] = None, resolution_full_space=1000, figsize: Tuple[float, float] = array([8.3702241, 2.09255602])) → Tuple[matplotlib.pyplot.figure, str][source]

This plot gives insight into sampled coordinate - space, the position distribution and the force timeseries

Parameters
  • system (systemCls) – a system that carried out a simulation, which should be visualized.

  • title (str, optional) – title to the output plot

  • out_path (str, optional) – store the plot to the given path

  • limits_coordinate_space (tuple, optional) – the coordinate space range

  • limits_potential_system_energy (tuple, optional) – y-limits for the Potential energies

  • limits_force (tuple, optional) – y-limits for force plots

  • resolution_full_space (int, optional) – how many points, shall be used to visualize the potential function.

Returns

returns the generated figure and the output str

Return type

Tuple[plt.figure, str]

ensembler.visualisation.plotSimulations.simulation_analysis_plot(system: system, title: str = '', out_path: str = None, limits_coordinate_space: Tuple[float, float] = None, oneD_limits_potential_system_energy: Tuple[float, float] = None, limits_force: Tuple[float, float] = None, twoD_number_of_bins: int = 25, resolution_full_space=1000, figsize: Tuple[float, float] = array([8.3702241, 2.09255602])) → Tuple[matplotlib.pyplot.figure, str][source]

This is a wrapper function for the analysis of

Parameters
  • system

  • title

  • out_path

  • limits_coordinate_space

  • resolution_full_space

ensembler.visualisation.plotSimulations.twoD_simulation_analysis_plot(system: system, out_path: str = None, title: str = '', limits_coordinate_space: Tuple[Tuple[float, float], Tuple[float, float]] = [[- 180, 180], [- 180, 180]], number_of_bins: int = 25, limits_force: Tuple[float, float] = None, resolution_full_space: int = 1000, figsize: Tuple[float, float] = array([8.3702241, 2.09255602])) → Tuple[matplotlib.figure.Figure, Optional[str]][source]

Plot giving the sampled space, position histogram and forces of a 2D simulation

system: sustemCls

The simulated 2D system

out_path: str, optional

save the plot to path

title:str, optional

title of the plot

limits_coordinate_space: Tuple[Tuple[float, float], Tuple[float, float]], optional

range of the coordinate space: ((xmin, xmax), (ymin, ymax))

number_of_bins:

number of bins for the position histogram

resolution_full_space: int

Number of points used for visualizing the potential space

sys: system Type

The simulated system

limits_potential_system_energy: tuple

Defines the range of the x axis of the first plot

limits_potential_system_energy: tuple

Defines the range of the y axis of the first plot

title: String

Title for the plot

out_path: str

If specified, figure will be saved to this location

resolution_full_space: int

Number of points used for visualizing the potential space

plt.Figure

Figure object

Union[str, None]

out_path

ensembler.visualisation.style module

This style file is used to control the styling of the visualizations followed

Module contents

A collection of visualizations (plots, animation, interactive widgets)

ensembler.visualisation.cm2inch(value: float)[source]