[CMP] Computational and Mathematical Primer

[CMP] Computational and Mathematical Primer

In general biological science students have an inadequate in computing and mathematics to undertake the subsequent modules in structural biology. The module is a primer aimed at bringing the students up to the level of mathematics and computation required for the modules that follow in the course. The module is innovative in the sense that it seeks to give the students a grounding in conceptual mathematics by making use of modern computational tools.


Dr David Pugh (Deputy Programme Co-ordinator, UWC) has a background in Applied Mathematics and Physics, and has experience of determining protein structures using nuclear magnetic resonance (NMR) spectroscopy. Dr Pugh is the leader of the Structural Biology Group at UWC. He will also co-ordinate the NMR component of the Masters Programme in Structural Biology, as well as contribute lectures on mathematical techniques and NMR spectroscopy.

Main Outcomes

The aim of this module is to introduce you to most of the physical and mathematical concepts that you will need for the theory modules in the later part of the course. These include complex numbers, vectors and matrices and Fourier analysis. At the same time you will learn the basics of computer programming and gain experience of working in a LINUX environment. For performing numerical and symbolic calculations and displaying the results, you will be using the MATLAB environment. MATLAB also has its own programming language, modelled closely on C, which we will use to do some rudimentary programming. You will also use Perl to write some web-based applications.

This module descriptor document also can be downloaded as an MS-Word document.

Main Content

Home Department: Biotechnology (UWC)
Module description (Header): Computational and Mathematical Primer
Generic module name: Structural Biology
Alpha-numeric code: STB705
Credit Value: 15 Credits
Duration: 10 Weeks
Module Type: P
Level: 8
Prerequisites: None
Co-requisites: None
Prohibited combinations: None
Learning time breakdown (hours):
Contact with lecturer/tutor: 60
Assignments & tasks: 40
Tests & examinations: 5
Practicals: 0
Selfstudy: 35
Total Learning Time 150
Methods of Student Assessment: Tutorial sheets will be handed out approximately once a week. Tutorials will count approximately equally towards a tutorial mark, which will make up 40% of the final mark for the module. A 3-hour exam will be scheduled at the end of the course. Moderation will be internal.
40% Tutorials
20% Project
40% Exam


  1. and MATLAB
    1. What is LINUX
    2. Getting started
    3. Creating and manipulating files
    4. Piping commands
    5. File permissions
    6. A MATLAB programme to calculate N factorial
  2. Functions, graphs and complex numbers
    1. Cartesian and polar coordinates
    2. Review of trigonometry
      1. Radian measure
    3. Exponentials and logs
      1. Definition of e
    4. Polynomials
    5. Review of differential calculus
      1. Chain rule
      2. Product rule
    6. Taylor series
      1. sin(x), cos(x) and exp(x) expansions
    7. Complex numbers
      1. Polar representation
      2. de Moivre’s Theorem
      3. Representation of phases
    8. Waves
  3. Basics of programming in MATLAB
    1. Analysis of factorial programme
    2. MATLAB scripts and functions
    3. Control structures
      1. for loops
      2. while loops
      3. if structures
  4. Vectors and matrices
    1. Position and displacement vectors
    2. Dot product
      1. Bond angles
      2. Plane waves and travelling waves
    3. Vector product
      1. Dihedral angles
    4. Matrices
      1. Matrix-vector multiplication rule
      2. Matrix-matrix multiplication rule
      3. 2D rotation matrices
      4. Inverse matrices
    5. Representation of matrices in MATLAB
    6. 3D rotation matrices
    7. More matrices in MATLAB
      1. Index notation
      2. Transpose
      3. Vectorisation
    8. Advanced topic: Representation of 3D rotations using 2x2 complex matrices
  5. Minimization problems
    1. Forces and potentials
      1. Bond length energy
      2. Bond angle energy
      3. Dihedral angle energy
      4. Force as the gradient of a potential
      5. Potential theorem
      6. Boltzmann distribution
      7. Molecular dynamics
    2. Generalisation to optimisation/minimization problems
      1. Configuration spaces
      2. Travelling salesman problem
      3. Least squares fitting
      4. Restrained molecular dynamics
    3. Energy minimisation algorithms
      1. Random search
      2. Method of steepest descent
      3. Monte Carlo Method
        1. Simulated annealing
  6. Fourier analysis
    1. Recap of waves
    2. Fourier Series
    3. Fourier’s Theorem for periodic functions
    4. Advanced topic: Vector analogy
    5. Application to X-ray diffraction
    6. Discrete Fourier Transform
    7. Application to NMR
  7. Perl programming


Weekly tutorial sheets will be handed out on Monday, and must be submitted before the beginning of the lecture on the following Monday. Tutorial sheets will be marked and will count approximately equally towards the final mark for the module.

Online lectures


The following lectures are available as MS-Word docs:


The following seven tutorials are available as MS-Words docs:


The recommended text for the course is:

Hahn, B and D Valentine. 2013. Essential MATLAB for Engineers and Scientists. Amsterdam: Academic Press, 5th ed.