Skip to content

Compute_temporal_propagation

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

The script prop/compute_prop.py can be used to propagate in time an initial state.

I strongly recommend to use it from a directory which is not the one of the and-python repository (e.g. obtained using git).

Suppose you have created your local git repository by cloning the main one:

git clone git@github-and-python:delande/and-python.git

or created a local copy by any method you like, in the directory ~/git/and-python. Then, you copy the parameter file in a local directory:

cd your_local_directory

cp ~/git/and-python/prop/params_1d.dat .

(or params_2d.dat depending on what you want to run).

Then, the script can be simply ran using the command:

python ~/git/and-python/prop/compute_prop.py params_1d.dat

or, if you want to use MPI:

mpiexec -n NN python ~/git/and-python/prop/compute_prop.py params_1d.dat

where NN is the number of cores for the parallel computation.

Two exemples of (working?) parameter files are given. The params_1d_so.dat and params_1d_so_jj.dat are apparently buggy |-(.

params_1d.dat

The script runs in less than one second on my computer. It prints (your output will be slightly different):

Python script runs on machine : meteor
Name of python script:  /home/delande/git/and-python/prop/compute_prop.py
Name of parameter file: /home/delande/git/and-python/prop/params_1d.dat

Python script started on: Fri Apr 29 19:07:05 2022

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

Python script ended on: Fri Apr 29 19:07:06 2022
Wallclock time 0.619 seconds

CHE time             = 0.293
Max nonlinear phase  = 0.000
Max order            = 14
Expect time          = 0.250
Dummy time           = 0.055
Number of ops        = 4.8096e+08
Total_CPU time       = 0.619

It creates 9 files:

  • potential.dat, containing the (averaged) potential.
  • potential_correlation.dat, which contains the potential correlation function (a delta-peak at the origin + numerical noise). *dispersion.dat, which should contain something like:
# Script ran by delande on machine meteor
# Name of python script:  /home/delande/git/and-python/prop/compute_prop.py
# Name of parameter file: /home/delande/git/and-python/prop/params_1d.dat
# Single processor version
# 
# Calculation started on: Fri Apr 29 19:07:05 2022
# Calculation   ended on: Fri Apr 29 19:07:06 2022
# 
# Dimension                              = 1
# Size_1                                 = 200.0
# delta_1                                = 1.0
# N_1                                    = 200
# Boundary_Condition_1                   = periodic
# Volume                                 = 200.0
# 1/mass                                 = 1.0
# Disorder type                          = anderson_gaussian
# randomize disorder for each config     = True
# use MKL random number generator        = True
# use MKL FFT                            = True
# V0                                     = 1.0
# g                                      = 0.0
# g_over_volume                          = 0.0
# Number of disorder realizations        = 100
# Number of processes                    = 1
# Number of realizations per proc        = 100
# Initial state                          = plane_wave
# k_0_1                                  = 0.0
# Integration Method                     = che
# accuracy                               = 1e-06
# accurate spectrum bounds               = False
# use ctypes implementation              = True
# use specific full Chebyshev routine    = True
# use specific Chebyshev step routine    = True
# use specific H|psi> routine            = True
# maximum Chebyshev order                = 14
# maximum non-linear phase               = 0.0
# data layout                            = real
# time step                              = 1.0
# total time                             = 100.0
# time step for dispersion measurement   = 2.0
# time step for density measurement      = 20.0
# time step for spectral function        = 100.0
# remove hot pixel in momentum density   = False
# 
# Column 1: Time
# Column 2: Total energy
# Column 3: Nonlinear energy
# 
0.000000000000000000e+00 1.685284812549830806e-03 0.000000000000000000e+00
2.000000000000000000e+00 1.685214924258968605e-03 0.000000000000000000e+00
4.000000000000000000e+00 1.685145035411547698e-03 0.000000000000000000e+00
6.000000000000000000e+00 1.685075146007570255e-03 0.000000000000000000e+00
8.000000000000000000e+00 1.685005256047044731e-03 0.000000000000000000e+00
1.000000000000000000e+01 1.684935365529965272e-03 0.000000000000000000e+00
1.200000000000000000e+01 1.684865474456324723e-03 0.000000000000000000e+00
1.400000000000000000e+01 1.684795582826144117e-03 0.000000000000000000e+00
1.600000000000000000e+01 1.684725690639421502e-03 0.000000000000000000e+00
1.800000000000000000e+01 1.684655797896155794e-03 0.000000000000000000e+00
2.000000000000000000e+01 1.684585904596350246e-03 0.000000000000000000e+00
2.200000000000000000e+01 1.684516010740005941e-03 0.000000000000000000e+00
2.400000000000000000e+01 1.684446116327128736e-03 0.000000000000000000e+00
2.600000000000000000e+01 1.684376221357717978e-03 0.000000000000000000e+00
2.800000000000000000e+01 1.684306325831782343e-03 0.000000000000000000e+00
3.000000000000000000e+01 1.684236429749321395e-03 0.000000000000000000e+00
3.200000000000000000e+01 1.684166533110335569e-03 0.000000000000000000e+00
3.400000000000000000e+01 1.684096635914822913e-03 0.000000000000000000e+00
3.600000000000000000e+01 1.684026738162794920e-03 0.000000000000000000e+00
3.800000000000000000e+01 1.683956839854245302e-03 0.000000000000000000e+00
4.000000000000000000e+01 1.683886940989189887e-03 0.000000000000000000e+00
4.200000000000000000e+01 1.683817041567632362e-03 0.000000000000000000e+00
4.400000000000000000e+01 1.683747141589551693e-03 0.000000000000000000e+00
4.600000000000000000e+01 1.683677241054970216e-03 0.000000000000000000e+00
4.800000000000000000e+01 1.683607339963882942e-03 0.000000000000000000e+00
5.000000000000000000e+01 1.683537438316299846e-03 0.000000000000000000e+00
5.200000000000000000e+01 1.683467536112219195e-03 0.000000000000000000e+00
5.400000000000000000e+01 1.683397633351637300e-03 0.000000000000000000e+00
5.600000000000000000e+01 1.683327730034569125e-03 0.000000000000000000e+00
5.800000000000000000e+01 1.683257826161012067e-03 0.000000000000000000e+00
6.000000000000000000e+01 1.683187921730953983e-03 0.000000000000000000e+00
6.200000000000000000e+01 1.683118016744421979e-03 0.000000000000000000e+00
6.400000000000000000e+01 1.683048111201408681e-03 0.000000000000000000e+00
6.600000000000000000e+01 1.682978205101908452e-03 0.000000000000000000e+00
6.800000000000000000e+01 1.682908298445932784e-03 0.000000000000000000e+00
7.000000000000000000e+01 1.682838391233491653e-03 0.000000000000000000e+00
7.200000000000000000e+01 1.682768483464571396e-03 0.000000000000000000e+00
7.400000000000000000e+01 1.682698575139176351e-03 0.000000000000000000e+00
7.600000000000000000e+01 1.682628666257314758e-03 0.000000000000000000e+00
7.800000000000000000e+01 1.682558756818995291e-03 0.000000000000000000e+00
8.000000000000000000e+01 1.682488846824206890e-03 0.000000000000000000e+00
8.200000000000000000e+01 1.682418936272964734e-03 0.000000000000000000e+00
8.400000000000000000e+01 1.682349025165256681e-03 0.000000000000000000e+00
8.600000000000000000e+01 1.682279113501105932e-03 0.000000000000000000e+00
8.800000000000000000e+01 1.682209201280505115e-03 0.000000000000000000e+00
9.000000000000000000e+01 1.682139288503456615e-03 0.000000000000000000e+00
9.200000000000000000e+01 1.682069375169951324e-03 0.000000000000000000e+00
9.400000000000000000e+01 1.681999461280009626e-03 0.000000000000000000e+00
9.600000000000000000e+01 1.681929546833623714e-03 0.000000000000000000e+00
9.800000000000000000e+01 1.681859631830799878e-03 0.000000000000000000e+00
1.000000000000000000e+02 1.681789716271541151e-03 0.000000000000000000e+00

which shows little, except energy conservation.

  • 6 files g1_intermediate_n.dat (with n=0,1,2,3,4,5) which contain the g1 function at increasing times. It is flat at t=0, amd more or exponentially shaped around the origin at longer times.

Clone this wiki locally