Scientific C++ Programming



    Part I: Language Basics and Initial Programming

  1. Introduction

    • Capabilities: »computers vs. humans«
    • Artificial »Intelligence«, Quantum Computing vs. classical programming
    • Programming paradigms, programming languages, Turing completeness
    • Interpreter, compiler, just in time compilation
    • Efficiency: language vs. algorithm vs. math
    • Why C++?

  2. First steps

    • »Hello world«
    • Error messages...
    • Variables and (builtin) types
    • Loops and if clauses
    • Expressions
    • Type safety, type propagation
    • Subroutines

  3. Templates: variable types (static polymorphism)

    • Function and class templates
    • Standard template library (STL) containers
    • vector, array, list, set, map, ...
    • Access, insert/delete complexities
    • Explicit and implicit instantiation
    • Algorithms and their complexities
    • Nesting of templates

  4. Idea of object orientation (OO)

    • 3 steps:
      • Group builtin types together to create new abstract types (data structures)
      • Group abstract types with methods
      • Introduce life cycle governing methods (constructors, destructors, ...)
    • Separation of interface and implementation
    • Introduction of custom operators
    • Access control
    • Inheritance
    • Virtual functions (dynamic polymorphism)
    • UML diagrams

  5. Technical issues

    • Organizing »large« projects
      • File splitting (header and implementation files)
      • Automatizing build process (make)
    • Compiler pipeline
      • Preprocessor, compiler, assembler, linker
      • Involved stages, files, and linker symbols
    • Interoperability with other languages
    • Floating point issues
    • Limits of computational power
      • Latency, bandwidth, caches
      • Basis linear algebra subroutines and their levels BLAS1-3
      • Cache overruns
    • Libraries and tools

    Part II: Small Programming Projects (mutually exclusive)

  • Implementation of a (simple) molecular dynamics program with graphical visualization (OpenGL)

  • Implementation of a (simple) Hartree-Fock program

  • Implementation of normal order and Wick's theorem I and II


The module is organized as a 6 week block consisting of everyday lectures and practical programming on a computer. The first four weeks provide fundamental concepts. In the last two weeks a simple project is implemented.

Lecture ~1-2h/day
Practical programming Rest of day
Exam oral

Further administrative information.

University of Cologne

Theoretical Chemistry


Workgroup Hanrath

Selected Animations