visualization.rst 2.49 KB
Newer Older
1
2
.. _visualize:

3
4
5
Visualization of crystals and results
=====================================

6
Now that our simulation finished successfully, we can continue with visualizing the results.
7

8
9
Visualize the supercell with Ovito
----------------------------------
10

11
The STEMsalabim output files (somewhat) comply with the `AMBER specifications <http://ambermd.org/netcdf/nctraj.xhtml>`_
12
to visualize the specimen structure. However, all the dimensions and variables of AMBER live within the NetCDF group
13
``/AMBER`` in the NC file. This means that STEMsalabim output files **will not be compatible to
14
visualization programs requiring the pure AMBER specs!**
15

16
However, the authors of the excellent cross-platform `Ovito <https://www.ovito.org/>`_ software, which is a
17
visualization program for atomic structures (and much more), have added support for the ``/AMBER`` sub-group, so that
18
STEMsalabim NetCDF result files can be visualized seamlessly in Ovito.
19
20

What you will see is the atomic structure of the input specimen. In addition to the positional coordinates of each atom,
21
you find the mean square displacement (``msd``), the slice ID and coordinate (``slice`` and ``slice_coordinates``), the equilibrium coordinates
22
(``lattice_coordinates``), elements (``elements``) and atomic radii (``radii``) as variables. Each frozen lattice
23
configuration is one ``frame`` in the AMBER specs, so you can see the atoms wiggling around if you use the frame slider
24
of Ovito.
25

26
27
Generate an ADF STEM image
--------------------------
28

29
In the :code:`examples/Si_001` folder you will find the two files ``make_haadf.m`` and ``make_haadf.py``.
30
Both extract an HAADF image from the result NetCDF file. Please have a look at the code to get an idea of how
31
to work with the NetCDF result files.
32

33
* `MATLAB® <https://de.mathworks.com/products/matlab.html>`_ uses HDF5 for its ``.mat`` format for a couple of versions
34
  now, and is therefore perfectly capable of reading STEMsalabim result files. For quick analysis and image generation
35
36
  is a great tool.
* Python with the `NetCDF4 <http://unidata.github.io/netcdf4-python/>`_ module is also a great tool to
37
  analyze and visualize STEMsalabim result files, especially combined with numerical libraries such
38
  as `numpy <http://www.numpy.org/>`_ or `pandas <https://pandas.pydata.org/>`_.
39

40
41
What now?
---------
42

43
44
You have now completed your first simulation and looked at some of its results. In order to use STEMsalabim
for your research you should dig deeper into this documentation by reading the documentation links on the left.