Tutorial 1

Preparation of atomic structure and electron density dataset.

From the LRZ Summer of Simulation 2017 project Photocatalytic water-splitting with carbon nitride materials: Combining the condensed matter and molecular approaches (Johannes Ehrmaier)

Data preparation

We begin with a cube file:

drho-of-eign-3.zip

The cube file contains information about heptazine in a water box as a periodic system and the charge response of the bright pipi^* state of heptazine.

Overview

We will start by visualizing the atoms in the system to obtain a spatial view of the atomic distribution.

ehrmaierAtoms.ncfg

atomscaling 1
repetitions 2 2 2
displaybonds
displayunitcell
cubefile drho-of-eign-3.cube

background 0 0 0

Isosurface extraction

We open drho-of-eign-3.cube in Paraview

We select "Gridded data"

We extract an isosurface at 0.004 using the "Contour filter"

We save the isosurface using "File -> Export scene" and save as "VRML files (*.vrml).

The procedure can be scripted if required.

Isosurface conversion

We process the isosurface in meshlab.

-Rename the isosurface to 1-04.wrl (Paraview saves VRML2 files by default which meshlab expects as *.wrl)

-Optional: Mesh simplification using Filters -> Remeshing, Simplification and Reconstruction -> "Quadric Edge Collapse Decimation" with "Percentage Reduction" set to 0.5 (50% reduction), then Apply

-Export as 1-04.ply using File -> Export Mesh as -> Stanford Polygon File Format (*.ply). Select Vert->Normals and "Binary encoding".

The procedure can be scripted if required (Filters -> Show Current Filter Script -> Save Script).

Optional: simplification of the cube file

Since we now have the isosurface, we do not need the volumetric data in the cube file.

We open the cube file in an editor such as notepad++, and delete the volumetric data (discard lines 383 to the end of the file).

Final cube and ply

drho-of-eign-3-header.cube

1-04.ply

Final ncfg

Ehrmaier.ncfg

atomscaling 1
repetitions 1 1 1
displaybonds
displayunitcell
cubefile drho-of-eign-3-header.cube

isos 1
values "04"
colours 0.186 0.806 0.286 0.5

background 0 0 0
hapticfeedback
showcontrollers

Visualization in VR tools

CAVE

HTC Vive

Google Cardboard

Desktop tool

Acknowledgements

Dataset provided by Johannes Ehrmaier.