Supersolids Python
Supersolids Python
Release 0.1.26
Daniel Scheiermann
1 Supersolids 1
1.1 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Installing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 pip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.4 Archlinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.5 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.6 Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.7 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.8 Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.9 Contributing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Contributing 5
3 License 7
4 API Reference 9
4.1 supersolids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Index 45
i
ii
CHAPTER
ONE
SUPERSOLIDS
Package to simulate and animate supersolids. This is done by solving the dimensionless time-dependent non-linear
Schrodinger equation for an arbitrary potential. The split operator method with the Trotter-Suzuki approximation is
used.
1.1 Documentation
https://supersolids.readthedocs.io/en/latest/
1.2 Installing
1.3 pip
1.4 Archlinux
1.5 Windows
You need to add python to your path (if you didn’t do it, when installing python/anaconda).
• Then continue with pip installation
1
supersolids, Release 0.1.26
1.6 Source
1.7 Usage
The package uses __main__.py, so it can be run as module. To get help for the flags, run:
• python -m supersolids -h
• python -m supersolids.tools.load_npz -h
• python -m supersolids.tools.simulate_npz -h
To actually run (example):
• python -m supersolids -Res=’{“x”: 16, “y”: 32, “z”: 62}’ -Box=’{“x0”: -10, “x1”: 10, “y0”: -6, “y1”: 5,
“z0”: -8, “z1”: 8}’
• python -m supersolids.tools.load_npz -frame_start=79000
• python -m supersolids.tools.simulate_npz -dir_name=movie004 -filename_npz=step_079000.npz
If you use an IDE and your script parameter includes double quotes, escape the double quotes with backslashes, for example:
1.8 Issues
2 Chapter 1. Supersolids
supersolids, Release 0.1.26
1.9 Contributing
1.9. Contributing 3
supersolids, Release 0.1.26
4 Chapter 1. Supersolids
CHAPTER
TWO
CONTRIBUTING
5
supersolids, Release 0.1.26
6 Chapter 2. Contributing
CHAPTER
THREE
LICENSE
MIT License
Copyright (c) 2021 Scheiermann
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documen-
tation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom
the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PAR-
TICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT-
WARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
supersolids, Release 0.1.26
8 Chapter 3. License
CHAPTER
FOUR
API REFERENCE
4.1 supersolids
4.1.1 Subpackages
supersolids.Animation
Submodules
supersolids.Animation.Animation
Module Contents
Classes
Animation
Parameters
• Res (supersolids.helper.Resolution.Resolution) –
• plot_psi_sol (bool) –
• plot_V (bool) –
• alpha_psi (float) –
1 Created with sphinx-autoapi
9
supersolids, Release 0.1.26
• alpha_psi_sol (float) –
• alpha_V (float) –
• camera_r_func (Optional[Callable]) –
• camera_phi_func (Optional[Callable]) –
• camera_z_func (Optional[Callable]) –
• filename (str) –
supersolids.Animation.MatplotlibAnimation
Module Contents
Classes
MatplotlibAnimation
Functions
class supersolids.Animation.MatplotlibAnimation.MatplotlibAnimation(Anim)
Bases: supersolids.Animation.Animation.Animation
Parameters Anim (supersolids.Animation.Animation.Animation) –
set_limits(self, row, col, x_min, x_max, y_min, y_max)
Sets the plot limits appropriate, even if the initial wave function 𝜓0 is not normalized.
Parameters
• row (int) – row of the subplot for the animation
• col (int) – column of the subplot for the animation
• x_min (float) – minimum x value of subplot
• x_max (float) – maximum x value of subplot
• y_min (float) – minimum y value of subplot
Parameters
• i (int) –
• j (int) –
• System (supersolids.Schroedinger.Schroedinger) –
• reserve (float) –
animate(self, frame_index, System, accuracy=10 ** - 6)
Sets the plot limits appropriate, even if the initial wave function 𝜓0 is not normalized.
Parameters
• frame_index (int) – Current index of frame
• System (supersolids.Schroedinger.Schroedinger) – Defines the Schroedinger
equation for a given problem
• accuracy (float) – Convergence is reached when relative error of mu is smaller than
accuracy, where 𝜇 = − log(𝜓𝑛𝑜𝑟𝑚𝑒𝑑 )/(2𝑑𝑡)
start(self, System, accuracy=10 ** - 6)
Sets the plot limits appropriate, even if the initial wave function 𝜓0 is not normalized
Parameters
• accuracy (float) – Convergence is reached when relative error of mu is smaller than
accuracy, where 𝜇 = − log(𝜓𝑛𝑜𝑟𝑚𝑒𝑑 )/(2𝑑𝑡)
• System (supersolids.Schroedinger.Schroedinger) – Defines the Schroedinger
equation for a given problem
supersolids.Animation.MatplotlibAnimation.plot_2d(resolution=32, x_lim=(- 1, 1), y_lim=(- 1, 1),
z_lim=(0, 1), alpha=[0.6], **kwargs)
Parameters
• resolution – number of grid points in one direction
• x_lim (Tuple[float, float]) – Limits of plot in x direction
• y_lim (Tuple[float, float]) – Limits of plot in y direction
• z_lim (Tuple[float, float]) – Limits of plot in z direction
• alpha (List[float]) – alpha value for plot transparency
4.1. supersolids 11
supersolids, Release 0.1.26
Parameters
• resolution (int) –
• reserve (float) –
supersolids.Animation.MayaviAnimation
Module Contents
Classes
MayaviAnimation
Functions
get_supersolids_version()
supersolids.Animation.MayaviAnimation.get_supersolids_version()
supersolids.Animation.MayaviAnimation.get_legend(System, frame, supersolids_version, mu_rel=None)
supersolids.Animation.MayaviAnimation.axes_style()
class supersolids.Animation.MayaviAnimation.MayaviAnimation(Anim, slice_indices=[0, 0, 0],
dir_path=Path.home().joinpath('supersolids',
'results'), offscreen=False)
Bases: supersolids.Animation.Animation.Animation
Parameters
• Anim (supersolids.Animation.Animation.Animation) –
• slice_indices (numpy.ndarray) –
• dir_path (pathlib.Path ) –
• offscreen (bool) –
mayavi_counter :int = 0
create_movie(self, dir_path=None, input_data_file_pattern='*.png', delete_input=True)
Creates movie filename with all matching pictures from input_data_file_pattern. By default deletes all input
pictures after creation of movie to save disk space.
Parameters
• dir_path (pathlib.Path ) – Path where to look for old directories (movie data)
• input_data_file_pattern (str) – Regex pattern to find all input data
• delete_input (bool) – Condition if the input pictures should be deleted, after creation
the creation of the animation as e.g. mp4
Return type pathlib.Path
prepare(self, System)
Parameters
• dir_path (pathlib.Path ) –
• dir_name (str) –
• filename_schroedinger (str) –
• filename_steps (str) –
• steps_format (str) –
• steps_per_npz (int) –
• frame_start (int) –
• arg_slices (bool) –
• azimuth (float) –
• elevation (float) –
animate(self, System, accuracy=10 ** - 6, interactive=True)
Animates solving of the Schroedinger equations of System with mayavi in 3D. Animation is limited to
System.max_timesteps or the convergence according to accuracy.
Parameters
• System (supersolids.Schroedinger.Schroedinger) – Schrödinger equations for the
specified system
• accuracy (float) – Convergence is reached when relative error of mu is smaller than
accuracy, where 𝜇 = − log(𝜓𝑛𝑜𝑟𝑚𝑒𝑑 )/(2𝑑𝑡)
• slice_indices – Numpy array with indices of grid points in the directions x, y, z (in
terms of System.x, System.y, System.z) to produce a slice/plane in mayavi, where 𝜓𝑝𝑟𝑜𝑏 =
|𝜓|2 is used for the slice Max values is for e.g. System.Res.x - 1.
4.1. supersolids 13
supersolids, Release 0.1.26
• interactive (bool) – Condition for interactive mode. When camera functions are used,
then interaction is not possible. So interactive=True turn the usage of camera functions off.
supersolids.helper
Submodules
supersolids.helper.Box
Module Contents
Classes
Functions
BoxResAssert(Res, Box)
supersolids.helper.Box.BoxResAssert(Res, Box)
supersolids.helper.Resolution
Module Contents
Classes
Functions
ResAssert(Res, a)
supersolids.helper.constants
Module Contents
supersolids.helper.constants.a_0 :float
supersolids.helper.constants.u_in_kg :float
supersolids.helper.constants.a_0
4.1. supersolids 15
supersolids, Release 0.1.26
supersolids.helper.cut_1d
Animation for the numerical solver for the non-linear time-dependent Schrodinger equation.
Module Contents
Functions
cut_1d(System, slice_indices = [0, 0, 0], Creates 1D plots of the probability function of the Sys-
psi_sol_3d_cut_x = None, psi_sol_3d_cut_y = tem |𝜓|2
None, psi_sol_3d_cut_z = None, dir_path =
Path(__file__).parent.parent.joinpath('results'), y_lim =
(0.0, 1.0))
prepare_cuts(func, N, alpha_z, e_dd, a_s_l_ho_ratio) Helper function to get 𝑅𝑟 and 𝑅𝑧 and set it for the given
func.
supersolids.helper.functions
Module Contents
Classes
Functions
BoxResAssert(Res, Box)
aResAssert(Res, a)
lambda_parsed(s)
identity(*args)
fft_plot(t, property_all)
get_meshgrid(x, y)
get_meshgrid_3d(x, y, z)
4.1. supersolids 17
supersolids, Release 0.1.26
mu_2d(g = 0.0)
mu_3d(g = 0.0)
v_harmonic_1d(x)
v_2d(x, y, alpha_y=1.0)
dipol_dipol_interaction(kx_mesh, ky_mesh,
kz_mesh, r_cut = 1.0)
f_kappa(kappa, epsilon = 10**(-10))
atan_special(x)
dt_adaptive(t, dt)
Attributes
datapoints_exponent
4.1. supersolids 19
supersolids, Release 0.1.26
Parameters
• N (int) –
• m (float) –
• a_s (float) –
• a_dd (float) –
• w_x (float) –
supersolids.helper.functions.get_g(N, a_s_l_ho_ratio)
Parameters
• N (int) –
• a_s_l_ho_ratio (float) –
supersolids.helper.functions.g_qf_helper(m=164 * constants.u_in_kg, a_s=90.0 * constants.a_0,
a_dd=130.0 * constants.a_0, w_x=2.0 * np.pi * 30.0)
Parameters
• m (float) –
• a_s (float) –
• a_dd (float) –
• w_x (float) –
supersolids.helper.functions.get_g_qf(N, a_s_l_ho_ratio, epsilon_dd)
Parameters
• N (int) –
• a_s_l_ho_ratio (float) –
• epsilon_dd (float) –
supersolids.helper.functions.get_l_ho(m=164.0 * constants.u_in_kg, w_x=2.0 * np.pi * 30.0)
Parameters
• m (float) –
• w_x (float) –
supersolids.helper.functions.get_alphas(w_x=2.0 * np.pi * 30.0, w_y=2.0 * np.pi * 30.0, w_z=2.0 * np.pi
* 30.0)
Parameters
• w_x (float) –
• w_y (float) –
• w_z (float) –
supersolids.helper.functions.psi_gauss_2d_pdf(pos, mu=np.array([0.0, 0.0]), var=np.array([[1.0, 0.0],
[0.0, 1.0]]))
Gives values according to gaus dirstribution (2D) with meshgrid of x,y as input
Parameters
• pos – stacked meshgrid of an x (1D) and y (1D)
• mu – Mean of gauss
• var – Variance of gauss
• z_mesh – values according to gaus dirstribution (2D) with meshgrid of x,y as input
supersolids.helper.functions.psi_gauss_2d(x, y, a=1.0, x_0=0.0, y_0=0.0, k_0=0.0)
Gaussian wave packet of width a and momentum k_0, centered at x_0
Parameters
• x – mathematical variable
• y – mathematical variable
• a (float) – Amplitude of pulse
• x_0 (float) – Mean spatial x of pulse
• y_0 (float) – Mean spatial y of pulse
• k_0 (float) – Group velocity of pulse
supersolids.helper.functions.psi_gauss_3d(x, y, z, a_x=1.0, a_y=1.0, a_z=1.0, x_0=0.0, y_0=0.0,
z_0=0.0, k_0=0.0)
Gaussian wave packet of width a and momentum k_0, centered at x_0
Parameters
• x – mathematical variable
• y – mathematical variable
• z – mathematical variable
4.1. supersolids 21
supersolids, Release 0.1.26
• x – mathematical variable
• y – mathematical variable
• g (float) – coupling constant
supersolids.helper.functions.thomas_fermi_2d_pos(pos, g=0.0)
Parameters g (float) –
supersolids.helper.functions.thomas_fermi_3d(x, y, z, g=0.0)
Mathematical function of Thomas-Fermi distribution with coupling constant g
Parameters
• x – mathematical variable
• y – mathematical variable
• z – mathematical variable
• g (float) – coupling constant
supersolids.helper.functions.mu_1d(g=0.0)
Parameters g (float) –
supersolids.helper.functions.mu_2d(g=0.0)
Parameters g (float) –
supersolids.helper.functions.mu_3d(g=0.0)
Parameters g (float) –
supersolids.helper.functions.v_harmonic_1d(x)
supersolids.helper.functions.v_harmonic_2d(pos, alpha_y=1.0)
Parameters
• alpha_y (float) –
• alpha_z (float) –
supersolids.helper.functions.get_r_cut(k_mesh, r_cut=1.0)
Parameters
• k_mesh (numpy.ndarray) –
• r_cut (float) –
supersolids.helper.functions.dipol_dipol_interaction(kx_mesh, ky_mesh, kz_mesh, r_cut=1.0)
4.1. supersolids 23
supersolids, Release 0.1.26
Parameters
• kx_mesh (float) –
• ky_mesh (float) –
• kz_mesh (float) –
• r_cut (float) –
supersolids.helper.functions.f_kappa(kappa, epsilon=10 ** - 10)
Parameters
• kappa (numpy.ndarray) –
• epsilon (float) –
Return type float
supersolids.helper.functions.atan_special(x)
supersolids.helper.functions.func_125(kappa, alpha_z, e_dd, epsilon=10 ** - 10)
Parameters
• kappa (float) –
• alpha_z (float) –
• e_dd (float) –
• epsilon (float) –
supersolids.helper.functions.func_124(kappa, e_dd, N, a_s_l_ho_ratio)
Parameters
• kappa (float) –
• e_dd (float) –
• N (float) –
• a_s_l_ho_ratio (float) –
supersolids.helper.functions.get_R_rz(kappa, e_dd, N, a_s_l_ho_ratio)
Parameters
• kappa (float) –
• e_dd (float) –
• N (int) –
• a_s_l_ho_ratio (float) –
supersolids.helper.functions.get_kappa(alpha_z, e_dd, x_min=3.0, x_max=5.0, res=1000)
Parameters
• alpha_z (float) –
• e_dd (float) –
• x_min (float) –
• x_max (float) –
• res (int) –
supersolids.helper.functions.density_in_trap(x, y, z, R_r, R_z, g=0.0)
Parameters
• x (float) –
• y (float) –
• z (float) –
• R_r (float) –
• R_z (float) –
• g (float) –
supersolids.helper.functions.density_in_trap_r(r, z, R_r, R_z, g=0.0)
Parameters
• r (float) –
• z (float) –
• R_r (float) –
• R_z (float) –
• g (float) –
supersolids.helper.functions.camera_func_r(frame, r_0=10.0, phi_0=45.0, z_0=20.0,
r_per_frame=10.0)
Parameters
• frame (int) –
• r_0 (float) –
• phi_0 (float) –
• z_0 (float) –
• r_per_frame (float) –
Return type float
supersolids.helper.functions.camera_func_phi(frame, r_0=10.0, phi_0=45.0, z_0=20.0,
phi_per_frame=10.0)
Parameters
• frame (int) –
• r_0 (float) –
• phi_0 (float) –
• z_0 (float) –
4.1. supersolids 25
supersolids, Release 0.1.26
• phi_per_frame (float) –
Return type float
supersolids.helper.functions.camera_func_z(frame, r_0=10.0, phi_0=45.0, z_0=20.0,
z_per_frame=10.0)
Parameters
• frame (int) –
• r_0 (float) –
• phi_0 (float) –
• z_0 (float) –
• z_per_frame (float) –
Return type float
supersolids.helper.functions.camera_3d_trajectory(frame, r_func=None, phi_func=None,
z_func=None, r_0=10.0, phi_0=45.0, z_0=20.0)
Computes r, phi, z as the components of the camera position in the animation for the given frame. Depending
on, if a callable function is given for the components, it is applied to the parameters or the start values are used.
Parameters
• frame (int) – Index of the frame in the animation
• r_func (Callable) – r component of the movement of the camera.
• phi_func (Callable) – phi component of the movement of the camera.
• z_func (Callable) – z component of the movement of the camera.
• r_0 (float) – r component of the starting point of the camera movement.
• phi_0 (float) – phi component of the starting point of the camera movement.
• z_0 (float) – z component of the starting point of the camera movement.
Returns r, phi, z as the components of the camera position in the animation for the given frame.
Return type Tuple[float, float, float]
supersolids.helper.functions.noise_mesh(min=0.8, max=1.2, shape=(64, 64, 64))
Parameters
• min (float) –
• max (float) –
• shape (Tuple[int, int, int]) –
Return type numpy.ndarray
supersolids.helper.functions.dt_adaptive(t, dt)
supersolids.helper.get_path
Module Contents
Functions
get_path (dir_path, dir_name = 'movie', count- Looks up all directories with matching dir_name
ing_format = '%03d', file_pattern = '')
supersolids.helper.run_time
Module Contents
Functions
run_time(name = 'method')
supersolids.helper.run_time.run_time(name='method')
4.1. supersolids 27
supersolids, Release 0.1.26
supersolids.helper.simulate_case
Animation for the numerical solver for the non-linear time-dependent Schrodinger equation for 1D, 2D and 3D in
single-core.
Module Contents
Functions
simulate_case(System, Anim, accuracy = Wrapper for Animation and Schroedinger to get a work-
10**(-6), delete_input = True, dir_path = ing Animation
Path.home().joinpath('supersolids', 'results'),
dir_name_result = '', slice_indices = [0, 0, 0], offscreen
= False, x_lim = (-1.0, 1.0), y_lim = (-1.0, 1.0), z_lim =
(-1.0, 1.0), filename_schroedinger = 'schroedinger.pkl',
filename_steps = 'step_', steps_format = '%07d',
steps_per_npz = 10, frame_start = 0)
supersolids.scripts
Subpackages
supersolids.scripts.deprecated
Submodules
supersolids.scripts.deprecated.multi_core
DEPRECATED
Animation for the numerical solver for the non-linear time-dependent Schrodinger equation for 1D and 2D in multi-core.
Module Contents
supersolids.scripts.deprecated.multi_core.max_workers
supersolids.scripts.deprecated.single_core
Animation for the numerical solver for the non-linear time-dependent Schrodinger equation for 1D, 2D and 3D.
Module Contents
supersolids.scripts.deprecated.single_core.Res :supersolids.helper.Resolution.Resolution
4.1. supersolids 29
supersolids, Release 0.1.26
Submodules
supersolids.scripts.cp_plots
Module Contents
Functions
Attributes
path_anchor_input
supersolids.scripts.density_in_trap
Module Contents
supersolids.scripts.density_in_trap.N :int
supersolids.scripts.multi_load
Module Contents
Functions
string_float(s)
Attributes
path_anchor_input
supersolids.scripts.multi_load.string_float(s)
supersolids.scripts.multi_load.path_anchor_input
supersolids.scripts.multi_property
Module Contents
Functions
string_float(s)
Attributes
path_anchor_input
supersolids.scripts.multi_property.string_float(s)
supersolids.scripts.multi_property.path_anchor_input
supersolids.scripts.multi_simulate
Module Contents
supersolids.scripts.multi_simulate.supersolids_version = 0.1.32rc12
supersolids.scripts.multi_simulate.dir_path
supersolids.scripts.multi_simulate.xvfb_display = 98
supersolids.scripts.multi_simulate.max_timesteps = 700001
supersolids.scripts.multi_simulate.dt = 0.0002
supersolids.scripts.multi_simulate.steps_per_npz = 1000
supersolids.scripts.multi_simulate.accuracy = 0.0
supersolids.scripts.multi_simulate.v_start = 2.0
supersolids.scripts.multi_simulate.v_end = 33.0
supersolids.scripts.multi_simulate.v_step = 10.0
supersolids.scripts.multi_simulate.d_start = 0.2
4.1. supersolids 31
supersolids, Release 0.1.26
supersolids.scripts.multi_simulate.d_end = 1.1
supersolids.scripts.multi_simulate.d_step = 0.2
supersolids.scripts.multi_simulate.file_start = step_
supersolids.scripts.multi_simulate.file_number = 1150000
supersolids.scripts.multi_simulate.file_pattern = .npz
supersolids.scripts.multi_simulate.file_name
supersolids.scripts.multi_simulate.movie_string = movie
supersolids.scripts.multi_simulate.counting_format = %03d
supersolids.scripts.multi_simulate.movie_number = 151
supersolids.scripts.multi_simulate.files2last = 324
supersolids.scripts.multi_simulate.movie_now
supersolids.scripts.multi_simulate.func_filename = distort.txt
supersolids.scripts.multi_simulate.j_counter = 0
supersolids.scripts.multi_simulate.func_list = []
supersolids.scripts.multi_simulate.func_path_list = []
supersolids.scripts.multi_simulate.dir_path_func_list = []
supersolids.scripts.multi_simulate.v_string
supersolids.scripts.multi_simulate.j_counter = 0
supersolids.scripts.multi_simulate.func
supersolids.scripts.multi_simulate_real
Module Contents
supersolids.scripts.multi_simulate_real.supersolids_version
supersolids.scripts.multi_simulate_real.dir_path
supersolids.scripts.multi_simulate_real.xvfb_display = 70
supersolids.scripts.multi_simulate_real.max_timesteps = 100001
supersolids.scripts.multi_simulate_real.dt = 0.0002
supersolids.scripts.multi_simulate_real.steps_per_npz = 1000
supersolids.scripts.multi_simulate_real.accuracy = 0.0
supersolids.scripts.multi_simulate_real.v_start = 2.0
supersolids.scripts.multi_simulate_real.v_end = 13.0
supersolids.scripts.multi_simulate_real.v_step = 2.0
supersolids.scripts.multi_simulate_real.d_start = 0.2
supersolids.scripts.multi_simulate_real.d_end = 1.1
supersolids.scripts.multi_simulate_real.d_step = 0.2
supersolids.scripts.multi_simulate_real.file_start = step_
supersolids.scripts.multi_simulate_real.file_number = 1210000
supersolids.scripts.multi_simulate_real.file_pattern = .npz
supersolids.scripts.multi_simulate_real.file_name
supersolids.scripts.multi_simulate_real.movie_string = movie
supersolids.scripts.multi_simulate_real.counting_format = %03d
supersolids.scripts.multi_simulate_real.movie_number = 475
supersolids.scripts.multi_simulate_real.files2last = 41
supersolids.scripts.multi_simulate_real.movie_now
supersolids.scripts.multi_simulate_real.func_filename = distort.txt
supersolids.scripts.multi_simulate_real.j_counter = 0
supersolids.scripts.multi_simulate_real.func_list = []
supersolids.scripts.multi_simulate_real.func_path_list = []
supersolids.scripts.multi_simulate_real.dir_path_func_list = []
supersolids.scripts.multi_simulate_real.v_string
supersolids.scripts.multi_simulate_real.j_counter = 0
supersolids.scripts.multi_simulate_real.func
supersolids.tools
Submodules
supersolids.tools.get_System_at_npz
Module Contents
Functions
flags(args_array)
4.1. supersolids 33
supersolids, Release 0.1.26
Attributes
args
supersolids.tools.get_System_at_npz.get_System_at_npz(dir_path =
Path('~/supersolids/results').expanduser(),
dir_name = 'movie001',
filename_schroedinger = f'schroedinger.pkl',
filename_steps = f'step_', steps_format =
'%06d', frame = 0)
Gets Schroedinger at given npz
Returns Schroedinger System
Parameters
• dir_path (pathlib.Path ) –
• dir_name (str) –
• filename_schroedinger (str) –
• filename_steps (str) –
• steps_format (str) –
• frame (int) –
Return type supersolids.Schroedinger.Schroedinger
supersolids.tools.get_System_at_npz.plot_System_at_npz(args)
supersolids.tools.get_System_at_npz.flags(args_array)
supersolids.tools.get_System_at_npz.args
supersolids.tools.load_npz
Animation for the numerical solver for the non-linear time-dependent Schrodinger equation for 1D, 2D and 3D in
single-core.
Module Contents
Functions
load_npz(args)
flags(args_array)
Attributes
args
supersolids.tools.load_npz.load_npz(args)
supersolids.tools.load_npz.flags(args_array)
supersolids.tools.load_npz.args
supersolids.tools.simulate_npz
Animation for the numerical solver for the non-linear time-dependent Schrodinger equation for 1D, 2D and 3D in
single-core.
Module Contents
Functions
simulate_npz(args)
flags(args_array)
Attributes
args
supersolids.tools.simulate_npz.simulate_npz(args)
supersolids.tools.simulate_npz.flags(args_array)
supersolids.tools.simulate_npz.args
4.1. supersolids 35
supersolids, Release 0.1.26
supersolids.tools.track_property
Module Contents
Functions
get_last_index(input_path, filename_steps)
get_property(System, property_name =
'get_center_of_mass')
property_check(property, property_name =
'get_center_of_mass', property_func = False, prop-
erty_args=[])
track_property(input_path, file-
name_schroedinger=f'schroedinger.pkl', file-
name_steps=f'step_', steps_format = '%06d',
steps_per_npz = 10, frame_start = 0, property_name
= 'get_center_of_mass', property_func = False, prop-
erty_args=[])
property_to_array(property_tuple)
plot_property(args, func=functions.identity)
flags(args_array)
Attributes
args
supersolids.tools.track_property.get_input_path(dir_path, dir_name)
supersolids.tools.track_property.get_last_index(input_path, filename_steps)
supersolids.tools.track_property.get_property(System, property_name='get_center_of_mass')
Parameters
• System (supersolids.Schroedinger) –
• property_name (str) –
supersolids.tools.track_property.property_check(property, property_name='get_center_of_mass',
property_func=False, property_args=[])
Parameters
• property_name (str) –
• property_func (bool) –
supersolids.tools.track_property.track_property(input_path,
filename_schroedinger=f'schroedinger.pkl',
filename_steps=f'step_', steps_format = '%06d',
steps_per_npz = 10, frame_start = 0, property_name
= 'get_center_of_mass', property_func = False,
property_args=[])
Parameters
• steps_format (str) –
• steps_per_npz (int) –
• frame_start (int) –
• property_name (str) –
• property_func (bool) –
supersolids.tools.track_property.property_to_array(property_tuple)
supersolids.tools.track_property.plot_property(args, func=functions.identity)
supersolids.tools.track_property.flags(args_array)
supersolids.tools.track_property.args
4.1.2 Submodules
supersolids.Schroedinger
Module Contents
Classes
Functions
peaks_sort_along(peaks_indices, peaks_height,
amount, axis)
get_peaks(prob) Takes an image and detect the peaks using the local max-
imum filter.
4.1. supersolids 37
supersolids, Release 0.1.26
• V (Optional[Callable]) –
• V_interaction (Optional[Callable]) –
• psi_sol (Optional[Callable]) –
• mu_sol (Optional[Callable]) –
• psi_0_noise (numpy.ndarray) –
get_density(self, p=2.0)
Calculates |𝜓|𝑝 for 1D, 2D or 3D (depending on self.dim).
Parameters p (float) – Exponent of |𝜓|. Use p=2.0 for density.
Returns |𝜓|𝑝
Return type numpy.ndarray
get_norm(self, ∫︀func=None, p=2.0)
Calculates |𝜓|𝑝 dV for 1D, 2D or 3D (depending on self.dim). For p=2 it is the 2-norm.
Parameters
• p (float) – Exponent of |𝜓|. Use p=2.0 for density.
• func – If func is not provided self.get_density(p=p) is used.
Returns |𝜓|𝑝 dV
∫︀
4.1. supersolids 39
supersolids, Release 0.1.26
Parameters
• accuracy (float) –
• dir_path (pathlib.Path ) –
• dir_name_result (str) –
• filename_schroedinger (str) –
• filename_steps (str) –
• steps_format (str) –
• steps_per_npz (int) –
• frame_start (int) –
supersolids.__main__
Animation for the numerical solver for the non-linear time-dependent Schrodinger equation for 1D, 2D and 3D.
Module Contents
supersolids.__main__.parser
FIVE
• genindex
• modindex
• search
41
supersolids, Release 0.1.26
s
supersolids, 9
supersolids.__main__, 40
supersolids.Animation, 9
supersolids.Animation.Animation, 9
supersolids.Animation.MatplotlibAnimation, 10
supersolids.Animation.MayaviAnimation, 12
supersolids.helper, 14
supersolids.helper.Box, 14
supersolids.helper.constants, 15
supersolids.helper.cut_1d, 16
supersolids.helper.functions, 17
supersolids.helper.get_path, 27
supersolids.helper.Resolution, 15
supersolids.helper.run_time, 27
supersolids.helper.simulate_case, 28
supersolids.Schroedinger, 37
supersolids.scripts, 29
supersolids.scripts.cp_plots, 30
supersolids.scripts.density_in_trap, 30
supersolids.scripts.deprecated, 29
supersolids.scripts.deprecated.multi_core, 29
supersolids.scripts.deprecated.single_core,
29
supersolids.scripts.multi_load, 30
supersolids.scripts.multi_property, 31
supersolids.scripts.multi_simulate, 31
supersolids.scripts.multi_simulate_real, 32
supersolids.tools, 33
supersolids.tools.get_System_at_npz, 33
supersolids.tools.load_npz, 34
supersolids.tools.simulate_npz, 35
supersolids.tools.track_property, 36
43
supersolids, Release 0.1.26
Symbols C
__str__() (supersolids.helper.Box.Box method), 14 camera_3d_trajectory() (in module super-
__str__() (supersolids.helper.Resolution.Resolution solids.helper.functions), 26
method), 15 camera_func_phi() (in module super-
__str__() (supersolids.helper.functions.Box method), solids.helper.functions), 25
19 camera_func_r() (in module super-
__str__() (supersolids.helper.functions.Resolution solids.helper.functions), 25
method), 19 camera_func_z() (in module super-
solids.helper.functions), 26
A counting_format (in module super-
a_0 (in module supersolids.helper.constants), 15 solids.scripts.multi_simulate), 32
accuracy (in module supersolids.scripts.multi_simulate), counting_format (in module super-
31 solids.scripts.multi_simulate_real), 33
accuracy (in module super- cp_plots() (in module supersolids.scripts.cp_plots), 30
solids.scripts.multi_simulate_real), 32 create_movie() (super-
solids.Animation.MayaviAnimation.MayaviAnimation
animate() (supersolids.Animation.MatplotlibAnimation.MatplotlibAnimation
method), 11 method), 13
animate() (supersolids.Animation.MayaviAnimation.MayaviAnimation
crop_pos_to_limits() (in module super-
method), 13 solids.Animation.MatplotlibAnimation), 12
animate_npz() (super- cut_1d() (in module supersolids.helper.cut_1d), 16
solids.Animation.MayaviAnimation.MayaviAnimation
method), 13 D
Animation (class in supersolids.Animation.Animation), 9 d_end (in module supersolids.scripts.multi_simulate), 31
aResAssert() (in module supersolids.helper.functions), d_end (in module super-
20 solids.scripts.multi_simulate_real), 32
args (in module supersolids.tools.get_System_at_npz), 34 d_start (in module supersolids.scripts.multi_simulate),
args (in module supersolids.tools.load_npz), 35 31
args (in module supersolids.tools.simulate_npz), 35 d_start (in module super-
args (in module supersolids.tools.track_property), 37 solids.scripts.multi_simulate_real), 32
atan_special() (in module super- d_step (in module supersolids.scripts.multi_simulate),
solids.helper.functions), 24 32
axes_style() (in module super- d_step (in module super-
solids.Animation.MayaviAnimation), 12 solids.scripts.multi_simulate_real), 32
datapoints_exponent (in module super-
B solids.helper.functions), 26
Box (class in supersolids.helper.Box), 14 density_in_trap() (in module super-
Box (class in supersolids.helper.functions), 19 solids.helper.functions), 25
BoxResAssert() (in module supersolids.helper.Box), 14 density_in_trap_r() (in module super-
BoxResAssert() (in module super- solids.helper.functions), 25
solids.helper.functions), 20 dipol_dipol_interaction() (in module super-
solids.helper.functions), 23
45
supersolids, Release 0.1.26
46 Index
supersolids, Release 0.1.26
Index 47
supersolids, Release 0.1.26
48 Index
supersolids, Release 0.1.26
T
thomas_fermi_1d() (in module super-
solids.helper.functions), 22
Index 49