Computational Physics: Some basics of high level programming with examples in Python

Overview

Introductory lecture material

Programming

Basic numerical methods

Methods and Algorithms
Molecular Dynamics
Hartree-Fock method
Density functional theory
Monte Carlo methods
Quantum Monte Carlo methods
Lanczos method
Perturbation theory





We will mostly follow lectures at https://github.com/jrjohansson/scientific-python-lectures
My lectures can be downloaded at https://github.com/haulek/CompPhysics/tree/main/Programing
Local copy of lectures:

  • 00_Introduction.html
  • 01_Basic_Python.html
  • 02_Numpy.html
  • 03_Scipy.html
  • 04_Scipy_example_Hydrogen_atom.html
  • 05_Atom_in_LDA.html


  • Homeworks:
        Homework 3, solution in Jupyter Notebook form
        Numerov algorithm
        Homework 4, solution in Jupyter Notebook form
         Script for XC potential: excor.py
         Total energies from NIST (Energies are given in Hartree's)

         Solution of the H2+ molecule in Python: Lecture notes, code

    Old codes:

  • Programming in C++ and Perl
  •     Homework 4
        Homework 5
        Homework 6

    Source code for this part of lectures

  • .emacs file
  • Example of using f2py to generate Mandelbrot set
  • Perl scipt for data-file manipulation, plotting, integration,...
  • Some Python scripts
  • All source codes