Skip to content

List_of_parameters

Dominique Delande edited this page Feb 20, 2023 · 49 revisions

Back to Parameter file

Back to List of sections


This page describes the available parameters in a parameter file, listed by section (see List of sections). This list should be exhaustive. If there is some unexpected error/problem dealing with parameters or sections, the code is contained in anderson/io.py in the routine parse_parameter_file at the beginning of the file.

Each parameter has a type (integer, float, boolean or string) and is either mandatory (if the section exists) or optional (there is then a default value). Each parameter is specified in the parameter file, in the relevant section, by:

parameter_name = value

[System] section

  • dimension: int, optional (default: 1). The dimension of the system. Can be any positive integer. Well tested for dimension=1, 2 and 3. Only hyper-rectangular grids and hyper-rectangular geometries are supported.
  • size_1, size_2...: float, mandatory. The size of the system along each axis, for the dimension dimensions. Sizes beyond dimension are ignored.
  • delta_1, delta_2...: float, mandatory. The spatial discretisation step along each axis.
  • boundary_condition_1, boundary_condition_2...: string, mandatory. The boundary condition along each axis. Can be either periodic or open.
  • one_over_mass: float, optional (default: 1.0). The inverse of the mass is the kinetic energy of the system p^2/2m. one_over_mass=2.0 together wtith delta_i=1.0 might be useful for simulating the Anderson model
  • use_mkl_fft: boolean, optional (default: True). Whether to use the MKL library for Fast Fourier transforms. If False, or if the MKL library is not found, the numpy.fft routines are used.
  • use_mkl_random: boolean, optional (default: True). Whether to use the MKL library for Random Number generation. If False, or if the MKL library is not found, the numpy.random routines are used.
  • reproducible_randomness: boolean, optional (default: True). If True, the same randomness is generated for each run of the program, both for the disorder and for the initial state (if its type is such that it has some randomness). The same results should be obtained for each run of the program, including for the serial version or the MPI version. If False, a random seed for the RNG is used for each run, producing a slightly different result.
  • custom_seed: integer, optional (default: 0). If _reproducible_randomness is False, this parameter is ignored. If it is True, the seed used for RNG is chosen as 1234+custom_seed for the generation of the disorder and 2345+custom_seed for the generation of the initial state (if it is a type that has some tandom properties).

[Disorder] section

type: string, optional (default: anderson_gaussian). The disorder type. The known types are:

  • anderson_gaussian: Gaussian distribution on each site, uncorrelated.
  • anderson_uniform: Uniform distribution on each site, uncorrelated.
  • anderson_cauchy: Cauchy (Lorentzian) distribution on each site, uncorrelated (not tested).
  • regensburg: Gaussian distribution on each site, with Gaussian spatial correlation function.
  • konstanz: speckle (Rayleigh) distribution on each site, with Gaussian spatial correlation function.
  • nice: same as anderson_uniform, with additional non-diagonal disorder. Works only in dimension 1, without spin. Other types, such as speckle or singapore, are not yet implemented.

Other parameters are:

  • correlation_length: float, optional (defautl:0.0). The correlation length for correlated disorder types. Isotropic in the current version, but anistropic should be added. For Gaussian correlation, the spatial correlation function is proportional to exp(-0.5*r^2/(correlation_length)^2).
  • V0: float, optional (default: 0.0). The disorder strength. For uniform distribution, the random disorder is chosen uniformly in [-V0/2,V0/2]. For Gaussian distribution, it is a normal distribution with zero mean and V0^2 variance, i.e. P(V)=exp(-0.5V^2/V0^2)/sqrt(2pi*V0^2). Takes automatically into account the correlation length for correlated potentials.
  • non_diagonal_disorder_strength: float, optional (default: 0.0). The non diagonal disorder strength for the nice disorder type.
  • b: int, optional (default: 1). The number of lower diagonals for the nice disorder type.
  • randomize_hamiltonian: boolean, optional (default: True). Whether to use a different disorder realization for each configuration.

[Averaging] section

  • n_config: int, optional (default: 1). Total number of disorder configurations over which the averaging is performed. For a MPI run, the code performs the same number of configurations per process, so that the total number of configurations is the smallest integer multiple of the number of processes, larger or equal to n_config.

[Spin] section

  • spin_one_half: boolean, optional (default: False). If False, the code will not use any internal degree of freedom. If True, each site has a 2-component spinor. Currently tested only in dimension 1.
  • gamma: float, optional (default: 0).
  • Omega: float, optional (default: 0).
  • beta: float, optional (default: 0).
  • delta: float, optional (default: 0).
  • h: float, optional (default: 0). These 5 parameters refer to the strength of various operators in the Hamiltonian: spin-orbit coupling, spin components, etc. Refer to the anderson/hamiltonian.py file for the definition of the parameters and operators.

[Nonlinearity] section

  • g_over_volume: float, optional (no default). As the wavefunction is normalized to unity over the volume of the system, 1/volume is the average density rho0. Thus this parameter, if present, is g*rho0. Used in the simulations of the Gross-Pitaevskii equation.
  • g: float, optional (default: 0.0). If g_over_volume is not present, the parameter g is used as the nonlinear strength in the Gross-Pitaevskii equation.

[Wavefunction] section

initial_state: string, mandatory. The initial wavefunction before temporal propagation or for the calculation of a spectral function. The following types are supported:

  • plane_wave: a plane wave characterized by its momentum (=wave vector).
  • gaussian_wave_packet: a Gaussian wave packet charaterized by its average momentum and its width along each spatial dimension.
  • chirped_wave_packet: like a Gaussian wave packet, but with additional chirp along each direction.
  • random: a state with complex Gaussian random amplitude on each site. Should be used for computing the density of states.
  • gaussian_with_speckle: the sum of a standard gaussian wavepacket and of a speckle gaussian wavepacket. The speckle component is simply the standard gausian wavepacket multiplied by a complex Gaussian random number.
  • gaussian_randomized: a spatially Gaussian enveloppe, but with complex Gaussian random amplitude on each site. Do not use, unless you konw exactly what you are doing.
  • point: a state localized on a single site, at the origin (used for computing a density of states, but superseeded by random).
  • multi_point: for debugging only. A state localized on a sub-grid. Do not use, unless you know exactly what you are doing.

Other parameters are:

  • k0_over_2_pi_1, k0_over_2_pi_2...: float, mandatory for plane_wave, gaussian_wave_packet and chirped_wave_packet. This is the wavevector (divided by 2pi) along each axis. It should be compatible with periodic boundary conditions, that is k0_over_2_pisize should be an integer along each axis. It is rounded (i.e. modified) so that this condition is met.
  • sigma_0_1, sigma_0_2...: float, mandatory for gaussian_wave_packet, chirped_wave_packet and gaussian_randomized. This is the size of the wavepacket along each direction, so that the modulus (not squared) of the wavefunction is proportional to exp(-0.5*x^2/sigma_0^2) along each axis.
  • chirp_1, chirp_2...: float, optional (default: 0.0). This is the chirp factor along each axis, for chirp_wave_wacket. It corresponds to a Gaussian wave packet multiplied by exp(ichirpx^2) along each axis.
  • randomize_initial_state: boolean, optional (default: False). Whether to take a different initial state fro each configuration. Meaningful only for gaussian_with_speckle, gaussian_randomized and random types.
  • wfc_correlation_length: float, mandatory for gaussian_with_speckle. This is the correlation length of the speckle, so that its spatial correlation function is proportional to exp(-0.25*(r/wfc_correlation_length)**2).
  • epsilon_speckle: float, optional (default: 0.0). Used only for gaussian_with_speckle. The weight of the speckle component with respect to the standard gaussian wavepacket. 0.0 is a pure gaussian wavepacket, infinity is a pure speckle. Everything is normalized by dividing by sqrt(1+epsilon_speckle**2).
  • minimum_distance: float, optional (default: 0.0). For debugging by experts only. Step of the sub-grid when using multi_point type. Do not use, unless you know exactly what you are doing.
  • teta: float, optional (default: 0.0). For spin systems, the angle defining the internal spin-1/2 state.
  • teta_measurement: float, optional (default: 0.0). For spin systems, the angle of the spin-1/2 state avec which to project after propagation.

[Propagation] section

  • method: string, optional (default: che). This is the numerical method to use for temporal propagation. Can be either che (Chebyshev method) or ode (using the scipy.integrate.ode routine). che is usually faster (roughly one order of magnitude), except for Gross_Pitaevskii with strong nolinearity.
  • accuracy: float, optional (default: 1.e-6). The accuracy of the integrator. 1.e-6 is usually a good compromise. Larger values can produce bullshit. Smaller values slightly increase the CPU time, although the cost is usually modest.
  • data_layout: string, optional (default: complex). The wavefunction is represented by a complex multi-dimensional array. Internally, t can be stored as a complex numpy array (if data_layout=complex) or as two consecutive real numpy arrays storing the real and imaginary parts (if data_layout=real). It should not affect the results, but the speed can be slightly different because of it uses the cache. The differences in speed is most often very small, so that this parameter can be safely omitted.
  • t_max: float, optional (default: 0.0). The total propagation time. Should not be needed for the calculation of the spectral function. Bug to be fixed.
  • delta_t: float, optional (default: 0.0). The time step for the temporal propgation. Note that the default value 0.0 is very stupid, as it crashes the program (bug to be fixed). Internally, the program may use smaller time steps, but it is guaranteed to pause at each mutiple of delta_t, restarting until t_max. This is an important parameter, especially for the Chebyshev method. A too small value will produce a small maximum Chebyshev order (printed at the end of the calculation), reducing efficiency. A too large value for the Gross-Pitaevskii equation using the Chebyshev method will produce a too large maximal nonlinear phase (printed at the end of the calculation). A nonlinear phase below 1.e-2 means that the calculation is ok. Between 1.e-2 and 1.e-1, be careful. Above 1.e-1, the results are almost surely rotten.
  • want_ctypes: boolean, optional (default: True). Most routines are written in Python, with the help of Numpy and Scipy (whose internal routines may be written in C). For the most computationally intensive routines, one can use instead a specific C code using the ctypes library. This may speed up the code by one order of magnitude. The details are described in the Use of ctypes page. If you want to use these ctypes routines, set want_ctypes to True. Otherwise, pure Python routines are used. Note that it may happen that ctypes is not available on your system, or that it cannot find the requested routines. in such a case, a message is printed and the Python version is used.
  • accurate_bounds: boolean, optional (default: False). When the Chebyshev method is used, one must find an interval on the real axis containing all the spectrum of the Hamiltonian (otherwise, disaster guaranteed). By default, the program uses conservative bounds which should never fail. If accurate_bounds is True, the program tries to optimise the bounds. this may speed up the code (reducing the order of the Chebyshev expansion), but has an initial cost to find optimized bounds. If t_max is very large, this optimization may be worth the extra cost.

[Measurement] section

  • delta_t_dispersion: float, optional (default: delta_t from the [Propagation] section). The temporal propagation code can measure several observables. The ones under the name "dispersion" are expectation values of position, momentum, energy... Which quantities are computed depend on the other parameters in this section (see below). They are all printed in a file named dispersion.dat. They are computed for times multiple of delta_t_dispersion. If delta_t_dispersion is not an integer multiple of delta_t, the latter parameter is adjusted. In each line of dispersion.dat, the first column is the time, the other columns the various quantities measured.
  • dispersion_position: boolean, optional (default: False). Whether the expectation value of the position along each axis is computed at times multiple of delta_t_dispersion and printed in dispersion.dat.
  • dispersion_position2: boolean, optional (default: False). Whether the expectation value of the squared position along each axis is computed at times multiple of delta_t_dispersion and printed in dispersion.dat.
  • dispersion_momentum: boolean, optional (default: False). Whether the expectation value of the momentum along each axis is computed at times multiple of delta_t_dispersion and printed in dispersion.dat.
  • dispersion_energy: boolean, optional (default: False). Whether the expectation value of the energy is computed at times multiple of delta_t_dispersion and printed in dispersion.dat. Both the total energy (conserved during the temporal evolution, even for the nonlinear Gross-Pitaevskii equation) and the nonlinear energy (zero for the Schroedinger equation) are computed and printed.
  • autocorrelation: boolean, optional, default: False). Whether the autocorrelation function <\psi(0)|\psi(t)> is computed at times multiple of delta_t_dispersion and printed in dispersion.dat.
  • dispersion_variance: boolean, optional (default: False). If set to True, not only the average values (averaged over disorder realizations) of the quantum expectation values are computed, but also the variances over disorder_realizations. Not to be confused with the 'quantum" variance, such as the <O^2>-^2, with O an observable and <> denotes the expectation value.
  • delta_t_density: float, optional (default: t_max from the [Propagation] section). This is how often the density in configuration space or momentum space, or the g1 function is measured and printed in files named density_intermediate_XX.dat, density_momentum_intermedaite_XX.dat and/or g_1_intermediate_XX.dat_, where XX is an integer measuring the time XX*delta_t_density at which the density is measured and printed.
  • density: boolean, optional (default: False). Whether to measure and print the density in configuration space (see parameter delta_t_density).
  • density_momentum: boolean, optional (default: False). Whether to measure and print the density in momentum space (see parameter delta_t_density).
  • g1: boolean, optional (default: False). Whether to measure and print the g1 coherence function (see parameter delta_t_density).
  • delta_t_spectral_function: float, optional (default: t_max from the [Propagation] section). This is how often the spectral function is computed and printed during the propagation. Makes little sense for the Schroedinger equation because it is identical at all times. Useless also if the parameter spectral_function is False.
  • spectral_function: boolean, optional (default: False). Whether to measure and print the spectral function during the temporal propagation. It is printed in files named spectral_function_intermediate_XX.dat or density_of_states_intermediate_XX.dat (depending on the type of the [Wavefunction] section, where XX is an integer measuring the time XX*delta_t_spectral_function at which the density is measured and printed.
  • potential: boolean, optional (default: False). Whether to print the potential in the file potential.dat (useful for debugging). Averaged over disorder realisations, makes thus sense for n_ocnfig=1.
  • potential_correlation: boolean, optional (default: False). If True, the code computes the spatial disorder correlation function <V(r')V(r'+r)> as a function of r (averaged over r' and disorder configurations). It is printed in the file potential_correlation.dat.
  • wavefunction: boolean, optional (default: False). If True, the wavefunction in configuration space (averaged over disorder realisations) is printed in the files wavefunction_initial.dat (at t=0) and wavefunction_final.dat (at t=t_max). Mostly useful for n_config=1.
  • wavefunction_momentum: boolean, optional (default: False). If True, the wavefunction in momentum space (averaged over disorder realisations) is printed in the file wavefunction_momentum_final.dat (at t=t_max). Mostly useful for n_config=1. For some reason, the initial wavefunction in momentum space is not printed...
  • overlap: boolean, optional (default: False). If True, the averaged overlap <psi(t=t_max)|psi(t=0)> is computed and printed in all output files. Useful for debugging the calculation of spectral function.
  • remove_hot_pixel: boolean, optional (default: False). When the density in momentum space is computed and the initial state is a plane wave, the density has a huge peak at the initial wave vector at short time (coherent component). If remove_hot_pixel is True, the density ot this point is put to 0. Makes visualisation easier.

[Spectral] section

  • resolution: float, mandatory. Resolution of the spectral function.
  • e_min: float, optional (no default).
  • e_max: float, optional (no default). If both e_min and e_max are set, the spectral function will be computed between e_min and e_max. The interval [e_min,e_max] must contain the entire spectrum of the Hamiltonian, otherwise a disaster will certainly takes place.
  • range: float, not used and optional if e_min and e_max are set, mandatory (no default) otherwise. This sets the interval over which the spectral function is computed to [-range/2,+range/2].
  • n_kpm: int, optional. This is the order of the [KPM}(https://github.com/delande/and-python-doc/wiki/Kernel_Polynomial_Method_(KPM)) method, i.e. the number of Chebyshev polynomials included in the expansion of the spectral function. By default,n_kpm is (e_max-e_min)/(2*resolution). The default value makes the spectral function rather smooth, but still able to resolve structures with width of the order of the energy resolution. A smaller n_kpm will smooth such structures, while a larger n_kpm will be more expensive and more noisy.
  • want_ctypes_for_spectral_function: boolean, optional (default: True). Whether to use the fast ctypes version of the code if available.
  • multiplicative_factor_for_interaction: float, optional (default: 0.0). Only meaningful for the Gross-Pitaevskii equation with non-zero nonlinear interaction. Can be ignored otherwise. As discussed in the Spectral function page, there are several ways to define the spectral function for the Gross-Pitavskii equation. multiplicative_factor_for_interaction is the \alpha parameter in the Spectral function page. 0 means pure Schroedinger spectral function, 1 means a pure Gross-Pitaevksii hamiltonian spectral function. Both choices do not preserve the average energy during propagation. multiplicative_factor_for_interaction=1/2 preserves the average energy.

[Diagonalization] section

  • method: string, optional (default: sparse). This parameter is the method used for diagonalizing the Hamiltonian. Can be lapack or sparse. If equal to lapack, a Lapack routine is used to fully diagonalize the Hamiltonian. If equal to sparse, a scipy.sparse.linalg routine is used to compute a limited number of eigenvalues/eigenvectors.
  • number_of_eigenvalues: int, optional (default: 1). The number of eigenvalues computed when using sparse diagonalization.
  • targeted_energy: float, mandatory. The energy around which eigenvalues are selected. The number_of_eigenvalues selected eigenvalues are (more or less) the closest ones to targeted_energy.
  • IPR_min: float, optional (default: 0.0). The smallest IPR included in the calculation.
  • IPR_max: float, optional (default: 1.0). The largest IPR included in the calculation.
  • number_of_bins: int, optional (default: 1). An histogram of the IPRs in the range [IPR_min,IPR_max] is built, with number_of_bins bins. Note that the default value 1 is probably stupid.

[Lyapounov] section

  • e_min: float, optional (default: 0.0).
  • e_max: float, optional (default: 0.0).
  • number_of_e_steps: int, optional (default: 0). The localization length (inverse of the Lyapounov exponent) is computed in the energy interval [e_min,e_max] divided in number_of_e_steps+1 intervals. Note that the e_min and e_max parameters are also used in the [Spectral] section, with a different meaning, which is probably confusing. To be fixed.
  • want_ctypes: boolean, optional (default: True). Most routines are written in Python, with the help of Numpy and Scipy (whose internal routines may be written in C). For the most computationally intensive routines, one can use instead a specific C code using the ctypes library. This may speed up the code by one order of magnitude. The details are described in the Use of ctypes page. If you want to use these ctypes routines, set want_ctypes to True. Otherwise, pure Python routines are used. Note that it may happen that ctypes is not available on your system, or that it cannot find the requested routines. in such a case, a message is printed and the Python version is used. Works only in dimension 1.
  • e_histogram: float, optional (default: 0.0). BROKEN! At the energy e_histogram, the code computes an histogram of the values of ther lyapounov exponent, for the various disorder configurations.
  • lyapounov_min, lyapounov_max: float, optional (default: 0.0). BROKEN! Minimum and maximum for the histogram of Lyapounov. The number of bins is not set, maybe borrowed from the [Diagonalization] section. Do not use!

Clone this wiki locally