Last update : January 4, 2016
Examples & tutorials from Geant4-DNA

The pdb4dna example can be found in 'extended/medical/dna' Geant4 10.1 and Geant4 10.2 example directory.
It simulates energy deposits in a target volume generated from a PDB file representing DNA geometry.
Position of energy deposits are used to compute strand breaks in the DNA geometry.
Geant4-DNA physical processes and models are used.

Authors: Emmanuel Delage, Yann Perrot, Quang Trung Pham. Roadmap: modelize the whole chromatin (Complementary author: Henri Payno).


Some classes have been separated from the main program to be reusable into an other C++ program.
Functionalities of PDBlib are accessible from PDBlib class (in PDBlib.hh).
Functionalities are:
  • Load a PDB file, Molecule * PDBlib::Load(...)
  • Calculate bounding box from atom coordinates, void PDBlib::ComputeBoundingVolumeParams(...)
  • Compute closest atom to deposited energy,unsigned short int PDBlib::ComputeMatchEdepDNA(...)

~~Geometry and visualisation~~

Once a PDB file is loaded, the geometry is translated into Geant4 geometry.
Then, the visualisation is performed with Geant4 visualisation drivers.
All those screenshots have been done with the QT driver for Geant4.
All pdb4dna specific functionalities (extra Geant4 features) could be called via messengers:
  • [1] Load a PDB file (The default atoms visualization is done by sphere that are parametrized with the van der Waals radius). CPK coloring.
    - Hydrogen(H) => white sphere,
    - Carbon(C) => gray sphere,
    - Oxygen(O) => red sphere,
    - Nitrogen(N) => dark blue sphere,
    - Sulfur(S) => yellow sphere,
    - Phosphorus(P) => orange sphere,
    - others/undefined => pink sphere.
    /PDB4DNA/det/loadPDB filename.pdb
  • [2] Build only a bounding volume for computation and draw it :
  • [3] Draw Atoms :
  • [4] Draw Nucleotids (sphere representing nucleotids) :
  • [5] Draw Residues (Spheres are linked by cylinders)
    - Base => blue sphere,
    - Sugar => yellow sphere,
    - Phosphate => red sphere.
  • [6] Draw Atoms with bounding volume :
1ZBB.pdb /vis/viewer/set/viewpointVector 0.9 1 0.9
1ZBB.pdb /vis/viewer/set/viewpointVector 0 0 1
1ZBB.pdb /vis/viewer/set/viewpointVector 1 0 0
1ZBB.pdb /vis/viewer/set/viewpointVector 1 0 1
  • [7] Draw Nucleotides with bounding volume :
    /PDB4DNA/det/drawNucleotidesWithBounding Vis3D
  • [8] Draw Residues with bounding volume :
[1] is mandatory for visualization and simulation.
[2] is needed for simulation.


How to run the example.
In interactive mode, run:

> $G4WORDIR/yourPath/pdb4dna(.exe) -gui qt

"1ZBB.pdb" is the default file and it should be placed into same directory as the executable.
You can download it here.

The macro runInGUI.mac should be executed after a PDB load.
In batch mode, run:

> $G4WORDIR/yourPath/pdb4dna(.exe) -mac [macro_file] -mt [number_of_thread]

By default, [macro_file] is pdb4dna.in, [number_of_thread] is 2

The physics
This example shows how to use the Geant4-DNA processes from the construction
Look at the PhyscisList.cc file.

Simulation output
The output results consists in a pdb.root file, containing for each event:
- the energy deposit in the bounding box (in electronVolt)
- the number of single strand break (SSB)
- the number of double strand break (DSB)


This file can be easily analyzed using for example the provided ROOT macro
file analysis.C; to do so :
* be sure to have ROOT installed on your machine
* be sure to be in the pdb4dna directory
* launch ROOT by typing root
* under your ROOT session, type in : .X analysis.C to execute the macro file
* alternatively you can type directly under your session : root analysis.C

Root Output
Messengers for physics:
  • [9] Set energy threshold to get SSB :
    /PDB4DNA/event/setEnergyThres 8.22 eV (default value set to 8.22 eV)
  • [10] Set distance threshold between two SSB, to get DSB :
    /PDB4DNA/event/setDistanceThres 10 (default value set to 10)

~~1ZBB.pdb with GLmol ~~

GLmol website: GLmol - Molecular Viewer on WebGL/Javascript
If you see only black screen and you are using:
-Internet Explorer doesn't support WebGL., try iewebgl.
-Firefox (version 4 or later), Chrome, Safari: enable WebGL.
3D view Rotate: LMB

Initialy designed by Emmanuel Delage (CNRS 2012-2015)
Web hosting : CC IN2P3