Dynamics of a single particle in free space is the simplest kind of simulation. It allows to check basic functionality of the program, and, besides, it is a good way to become familiar with how the program works.

In absence of external forces, a body moves in straight line with constant velocity

\begin{align}
& \textbf{r}(t) = \textbf{r}_0 + \textbf{v}_0 t
\\
& \textbf{v}(t) = \textbf{v}_0
\end{align}

To get some sense of scales (see below), suppose the particle is an electron that has just passed an 1 keV accelerating potential difference. Its mass `m` and charge `q` are `q = 4.8e-10 [cgs], m = 9.1e-28 [g]`. Since its energy is nonrelativistic, it's possible to calculate its speed simply as $v = \sqrt{ 2 E / m } = 1.808e+09 ~ [cm/s]$. To cover a `10 [cm]` distance with such speed, it will take the electron `t = 5.530e-09 [s] ~ 6 [ns]`.


```python
#estimates

from math import *

m = 9.8e-28
q = 4.8e-10
print("q = {:.3e} [cgs]".format(q))
print("m = {:.3e} [g]".format(m))

ev_to_cgs = 1.60218e-12
E = 1000 * ev_to_cgs
v = sqrt(2 * E / m)
print("E = {:.3e} [eV] = {:.3e} [erg]".format(E / ev_to_cgs, E))
print("v = {:.3e} [cm/s]".format(v))
print("p = {:.3e} [g * cm/s]".format(v * m))

z_distance = 10
t = z_distance / v
print("z_distance = {:f} [cm]".format(z_distance))
print("t = {:.3e} [s]".format(t))

sim_time = 6.0e-9
n_of_steps = 1000
dt = sim_time / n_of_steps
print("simulation_time = {:.3e} [s]".format(sim_time))
print("number_of_time_steps = {:d}".format(n_of_steps))
print("time_step_size = {:.3e} [s]".format(dt))

```

    q = 4.800e-10 [cgs]
    m = 9.800e-28 [g]
    E = 1.000e+03 [eV] = 1.602e-09 [erg]
    v = 1.808e+09 [cm/s]
    p = 1.772e-18 [g * cm/s]
    z_distance = 10.000000 [cm]
    t = 5.530e-09 [s]
    simulation_time = 6.000e-09 [s]
    number_of_time_steps = 1000
    time_step_size = 6.000e-12 [s]



```python
from math import *

m = 9.8e-28
q = 4.8e-10
print( "q = {:.3e} [cgs]".format( q ) )
print( "m = {:.3e} [g]".format( m ) )

ev_to_cgs = 1.60218e-12
E = 1000 * ev_to_cgs
v = sqrt( 2 * E / m )
z = 10
t = z / v
print( "E = {:.3e} [eV] = {:.3e} [erg]".format( E / ev_to_cgs, E ) )
print( "v = {:.3e} [cm/s]; p = {:.3e} [g * cm/s]".format( v, v * m ) )
print( "z = {:.3e} [cm]".format( z ) )
print( "t = {:.3e} [s]".format( t ) )
```

    q = 4.800e-10 [cgs]
    m = 9.800e-28 [g]
    E = 1.000e+03 [eV] = 1.602e-09 [erg]
    v = 1.808e+09 [cm/s]; p = 1.772e-18 [g * cm/s]
    z = 1.000e+01 [cm]
    t = 5.530e-09 [s]


To perform a simulation, it's necessary to prepare a config file. It is an `ini`-file with sections describing the simulation parameters, e.g.:

```
[TimeGrid]
total_time = 6e-09
time_save_step = 6e-12
time_step_size = 6e-12

[SpatialMesh]
grid_x_size = 5.0
grid_x_step = 0.5
grid_y_size = 5.0
grid_y_step = 0.5
grid_z_size = 15.0
grid_z_step = 1.5

[ParticleSourceBox.emit_single_particle]
box_x_left = 0.11
box_x_right = 0.1
...
```
If Ef is invoked from the command line, this file is passed as an argument:

```
ef conf.ini
```

The list of supported config sections can be found in the wiki: https://github.com/epicf/ef/wiki/Supported-Config-File-Sections .

Config classes can be used to create, visualize and read/write to ini the config file with python or jupyter.


```python
from ef.config.components import *
from ef.config.config import Config
from ef.config.visualizer import Visualizer3d
Visualizer3d()

```




    <ef.config.visualizer.Visualizer3d at 0x7fcaf678c0f0>



First, it's necessary to set a total time of the simulation and a time step.
Let's use the estimates above as guiding values and set the total time to `6e-9 [s]`.
We use `1000` time steps, so that `time_step_size = 6.0e-12 [s]`. 
Besides, it's necessary to decide at which time steps the state of the whole simulation should be saved to the disk.
To save each tenth step, `time_save_step` is set equal to 10x of `time_step_size`: `time_save_step = 6.0e-11`.


```python
single_particle_in_free_space_conf = ""

time_grid_sec = """
[TimeGrid]
total_time = 6e-09
time_save_step = 6e-11
time_step_size = 6e-12
"""

single_particle_in_free_space_conf = single_particle_in_free_space_conf + time_grid_sec

print( single_particle_in_free_space_conf )
```

    
    [TimeGrid]
    total_time = 6e-09
    time_save_step = 6e-11
    time_step_size = 6e-12
    



```python
timegrid = TimeGridConf(total=6e-09, save_step=6e-11, step=6e-12)
print(repr(timegrid))
print(timegrid)
```

    TimeGridConf(total=6e-09, save_step=6e-11, step=6e-12)
    ### TimeGridConf:
    total = 6e-09
    save_step = 6e-11
    step = 6e-12


Next we need to define size of a computational volume.
Domain size is set to 15 [cm] along the z-axis and 5 [cm] along the x- and y-axes. 
The parameters for PIC-mesh are also defined in this section.
Since we are going to use noninteracting particle model instead of PIC, they are not used and can be set arbitrary. 


```python
spat_mesh_sec = """
[SpatialMesh]
grid_x_size = 5.0
grid_x_step = 0.5
grid_y_size = 5.0
grid_y_step = 0.5
grid_z_size = 15.0
grid_z_step = 1.5
"""

single_particle_in_free_space_conf = single_particle_in_free_space_conf + spat_mesh_sec

print( single_particle_in_free_space_conf )
```

    
    [TimeGrid]
    total_time = 6e-09
    time_save_step = 6e-11
    time_step_size = 6e-12
    
    [SpatialMesh]
    grid_x_size = 5.0
    grid_x_step = 0.5
    grid_y_size = 5.0
    grid_y_step = 0.5
    grid_z_size = 15.0
    grid_z_step = 1.5
    



```python
mesh = SpatialMeshConf((5, 5, 15), (.5, .5, 1.5))
print(repr(mesh))
print(mesh)
Visualizer3d().visualize([mesh])

```

Next, a particle source. 
We need a single particle at startup ( `initial_number_of_particles = 1` ), approximately 1 [mm] away from
coordinate axis origin at the bottom-left-near corner of the domain (`shape = Box( origin = (0.1, ...` below and `box_x_left = 0.10 ...` in the ini-version).
Charge and mass are set to those of the electron.
Momentum corresponding to 1 keV energy is `1.772e-18 [g * cm / s]`.
Such value is set for momentum along the z-axis. 
Momenta along the x- and y-axes could be set to zero; instead they are chosen 3 times smaller than the z-axis momentum
(domain size along the x and y is 3 times smaller than along the z). 
To prevent any variation in momentum, the `temperature` is set to 0.
Notice that the source is given a descriptive name: `emit_single_particle` in this case.


```python
emit_single_particle_sec = """
[ParticleSourceBox.emit_single_particle]
box_x_left = 0.11
box_x_right = 0.1
box_y_bottom = 0.1
box_y_top = 0.11
box_z_near = 0.1
box_z_far = 0.11
initial_number_of_particles = 1
particles_to_generate_each_step = 0
mean_momentum_x = 6e-19
mean_momentum_y = 6e-19
mean_momentum_z = 1.77e-18
temperature = 0.0
charge = 4.8e-10
mass = 9.8e-28
"""

single_particle_in_free_space_conf = single_particle_in_free_space_conf + emit_single_particle_sec

print( single_particle_in_free_space_conf )
```

    
    [TimeGrid]
    total_time = 6e-09
    time_save_step = 6e-11
    time_step_size = 6e-12
    
    [SpatialMesh]
    grid_x_size = 5.0
    grid_x_step = 0.5
    grid_y_size = 5.0
    grid_y_step = 0.5
    grid_z_size = 15.0
    grid_z_step = 1.5
    
    [ParticleSourceBox.emit_single_particle]
    box_x_left = 0.11
    box_x_right = 0.1
    box_y_bottom = 0.1
    box_y_top = 0.11
    box_z_near = 0.1
    box_z_far = 0.11
    initial_number_of_particles = 1
    particles_to_generate_each_step = 0
    mean_momentum_x = 6e-19
    mean_momentum_y = 6e-19
    mean_momentum_z = 1.77e-18
    temperature = 0.0
    charge = 4.8e-10
    mass = 9.8e-28
    



```python
source = ParticleSourceConf("emit_single_particle", Box((.1, .1, .1), (.01, .01, .01)), 1, 0,
                           (6e-19, 6e-19, 1.77e-18), 0., 4.8e-10, 9.8e-28)
print(repr(source))
print(source)
Visualizer3d().visualize([mesh, source]) # small dot near (0, 0, 0) because mesh is so big
```

Next section is boundary conditions. 
In a free space, potentials on each boundary should be equal. 
It is possible to simply set them to zero.


```python
boundary_sec = """
[BoundaryConditions]
boundary_phi_right = 0.0
boundary_phi_left = 0.0
boundary_phi_bottom = 0.0
boundary_phi_top = 0.0
boundary_phi_near = 0.0
boundary_phi_far = 0.0
"""

single_particle_in_free_space_conf = single_particle_in_free_space_conf + boundary_sec

print( single_particle_in_free_space_conf )
```

    
    [TimeGrid]
    total_time = 6e-09
    time_save_step = 6e-11
    time_step_size = 6e-12
    
    [SpatialMesh]
    grid_x_size = 5.0
    grid_x_step = 0.5
    grid_y_size = 5.0
    grid_y_step = 0.5
    grid_z_size = 15.0
    grid_z_step = 1.5
    
    [ParticleSourceBox.emit_single_particle]
    box_x_left = 0.11
    box_x_right = 0.1
    box_y_bottom = 0.1
    box_y_top = 0.11
    box_z_near = 0.1
    box_z_far = 0.11
    initial_number_of_particles = 1
    particles_to_generate_each_step = 0
    mean_momentum_x = 6e-19
    mean_momentum_y = 6e-19
    mean_momentum_z = 1.77e-18
    temperature = 0.0
    charge = 4.8e-10
    mass = 9.8e-28
    
    [BoundaryConditions]
    boundary_phi_right = 0.0
    boundary_phi_left = 0.0
    boundary_phi_bottom = 0.0
    boundary_phi_top = 0.0
    boundary_phi_near = 0.0
    boundary_phi_far = 0.0
    



```python
boundary_conditions = BoundaryConditionsConf(0)
print(repr(boundary_conditions))
print(boundary_conditions)
```

    BoundaryConditionsConf(right=0.0, left=0.0, bottom=0.0, top=0.0, near=0.0, far=0.0)
    ### BoundaryConditionsConf:
    right = 0.0
    left = 0.0
    bottom = 0.0
    top = 0.0
    near = 0.0
    far = 0.0


Particle interaction model allows to choose between noninteracting particles, particle interacting with binary forces and PIC method. Since there is only one particle, there is no need to use PIC, and noninteracting mode is enough. Moreover, PIC will lead to wrong results (because particle creates electric field that acts back on the particle). 


```python
particle_interaction_model_sec = """
[ParticleInteractionModel]
particle_interaction_model = noninteracting
"""

single_particle_in_free_space_conf = single_particle_in_free_space_conf + particle_interaction_model_sec

print( single_particle_in_free_space_conf )
```

    
    [TimeGrid]
    total_time = 6e-09
    time_save_step = 6e-11
    time_step_size = 6e-12
    
    [SpatialMesh]
    grid_x_size = 5.0
    grid_x_step = 0.5
    grid_y_size = 5.0
    grid_y_step = 0.5
    grid_z_size = 15.0
    grid_z_step = 1.5
    
    [ParticleSourceBox.emit_single_particle]
    box_x_left = 0.11
    box_x_right = 0.1
    box_y_bottom = 0.1
    box_y_top = 0.11
    box_z_near = 0.1
    box_z_far = 0.11
    initial_number_of_particles = 1
    particles_to_generate_each_step = 0
    mean_momentum_x = 6e-19
    mean_momentum_y = 6e-19
    mean_momentum_z = 1.77e-18
    temperature = 0.0
    charge = 4.8e-10
    mass = 9.8e-28
    
    [BoundaryConditions]
    boundary_phi_right = 0.0
    boundary_phi_left = 0.0
    boundary_phi_bottom = 0.0
    boundary_phi_top = 0.0
    boundary_phi_near = 0.0
    boundary_phi_far = 0.0
    
    [ParticleInteractionModel]
    particle_interaction_model = noninteracting
    



```python
model = ParticleInteractionModelConf('noninteracting')
print(repr(model))
print(model)
```

    ParticleInteractionModelConf(model='noninteracting')
    ### ParticleInteractionModelConf:
    model = 'noninteracting'


The last step is to specify pattern for output file names. 
They will be of the form `single_particle_free_space_0001000.h5`, where `0001000` is a time step number.


```python
output_sec = """
[OutputFilename]
output_filename_prefix = single_particle_free_space_
output_filename_suffix = .h5
"""

single_particle_in_free_space_conf = single_particle_in_free_space_conf + output_sec

print( single_particle_in_free_space_conf )
```

    
    [TimeGrid]
    total_time = 6e-09
    time_save_step = 6e-11
    time_step_size = 6e-12
    
    [SpatialMesh]
    grid_x_size = 5.0
    grid_x_step = 0.5
    grid_y_size = 5.0
    grid_y_step = 0.5
    grid_z_size = 15.0
    grid_z_step = 1.5
    
    [ParticleSourceBox.emit_single_particle]
    box_x_left = 0.11
    box_x_right = 0.1
    box_y_bottom = 0.1
    box_y_top = 0.11
    box_z_near = 0.1
    box_z_far = 0.11
    initial_number_of_particles = 1
    particles_to_generate_each_step = 0
    mean_momentum_x = 6e-19
    mean_momentum_y = 6e-19
    mean_momentum_z = 1.77e-18
    temperature = 0.0
    charge = 4.8e-10
    mass = 9.8e-28
    
    [BoundaryConditions]
    boundary_phi_right = 0.0
    boundary_phi_left = 0.0
    boundary_phi_bottom = 0.0
    boundary_phi_top = 0.0
    boundary_phi_near = 0.0
    boundary_phi_far = 0.0
    
    [ParticleInteractionModel]
    particle_interaction_model = noninteracting
    
    [OutputFilename]
    output_filename_prefix = single_particle_free_space_
    output_filename_suffix = .h5
    


To start the simulation, the config should saved into file and provided as an argument to the `ef.out`, e.g.:

```
ef.out ./single_particle_in_free_space_conf.ini
```

EfJupyter module provides a wrapper `EfRunner` to do this.  


```python
file_conf = OutputFileConf('single_particle_free_space_', '.h5')
print(repr(file_conf))
print(file_conf)
```

    OutputFileConf(prefix='single_particle_free_space_', suffix='.h5', format_='cpp')
    ### OutputFileConf:
    prefix = 'single_particle_free_space_'
    suffix = '.h5'
    format_ = 'cpp'


You can check that config objects describe the same simulation:


```python
conf = Config(timegrid, mesh, [source], [], file_conf, boundary_conditions, model)
print(conf)
print(conf.export_to_string())
conf.visualize_all(Visualizer3d())
```

To run outside Jupyter just save the config file

-  with any text editor
-  or with `efconf.export_to_file()`

Run `ef config.ini` in the directory where you want simulation to run and save results.

To run in python from Jupyter:


```python
from ef.runner import Runner
# if you start from .ini
# conf = Config.from_fname('config.ini')
sim = conf.make()
Runner(sim, output_writer=conf.output_file.make()).start()

```

    Writing initial fields to file
    Writing to file single_particle_free_space_fieldsWithoutParticles_new.h5
    Writing to file single_particle_free_space_fieldsWithoutParticles.h5
    Writing step 0 to file
    Writing to file single_particle_free_space_0000000.h5
    Time step from 0 to 1 of 1000
    Time step from 1 to 2 of 1000
    Time step from 2 to 3 of 1000
    Time step from 3 to 4 of 1000
    Time step from 4 to 5 of 1000
    Time step from 5 to 6 of 1000
    Time step from 6 to 7 of 1000
    Time step from 7 to 8 of 1000
    Time step from 8 to 9 of 1000
    Time step from 9 to 10 of 1000
    Writing step 10 to file
    Writing to file single_particle_free_space_0000010.h5
    Time step from 10 to 11 of 1000
    Time step from 11 to 12 of 1000
    Time step from 12 to 13 of 1000
    Time step from 13 to 14 of 1000
    Time step from 14 to 15 of 1000
    Time step from 15 to 16 of 1000
    Time step from 16 to 17 of 1000
    Time step from 17 to 18 of 1000
    Time step from 18 to 19 of 1000
    Time step from 19 to 20 of 1000
    Writing step 20 to file
    Writing to file single_particle_free_space_0000020.h5
    Time step from 20 to 21 of 1000
    Time step from 21 to 22 of 1000
    Time step from 22 to 23 of 1000
    Time step from 23 to 24 of 1000
    Time step from 24 to 25 of 1000
    Time step from 25 to 26 of 1000
    Time step from 26 to 27 of 1000
    Time step from 27 to 28 of 1000
    Time step from 28 to 29 of 1000
    Time step from 29 to 30 of 1000
    Writing step 30 to file
    Writing to file single_particle_free_space_0000030.h5
    Time step from 30 to 31 of 1000
    Time step from 31 to 32 of 1000
    Time step from 32 to 33 of 1000
    Time step from 33 to 34 of 1000
    Time step from 34 to 35 of 1000
    Time step from 35 to 36 of 1000
    Time step from 36 to 37 of 1000
    Time step from 37 to 38 of 1000
    Time step from 38 to 39 of 1000
    Time step from 39 to 40 of 1000
    Writing step 40 to file
    Writing to file single_particle_free_space_0000040.h5
    Time step from 40 to 41 of 1000
    Time step from 41 to 42 of 1000
    Time step from 42 to 43 of 1000
    Time step from 43 to 44 of 1000
    Time step from 44 to 45 of 1000
    Time step from 45 to 46 of 1000
    Time step from 46 to 47 of 1000
    Time step from 47 to 48 of 1000
    Time step from 48 to 49 of 1000
    Time step from 49 to 50 of 1000
    Writing step 50 to file
    Writing to file single_particle_free_space_0000050.h5
    Time step from 50 to 51 of 1000
    Time step from 51 to 52 of 1000
    Time step from 52 to 53 of 1000
    Time step from 53 to 54 of 1000
    Time step from 54 to 55 of 1000
    Time step from 55 to 56 of 1000
    Time step from 56 to 57 of 1000
    Time step from 57 to 58 of 1000
    Time step from 58 to 59 of 1000
    Time step from 59 to 60 of 1000
    Writing step 60 to file
    Writing to file single_particle_free_space_0000060.h5
    Time step from 60 to 61 of 1000
    Time step from 61 to 62 of 1000
    Time step from 62 to 63 of 1000
    Time step from 63 to 64 of 1000
    Time step from 64 to 65 of 1000
    Time step from 65 to 66 of 1000
    Time step from 66 to 67 of 1000
    Time step from 67 to 68 of 1000
    Time step from 68 to 69 of 1000
    Time step from 69 to 70 of 1000
    Writing step 70 to file
    Writing to file single_particle_free_space_0000070.h5
    Time step from 70 to 71 of 1000
    Time step from 71 to 72 of 1000
    Time step from 72 to 73 of 1000
    Time step from 73 to 74 of 1000
    Time step from 74 to 75 of 1000
    Time step from 75 to 76 of 1000
    Time step from 76 to 77 of 1000
    Time step from 77 to 78 of 1000
    Time step from 78 to 79 of 1000
    Time step from 79 to 80 of 1000
    Writing step 80 to file
    Writing to file single_particle_free_space_0000080.h5
    Time step from 80 to 81 of 1000
    Time step from 81 to 82 of 1000
    Time step from 82 to 83 of 1000
    Time step from 83 to 84 of 1000
    Time step from 84 to 85 of 1000
    Time step from 85 to 86 of 1000
    Time step from 86 to 87 of 1000
    Time step from 87 to 88 of 1000
    Time step from 88 to 89 of 1000
    Time step from 89 to 90 of 1000
    Writing step 90 to file
    Writing to file single_particle_free_space_0000090.h5
    Time step from 90 to 91 of 1000
    Time step from 91 to 92 of 1000
    Time step from 92 to 93 of 1000
    Time step from 93 to 94 of 1000
    Time step from 94 to 95 of 1000
    Time step from 95 to 96 of 1000
    Time step from 96 to 97 of 1000
    Time step from 97 to 98 of 1000
    Time step from 98 to 99 of 1000
    Time step from 99 to 100 of 1000
    Writing step 100 to file
    Writing to file single_particle_free_space_0000100.h5
    Time step from 100 to 101 of 1000
    Time step from 101 to 102 of 1000
    Time step from 102 to 103 of 1000
    Time step from 103 to 104 of 1000
    Time step from 104 to 105 of 1000
    Time step from 105 to 106 of 1000
    Time step from 106 to 107 of 1000
    Time step from 107 to 108 of 1000
    Time step from 108 to 109 of 1000
    Time step from 109 to 110 of 1000
    Writing step 110 to file
    Writing to file single_particle_free_space_0000110.h5
    Time step from 110 to 111 of 1000
    Time step from 111 to 112 of 1000
    Time step from 112 to 113 of 1000
    Time step from 113 to 114 of 1000
    Time step from 114 to 115 of 1000
    Time step from 115 to 116 of 1000
    Time step from 116 to 117 of 1000
    Time step from 117 to 118 of 1000
    Time step from 118 to 119 of 1000
    Time step from 119 to 120 of 1000
    Writing step 120 to file
    Writing to file single_particle_free_space_0000120.h5
    Time step from 120 to 121 of 1000
    Time step from 121 to 122 of 1000
    Time step from 122 to 123 of 1000
    Time step from 123 to 124 of 1000
    Time step from 124 to 125 of 1000
    Time step from 125 to 126 of 1000
    Time step from 126 to 127 of 1000
    Time step from 127 to 128 of 1000
    Time step from 128 to 129 of 1000
    Time step from 129 to 130 of 1000
    Writing step 130 to file
    Writing to file single_particle_free_space_0000130.h5
    Time step from 130 to 131 of 1000
    Time step from 131 to 132 of 1000
    Time step from 132 to 133 of 1000
    Time step from 133 to 134 of 1000
    Time step from 134 to 135 of 1000
    Time step from 135 to 136 of 1000
    Time step from 136 to 137 of 1000
    Time step from 137 to 138 of 1000
    Time step from 138 to 139 of 1000
    Time step from 139 to 140 of 1000
    Writing step 140 to file
    Writing to file single_particle_free_space_0000140.h5
    Time step from 140 to 141 of 1000
    Time step from 141 to 142 of 1000
    Time step from 142 to 143 of 1000
    Time step from 143 to 144 of 1000
    Time step from 144 to 145 of 1000
    Time step from 145 to 146 of 1000
    Time step from 146 to 147 of 1000
    Time step from 147 to 148 of 1000
    Time step from 148 to 149 of 1000
    Time step from 149 to 150 of 1000
    Writing step 150 to file
    Writing to file single_particle_free_space_0000150.h5
    Time step from 150 to 151 of 1000
    Time step from 151 to 152 of 1000
    Time step from 152 to 153 of 1000
    Time step from 153 to 154 of 1000
    Time step from 154 to 155 of 1000
    Time step from 155 to 156 of 1000
    Time step from 156 to 157 of 1000
    Time step from 157 to 158 of 1000
    Time step from 158 to 159 of 1000
    Time step from 159 to 160 of 1000
    Writing step 160 to file
    Writing to file single_particle_free_space_0000160.h5
    Time step from 160 to 161 of 1000
    Time step from 161 to 162 of 1000
    Time step from 162 to 163 of 1000
    Time step from 163 to 164 of 1000
    Time step from 164 to 165 of 1000
    Time step from 165 to 166 of 1000
    Time step from 166 to 167 of 1000
    Time step from 167 to 168 of 1000
    Time step from 168 to 169 of 1000
    Time step from 169 to 170 of 1000
    Writing step 170 to file
    Writing to file single_particle_free_space_0000170.h5
    Time step from 170 to 171 of 1000
    Time step from 171 to 172 of 1000
    Time step from 172 to 173 of 1000
    Time step from 173 to 174 of 1000
    Time step from 174 to 175 of 1000
    Time step from 175 to 176 of 1000
    Time step from 176 to 177 of 1000
    Time step from 177 to 178 of 1000
    Time step from 178 to 179 of 1000
    Time step from 179 to 180 of 1000
    Writing step 180 to file
    Writing to file single_particle_free_space_0000180.h5
    Time step from 180 to 181 of 1000
    Time step from 181 to 182 of 1000
    Time step from 182 to 183 of 1000
    Time step from 183 to 184 of 1000
    Time step from 184 to 185 of 1000
    Time step from 185 to 186 of 1000
    Time step from 186 to 187 of 1000
    Time step from 187 to 188 of 1000
    Time step from 188 to 189 of 1000
    Time step from 189 to 190 of 1000
    Writing step 190 to file
    Writing to file single_particle_free_space_0000190.h5
    Time step from 190 to 191 of 1000
    Time step from 191 to 192 of 1000
    Time step from 192 to 193 of 1000
    Time step from 193 to 194 of 1000
    Time step from 194 to 195 of 1000
    Time step from 195 to 196 of 1000
    Time step from 196 to 197 of 1000
    Time step from 197 to 198 of 1000
    Time step from 198 to 199 of 1000
    Time step from 199 to 200 of 1000
    Writing step 200 to file
    Writing to file single_particle_free_space_0000200.h5
    Time step from 200 to 201 of 1000
    Time step from 201 to 202 of 1000
    Time step from 202 to 203 of 1000
    Time step from 203 to 204 of 1000
    Time step from 204 to 205 of 1000
    Time step from 205 to 206 of 1000
    Time step from 206 to 207 of 1000
    Time step from 207 to 208 of 1000
    Time step from 208 to 209 of 1000
    Time step from 209 to 210 of 1000
    Writing step 210 to file
    Writing to file single_particle_free_space_0000210.h5
    Time step from 210 to 211 of 1000
    Time step from 211 to 212 of 1000
    Time step from 212 to 213 of 1000
    Time step from 213 to 214 of 1000
    Time step from 214 to 215 of 1000
    Time step from 215 to 216 of 1000
    Time step from 216 to 217 of 1000
    Time step from 217 to 218 of 1000
    Time step from 218 to 219 of 1000
    Time step from 219 to 220 of 1000
    Writing step 220 to file
    Writing to file single_particle_free_space_0000220.h5
    Time step from 220 to 221 of 1000
    Time step from 221 to 222 of 1000
    Time step from 222 to 223 of 1000
    Time step from 223 to 224 of 1000
    Time step from 224 to 225 of 1000
    Time step from 225 to 226 of 1000
    Time step from 226 to 227 of 1000
    Time step from 227 to 228 of 1000
    Time step from 228 to 229 of 1000
    Time step from 229 to 230 of 1000
    Writing step 230 to file
    Writing to file single_particle_free_space_0000230.h5
    Time step from 230 to 231 of 1000
    Time step from 231 to 232 of 1000
    Time step from 232 to 233 of 1000
    Time step from 233 to 234 of 1000
    Time step from 234 to 235 of 1000
    Time step from 235 to 236 of 1000
    Time step from 236 to 237 of 1000
    Time step from 237 to 238 of 1000
    Time step from 238 to 239 of 1000
    Time step from 239 to 240 of 1000
    Writing step 240 to file
    Writing to file single_particle_free_space_0000240.h5
    Time step from 240 to 241 of 1000
    Time step from 241 to 242 of 1000
    Time step from 242 to 243 of 1000
    Time step from 243 to 244 of 1000
    Time step from 244 to 245 of 1000
    Time step from 245 to 246 of 1000
    Time step from 246 to 247 of 1000
    Time step from 247 to 248 of 1000
    Time step from 248 to 249 of 1000
    Time step from 249 to 250 of 1000
    Writing step 250 to file
    Writing to file single_particle_free_space_0000250.h5
    Time step from 250 to 251 of 1000
    Time step from 251 to 252 of 1000
    Time step from 252 to 253 of 1000
    Time step from 253 to 254 of 1000
    Time step from 254 to 255 of 1000
    Time step from 255 to 256 of 1000
    Time step from 256 to 257 of 1000
    Time step from 257 to 258 of 1000
    Time step from 258 to 259 of 1000
    Time step from 259 to 260 of 1000
    Writing step 260 to file
    Writing to file single_particle_free_space_0000260.h5
    Time step from 260 to 261 of 1000
    Time step from 261 to 262 of 1000
    Time step from 262 to 263 of 1000
    Time step from 263 to 264 of 1000
    Time step from 264 to 265 of 1000
    Time step from 265 to 266 of 1000
    Time step from 266 to 267 of 1000
    Time step from 267 to 268 of 1000
    Time step from 268 to 269 of 1000
    Time step from 269 to 270 of 1000
    Writing step 270 to file
    Writing to file single_particle_free_space_0000270.h5
    Time step from 270 to 271 of 1000
    Time step from 271 to 272 of 1000
    Time step from 272 to 273 of 1000
    Time step from 273 to 274 of 1000
    Time step from 274 to 275 of 1000
    Time step from 275 to 276 of 1000
    Time step from 276 to 277 of 1000
    Time step from 277 to 278 of 1000
    Time step from 278 to 279 of 1000
    Time step from 279 to 280 of 1000
    Writing step 280 to file
    Writing to file single_particle_free_space_0000280.h5
    Time step from 280 to 281 of 1000
    Time step from 281 to 282 of 1000
    Time step from 282 to 283 of 1000
    Time step from 283 to 284 of 1000
    Time step from 284 to 285 of 1000
    Time step from 285 to 286 of 1000
    Time step from 286 to 287 of 1000
    Time step from 287 to 288 of 1000
    Time step from 288 to 289 of 1000
    Time step from 289 to 290 of 1000
    Writing step 290 to file
    Writing to file single_particle_free_space_0000290.h5
    Time step from 290 to 291 of 1000
    Time step from 291 to 292 of 1000
    Time step from 292 to 293 of 1000
    Time step from 293 to 294 of 1000
    Time step from 294 to 295 of 1000
    Time step from 295 to 296 of 1000
    Time step from 296 to 297 of 1000
    Time step from 297 to 298 of 1000
    Time step from 298 to 299 of 1000
    Time step from 299 to 300 of 1000
    Writing step 300 to file
    Writing to file single_particle_free_space_0000300.h5
    Time step from 300 to 301 of 1000
    Time step from 301 to 302 of 1000
    Time step from 302 to 303 of 1000
    Time step from 303 to 304 of 1000
    Time step from 304 to 305 of 1000
    Time step from 305 to 306 of 1000
    Time step from 306 to 307 of 1000
    Time step from 307 to 308 of 1000
    Time step from 308 to 309 of 1000
    Time step from 309 to 310 of 1000
    Writing step 310 to file
    Writing to file single_particle_free_space_0000310.h5
    Time step from 310 to 311 of 1000
    Time step from 311 to 312 of 1000
    Time step from 312 to 313 of 1000
    Time step from 313 to 314 of 1000
    Time step from 314 to 315 of 1000
    Time step from 315 to 316 of 1000
    Time step from 316 to 317 of 1000
    Time step from 317 to 318 of 1000
    Time step from 318 to 319 of 1000
    Time step from 319 to 320 of 1000
    Writing step 320 to file
    Writing to file single_particle_free_space_0000320.h5
    Time step from 320 to 321 of 1000
    Time step from 321 to 322 of 1000
    Time step from 322 to 323 of 1000
    Time step from 323 to 324 of 1000
    Time step from 324 to 325 of 1000
    Time step from 325 to 326 of 1000
    Time step from 326 to 327 of 1000
    Time step from 327 to 328 of 1000
    Time step from 328 to 329 of 1000
    Time step from 329 to 330 of 1000
    Writing step 330 to file
    Writing to file single_particle_free_space_0000330.h5
    Time step from 330 to 331 of 1000
    Time step from 331 to 332 of 1000
    Time step from 332 to 333 of 1000
    Time step from 333 to 334 of 1000
    Time step from 334 to 335 of 1000
    Time step from 335 to 336 of 1000
    Time step from 336 to 337 of 1000
    Time step from 337 to 338 of 1000
    Time step from 338 to 339 of 1000
    Time step from 339 to 340 of 1000
    Writing step 340 to file
    Writing to file single_particle_free_space_0000340.h5
    Time step from 340 to 341 of 1000
    Time step from 341 to 342 of 1000
    Time step from 342 to 343 of 1000
    Time step from 343 to 344 of 1000
    Time step from 344 to 345 of 1000
    Time step from 345 to 346 of 1000
    Time step from 346 to 347 of 1000
    Time step from 347 to 348 of 1000
    Time step from 348 to 349 of 1000
    Time step from 349 to 350 of 1000
    Writing step 350 to file
    Writing to file single_particle_free_space_0000350.h5
    Time step from 350 to 351 of 1000
    Time step from 351 to 352 of 1000
    Time step from 352 to 353 of 1000
    Time step from 353 to 354 of 1000
    Time step from 354 to 355 of 1000
    Time step from 355 to 356 of 1000
    Time step from 356 to 357 of 1000
    Time step from 357 to 358 of 1000
    Time step from 358 to 359 of 1000
    Time step from 359 to 360 of 1000
    Writing step 360 to file
    Writing to file single_particle_free_space_0000360.h5
    Time step from 360 to 361 of 1000
    Time step from 361 to 362 of 1000
    Time step from 362 to 363 of 1000
    Time step from 363 to 364 of 1000
    Time step from 364 to 365 of 1000
    Time step from 365 to 366 of 1000
    Time step from 366 to 367 of 1000
    Time step from 367 to 368 of 1000
    Time step from 368 to 369 of 1000
    Time step from 369 to 370 of 1000
    Writing step 370 to file
    Writing to file single_particle_free_space_0000370.h5
    Time step from 370 to 371 of 1000
    Time step from 371 to 372 of 1000
    Time step from 372 to 373 of 1000
    Time step from 373 to 374 of 1000
    Time step from 374 to 375 of 1000
    Time step from 375 to 376 of 1000
    Time step from 376 to 377 of 1000
    Time step from 377 to 378 of 1000
    Time step from 378 to 379 of 1000
    Time step from 379 to 380 of 1000
    Writing step 380 to file
    Writing to file single_particle_free_space_0000380.h5
    Time step from 380 to 381 of 1000
    Time step from 381 to 382 of 1000
    Time step from 382 to 383 of 1000
    Time step from 383 to 384 of 1000
    Time step from 384 to 385 of 1000
    Time step from 385 to 386 of 1000
    Time step from 386 to 387 of 1000
    Time step from 387 to 388 of 1000
    Time step from 388 to 389 of 1000
    Time step from 389 to 390 of 1000
    Writing step 390 to file
    Writing to file single_particle_free_space_0000390.h5
    Time step from 390 to 391 of 1000
    Time step from 391 to 392 of 1000
    Time step from 392 to 393 of 1000
    Time step from 393 to 394 of 1000
    Time step from 394 to 395 of 1000
    Time step from 395 to 396 of 1000
    Time step from 396 to 397 of 1000
    Time step from 397 to 398 of 1000
    Time step from 398 to 399 of 1000
    Time step from 399 to 400 of 1000
    Writing step 400 to file
    Writing to file single_particle_free_space_0000400.h5
    Time step from 400 to 401 of 1000
    Time step from 401 to 402 of 1000
    Time step from 402 to 403 of 1000
    Time step from 403 to 404 of 1000
    Time step from 404 to 405 of 1000
    Time step from 405 to 406 of 1000
    Time step from 406 to 407 of 1000
    Time step from 407 to 408 of 1000
    Time step from 408 to 409 of 1000
    Time step from 409 to 410 of 1000
    Writing step 410 to file
    Writing to file single_particle_free_space_0000410.h5
    Time step from 410 to 411 of 1000
    Time step from 411 to 412 of 1000
    Time step from 412 to 413 of 1000
    Time step from 413 to 414 of 1000
    Time step from 414 to 415 of 1000
    Time step from 415 to 416 of 1000
    Time step from 416 to 417 of 1000
    Time step from 417 to 418 of 1000
    Time step from 418 to 419 of 1000
    Time step from 419 to 420 of 1000
    Writing step 420 to file
    Writing to file single_particle_free_space_0000420.h5
    Time step from 420 to 421 of 1000
    Time step from 421 to 422 of 1000
    Time step from 422 to 423 of 1000
    Time step from 423 to 424 of 1000
    Time step from 424 to 425 of 1000
    Time step from 425 to 426 of 1000
    Time step from 426 to 427 of 1000
    Time step from 427 to 428 of 1000
    Time step from 428 to 429 of 1000
    Time step from 429 to 430 of 1000
    Writing step 430 to file
    Writing to file single_particle_free_space_0000430.h5
    Time step from 430 to 431 of 1000
    Time step from 431 to 432 of 1000
    Time step from 432 to 433 of 1000
    Time step from 433 to 434 of 1000
    Time step from 434 to 435 of 1000
    Time step from 435 to 436 of 1000
    Time step from 436 to 437 of 1000
    Time step from 437 to 438 of 1000
    Time step from 438 to 439 of 1000
    Time step from 439 to 440 of 1000
    Writing step 440 to file
    Writing to file single_particle_free_space_0000440.h5
    Time step from 440 to 441 of 1000
    Time step from 441 to 442 of 1000
    Time step from 442 to 443 of 1000
    Time step from 443 to 444 of 1000
    Time step from 444 to 445 of 1000
    Time step from 445 to 446 of 1000
    Time step from 446 to 447 of 1000
    Time step from 447 to 448 of 1000
    Time step from 448 to 449 of 1000
    Time step from 449 to 450 of 1000
    Writing step 450 to file
    Writing to file single_particle_free_space_0000450.h5
    Time step from 450 to 451 of 1000
    Time step from 451 to 452 of 1000
    Time step from 452 to 453 of 1000
    Time step from 453 to 454 of 1000
    Time step from 454 to 455 of 1000
    Time step from 455 to 456 of 1000
    Time step from 456 to 457 of 1000
    Time step from 457 to 458 of 1000
    Time step from 458 to 459 of 1000
    Time step from 459 to 460 of 1000
    Writing step 460 to file
    Writing to file single_particle_free_space_0000460.h5
    Time step from 460 to 461 of 1000
    Time step from 461 to 462 of 1000
    Time step from 462 to 463 of 1000
    Time step from 463 to 464 of 1000
    Time step from 464 to 465 of 1000
    Time step from 465 to 466 of 1000
    Time step from 466 to 467 of 1000
    Time step from 467 to 468 of 1000
    Time step from 468 to 469 of 1000
    Time step from 469 to 470 of 1000
    Writing step 470 to file
    Writing to file single_particle_free_space_0000470.h5
    Time step from 470 to 471 of 1000
    Time step from 471 to 472 of 1000
    Time step from 472 to 473 of 1000
    Time step from 473 to 474 of 1000
    Time step from 474 to 475 of 1000
    Time step from 475 to 476 of 1000
    Time step from 476 to 477 of 1000
    Time step from 477 to 478 of 1000
    Time step from 478 to 479 of 1000
    Time step from 479 to 480 of 1000
    Writing step 480 to file
    Writing to file single_particle_free_space_0000480.h5
    Time step from 480 to 481 of 1000
    Time step from 481 to 482 of 1000
    Time step from 482 to 483 of 1000
    Time step from 483 to 484 of 1000
    Time step from 484 to 485 of 1000
    Time step from 485 to 486 of 1000
    Time step from 486 to 487 of 1000
    Time step from 487 to 488 of 1000
    Time step from 488 to 489 of 1000
    Time step from 489 to 490 of 1000
    Writing step 490 to file
    Writing to file single_particle_free_space_0000490.h5
    Time step from 490 to 491 of 1000
    Time step from 491 to 492 of 1000
    Time step from 492 to 493 of 1000
    Time step from 493 to 494 of 1000
    Time step from 494 to 495 of 1000
    Time step from 495 to 496 of 1000
    Time step from 496 to 497 of 1000
    Time step from 497 to 498 of 1000
    Time step from 498 to 499 of 1000
    Time step from 499 to 500 of 1000
    Writing step 500 to file
    Writing to file single_particle_free_space_0000500.h5
    Time step from 500 to 501 of 1000
    Time step from 501 to 502 of 1000
    Time step from 502 to 503 of 1000
    Time step from 503 to 504 of 1000
    Time step from 504 to 505 of 1000
    Time step from 505 to 506 of 1000
    Time step from 506 to 507 of 1000
    Time step from 507 to 508 of 1000
    Time step from 508 to 509 of 1000
    Time step from 509 to 510 of 1000
    Writing step 510 to file
    Writing to file single_particle_free_space_0000510.h5
    Time step from 510 to 511 of 1000
    Time step from 511 to 512 of 1000
    Time step from 512 to 513 of 1000
    Time step from 513 to 514 of 1000
    Time step from 514 to 515 of 1000
    Time step from 515 to 516 of 1000
    Time step from 516 to 517 of 1000
    Time step from 517 to 518 of 1000
    Time step from 518 to 519 of 1000
    Time step from 519 to 520 of 1000
    Writing step 520 to file
    Writing to file single_particle_free_space_0000520.h5
    Time step from 520 to 521 of 1000
    Time step from 521 to 522 of 1000
    Time step from 522 to 523 of 1000
    Time step from 523 to 524 of 1000
    Time step from 524 to 525 of 1000
    Time step from 525 to 526 of 1000
    Time step from 526 to 527 of 1000
    Time step from 527 to 528 of 1000
    Time step from 528 to 529 of 1000
    Time step from 529 to 530 of 1000
    Writing step 530 to file
    Writing to file single_particle_free_space_0000530.h5
    Time step from 530 to 531 of 1000
    Time step from 531 to 532 of 1000
    Time step from 532 to 533 of 1000
    Time step from 533 to 534 of 1000
    Time step from 534 to 535 of 1000
    Time step from 535 to 536 of 1000
    Time step from 536 to 537 of 1000
    Time step from 537 to 538 of 1000
    Time step from 538 to 539 of 1000
    Time step from 539 to 540 of 1000
    Writing step 540 to file
    Writing to file single_particle_free_space_0000540.h5
    Time step from 540 to 541 of 1000
    Time step from 541 to 542 of 1000
    Time step from 542 to 543 of 1000
    Time step from 543 to 544 of 1000
    Time step from 544 to 545 of 1000
    Time step from 545 to 546 of 1000
    Time step from 546 to 547 of 1000
    Time step from 547 to 548 of 1000
    Time step from 548 to 549 of 1000
    Time step from 549 to 550 of 1000
    Writing step 550 to file
    Writing to file single_particle_free_space_0000550.h5
    Time step from 550 to 551 of 1000
    Time step from 551 to 552 of 1000
    Time step from 552 to 553 of 1000
    Time step from 553 to 554 of 1000
    Time step from 554 to 555 of 1000
    Time step from 555 to 556 of 1000
    Time step from 556 to 557 of 1000
    Time step from 557 to 558 of 1000
    Time step from 558 to 559 of 1000
    Time step from 559 to 560 of 1000
    Writing step 560 to file
    Writing to file single_particle_free_space_0000560.h5
    Time step from 560 to 561 of 1000
    Time step from 561 to 562 of 1000
    Time step from 562 to 563 of 1000
    Time step from 563 to 564 of 1000
    Time step from 564 to 565 of 1000
    Time step from 565 to 566 of 1000
    Time step from 566 to 567 of 1000
    Time step from 567 to 568 of 1000
    Time step from 568 to 569 of 1000
    Time step from 569 to 570 of 1000
    Writing step 570 to file
    Writing to file single_particle_free_space_0000570.h5
    Time step from 570 to 571 of 1000
    Time step from 571 to 572 of 1000
    Time step from 572 to 573 of 1000
    Time step from 573 to 574 of 1000
    Time step from 574 to 575 of 1000
    Time step from 575 to 576 of 1000
    Time step from 576 to 577 of 1000
    Time step from 577 to 578 of 1000
    Time step from 578 to 579 of 1000
    Time step from 579 to 580 of 1000
    Writing step 580 to file
    Writing to file single_particle_free_space_0000580.h5
    Time step from 580 to 581 of 1000
    Time step from 581 to 582 of 1000
    Time step from 582 to 583 of 1000
    Time step from 583 to 584 of 1000
    Time step from 584 to 585 of 1000
    Time step from 585 to 586 of 1000
    Time step from 586 to 587 of 1000
    Time step from 587 to 588 of 1000
    Time step from 588 to 589 of 1000
    Time step from 589 to 590 of 1000
    Writing step 590 to file
    Writing to file single_particle_free_space_0000590.h5
    Time step from 590 to 591 of 1000
    Time step from 591 to 592 of 1000
    Time step from 592 to 593 of 1000
    Time step from 593 to 594 of 1000
    Time step from 594 to 595 of 1000
    Time step from 595 to 596 of 1000
    Time step from 596 to 597 of 1000
    Time step from 597 to 598 of 1000
    Time step from 598 to 599 of 1000
    Time step from 599 to 600 of 1000
    Writing step 600 to file
    Writing to file single_particle_free_space_0000600.h5
    Time step from 600 to 601 of 1000
    Time step from 601 to 602 of 1000
    Time step from 602 to 603 of 1000
    Time step from 603 to 604 of 1000
    Time step from 604 to 605 of 1000
    Time step from 605 to 606 of 1000
    Time step from 606 to 607 of 1000
    Time step from 607 to 608 of 1000
    Time step from 608 to 609 of 1000
    Time step from 609 to 610 of 1000
    Writing step 610 to file
    Writing to file single_particle_free_space_0000610.h5
    Time step from 610 to 611 of 1000
    Time step from 611 to 612 of 1000
    Time step from 612 to 613 of 1000
    Time step from 613 to 614 of 1000
    Time step from 614 to 615 of 1000
    Time step from 615 to 616 of 1000
    Time step from 616 to 617 of 1000
    Time step from 617 to 618 of 1000
    Time step from 618 to 619 of 1000
    Time step from 619 to 620 of 1000
    Writing step 620 to file
    Writing to file single_particle_free_space_0000620.h5
    Time step from 620 to 621 of 1000
    Time step from 621 to 622 of 1000
    Time step from 622 to 623 of 1000
    Time step from 623 to 624 of 1000
    Time step from 624 to 625 of 1000
    Time step from 625 to 626 of 1000
    Time step from 626 to 627 of 1000
    Time step from 627 to 628 of 1000
    Time step from 628 to 629 of 1000
    Time step from 629 to 630 of 1000
    Writing step 630 to file
    Writing to file single_particle_free_space_0000630.h5
    Time step from 630 to 631 of 1000
    Time step from 631 to 632 of 1000
    Time step from 632 to 633 of 1000
    Time step from 633 to 634 of 1000
    Time step from 634 to 635 of 1000
    Time step from 635 to 636 of 1000
    Time step from 636 to 637 of 1000
    Time step from 637 to 638 of 1000
    Time step from 638 to 639 of 1000
    Time step from 639 to 640 of 1000
    Writing step 640 to file
    Writing to file single_particle_free_space_0000640.h5
    Time step from 640 to 641 of 1000
    Time step from 641 to 642 of 1000
    Time step from 642 to 643 of 1000
    Time step from 643 to 644 of 1000
    Time step from 644 to 645 of 1000
    Time step from 645 to 646 of 1000
    Time step from 646 to 647 of 1000
    Time step from 647 to 648 of 1000
    Time step from 648 to 649 of 1000
    Time step from 649 to 650 of 1000
    Writing step 650 to file
    Writing to file single_particle_free_space_0000650.h5
    Time step from 650 to 651 of 1000
    Time step from 651 to 652 of 1000
    Time step from 652 to 653 of 1000
    Time step from 653 to 654 of 1000
    Time step from 654 to 655 of 1000
    Time step from 655 to 656 of 1000
    Time step from 656 to 657 of 1000
    Time step from 657 to 658 of 1000
    Time step from 658 to 659 of 1000
    Time step from 659 to 660 of 1000
    Writing step 660 to file
    Writing to file single_particle_free_space_0000660.h5
    Time step from 660 to 661 of 1000
    Time step from 661 to 662 of 1000
    Time step from 662 to 663 of 1000
    Time step from 663 to 664 of 1000
    Time step from 664 to 665 of 1000
    Time step from 665 to 666 of 1000
    Time step from 666 to 667 of 1000
    Time step from 667 to 668 of 1000
    Time step from 668 to 669 of 1000
    Time step from 669 to 670 of 1000
    Writing step 670 to file
    Writing to file single_particle_free_space_0000670.h5
    Time step from 670 to 671 of 1000
    Time step from 671 to 672 of 1000
    Time step from 672 to 673 of 1000
    Time step from 673 to 674 of 1000
    Time step from 674 to 675 of 1000
    Time step from 675 to 676 of 1000
    Time step from 676 to 677 of 1000
    Time step from 677 to 678 of 1000
    Time step from 678 to 679 of 1000
    Time step from 679 to 680 of 1000
    Writing step 680 to file
    Writing to file single_particle_free_space_0000680.h5
    Time step from 680 to 681 of 1000
    Time step from 681 to 682 of 1000
    Time step from 682 to 683 of 1000
    Time step from 683 to 684 of 1000
    Time step from 684 to 685 of 1000
    Time step from 685 to 686 of 1000
    Time step from 686 to 687 of 1000
    Time step from 687 to 688 of 1000
    Time step from 688 to 689 of 1000
    Time step from 689 to 690 of 1000
    Writing step 690 to file
    Writing to file single_particle_free_space_0000690.h5
    Time step from 690 to 691 of 1000
    Time step from 691 to 692 of 1000
    Time step from 692 to 693 of 1000
    Time step from 693 to 694 of 1000
    Time step from 694 to 695 of 1000
    Time step from 695 to 696 of 1000
    Time step from 696 to 697 of 1000
    Time step from 697 to 698 of 1000
    Time step from 698 to 699 of 1000
    Time step from 699 to 700 of 1000
    Writing step 700 to file
    Writing to file single_particle_free_space_0000700.h5
    Time step from 700 to 701 of 1000
    Time step from 701 to 702 of 1000
    Time step from 702 to 703 of 1000
    Time step from 703 to 704 of 1000
    Time step from 704 to 705 of 1000
    Time step from 705 to 706 of 1000
    Time step from 706 to 707 of 1000
    Time step from 707 to 708 of 1000
    Time step from 708 to 709 of 1000
    Time step from 709 to 710 of 1000
    Writing step 710 to file
    Writing to file single_particle_free_space_0000710.h5
    Time step from 710 to 711 of 1000
    Time step from 711 to 712 of 1000
    Time step from 712 to 713 of 1000
    Time step from 713 to 714 of 1000
    Time step from 714 to 715 of 1000
    Time step from 715 to 716 of 1000
    Time step from 716 to 717 of 1000
    Time step from 717 to 718 of 1000
    Time step from 718 to 719 of 1000
    Time step from 719 to 720 of 1000
    Writing step 720 to file
    Writing to file single_particle_free_space_0000720.h5
    Time step from 720 to 721 of 1000
    Time step from 721 to 722 of 1000
    Time step from 722 to 723 of 1000
    Time step from 723 to 724 of 1000
    Time step from 724 to 725 of 1000
    Time step from 725 to 726 of 1000
    Time step from 726 to 727 of 1000
    Time step from 727 to 728 of 1000
    Time step from 728 to 729 of 1000
    Time step from 729 to 730 of 1000
    Writing step 730 to file
    Writing to file single_particle_free_space_0000730.h5
    Time step from 730 to 731 of 1000
    Time step from 731 to 732 of 1000
    Time step from 732 to 733 of 1000
    Time step from 733 to 734 of 1000
    Time step from 734 to 735 of 1000
    Time step from 735 to 736 of 1000
    Time step from 736 to 737 of 1000
    Time step from 737 to 738 of 1000
    Time step from 738 to 739 of 1000
    Time step from 739 to 740 of 1000
    Writing step 740 to file
    Writing to file single_particle_free_space_0000740.h5
    Time step from 740 to 741 of 1000
    Time step from 741 to 742 of 1000
    Time step from 742 to 743 of 1000
    Time step from 743 to 744 of 1000
    Time step from 744 to 745 of 1000
    Time step from 745 to 746 of 1000
    Time step from 746 to 747 of 1000
    Time step from 747 to 748 of 1000
    Time step from 748 to 749 of 1000
    Time step from 749 to 750 of 1000
    Writing step 750 to file
    Writing to file single_particle_free_space_0000750.h5
    Time step from 750 to 751 of 1000
    Time step from 751 to 752 of 1000
    Time step from 752 to 753 of 1000
    Time step from 753 to 754 of 1000
    Time step from 754 to 755 of 1000
    Time step from 755 to 756 of 1000
    Time step from 756 to 757 of 1000
    Time step from 757 to 758 of 1000
    Time step from 758 to 759 of 1000
    Time step from 759 to 760 of 1000
    Writing step 760 to file
    Writing to file single_particle_free_space_0000760.h5
    Time step from 760 to 761 of 1000
    Time step from 761 to 762 of 1000
    Time step from 762 to 763 of 1000
    Time step from 763 to 764 of 1000
    Time step from 764 to 765 of 1000
    Time step from 765 to 766 of 1000
    Time step from 766 to 767 of 1000
    Time step from 767 to 768 of 1000
    Time step from 768 to 769 of 1000
    Time step from 769 to 770 of 1000
    Writing step 770 to file
    Writing to file single_particle_free_space_0000770.h5
    Time step from 770 to 771 of 1000
    Time step from 771 to 772 of 1000
    Time step from 772 to 773 of 1000
    Time step from 773 to 774 of 1000
    Time step from 774 to 775 of 1000
    Time step from 775 to 776 of 1000
    Time step from 776 to 777 of 1000
    Time step from 777 to 778 of 1000
    Time step from 778 to 779 of 1000
    Time step from 779 to 780 of 1000
    Writing step 780 to file
    Writing to file single_particle_free_space_0000780.h5
    Time step from 780 to 781 of 1000
    Time step from 781 to 782 of 1000
    Time step from 782 to 783 of 1000
    Time step from 783 to 784 of 1000
    Time step from 784 to 785 of 1000
    Time step from 785 to 786 of 1000
    Time step from 786 to 787 of 1000
    Time step from 787 to 788 of 1000
    Time step from 788 to 789 of 1000
    Time step from 789 to 790 of 1000
    Writing step 790 to file
    Writing to file single_particle_free_space_0000790.h5
    Time step from 790 to 791 of 1000
    Time step from 791 to 792 of 1000
    Time step from 792 to 793 of 1000
    Time step from 793 to 794 of 1000
    Time step from 794 to 795 of 1000
    Time step from 795 to 796 of 1000
    Time step from 796 to 797 of 1000
    Time step from 797 to 798 of 1000
    Time step from 798 to 799 of 1000
    Time step from 799 to 800 of 1000
    Writing step 800 to file
    Writing to file single_particle_free_space_0000800.h5
    Time step from 800 to 801 of 1000
    Time step from 801 to 802 of 1000
    Time step from 802 to 803 of 1000
    Time step from 803 to 804 of 1000
    Time step from 804 to 805 of 1000
    Time step from 805 to 806 of 1000
    Time step from 806 to 807 of 1000
    Time step from 807 to 808 of 1000
    Time step from 808 to 809 of 1000
    Time step from 809 to 810 of 1000
    Writing step 810 to file
    Writing to file single_particle_free_space_0000810.h5
    Time step from 810 to 811 of 1000
    Time step from 811 to 812 of 1000
    Time step from 812 to 813 of 1000
    Time step from 813 to 814 of 1000
    Time step from 814 to 815 of 1000
    Time step from 815 to 816 of 1000
    Time step from 816 to 817 of 1000
    Time step from 817 to 818 of 1000
    Time step from 818 to 819 of 1000
    Time step from 819 to 820 of 1000
    Writing step 820 to file
    Writing to file single_particle_free_space_0000820.h5
    Time step from 820 to 821 of 1000
    Time step from 821 to 822 of 1000
    Time step from 822 to 823 of 1000
    Time step from 823 to 824 of 1000
    Time step from 824 to 825 of 1000
    Time step from 825 to 826 of 1000
    Time step from 826 to 827 of 1000
    Time step from 827 to 828 of 1000
    Time step from 828 to 829 of 1000
    Time step from 829 to 830 of 1000
    Writing step 830 to file
    Writing to file single_particle_free_space_0000830.h5
    Time step from 830 to 831 of 1000
    Time step from 831 to 832 of 1000
    Time step from 832 to 833 of 1000
    Time step from 833 to 834 of 1000
    Time step from 834 to 835 of 1000
    Time step from 835 to 836 of 1000
    Time step from 836 to 837 of 1000
    Time step from 837 to 838 of 1000
    Time step from 838 to 839 of 1000
    Time step from 839 to 840 of 1000
    Writing step 840 to file
    Writing to file single_particle_free_space_0000840.h5
    Time step from 840 to 841 of 1000
    Time step from 841 to 842 of 1000
    Time step from 842 to 843 of 1000
    Time step from 843 to 844 of 1000
    Time step from 844 to 845 of 1000
    Time step from 845 to 846 of 1000
    Time step from 846 to 847 of 1000
    Time step from 847 to 848 of 1000
    Time step from 848 to 849 of 1000
    Time step from 849 to 850 of 1000
    Writing step 850 to file
    Writing to file single_particle_free_space_0000850.h5
    Time step from 850 to 851 of 1000
    Time step from 851 to 852 of 1000
    Time step from 852 to 853 of 1000
    Time step from 853 to 854 of 1000
    Time step from 854 to 855 of 1000
    Time step from 855 to 856 of 1000
    Time step from 856 to 857 of 1000
    Time step from 857 to 858 of 1000
    Time step from 858 to 859 of 1000
    Time step from 859 to 860 of 1000
    Writing step 860 to file
    Writing to file single_particle_free_space_0000860.h5
    Time step from 860 to 861 of 1000
    Time step from 861 to 862 of 1000
    Time step from 862 to 863 of 1000
    Time step from 863 to 864 of 1000
    Time step from 864 to 865 of 1000
    Time step from 865 to 866 of 1000
    Time step from 866 to 867 of 1000
    Time step from 867 to 868 of 1000
    Time step from 868 to 869 of 1000
    Time step from 869 to 870 of 1000
    Writing step 870 to file
    Writing to file single_particle_free_space_0000870.h5
    Time step from 870 to 871 of 1000
    Time step from 871 to 872 of 1000
    Time step from 872 to 873 of 1000
    Time step from 873 to 874 of 1000
    Time step from 874 to 875 of 1000
    Time step from 875 to 876 of 1000
    Time step from 876 to 877 of 1000
    Time step from 877 to 878 of 1000
    Time step from 878 to 879 of 1000
    Time step from 879 to 880 of 1000
    Writing step 880 to file
    Writing to file single_particle_free_space_0000880.h5
    Time step from 880 to 881 of 1000
    Time step from 881 to 882 of 1000
    Time step from 882 to 883 of 1000
    Time step from 883 to 884 of 1000
    Time step from 884 to 885 of 1000
    Time step from 885 to 886 of 1000
    Time step from 886 to 887 of 1000
    Time step from 887 to 888 of 1000
    Time step from 888 to 889 of 1000
    Time step from 889 to 890 of 1000
    Writing step 890 to file
    Writing to file single_particle_free_space_0000890.h5
    Time step from 890 to 891 of 1000
    Time step from 891 to 892 of 1000
    Time step from 892 to 893 of 1000
    Time step from 893 to 894 of 1000
    Time step from 894 to 895 of 1000
    Time step from 895 to 896 of 1000
    Time step from 896 to 897 of 1000
    Time step from 897 to 898 of 1000
    Time step from 898 to 899 of 1000
    Time step from 899 to 900 of 1000
    Writing step 900 to file
    Writing to file single_particle_free_space_0000900.h5
    Time step from 900 to 901 of 1000
    Time step from 901 to 902 of 1000
    Time step from 902 to 903 of 1000
    Time step from 903 to 904 of 1000
    Time step from 904 to 905 of 1000
    Time step from 905 to 906 of 1000
    Time step from 906 to 907 of 1000
    Time step from 907 to 908 of 1000
    Time step from 908 to 909 of 1000
    Time step from 909 to 910 of 1000
    Writing step 910 to file
    Writing to file single_particle_free_space_0000910.h5
    Time step from 910 to 911 of 1000
    Time step from 911 to 912 of 1000
    Time step from 912 to 913 of 1000
    Time step from 913 to 914 of 1000
    Time step from 914 to 915 of 1000
    Time step from 915 to 916 of 1000
    Time step from 916 to 917 of 1000
    Time step from 917 to 918 of 1000
    Time step from 918 to 919 of 1000
    Time step from 919 to 920 of 1000
    Writing step 920 to file
    Writing to file single_particle_free_space_0000920.h5
    Time step from 920 to 921 of 1000
    Time step from 921 to 922 of 1000
    Time step from 922 to 923 of 1000
    Time step from 923 to 924 of 1000
    Time step from 924 to 925 of 1000
    Time step from 925 to 926 of 1000
    Time step from 926 to 927 of 1000
    Time step from 927 to 928 of 1000
    Time step from 928 to 929 of 1000
    Time step from 929 to 930 of 1000
    Writing step 930 to file
    Writing to file single_particle_free_space_0000930.h5
    Time step from 930 to 931 of 1000
    Time step from 931 to 932 of 1000
    Time step from 932 to 933 of 1000
    Time step from 933 to 934 of 1000
    Time step from 934 to 935 of 1000
    Time step from 935 to 936 of 1000
    Time step from 936 to 937 of 1000
    Time step from 937 to 938 of 1000
    Time step from 938 to 939 of 1000
    Time step from 939 to 940 of 1000
    Writing step 940 to file
    Writing to file single_particle_free_space_0000940.h5
    Time step from 940 to 941 of 1000
    Time step from 941 to 942 of 1000
    Time step from 942 to 943 of 1000
    Time step from 943 to 944 of 1000
    Time step from 944 to 945 of 1000
    Time step from 945 to 946 of 1000
    Time step from 946 to 947 of 1000
    Time step from 947 to 948 of 1000
    Time step from 948 to 949 of 1000
    Time step from 949 to 950 of 1000
    Writing step 950 to file
    Writing to file single_particle_free_space_0000950.h5
    Time step from 950 to 951 of 1000
    Time step from 951 to 952 of 1000
    Time step from 952 to 953 of 1000
    Time step from 953 to 954 of 1000
    Time step from 954 to 955 of 1000
    Time step from 955 to 956 of 1000
    Time step from 956 to 957 of 1000
    Time step from 957 to 958 of 1000
    Time step from 958 to 959 of 1000
    Time step from 959 to 960 of 1000
    Writing step 960 to file
    Writing to file single_particle_free_space_0000960.h5
    Time step from 960 to 961 of 1000
    Time step from 961 to 962 of 1000
    Time step from 962 to 963 of 1000
    Time step from 963 to 964 of 1000
    Time step from 964 to 965 of 1000
    Time step from 965 to 966 of 1000
    Time step from 966 to 967 of 1000
    Time step from 967 to 968 of 1000
    Time step from 968 to 969 of 1000
    Time step from 969 to 970 of 1000
    Writing step 970 to file
    Writing to file single_particle_free_space_0000970.h5
    Time step from 970 to 971 of 1000
    Time step from 971 to 972 of 1000
    Time step from 972 to 973 of 1000
    Time step from 973 to 974 of 1000
    Time step from 974 to 975 of 1000
    Time step from 975 to 976 of 1000
    Time step from 976 to 977 of 1000
    Time step from 977 to 978 of 1000
    Time step from 978 to 979 of 1000
    Time step from 979 to 980 of 1000
    Writing step 980 to file
    Writing to file single_particle_free_space_0000980.h5
    Time step from 980 to 981 of 1000
    Time step from 981 to 982 of 1000
    Time step from 982 to 983 of 1000
    Time step from 983 to 984 of 1000
    Time step from 984 to 985 of 1000
    Time step from 985 to 986 of 1000
    Time step from 986 to 987 of 1000
    Time step from 987 to 988 of 1000
    Time step from 988 to 989 of 1000
    Time step from 989 to 990 of 1000
    Writing step 990 to file
    Writing to file single_particle_free_space_0000990.h5
    Time step from 990 to 991 of 1000
    Time step from 991 to 992 of 1000
    Time step from 992 to 993 of 1000
    Time step from 993 to 994 of 1000
    Time step from 994 to 995 of 1000
    Time step from 995 to 996 of 1000
    Time step from 996 to 997 of 1000
    Time step from 997 to 998 of 1000
    Time step from 998 to 999 of 1000
    Time step from 999 to 1000 of 1000
    Writing step 1000 to file
    Writing to file single_particle_free_space_0001000.h5


To run outside python (for example, C++ ef):


```python
conf.export_to_fname('config.ini')
```


```python
!ef config.ini --output-format python
```

    Trying to guess input file type: config.ini
    ### Config:
    time_grid = TimeGridConf(total=6e-09, save_step=6e-11, step=6e-12)
    spatial_mesh = SpatialMeshConf(size=array([ 5.,  5., 15.]), step=array([0.5, 0.5, 1.5]))
    sources = [ParticleSourceConf(name='emit_single_particle', shape=Box(origin=array([0.1, 0.1, 0.1]), size=array([0.01, 0.01, 0.01])), initial_particles=1, particles_to_generate_each_step=0, momentum=array([6.00e-19, 6.00e-19, 1.77e-18]), temperature=0.0, charge=4.8e-10, mass=9.8e-28)]
    inner_regions = []
    output_file = OutputFileConf(prefix='single_particle_free_space_', suffix='.h5', format_='python')
    boundary_conditions = BoundaryConditionsConf(right=0.0, left=0.0, bottom=0.0, top=0.0, near=0.0, far=0.0)
    particle_interaction_model = ParticleInteractionModelConf(model='noninteracting')
    external_fields = []
    Writing initial fields to file
    Writing to file single_particle_free_space_fieldsWithoutParticles_new.h5
    Writing to file single_particle_free_space_fieldsWithoutParticles.h5
    Writing step 0 to file
    Writing to file single_particle_free_space_0000000.h5
    Time step from 0 to 1 of 1000
    Time step from 1 to 2 of 1000
    Time step from 2 to 3 of 1000
    Time step from 3 to 4 of 1000
    Time step from 4 to 5 of 1000
    Time step from 5 to 6 of 1000
    Time step from 6 to 7 of 1000
    Time step from 7 to 8 of 1000
    Time step from 8 to 9 of 1000
    Time step from 9 to 10 of 1000
    Writing step 10 to file
    Writing to file single_particle_free_space_0000010.h5
    Time step from 10 to 11 of 1000
    Time step from 11 to 12 of 1000
    Time step from 12 to 13 of 1000
    Time step from 13 to 14 of 1000
    Time step from 14 to 15 of 1000
    Time step from 15 to 16 of 1000
    Time step from 16 to 17 of 1000
    Time step from 17 to 18 of 1000
    Time step from 18 to 19 of 1000
    Time step from 19 to 20 of 1000
    Writing step 20 to file
    Writing to file single_particle_free_space_0000020.h5
    Time step from 20 to 21 of 1000
    Time step from 21 to 22 of 1000
    Time step from 22 to 23 of 1000
    Time step from 23 to 24 of 1000
    Time step from 24 to 25 of 1000
    Time step from 25 to 26 of 1000
    Time step from 26 to 27 of 1000
    Time step from 27 to 28 of 1000
    Time step from 28 to 29 of 1000
    Time step from 29 to 30 of 1000
    Writing step 30 to file
    Writing to file single_particle_free_space_0000030.h5
    Time step from 30 to 31 of 1000
    Time step from 31 to 32 of 1000
    Time step from 32 to 33 of 1000
    Time step from 33 to 34 of 1000
    Time step from 34 to 35 of 1000
    Time step from 35 to 36 of 1000
    Time step from 36 to 37 of 1000
    Time step from 37 to 38 of 1000
    Time step from 38 to 39 of 1000
    Time step from 39 to 40 of 1000
    Writing step 40 to file
    Writing to file single_particle_free_space_0000040.h5
    Time step from 40 to 41 of 1000
    Time step from 41 to 42 of 1000
    Time step from 42 to 43 of 1000
    Time step from 43 to 44 of 1000
    Time step from 44 to 45 of 1000
    Time step from 45 to 46 of 1000
    Time step from 46 to 47 of 1000
    Time step from 47 to 48 of 1000
    Time step from 48 to 49 of 1000
    Time step from 49 to 50 of 1000
    Writing step 50 to file
    Writing to file single_particle_free_space_0000050.h5
    Time step from 50 to 51 of 1000
    Time step from 51 to 52 of 1000
    Time step from 52 to 53 of 1000
    Time step from 53 to 54 of 1000
    Time step from 54 to 55 of 1000
    Time step from 55 to 56 of 1000
    Time step from 56 to 57 of 1000
    Time step from 57 to 58 of 1000
    Time step from 58 to 59 of 1000
    Time step from 59 to 60 of 1000
    Writing step 60 to file
    Writing to file single_particle_free_space_0000060.h5
    Time step from 60 to 61 of 1000
    Time step from 61 to 62 of 1000
    Time step from 62 to 63 of 1000
    Time step from 63 to 64 of 1000
    Time step from 64 to 65 of 1000
    Time step from 65 to 66 of 1000
    Time step from 66 to 67 of 1000
    Time step from 67 to 68 of 1000
    Time step from 68 to 69 of 1000
    Time step from 69 to 70 of 1000
    Writing step 70 to file
    Writing to file single_particle_free_space_0000070.h5
    Time step from 70 to 71 of 1000
    Time step from 71 to 72 of 1000
    Time step from 72 to 73 of 1000
    Time step from 73 to 74 of 1000
    Time step from 74 to 75 of 1000
    Time step from 75 to 76 of 1000
    Time step from 76 to 77 of 1000
    Time step from 77 to 78 of 1000
    Time step from 78 to 79 of 1000
    Time step from 79 to 80 of 1000
    Writing step 80 to file
    Writing to file single_particle_free_space_0000080.h5
    Time step from 80 to 81 of 1000
    Time step from 81 to 82 of 1000
    Time step from 82 to 83 of 1000
    Time step from 83 to 84 of 1000
    Time step from 84 to 85 of 1000
    Time step from 85 to 86 of 1000
    Time step from 86 to 87 of 1000
    Time step from 87 to 88 of 1000
    Time step from 88 to 89 of 1000
    Time step from 89 to 90 of 1000
    Writing step 90 to file
    Writing to file single_particle_free_space_0000090.h5
    Time step from 90 to 91 of 1000
    Time step from 91 to 92 of 1000
    Time step from 92 to 93 of 1000
    Time step from 93 to 94 of 1000
    Time step from 94 to 95 of 1000
    Time step from 95 to 96 of 1000
    Time step from 96 to 97 of 1000
    Time step from 97 to 98 of 1000
    Time step from 98 to 99 of 1000
    Time step from 99 to 100 of 1000
    Writing step 100 to file
    Writing to file single_particle_free_space_0000100.h5
    Time step from 100 to 101 of 1000
    Time step from 101 to 102 of 1000
    Time step from 102 to 103 of 1000
    Time step from 103 to 104 of 1000
    Time step from 104 to 105 of 1000
    Time step from 105 to 106 of 1000
    Time step from 106 to 107 of 1000
    Time step from 107 to 108 of 1000
    Time step from 108 to 109 of 1000
    Time step from 109 to 110 of 1000
    Writing step 110 to file
    Writing to file single_particle_free_space_0000110.h5
    Time step from 110 to 111 of 1000
    Time step from 111 to 112 of 1000
    Time step from 112 to 113 of 1000
    Time step from 113 to 114 of 1000
    Time step from 114 to 115 of 1000
    Time step from 115 to 116 of 1000
    Time step from 116 to 117 of 1000
    Time step from 117 to 118 of 1000
    Time step from 118 to 119 of 1000
    Time step from 119 to 120 of 1000
    Writing step 120 to file
    Writing to file single_particle_free_space_0000120.h5
    Time step from 120 to 121 of 1000
    Time step from 121 to 122 of 1000
    Time step from 122 to 123 of 1000
    Time step from 123 to 124 of 1000
    Time step from 124 to 125 of 1000
    Time step from 125 to 126 of 1000
    Time step from 126 to 127 of 1000
    Time step from 127 to 128 of 1000
    Time step from 128 to 129 of 1000
    Time step from 129 to 130 of 1000
    Writing step 130 to file
    Writing to file single_particle_free_space_0000130.h5
    Time step from 130 to 131 of 1000
    Time step from 131 to 132 of 1000
    Time step from 132 to 133 of 1000
    Time step from 133 to 134 of 1000
    Time step from 134 to 135 of 1000
    Time step from 135 to 136 of 1000
    Time step from 136 to 137 of 1000
    Time step from 137 to 138 of 1000
    Time step from 138 to 139 of 1000
    Time step from 139 to 140 of 1000
    Writing step 140 to file
    Writing to file single_particle_free_space_0000140.h5
    Time step from 140 to 141 of 1000
    Time step from 141 to 142 of 1000
    Time step from 142 to 143 of 1000
    Time step from 143 to 144 of 1000
    Time step from 144 to 145 of 1000
    Time step from 145 to 146 of 1000
    Time step from 146 to 147 of 1000
    Time step from 147 to 148 of 1000
    Time step from 148 to 149 of 1000
    Time step from 149 to 150 of 1000
    Writing step 150 to file
    Writing to file single_particle_free_space_0000150.h5
    Time step from 150 to 151 of 1000
    Time step from 151 to 152 of 1000
    Time step from 152 to 153 of 1000
    Time step from 153 to 154 of 1000
    Time step from 154 to 155 of 1000
    Time step from 155 to 156 of 1000
    Time step from 156 to 157 of 1000
    Time step from 157 to 158 of 1000
    Time step from 158 to 159 of 1000
    Time step from 159 to 160 of 1000
    Writing step 160 to file
    Writing to file single_particle_free_space_0000160.h5
    Time step from 160 to 161 of 1000
    Time step from 161 to 162 of 1000
    Time step from 162 to 163 of 1000
    Time step from 163 to 164 of 1000
    Time step from 164 to 165 of 1000
    Time step from 165 to 166 of 1000
    Time step from 166 to 167 of 1000
    Time step from 167 to 168 of 1000
    Time step from 168 to 169 of 1000
    Time step from 169 to 170 of 1000
    Writing step 170 to file
    Writing to file single_particle_free_space_0000170.h5
    Time step from 170 to 171 of 1000
    Time step from 171 to 172 of 1000
    Time step from 172 to 173 of 1000
    Time step from 173 to 174 of 1000
    Time step from 174 to 175 of 1000
    Time step from 175 to 176 of 1000
    Time step from 176 to 177 of 1000
    Time step from 177 to 178 of 1000
    Time step from 178 to 179 of 1000
    Time step from 179 to 180 of 1000
    Writing step 180 to file
    Writing to file single_particle_free_space_0000180.h5
    Time step from 180 to 181 of 1000
    Time step from 181 to 182 of 1000
    Time step from 182 to 183 of 1000
    Time step from 183 to 184 of 1000
    Time step from 184 to 185 of 1000
    Time step from 185 to 186 of 1000
    Time step from 186 to 187 of 1000
    Time step from 187 to 188 of 1000
    Time step from 188 to 189 of 1000
    Time step from 189 to 190 of 1000
    Writing step 190 to file
    Writing to file single_particle_free_space_0000190.h5
    Time step from 190 to 191 of 1000
    Time step from 191 to 192 of 1000
    Time step from 192 to 193 of 1000
    Time step from 193 to 194 of 1000
    Time step from 194 to 195 of 1000
    Time step from 195 to 196 of 1000
    Time step from 196 to 197 of 1000
    Time step from 197 to 198 of 1000
    Time step from 198 to 199 of 1000
    Time step from 199 to 200 of 1000
    Writing step 200 to file
    Writing to file single_particle_free_space_0000200.h5
    Time step from 200 to 201 of 1000
    Time step from 201 to 202 of 1000
    Time step from 202 to 203 of 1000
    Time step from 203 to 204 of 1000
    Time step from 204 to 205 of 1000
    Time step from 205 to 206 of 1000
    Time step from 206 to 207 of 1000
    Time step from 207 to 208 of 1000
    Time step from 208 to 209 of 1000
    Time step from 209 to 210 of 1000
    Writing step 210 to file
    Writing to file single_particle_free_space_0000210.h5
    Time step from 210 to 211 of 1000
    Time step from 211 to 212 of 1000
    Time step from 212 to 213 of 1000
    Time step from 213 to 214 of 1000
    Time step from 214 to 215 of 1000
    Time step from 215 to 216 of 1000
    Time step from 216 to 217 of 1000
    Time step from 217 to 218 of 1000
    Time step from 218 to 219 of 1000
    Time step from 219 to 220 of 1000
    Writing step 220 to file
    Writing to file single_particle_free_space_0000220.h5
    Time step from 220 to 221 of 1000
    Time step from 221 to 222 of 1000
    Time step from 222 to 223 of 1000
    Time step from 223 to 224 of 1000
    Time step from 224 to 225 of 1000
    Time step from 225 to 226 of 1000
    Time step from 226 to 227 of 1000
    Time step from 227 to 228 of 1000
    Time step from 228 to 229 of 1000
    Time step from 229 to 230 of 1000
    Writing step 230 to file
    Writing to file single_particle_free_space_0000230.h5
    Time step from 230 to 231 of 1000
    Time step from 231 to 232 of 1000
    Time step from 232 to 233 of 1000
    Time step from 233 to 234 of 1000
    Time step from 234 to 235 of 1000
    Time step from 235 to 236 of 1000
    Time step from 236 to 237 of 1000
    Time step from 237 to 238 of 1000
    Time step from 238 to 239 of 1000
    Time step from 239 to 240 of 1000
    Writing step 240 to file
    Writing to file single_particle_free_space_0000240.h5
    Time step from 240 to 241 of 1000
    Time step from 241 to 242 of 1000
    Time step from 242 to 243 of 1000
    Time step from 243 to 244 of 1000
    Time step from 244 to 245 of 1000
    Time step from 245 to 246 of 1000
    Time step from 246 to 247 of 1000
    Time step from 247 to 248 of 1000
    Time step from 248 to 249 of 1000
    Time step from 249 to 250 of 1000
    Writing step 250 to file
    Writing to file single_particle_free_space_0000250.h5
    Time step from 250 to 251 of 1000
    Time step from 251 to 252 of 1000
    Time step from 252 to 253 of 1000
    Time step from 253 to 254 of 1000
    Time step from 254 to 255 of 1000
    Time step from 255 to 256 of 1000
    Time step from 256 to 257 of 1000
    Time step from 257 to 258 of 1000
    Time step from 258 to 259 of 1000
    Time step from 259 to 260 of 1000
    Writing step 260 to file
    Writing to file single_particle_free_space_0000260.h5
    Time step from 260 to 261 of 1000
    Time step from 261 to 262 of 1000
    Time step from 262 to 263 of 1000
    Time step from 263 to 264 of 1000
    Time step from 264 to 265 of 1000
    Time step from 265 to 266 of 1000
    Time step from 266 to 267 of 1000
    Time step from 267 to 268 of 1000
    Time step from 268 to 269 of 1000
    Time step from 269 to 270 of 1000
    Writing step 270 to file
    Writing to file single_particle_free_space_0000270.h5
    Time step from 270 to 271 of 1000
    Time step from 271 to 272 of 1000
    Time step from 272 to 273 of 1000
    Time step from 273 to 274 of 1000
    Time step from 274 to 275 of 1000
    Time step from 275 to 276 of 1000
    Time step from 276 to 277 of 1000
    Time step from 277 to 278 of 1000
    Time step from 278 to 279 of 1000
    Time step from 279 to 280 of 1000
    Writing step 280 to file
    Writing to file single_particle_free_space_0000280.h5
    Time step from 280 to 281 of 1000
    Time step from 281 to 282 of 1000
    Time step from 282 to 283 of 1000
    Time step from 283 to 284 of 1000
    Time step from 284 to 285 of 1000
    Time step from 285 to 286 of 1000
    Time step from 286 to 287 of 1000
    Time step from 287 to 288 of 1000
    Time step from 288 to 289 of 1000
    Time step from 289 to 290 of 1000
    Writing step 290 to file
    Writing to file single_particle_free_space_0000290.h5
    Time step from 290 to 291 of 1000
    Time step from 291 to 292 of 1000
    Time step from 292 to 293 of 1000
    Time step from 293 to 294 of 1000
    Time step from 294 to 295 of 1000
    Time step from 295 to 296 of 1000
    Time step from 296 to 297 of 1000
    Time step from 297 to 298 of 1000
    Time step from 298 to 299 of 1000
    Time step from 299 to 300 of 1000
    Writing step 300 to file
    Writing to file single_particle_free_space_0000300.h5
    Time step from 300 to 301 of 1000
    Time step from 301 to 302 of 1000
    Time step from 302 to 303 of 1000
    Time step from 303 to 304 of 1000
    Time step from 304 to 305 of 1000
    Time step from 305 to 306 of 1000
    Time step from 306 to 307 of 1000
    Time step from 307 to 308 of 1000
    Time step from 308 to 309 of 1000
    Time step from 309 to 310 of 1000
    Writing step 310 to file
    Writing to file single_particle_free_space_0000310.h5
    Time step from 310 to 311 of 1000
    Time step from 311 to 312 of 1000
    Time step from 312 to 313 of 1000
    Time step from 313 to 314 of 1000
    Time step from 314 to 315 of 1000
    Time step from 315 to 316 of 1000
    Time step from 316 to 317 of 1000
    Time step from 317 to 318 of 1000
    Time step from 318 to 319 of 1000
    Time step from 319 to 320 of 1000
    Writing step 320 to file
    Writing to file single_particle_free_space_0000320.h5
    Time step from 320 to 321 of 1000
    Time step from 321 to 322 of 1000
    Time step from 322 to 323 of 1000
    Time step from 323 to 324 of 1000
    Time step from 324 to 325 of 1000
    Time step from 325 to 326 of 1000
    Time step from 326 to 327 of 1000
    Time step from 327 to 328 of 1000
    Time step from 328 to 329 of 1000
    Time step from 329 to 330 of 1000
    Writing step 330 to file
    Writing to file single_particle_free_space_0000330.h5
    Time step from 330 to 331 of 1000
    Time step from 331 to 332 of 1000
    Time step from 332 to 333 of 1000
    Time step from 333 to 334 of 1000
    Time step from 334 to 335 of 1000
    Time step from 335 to 336 of 1000
    Time step from 336 to 337 of 1000
    Time step from 337 to 338 of 1000
    Time step from 338 to 339 of 1000
    Time step from 339 to 340 of 1000
    Writing step 340 to file
    Writing to file single_particle_free_space_0000340.h5
    Time step from 340 to 341 of 1000
    Time step from 341 to 342 of 1000
    Time step from 342 to 343 of 1000
    Time step from 343 to 344 of 1000
    Time step from 344 to 345 of 1000
    Time step from 345 to 346 of 1000
    Time step from 346 to 347 of 1000
    Time step from 347 to 348 of 1000
    Time step from 348 to 349 of 1000
    Time step from 349 to 350 of 1000
    Writing step 350 to file
    Writing to file single_particle_free_space_0000350.h5
    Time step from 350 to 351 of 1000
    Time step from 351 to 352 of 1000
    Time step from 352 to 353 of 1000
    Time step from 353 to 354 of 1000
    Time step from 354 to 355 of 1000
    Time step from 355 to 356 of 1000
    Time step from 356 to 357 of 1000
    Time step from 357 to 358 of 1000
    Time step from 358 to 359 of 1000
    Time step from 359 to 360 of 1000
    Writing step 360 to file
    Writing to file single_particle_free_space_0000360.h5
    Time step from 360 to 361 of 1000
    Time step from 361 to 362 of 1000
    Time step from 362 to 363 of 1000
    Time step from 363 to 364 of 1000
    Time step from 364 to 365 of 1000
    Time step from 365 to 366 of 1000
    Time step from 366 to 367 of 1000
    Time step from 367 to 368 of 1000
    Time step from 368 to 369 of 1000
    Time step from 369 to 370 of 1000
    Writing step 370 to file
    Writing to file single_particle_free_space_0000370.h5
    Time step from 370 to 371 of 1000
    Time step from 371 to 372 of 1000
    Time step from 372 to 373 of 1000
    Time step from 373 to 374 of 1000
    Time step from 374 to 375 of 1000
    Time step from 375 to 376 of 1000
    Time step from 376 to 377 of 1000
    Time step from 377 to 378 of 1000
    Time step from 378 to 379 of 1000
    Time step from 379 to 380 of 1000
    Writing step 380 to file
    Writing to file single_particle_free_space_0000380.h5
    Time step from 380 to 381 of 1000
    Time step from 381 to 382 of 1000
    Time step from 382 to 383 of 1000
    Time step from 383 to 384 of 1000
    Time step from 384 to 385 of 1000
    Time step from 385 to 386 of 1000
    Time step from 386 to 387 of 1000
    Time step from 387 to 388 of 1000
    Time step from 388 to 389 of 1000
    Time step from 389 to 390 of 1000
    Writing step 390 to file
    Writing to file single_particle_free_space_0000390.h5
    Time step from 390 to 391 of 1000
    Time step from 391 to 392 of 1000
    Time step from 392 to 393 of 1000
    Time step from 393 to 394 of 1000
    Time step from 394 to 395 of 1000
    Time step from 395 to 396 of 1000
    Time step from 396 to 397 of 1000
    Time step from 397 to 398 of 1000
    Time step from 398 to 399 of 1000
    Time step from 399 to 400 of 1000
    Writing step 400 to file
    Writing to file single_particle_free_space_0000400.h5
    Time step from 400 to 401 of 1000
    Time step from 401 to 402 of 1000
    Time step from 402 to 403 of 1000
    Time step from 403 to 404 of 1000
    Time step from 404 to 405 of 1000
    Time step from 405 to 406 of 1000
    Time step from 406 to 407 of 1000
    Time step from 407 to 408 of 1000
    Time step from 408 to 409 of 1000
    Time step from 409 to 410 of 1000
    Writing step 410 to file
    Writing to file single_particle_free_space_0000410.h5
    Time step from 410 to 411 of 1000
    Time step from 411 to 412 of 1000
    Time step from 412 to 413 of 1000
    Time step from 413 to 414 of 1000
    Time step from 414 to 415 of 1000
    Time step from 415 to 416 of 1000
    Time step from 416 to 417 of 1000
    Time step from 417 to 418 of 1000
    Time step from 418 to 419 of 1000
    Time step from 419 to 420 of 1000
    Writing step 420 to file
    Writing to file single_particle_free_space_0000420.h5
    Time step from 420 to 421 of 1000
    Time step from 421 to 422 of 1000
    Time step from 422 to 423 of 1000
    Time step from 423 to 424 of 1000
    Time step from 424 to 425 of 1000
    Time step from 425 to 426 of 1000
    Time step from 426 to 427 of 1000
    Time step from 427 to 428 of 1000
    Time step from 428 to 429 of 1000
    Time step from 429 to 430 of 1000
    Writing step 430 to file
    Writing to file single_particle_free_space_0000430.h5
    Time step from 430 to 431 of 1000
    Time step from 431 to 432 of 1000
    Time step from 432 to 433 of 1000
    Time step from 433 to 434 of 1000
    Time step from 434 to 435 of 1000
    Time step from 435 to 436 of 1000
    Time step from 436 to 437 of 1000
    Time step from 437 to 438 of 1000
    Time step from 438 to 439 of 1000
    Time step from 439 to 440 of 1000
    Writing step 440 to file
    Writing to file single_particle_free_space_0000440.h5
    Time step from 440 to 441 of 1000
    Time step from 441 to 442 of 1000
    Time step from 442 to 443 of 1000
    Time step from 443 to 444 of 1000
    Time step from 444 to 445 of 1000
    Time step from 445 to 446 of 1000
    Time step from 446 to 447 of 1000
    Time step from 447 to 448 of 1000
    Time step from 448 to 449 of 1000
    Time step from 449 to 450 of 1000
    Writing step 450 to file
    Writing to file single_particle_free_space_0000450.h5
    Time step from 450 to 451 of 1000
    Time step from 451 to 452 of 1000
    Time step from 452 to 453 of 1000
    Time step from 453 to 454 of 1000
    Time step from 454 to 455 of 1000
    Time step from 455 to 456 of 1000
    Time step from 456 to 457 of 1000
    Time step from 457 to 458 of 1000
    Time step from 458 to 459 of 1000
    Time step from 459 to 460 of 1000
    Writing step 460 to file
    Writing to file single_particle_free_space_0000460.h5
    Time step from 460 to 461 of 1000
    Time step from 461 to 462 of 1000
    Time step from 462 to 463 of 1000
    Time step from 463 to 464 of 1000
    Time step from 464 to 465 of 1000
    Time step from 465 to 466 of 1000
    Time step from 466 to 467 of 1000
    Time step from 467 to 468 of 1000
    Time step from 468 to 469 of 1000
    Time step from 469 to 470 of 1000
    Writing step 470 to file
    Writing to file single_particle_free_space_0000470.h5
    Time step from 470 to 471 of 1000
    Time step from 471 to 472 of 1000
    Time step from 472 to 473 of 1000
    Time step from 473 to 474 of 1000
    Time step from 474 to 475 of 1000
    Time step from 475 to 476 of 1000
    Time step from 476 to 477 of 1000
    Time step from 477 to 478 of 1000
    Time step from 478 to 479 of 1000
    Time step from 479 to 480 of 1000
    Writing step 480 to file
    Writing to file single_particle_free_space_0000480.h5
    Time step from 480 to 481 of 1000
    Time step from 481 to 482 of 1000
    Time step from 482 to 483 of 1000
    Time step from 483 to 484 of 1000
    Time step from 484 to 485 of 1000
    Time step from 485 to 486 of 1000
    Time step from 486 to 487 of 1000
    Time step from 487 to 488 of 1000
    Time step from 488 to 489 of 1000
    Time step from 489 to 490 of 1000
    Writing step 490 to file
    Writing to file single_particle_free_space_0000490.h5
    Time step from 490 to 491 of 1000
    Time step from 491 to 492 of 1000
    Time step from 492 to 493 of 1000
    Time step from 493 to 494 of 1000
    Time step from 494 to 495 of 1000
    Time step from 495 to 496 of 1000
    Time step from 496 to 497 of 1000
    Time step from 497 to 498 of 1000
    Time step from 498 to 499 of 1000
    Time step from 499 to 500 of 1000
    Writing step 500 to file
    Writing to file single_particle_free_space_0000500.h5
    Time step from 500 to 501 of 1000
    Time step from 501 to 502 of 1000
    Time step from 502 to 503 of 1000
    Time step from 503 to 504 of 1000
    Time step from 504 to 505 of 1000
    Time step from 505 to 506 of 1000
    Time step from 506 to 507 of 1000
    Time step from 507 to 508 of 1000
    Time step from 508 to 509 of 1000
    Time step from 509 to 510 of 1000
    Writing step 510 to file
    Writing to file single_particle_free_space_0000510.h5
    Time step from 510 to 511 of 1000
    Time step from 511 to 512 of 1000
    Time step from 512 to 513 of 1000
    Time step from 513 to 514 of 1000
    Time step from 514 to 515 of 1000
    Time step from 515 to 516 of 1000
    Time step from 516 to 517 of 1000
    Time step from 517 to 518 of 1000
    Time step from 518 to 519 of 1000
    Time step from 519 to 520 of 1000
    Writing step 520 to file
    Writing to file single_particle_free_space_0000520.h5
    Time step from 520 to 521 of 1000
    Time step from 521 to 522 of 1000
    Time step from 522 to 523 of 1000
    Time step from 523 to 524 of 1000
    Time step from 524 to 525 of 1000
    Time step from 525 to 526 of 1000
    Time step from 526 to 527 of 1000
    Time step from 527 to 528 of 1000
    Time step from 528 to 529 of 1000
    Time step from 529 to 530 of 1000
    Writing step 530 to file
    Writing to file single_particle_free_space_0000530.h5
    Time step from 530 to 531 of 1000
    Time step from 531 to 532 of 1000
    Time step from 532 to 533 of 1000
    Time step from 533 to 534 of 1000
    Time step from 534 to 535 of 1000
    Time step from 535 to 536 of 1000
    Time step from 536 to 537 of 1000
    Time step from 537 to 538 of 1000
    Time step from 538 to 539 of 1000
    Time step from 539 to 540 of 1000
    Writing step 540 to file
    Writing to file single_particle_free_space_0000540.h5
    Time step from 540 to 541 of 1000
    Time step from 541 to 542 of 1000
    Time step from 542 to 543 of 1000
    Time step from 543 to 544 of 1000
    Time step from 544 to 545 of 1000
    Time step from 545 to 546 of 1000
    Time step from 546 to 547 of 1000
    Time step from 547 to 548 of 1000
    Time step from 548 to 549 of 1000
    Time step from 549 to 550 of 1000
    Writing step 550 to file
    Writing to file single_particle_free_space_0000550.h5
    Time step from 550 to 551 of 1000
    Time step from 551 to 552 of 1000
    Time step from 552 to 553 of 1000
    Time step from 553 to 554 of 1000
    Time step from 554 to 555 of 1000
    Time step from 555 to 556 of 1000
    Time step from 556 to 557 of 1000
    Time step from 557 to 558 of 1000
    Time step from 558 to 559 of 1000
    Time step from 559 to 560 of 1000
    Writing step 560 to file
    Writing to file single_particle_free_space_0000560.h5
    Time step from 560 to 561 of 1000
    Time step from 561 to 562 of 1000
    Time step from 562 to 563 of 1000
    Time step from 563 to 564 of 1000
    Time step from 564 to 565 of 1000
    Time step from 565 to 566 of 1000
    Time step from 566 to 567 of 1000
    Time step from 567 to 568 of 1000
    Time step from 568 to 569 of 1000
    Time step from 569 to 570 of 1000
    Writing step 570 to file
    Writing to file single_particle_free_space_0000570.h5
    Time step from 570 to 571 of 1000
    Time step from 571 to 572 of 1000
    Time step from 572 to 573 of 1000
    Time step from 573 to 574 of 1000
    Time step from 574 to 575 of 1000
    Time step from 575 to 576 of 1000
    Time step from 576 to 577 of 1000
    Time step from 577 to 578 of 1000
    Time step from 578 to 579 of 1000
    Time step from 579 to 580 of 1000
    Writing step 580 to file
    Writing to file single_particle_free_space_0000580.h5
    Time step from 580 to 581 of 1000
    Time step from 581 to 582 of 1000
    Time step from 582 to 583 of 1000
    Time step from 583 to 584 of 1000
    Time step from 584 to 585 of 1000
    Time step from 585 to 586 of 1000
    Time step from 586 to 587 of 1000
    Time step from 587 to 588 of 1000
    Time step from 588 to 589 of 1000
    Time step from 589 to 590 of 1000
    Writing step 590 to file
    Writing to file single_particle_free_space_0000590.h5
    Time step from 590 to 591 of 1000
    Time step from 591 to 592 of 1000
    Time step from 592 to 593 of 1000
    Time step from 593 to 594 of 1000
    Time step from 594 to 595 of 1000
    Time step from 595 to 596 of 1000
    Time step from 596 to 597 of 1000
    Time step from 597 to 598 of 1000
    Time step from 598 to 599 of 1000
    Time step from 599 to 600 of 1000
    Writing step 600 to file
    Writing to file single_particle_free_space_0000600.h5
    Time step from 600 to 601 of 1000
    Time step from 601 to 602 of 1000
    Time step from 602 to 603 of 1000
    Time step from 603 to 604 of 1000
    Time step from 604 to 605 of 1000
    Time step from 605 to 606 of 1000
    Time step from 606 to 607 of 1000
    Time step from 607 to 608 of 1000
    Time step from 608 to 609 of 1000
    Time step from 609 to 610 of 1000
    Writing step 610 to file
    Writing to file single_particle_free_space_0000610.h5
    Time step from 610 to 611 of 1000
    Time step from 611 to 612 of 1000
    Time step from 612 to 613 of 1000
    Time step from 613 to 614 of 1000
    Time step from 614 to 615 of 1000
    Time step from 615 to 616 of 1000
    Time step from 616 to 617 of 1000
    Time step from 617 to 618 of 1000
    Time step from 618 to 619 of 1000
    Time step from 619 to 620 of 1000
    Writing step 620 to file
    Writing to file single_particle_free_space_0000620.h5
    Time step from 620 to 621 of 1000
    Time step from 621 to 622 of 1000
    Time step from 622 to 623 of 1000
    Time step from 623 to 624 of 1000
    Time step from 624 to 625 of 1000
    Time step from 625 to 626 of 1000
    Time step from 626 to 627 of 1000
    Time step from 627 to 628 of 1000
    Time step from 628 to 629 of 1000
    Time step from 629 to 630 of 1000
    Writing step 630 to file
    Writing to file single_particle_free_space_0000630.h5
    Time step from 630 to 631 of 1000
    Time step from 631 to 632 of 1000
    Time step from 632 to 633 of 1000
    Time step from 633 to 634 of 1000
    Time step from 634 to 635 of 1000
    Time step from 635 to 636 of 1000
    Time step from 636 to 637 of 1000
    Time step from 637 to 638 of 1000
    Time step from 638 to 639 of 1000
    Time step from 639 to 640 of 1000
    Writing step 640 to file
    Writing to file single_particle_free_space_0000640.h5
    Time step from 640 to 641 of 1000
    Time step from 641 to 642 of 1000
    Time step from 642 to 643 of 1000
    Time step from 643 to 644 of 1000
    Time step from 644 to 645 of 1000
    Time step from 645 to 646 of 1000
    Time step from 646 to 647 of 1000
    Time step from 647 to 648 of 1000
    Time step from 648 to 649 of 1000
    Time step from 649 to 650 of 1000
    Writing step 650 to file
    Writing to file single_particle_free_space_0000650.h5
    Time step from 650 to 651 of 1000
    Time step from 651 to 652 of 1000
    Time step from 652 to 653 of 1000
    Time step from 653 to 654 of 1000
    Time step from 654 to 655 of 1000
    Time step from 655 to 656 of 1000
    Time step from 656 to 657 of 1000
    Time step from 657 to 658 of 1000
    Time step from 658 to 659 of 1000
    Time step from 659 to 660 of 1000
    Writing step 660 to file
    Writing to file single_particle_free_space_0000660.h5
    Time step from 660 to 661 of 1000
    Time step from 661 to 662 of 1000
    Time step from 662 to 663 of 1000
    Time step from 663 to 664 of 1000
    Time step from 664 to 665 of 1000
    Time step from 665 to 666 of 1000
    Time step from 666 to 667 of 1000
    Time step from 667 to 668 of 1000
    Time step from 668 to 669 of 1000
    Time step from 669 to 670 of 1000
    Writing step 670 to file
    Writing to file single_particle_free_space_0000670.h5
    Time step from 670 to 671 of 1000
    Time step from 671 to 672 of 1000
    Time step from 672 to 673 of 1000
    Time step from 673 to 674 of 1000
    Time step from 674 to 675 of 1000
    Time step from 675 to 676 of 1000
    Time step from 676 to 677 of 1000
    Time step from 677 to 678 of 1000
    Time step from 678 to 679 of 1000
    Time step from 679 to 680 of 1000
    Writing step 680 to file
    Writing to file single_particle_free_space_0000680.h5
    Time step from 680 to 681 of 1000
    Time step from 681 to 682 of 1000
    Time step from 682 to 683 of 1000
    Time step from 683 to 684 of 1000
    Time step from 684 to 685 of 1000
    Time step from 685 to 686 of 1000
    Time step from 686 to 687 of 1000
    Time step from 687 to 688 of 1000
    Time step from 688 to 689 of 1000
    Time step from 689 to 690 of 1000
    Writing step 690 to file
    Writing to file single_particle_free_space_0000690.h5
    Time step from 690 to 691 of 1000
    Time step from 691 to 692 of 1000
    Time step from 692 to 693 of 1000
    Time step from 693 to 694 of 1000
    Time step from 694 to 695 of 1000
    Time step from 695 to 696 of 1000
    Time step from 696 to 697 of 1000
    Time step from 697 to 698 of 1000
    Time step from 698 to 699 of 1000
    Time step from 699 to 700 of 1000
    Writing step 700 to file
    Writing to file single_particle_free_space_0000700.h5
    Time step from 700 to 701 of 1000
    Time step from 701 to 702 of 1000
    Time step from 702 to 703 of 1000
    Time step from 703 to 704 of 1000
    Time step from 704 to 705 of 1000
    Time step from 705 to 706 of 1000
    Time step from 706 to 707 of 1000
    Time step from 707 to 708 of 1000
    Time step from 708 to 709 of 1000
    Time step from 709 to 710 of 1000
    Writing step 710 to file
    Writing to file single_particle_free_space_0000710.h5
    Time step from 710 to 711 of 1000
    Time step from 711 to 712 of 1000
    Time step from 712 to 713 of 1000
    Time step from 713 to 714 of 1000
    Time step from 714 to 715 of 1000
    Time step from 715 to 716 of 1000
    Time step from 716 to 717 of 1000
    Time step from 717 to 718 of 1000
    Time step from 718 to 719 of 1000
    Time step from 719 to 720 of 1000
    Writing step 720 to file
    Writing to file single_particle_free_space_0000720.h5
    Time step from 720 to 721 of 1000
    Time step from 721 to 722 of 1000
    Time step from 722 to 723 of 1000
    Time step from 723 to 724 of 1000
    Time step from 724 to 725 of 1000
    Time step from 725 to 726 of 1000
    Time step from 726 to 727 of 1000
    Time step from 727 to 728 of 1000
    Time step from 728 to 729 of 1000
    Time step from 729 to 730 of 1000
    Writing step 730 to file
    Writing to file single_particle_free_space_0000730.h5
    Time step from 730 to 731 of 1000
    Time step from 731 to 732 of 1000
    Time step from 732 to 733 of 1000
    Time step from 733 to 734 of 1000
    Time step from 734 to 735 of 1000
    Time step from 735 to 736 of 1000
    Time step from 736 to 737 of 1000
    Time step from 737 to 738 of 1000
    Time step from 738 to 739 of 1000
    Time step from 739 to 740 of 1000
    Writing step 740 to file
    Writing to file single_particle_free_space_0000740.h5
    Time step from 740 to 741 of 1000
    Time step from 741 to 742 of 1000
    Time step from 742 to 743 of 1000
    Time step from 743 to 744 of 1000
    Time step from 744 to 745 of 1000
    Time step from 745 to 746 of 1000
    Time step from 746 to 747 of 1000
    Time step from 747 to 748 of 1000
    Time step from 748 to 749 of 1000
    Time step from 749 to 750 of 1000
    Writing step 750 to file
    Writing to file single_particle_free_space_0000750.h5
    Time step from 750 to 751 of 1000
    Time step from 751 to 752 of 1000
    Time step from 752 to 753 of 1000
    Time step from 753 to 754 of 1000
    Time step from 754 to 755 of 1000
    Time step from 755 to 756 of 1000
    Time step from 756 to 757 of 1000
    Time step from 757 to 758 of 1000
    Time step from 758 to 759 of 1000
    Time step from 759 to 760 of 1000
    Writing step 760 to file
    Writing to file single_particle_free_space_0000760.h5
    Time step from 760 to 761 of 1000
    Time step from 761 to 762 of 1000
    Time step from 762 to 763 of 1000
    Time step from 763 to 764 of 1000
    Time step from 764 to 765 of 1000
    Time step from 765 to 766 of 1000
    Time step from 766 to 767 of 1000
    Time step from 767 to 768 of 1000
    Time step from 768 to 769 of 1000
    Time step from 769 to 770 of 1000
    Writing step 770 to file
    Writing to file single_particle_free_space_0000770.h5
    Time step from 770 to 771 of 1000
    Time step from 771 to 772 of 1000
    Time step from 772 to 773 of 1000
    Time step from 773 to 774 of 1000
    Time step from 774 to 775 of 1000
    Time step from 775 to 776 of 1000
    Time step from 776 to 777 of 1000
    Time step from 777 to 778 of 1000
    Time step from 778 to 779 of 1000
    Time step from 779 to 780 of 1000
    Writing step 780 to file
    Writing to file single_particle_free_space_0000780.h5
    Time step from 780 to 781 of 1000
    Time step from 781 to 782 of 1000
    Time step from 782 to 783 of 1000
    Time step from 783 to 784 of 1000
    Time step from 784 to 785 of 1000
    Time step from 785 to 786 of 1000
    Time step from 786 to 787 of 1000
    Time step from 787 to 788 of 1000
    Time step from 788 to 789 of 1000
    Time step from 789 to 790 of 1000
    Writing step 790 to file
    Writing to file single_particle_free_space_0000790.h5
    Time step from 790 to 791 of 1000
    Time step from 791 to 792 of 1000
    Time step from 792 to 793 of 1000
    Time step from 793 to 794 of 1000
    Time step from 794 to 795 of 1000
    Time step from 795 to 796 of 1000
    Time step from 796 to 797 of 1000
    Time step from 797 to 798 of 1000
    Time step from 798 to 799 of 1000
    Time step from 799 to 800 of 1000
    Writing step 800 to file
    Writing to file single_particle_free_space_0000800.h5
    Time step from 800 to 801 of 1000
    Time step from 801 to 802 of 1000
    Time step from 802 to 803 of 1000
    Time step from 803 to 804 of 1000
    Time step from 804 to 805 of 1000
    Time step from 805 to 806 of 1000
    Time step from 806 to 807 of 1000
    Time step from 807 to 808 of 1000
    Time step from 808 to 809 of 1000
    Time step from 809 to 810 of 1000
    Writing step 810 to file
    Writing to file single_particle_free_space_0000810.h5
    Time step from 810 to 811 of 1000
    Time step from 811 to 812 of 1000
    Time step from 812 to 813 of 1000
    Time step from 813 to 814 of 1000
    Time step from 814 to 815 of 1000
    Time step from 815 to 816 of 1000
    Time step from 816 to 817 of 1000
    Time step from 817 to 818 of 1000
    Time step from 818 to 819 of 1000
    Time step from 819 to 820 of 1000
    Writing step 820 to file
    Writing to file single_particle_free_space_0000820.h5
    Time step from 820 to 821 of 1000
    Time step from 821 to 822 of 1000
    Time step from 822 to 823 of 1000
    Time step from 823 to 824 of 1000
    Time step from 824 to 825 of 1000
    Time step from 825 to 826 of 1000
    Time step from 826 to 827 of 1000
    Time step from 827 to 828 of 1000
    Time step from 828 to 829 of 1000
    Time step from 829 to 830 of 1000
    Writing step 830 to file
    Writing to file single_particle_free_space_0000830.h5
    Time step from 830 to 831 of 1000
    Time step from 831 to 832 of 1000
    Time step from 832 to 833 of 1000
    Time step from 833 to 834 of 1000
    Time step from 834 to 835 of 1000
    Time step from 835 to 836 of 1000
    Time step from 836 to 837 of 1000
    Time step from 837 to 838 of 1000
    Time step from 838 to 839 of 1000
    Time step from 839 to 840 of 1000
    Writing step 840 to file
    Writing to file single_particle_free_space_0000840.h5
    Time step from 840 to 841 of 1000
    Time step from 841 to 842 of 1000
    Time step from 842 to 843 of 1000
    Time step from 843 to 844 of 1000
    Time step from 844 to 845 of 1000
    Time step from 845 to 846 of 1000
    Time step from 846 to 847 of 1000
    Time step from 847 to 848 of 1000
    Time step from 848 to 849 of 1000
    Time step from 849 to 850 of 1000
    Writing step 850 to file
    Writing to file single_particle_free_space_0000850.h5
    Time step from 850 to 851 of 1000
    Time step from 851 to 852 of 1000
    Time step from 852 to 853 of 1000
    Time step from 853 to 854 of 1000
    Time step from 854 to 855 of 1000
    Time step from 855 to 856 of 1000
    Time step from 856 to 857 of 1000
    Time step from 857 to 858 of 1000
    Time step from 858 to 859 of 1000
    Time step from 859 to 860 of 1000
    Writing step 860 to file
    Writing to file single_particle_free_space_0000860.h5
    Time step from 860 to 861 of 1000
    Time step from 861 to 862 of 1000
    Time step from 862 to 863 of 1000
    Time step from 863 to 864 of 1000
    Time step from 864 to 865 of 1000
    Time step from 865 to 866 of 1000
    Time step from 866 to 867 of 1000
    Time step from 867 to 868 of 1000
    Time step from 868 to 869 of 1000
    Time step from 869 to 870 of 1000
    Writing step 870 to file
    Writing to file single_particle_free_space_0000870.h5
    Time step from 870 to 871 of 1000
    Time step from 871 to 872 of 1000
    Time step from 872 to 873 of 1000
    Time step from 873 to 874 of 1000
    Time step from 874 to 875 of 1000
    Time step from 875 to 876 of 1000
    Time step from 876 to 877 of 1000
    Time step from 877 to 878 of 1000
    Time step from 878 to 879 of 1000
    Time step from 879 to 880 of 1000
    Writing step 880 to file
    Writing to file single_particle_free_space_0000880.h5
    Time step from 880 to 881 of 1000
    Time step from 881 to 882 of 1000
    Time step from 882 to 883 of 1000
    Time step from 883 to 884 of 1000
    Time step from 884 to 885 of 1000
    Time step from 885 to 886 of 1000
    Time step from 886 to 887 of 1000
    Time step from 887 to 888 of 1000
    Time step from 888 to 889 of 1000
    Time step from 889 to 890 of 1000
    Writing step 890 to file
    Writing to file single_particle_free_space_0000890.h5
    Time step from 890 to 891 of 1000
    Time step from 891 to 892 of 1000
    Time step from 892 to 893 of 1000
    Time step from 893 to 894 of 1000
    Time step from 894 to 895 of 1000
    Time step from 895 to 896 of 1000
    Time step from 896 to 897 of 1000
    Time step from 897 to 898 of 1000
    Time step from 898 to 899 of 1000
    Time step from 899 to 900 of 1000
    Writing step 900 to file
    Writing to file single_particle_free_space_0000900.h5
    Time step from 900 to 901 of 1000
    Time step from 901 to 902 of 1000
    Time step from 902 to 903 of 1000
    Time step from 903 to 904 of 1000
    Time step from 904 to 905 of 1000
    Time step from 905 to 906 of 1000
    Time step from 906 to 907 of 1000
    Time step from 907 to 908 of 1000
    Time step from 908 to 909 of 1000
    Time step from 909 to 910 of 1000
    Writing step 910 to file
    Writing to file single_particle_free_space_0000910.h5
    Time step from 910 to 911 of 1000
    Time step from 911 to 912 of 1000
    Time step from 912 to 913 of 1000
    Time step from 913 to 914 of 1000
    Time step from 914 to 915 of 1000
    Time step from 915 to 916 of 1000
    Time step from 916 to 917 of 1000
    Time step from 917 to 918 of 1000
    Time step from 918 to 919 of 1000
    Time step from 919 to 920 of 1000
    Writing step 920 to file
    Writing to file single_particle_free_space_0000920.h5
    Time step from 920 to 921 of 1000
    Time step from 921 to 922 of 1000
    Time step from 922 to 923 of 1000
    Time step from 923 to 924 of 1000
    Time step from 924 to 925 of 1000
    Time step from 925 to 926 of 1000
    Time step from 926 to 927 of 1000
    Time step from 927 to 928 of 1000
    Time step from 928 to 929 of 1000
    Time step from 929 to 930 of 1000
    Writing step 930 to file
    Writing to file single_particle_free_space_0000930.h5
    Time step from 930 to 931 of 1000
    Time step from 931 to 932 of 1000
    Time step from 932 to 933 of 1000
    Time step from 933 to 934 of 1000
    Time step from 934 to 935 of 1000
    Time step from 935 to 936 of 1000
    Time step from 936 to 937 of 1000
    Time step from 937 to 938 of 1000
    Time step from 938 to 939 of 1000
    Time step from 939 to 940 of 1000
    Writing step 940 to file
    Writing to file single_particle_free_space_0000940.h5
    Time step from 940 to 941 of 1000
    Time step from 941 to 942 of 1000
    Time step from 942 to 943 of 1000
    Time step from 943 to 944 of 1000
    Time step from 944 to 945 of 1000
    Time step from 945 to 946 of 1000
    Time step from 946 to 947 of 1000
    Time step from 947 to 948 of 1000
    Time step from 948 to 949 of 1000
    Time step from 949 to 950 of 1000
    Writing step 950 to file
    Writing to file single_particle_free_space_0000950.h5
    Time step from 950 to 951 of 1000
    Time step from 951 to 952 of 1000
    Time step from 952 to 953 of 1000
    Time step from 953 to 954 of 1000
    Time step from 954 to 955 of 1000
    Time step from 955 to 956 of 1000
    Time step from 956 to 957 of 1000
    Time step from 957 to 958 of 1000
    Time step from 958 to 959 of 1000
    Time step from 959 to 960 of 1000
    Writing step 960 to file
    Writing to file single_particle_free_space_0000960.h5
    Time step from 960 to 961 of 1000
    Time step from 961 to 962 of 1000
    Time step from 962 to 963 of 1000
    Time step from 963 to 964 of 1000
    Time step from 964 to 965 of 1000
    Time step from 965 to 966 of 1000
    Time step from 966 to 967 of 1000
    Time step from 967 to 968 of 1000
    Time step from 968 to 969 of 1000
    Time step from 969 to 970 of 1000
    Writing step 970 to file
    Writing to file single_particle_free_space_0000970.h5
    Time step from 970 to 971 of 1000
    Time step from 971 to 972 of 1000
    Time step from 972 to 973 of 1000
    Time step from 973 to 974 of 1000
    Time step from 974 to 975 of 1000
    Time step from 975 to 976 of 1000
    Time step from 976 to 977 of 1000
    Time step from 977 to 978 of 1000
    Time step from 978 to 979 of 1000
    Time step from 979 to 980 of 1000
    Writing step 980 to file
    Writing to file single_particle_free_space_0000980.h5
    Time step from 980 to 981 of 1000
    Time step from 981 to 982 of 1000
    Time step from 982 to 983 of 1000
    Time step from 983 to 984 of 1000
    Time step from 984 to 985 of 1000
    Time step from 985 to 986 of 1000
    Time step from 986 to 987 of 1000
    Time step from 987 to 988 of 1000
    Time step from 988 to 989 of 1000
    Time step from 989 to 990 of 1000
    Writing step 990 to file
    Writing to file single_particle_free_space_0000990.h5
    Time step from 990 to 991 of 1000
    Time step from 991 to 992 of 1000
    Time step from 992 to 993 of 1000
    Time step from 993 to 994 of 1000
    Time step from 994 to 995 of 1000
    Time step from 995 to 996 of 1000
    Time step from 996 to 997 of 1000
    Time step from 997 to 998 of 1000
    Time step from 998 to 999 of 1000
    Time step from 999 to 1000 of 1000
    Writing step 1000 to file
    Writing to file single_particle_free_space_0001000.h5


After the simulation finishes, a bunch of `*.h5` files emerge in the directory.


```python
!ls
```

    config.ini
    single_particle_free_space_0000000.h5
    single_particle_free_space_0000010.h5
    single_particle_free_space_0000020.h5
    single_particle_free_space_0000030.h5
    single_particle_free_space_0000040.h5
    single_particle_free_space_0000050.h5
    single_particle_free_space_0000060.h5
    single_particle_free_space_0000070.h5
    single_particle_free_space_0000080.h5
    single_particle_free_space_0000090.h5
    single_particle_free_space_0000100.h5
    single_particle_free_space_0000110.h5
    single_particle_free_space_0000120.h5
    single_particle_free_space_0000130.h5
    single_particle_free_space_0000140.h5
    single_particle_free_space_0000150.h5
    single_particle_free_space_0000160.h5
    single_particle_free_space_0000170.h5
    single_particle_free_space_0000180.h5
    single_particle_free_space_0000190.h5
    single_particle_free_space_0000200.h5
    single_particle_free_space_0000210.h5
    single_particle_free_space_0000220.h5
    single_particle_free_space_0000230.h5
    single_particle_free_space_0000240.h5
    single_particle_free_space_0000250.h5
    single_particle_free_space_0000260.h5
    single_particle_free_space_0000270.h5
    single_particle_free_space_0000280.h5
    single_particle_free_space_0000290.h5
    single_particle_free_space_0000300.h5
    single_particle_free_space_0000310.h5
    single_particle_free_space_0000320.h5
    single_particle_free_space_0000330.h5
    single_particle_free_space_0000340.h5
    single_particle_free_space_0000350.h5
    single_particle_free_space_0000360.h5
    single_particle_free_space_0000370.h5
    single_particle_free_space_0000380.h5
    single_particle_free_space_0000390.h5
    single_particle_free_space_0000400.h5
    single_particle_free_space_0000410.h5
    single_particle_free_space_0000420.h5
    single_particle_free_space_0000430.h5
    single_particle_free_space_0000440.h5
    single_particle_free_space_0000450.h5
    single_particle_free_space_0000460.h5
    single_particle_free_space_0000470.h5
    single_particle_free_space_0000480.h5
    single_particle_free_space_0000490.h5
    single_particle_free_space_0000500.h5
    single_particle_free_space_0000510.h5
    single_particle_free_space_0000520.h5
    single_particle_free_space_0000530.h5
    single_particle_free_space_0000540.h5
    single_particle_free_space_0000550.h5
    single_particle_free_space_0000560.h5
    single_particle_free_space_0000570.h5
    single_particle_free_space_0000580.h5
    single_particle_free_space_0000590.h5
    single_particle_free_space_0000600.h5
    single_particle_free_space_0000610.h5
    single_particle_free_space_0000620.h5
    single_particle_free_space_0000630.h5
    single_particle_free_space_0000640.h5
    single_particle_free_space_0000650.h5
    single_particle_free_space_0000660.h5
    single_particle_free_space_0000670.h5
    single_particle_free_space_0000680.h5
    single_particle_free_space_0000690.h5
    single_particle_free_space_0000700.h5
    single_particle_free_space_0000710.h5
    single_particle_free_space_0000720.h5
    single_particle_free_space_0000730.h5
    single_particle_free_space_0000740.h5
    single_particle_free_space_0000750.h5
    single_particle_free_space_0000760.h5
    single_particle_free_space_0000770.h5
    single_particle_free_space_0000780.h5
    single_particle_free_space_0000790.h5
    single_particle_free_space_0000800.h5
    single_particle_free_space_0000810.h5
    single_particle_free_space_0000820.h5
    single_particle_free_space_0000830.h5
    single_particle_free_space_0000840.h5
    single_particle_free_space_0000850.h5
    single_particle_free_space_0000860.h5
    single_particle_free_space_0000870.h5
    single_particle_free_space_0000880.h5
    single_particle_free_space_0000890.h5
    single_particle_free_space_0000900.h5
    single_particle_free_space_0000910.h5
    single_particle_free_space_0000920.h5
    single_particle_free_space_0000930.h5
    single_particle_free_space_0000940.h5
    single_particle_free_space_0000950.h5
    single_particle_free_space_0000960.h5
    single_particle_free_space_0000970.h5
    single_particle_free_space_0000980.h5
    single_particle_free_space_0000990.h5
    single_particle_free_space_0001000.h5
    single_particle_free_space_fieldsWithoutParticles.h5
    single_particle_free_space_fieldsWithoutParticles_new.h5
    single_particle_in_free_space.conf
    single_particle_in_free_space.ipynb


To open these files and glance over the results, an [Hdfview](https://support.hdfgroup.org/products/java/hdfview/) is a convenient tool.
In this simulation, two places are of interest: `current time` and particle position
and momentum at this time moment:

<p align="center">

</p>

Each created `h5`-file corresponds to a different time step. 
If we were able to extract time, position and momentum of the particle from each file, we could have obtained numerical trajectory, which could be compared to the analytical one. 

Data extraction and plotting are accomplished by the accompanying [`plot.py`](https://github.com/epicf/ef/blob/master/examples/single_particle_in_free_space/plot.py) python script (see below). Its constituent parts are described further. The script produces a 3d plot and side views of the numerical and analytical trajectories. Besides, kinetic energies are compared.


```python
import pandas as pd
import  glob
import h5py
import matplotlib.pyplot as plt 

def main():
    num = extract_num_trajectory_from_out_files()
    an = eval_an_trajectory_at_num_time_points( num )
    plot_trajectories( num , an )

def extract_num_trajectory_from_out_files():
    out_files = glob.glob("single_particle_free_space_[0-9][0-9][0-9][0-9][0-9][0-9][0-9].h5")

    num_trajectory = []
    for f in out_files:
        num_trajectory.append( extract_time_pos_mom( f ) )    

    num_trajectory = sorted([ x for x in num_trajectory if x ], key = lambda x: x[0])
    return pd.DataFrame.from_records(num_trajectory, columns=('t', 'x', 'y', 'z', 'px', 'py', 'pz'))
    
def extract_time_pos_mom( h5file ):
    with h5py.File(h5file, mode="r") as h5:
        t = h5["/time_grid"].attrs["current_node"] * h5["/time_grid"].attrs["time_step_size"]
        particle_array = h5["/particle_arrays/0"]
        pos = particle_array["positions"][0]
        momentum = particle_array["momentums"][0]
    return [t] + list(pos) + list(momentum)

def eval_an_trajectory_at_num_time_points( num_trajectory ):
    global particle_mass
    particle_mass, pos0, mom0 =  get_mass_and_initial_pos_and_mom()

    an_trajectory = []
    for t in num_trajectory.t:
        pos = coords( particle_mass, t, pos0, mom0 )
        mom = momenta( t, mom0 )
        an_trajectory.append([t] + list(pos) + list(mom))

    return pd.DataFrame.from_records(an_trajectory, columns=('t', 'x', 'y', 'z', 'px', 'py', 'pz'))

def get_mass_and_initial_pos_and_mom():
    initial_out_file = "single_particle_free_space_0000000.h5"
    with h5py.File( initial_out_file, mode="r") as h5:
        particle_array = h5["/particle_arrays/0"]
        m = particle_array.attrs["mass"]
        pos0 = particle_array["positions"][0]
        mom0 = particle_array["momentums"][0]
    return m, pos0, mom0

def momenta( t, mom0 ):    
    return mom0

def coords( m, t, pos0, mom0 ):
    pos = pos0 + mom0 / m * t
    return pos

def plot_trajectories( num , an ):
    plot_3d( num, an )
    plot_2d( num, an )
    plot_kin_en( num , an )

def plot_3d( num, an ):
    fig = plt.figure()
    ax = fig.gca( projection='3d' )
    ax.plot( num.x, num.z, num.y, 'b.', markersize = 12, label = "Num" )
    ax.plot( an.x, an.z, an.y,  'g-', linewidth = 3, label = "An" )
    ax.set_xlabel('X [cm]')
    ax.set_ylabel('Z [cm]')
    ax.set_zlabel('Y [cm]')
    plt.legend( loc = 'upper left', title="3d" )
    #print( 'Saving 3d trajectory plot to "3d.png"' )
    #plt.savefig('3d.png')
    plt.show()

def plot_2d( num, an ):
    plt.figure( figsize=( 16, 6 ) )
    plt.subplots_adjust( left = None, bottom = None,
                         right = None, top = None,
                         wspace = 0.4, hspace = None )
    #XY
    ax = plt.subplot(131)
    plt.plot( num.x, num.y,
              linestyle='', marker='o',
              label = "Num" )
    plt.plot( an.x, an.y,
              linestyle='-', marker='', lw = 2,
              label = "An" )
    ax.set_xlabel('X [cm]') 
    ax.set_ylabel('Y [cm]') 
    plt.legend( loc = 'upper left', title="XY" )
    #ZX
    ax = plt.subplot(132)
    plt.plot( num.z, num.x,
        linestyle='', marker='o',
        label = "Num" )
    plt.plot( an.z, an.x,
              linestyle='-', marker='', lw = 2,
              label = "An" )
    ax.set_xlabel('Z [cm]') 
    ax.set_ylabel('X [cm]') 
    plt.legend( loc = 'upper left', title="ZX" )
    #ZY
    ax = plt.subplot(133)
    plt.plot( num.z, num.y,
        linestyle='', marker='o',
        label = "Num" )
    plt.plot( an.z, an.y,
              linestyle='-', marker='', lw = 2,
              label = "An" )
    ax.set_xlabel('Z [cm]') 
    ax.set_ylabel('Y [cm]') 
    plt.legend( loc = 'upper left', title="ZY" )
    #print( 'Saving 2d trajectory projection plots to "2d.png"' )
    #plt.savefig('2d.png')
    plt.show()
    
def plot_kin_en( num , an ):
    global particle_mass
    E_num = (num.px**2 + num.py**2 + num.pz**2) / ( 2 * particle_mass )
    E_an = (an.px**2 + an.py**2 + an.pz**2) / ( 2 * particle_mass )
    t = num.t
    plt.figure()
    axes = plt.gca()
    axes.set_xlabel( "t [s]" )
    axes.set_ylabel( "E [erg]" )
    # axes.set_ylim( [min( E_an.min(), E_num.min() ),
    #                 max( E_an.max(), E_num.max() ) ] )
    line, = plt.plot( t, E_num, 'o' )
    line.set_label( "Num" )
    line, = plt.plot( t, E_an, ls = 'solid', lw = 3 )
    line.set_label( "An" )
    plt.legend( loc = 'upper right' )
    #print( 'Saving kinetic energy comparison plot to "kin_en.png"' )
    #plt.savefig('kin_en.png')
    plt.show()


main()
```

It can be seen, that numerical trajectory (points) coincides with the analytical (line) and that the energy is conserved during the simulation.

### Plotting script

The `main` function of the script does exactly what is described above: extracts numerical trajectory from the output files, evaluates analytical trajectory at the extracted time points and plots both numerical and analytical trajectories on the same axes.

```
def main():
    num = extract_num_trajectory_from_out_files()
    an = eval_an_trajectory_at_num_time_points( num )
    plot_trajectories( num , an )
```

It uses [h5py](http://www.h5py.org/) library to read from h5 files, [numpy](http://www.numpy.org/) to simplify working with arrays and [matplotlib](https://matplotlib.org/) to perform plotting of the trajectory. 

```
import os, glob
import h5py
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D 
```

Let's examine the function to obtain the numerical trajectory:

```
def extract_num_trajectory_from_out_files():
    out_files = find_necessary_out_files()                           # (*1)

    num_trajectory = []
    for f in out_files:
        num_trajectory.append( extract_time_pos_mom( f ) )           # (*2)  

    num_trajectory = remove_empty_and_sort_by_time( num_trajectory ) # (*3)
    num_trajectory = np.array( num_trajectory,                       # (*4)
                               dtype=[('t','float'),
                                      ('x','float'), ('y','float'), ('z','float'),
                                      ('px','float'), ('py','float'),('pz','float')])
    return( num_trajectory )
```

(\*1): To extract data, first we find all `*.h5` files in the current directory.  
(\*2): Then the script iterates over them and extracts a relevant data from each one.  
(\*3): In the end of this process, `num_trajectory` array contains positions and velocities of particle at different
time steps. In is convenient to sort it over time values.  
(\*4): After the previous step the numerical trajectory is in a format of a list of tuples:
`[ (t, x, y, z, px, py, pz), ..... ]` . It is convenient to convert it into one of the `np.array` types to simplify further manipulations with it.  

For analytical trajectory we need the initial position and momentum.
They can be extracted from the first h5-file:

```
def get_mass_and_initial_pos_and_mom():
    initial_out_file = "single_particle_free_space_0000000.h5"
    h5 = h5py.File( initial_out_file, mode="r")
    m = h5["/ParticleSources/emit_single_particle"].attrs["mass"][0]
    x0 = h5["/ParticleSources/emit_single_particle/position_x"][0]
    y0 = h5["/ParticleSources/emit_single_particle/position_y"][0]
    z0 = h5["/ParticleSources/emit_single_particle/position_z"][0]
    px0 = h5["/ParticleSources/emit_single_particle/momentum_x"][0]
    py0 = h5["/ParticleSources/emit_single_particle/momentum_y"][0]
    pz0 = h5["/ParticleSources/emit_single_particle/momentum_z"][0]
    h5.close()
    return( m, x0, y0, z0, px0, py0, pz0 )
```

With this function, the analytical trajectory can be computed at the same 
time points as the numerical one:

```
def eval_an_trajectory_at_num_time_points( num_trajectory ):
    global particle_mass
    particle_mass, x0, y0, z0, px0, py0, pz0 =  get_mass_and_initial_pos_and_mom()
    #
    an_trajectory = np.empty_like( num_trajectory )
    for i, t in enumerate( num_trajectory['t'] ):
        x, y, z = coords( particle_mass, t, x0, y0, z0, px0, py0, pz0 )
        px, py, pz = momenta( t, px0, py0, pz0 )
        an_trajectory[i] = ( t, x, y ,z, px, py, pz )
    #
    return( an_trajectory )
```

Finally, both numerical and analytical trajectories are plotted in 3d and side views. 
Kinetic energies are also compared.

```
def plot_trajectories( num , an ):
    plot_3d( num, an )
    plot_2d( num, an )
    plot_kin_en( num , an )
```


```python

```

9c5e38563223c5a92d0de8f6e29598e7aef1b4f2
ipynb
Jupyter Notebook
examples/single_particle_in_free_space/single_particle_in_free_space.ipynb
fizmat/ef_python
1fccdc90b1dd628c9adb5f8713bee4e4df633daf
MIT
2018-12-13T08:32:46.000Z
2018-12-13T08:32:46.000Z
examples/single_particle_in_free_space/single_particle_in_free_space.ipynb
dumbman/ef_python
d26e48d3afd81c3b24a5ec207fce674cdc9609d3
MIT
2018-05-21T11:26:57.000Z
2020-03-12T12:28:44.000Z
examples/single_particle_in_free_space/single_particle_in_free_space.ipynb
dumbman/ef_python
d26e48d3afd81c3b24a5ec207fce674cdc9609d3
MIT
Qwen/Qwen-72B
1. YES
2. YES