Skip to content

Run_a_simulation

Dominique Delande edited this page Apr 6, 2022 · 13 revisions

Running a simulation requires two things:

  • A Python script which calls the proper sequence of routines from the module Anderson.
  • A file containing the parameters of the simulation.

The simplest method for running a script is to type from a command line (requires of course an environment with a python3 interprer and proper access to the needed modules):

python name_of_script name_of_parameter_file

The results are printed in one or several files, typically named something_depending_on_the script.dat. Presently, everything is printed in ASCII human readable files. In the future, binary formats, such as HDF5 files, will be available.

The script also prints some useful information in the standard output, typically something like (here given for the script spectral_function/compute_spectral_function.py and parameter file parameter_1d.dat in the same subdirectory):

Python script runs on machine : meteor
Name of python script:  /home/delande/git/and-python/spectral_function/compute_spectral_function.py
Name of parameter file: /home/delande/git/and-python/spectral_function/params.dat

Python script started on: Wed Apr  6 19:15:30 2022

Total number of disorder realizations: 64
Number of processes: 1

Python script ended on: Wed Apr  6 19:15:32 2022
Wallclock time 2.261 seconds

CHE time             = 1.863
Max nonlinear phase  = 0.000
Max order            = 12
Expect time          = 0.124
Dummy time           = 0.108
Number of ops        = 1.4969e+10
Total_CPU time       = 2.261

It shows which script with which parameter file was on which machine and when.

The other information is for checking that everything went well.

Parallel run

Some useful(?) scripts

The following list of scripts are just examples of what can be ran, mostly following the list of physical quantities of interest in Physics. Note that much more examples should be given, exploring the various capacities of the project. This is left for a near future.

  • Compute the inverse participation ratio of some eingestates using exact diagonalization. The script is in the subdirectory diag/compute_IPR.py.

Clone this wiki locally