Simulation parameters

Before we can run a simulation we need to set the parameters for the TBPM calculations. For example, if we want to use 1024 time steps, 4 random samples, an energy range from -10 to 10 eV and we want to correct for spin in the final result:

config = tipsi.Config(sample)
config.generic['nr_time_steps'] = 1024
config.generic['nr_random_samples'] = 4
config.generic['energy_range'] = 20.
config.generic['correct_spin'] = True
config.save()

The last line ensures that the configuration object is saved to file in the sim_data folder, with the same timestamp prefix as the correlation files.

Each correlation function calculation has its own set of configuration parameters. Moreover, the Config object also contains output options.

class tipsi.config.Config(sample=False, read_from_file=False)

Class for TBPM parameters.

sample['area_unit_cell']

float – Area of the unit cell.

sample['energy_range']

float – Energy range in eV, centered at 0.

sample['extended']

integer – Number of times the unit cell has been extended.

sample['nr_orbitals']

integer – Degrees of freedom per unit cell.

sample['volume_unit_cell']

float – Volume of the unit cell.

generic['Bessel_max']

int – Maximum number of Bessel functions. Default value: 100

generic['Bessel_precision']

float – Bessel function precision cut-off. Default value: 1.0e-13

generic['beta']

float – Value for 1/kT. Default value: 11604.505/300 (room temperature, using eV)

generic['correct_spin']

bool – If True, results are corrected for spin. Default value: False.

generic['Fermi_cheb_precision']

float – Precision cut-off of Fermi-Dirac distribution. Default value: 1.0e-10

generic['mu']

float – Chemical potential. Default value: 0.

generic['nr_Fermi_fft_steps']

int – Maximum number of Fermi-Dirac distribution FFT steps, must be power of two. Default value: 2**15

generic['nr_ran_samples']

int – Number of random initial wave functions. Default value: 1

generic['nr_time_steps']

int – Number of time steps. Default value: 1024

generic['seed']

int – Seed for random wavefunction generation. Default value: 1337.

LDOS['site_index']

int – Site index for LDOS calculation.

dyn_pol['background_dielectric_constant']

float – Background dielectric constant. Default value: 23.6.

dyn_pol['coulomb_constant']

float – Coulomb constant. Default value: 1.0

dyn_pol['q_points']

(n_q_points, 3) list of floats – List of q-points. Default value: [[0.1, 0., 0.]].

DC_conductivity['energy_limits']

2-tuple of floats – Minimum and maximum of energy window for dc conductivity. Default value: [-0.5, 0.5].

quasi_eigenstates['energies']

list of floats – List of energies of quasi-eigenstates. Default value: [-0.1, 0., 0.1].

output['timestamp']

int – Timestamp generated at __init__ call to make output files unique.

output['corr_AC']

string – AC conductivity correlation output file. Default value: “sim_data/” + timestamp + “corr_AC.dat”.

output['corr_DC']

string – DC conductivity correlation output file. Default value: “sim_data/” + timestamp + “corr_DC.dat”.

output['corr_DOS']

string – DOS correlation output file. Default value: “sim_data/” + timestamp + “corr_DOS.dat”.

output['corr_LDOS']

string – LDOS correlation output file. Default value: “sim_data/” + timestamp + “corr_LDOS.dat”.

output['corr_dyn_pol']

string – AC conductivity correlation output file. Default value: “sim_data/” + timestamp + “corr_dyn_pol.dat”.

output['directory']

string – Output directory. Default value: “sim_data”.

save(filename='config.pkl', directory='sim_data', prefix=False)

Function to save config parameters to a .pkl file.

Parameters:
  • filename (string, optional) – file name
  • directory (string, optional) – output directory, set to False if you don’t want to specify an output directory
  • prefix (string, optional) – prefix for filenames, , set to False for standard (timestamp) prefix
set_output(directory='sim_data', prefix=False)

Function to set data output options.

This function will set self.output[‘directory’] and correlation file names for automised data output.

Parameters:
  • directory (string, optional) – output directory, set to False if you don’t want to specify an output directory
  • prefix (string, optional) – prefix for filenames, set to False for standard (timestamp) prefix