Home Teaching About Contact

PyRTP

Objective: develop a program to perform real-time time dependent density functional theory calculations as simply as possible.

During the devlopment of the code for the Optimisation of RT-TDDFT methods in CP2K project, it was found that the program was easy to read and accessible for undergraduate students. Many DFT codes, owing to the push for greater efficiency and accuracy, have source code which is either unaccessible (closed-source) or extremely unfriendly for non-technical people (i.e. students who are not strong programmers). On top of this, many DFT codes are written in programming languages which are not simple to follow (i.e. C, Fortran, etc.). For many students, looking at exactly how a code calculates values is beneficial, and thus, the project was designed to produce a code to do this.

In order to complete this project, the program had to be designed with the following considerations in order to achieve the aims set out:

  • Easy to read - These methods should be programmed in such a way that users who are new to programming (i.e. undergrads) can understand the code.

  • Accurate methods - The DFT and TDDFT calculations should not be appreciably less accurate than existing QC programs.

  • Reflective of methods in other programs - Methods which mirror existing codes allow for the progression of users to using more robust QC programs.

In order to do this, the following programming decisions were made:

  • Written exclusively in Python - Free, clear syntax and can be further optimised using external packages.

  • Mirrors the methods used by CP2K - CP2K is free, open-source and popular within the community. Alongside that, CP2K's GPW method 'Quickstep' is robust and accurate.

  • Uses only packages available on a range of OSs - Many QC programs require a Unix-based operating system, which locks out many less experienced users.

  • Optimised with multithreading (where possible) - The Numba package is used to multithread processes, allowing the programs to be run relatively quickly.

  • Available in an .ipynb format - IPython notebooks allow for a blended approach between theory and code, helping students.

This project is publically accessible on GitHub, and is maintained by myself. There are a number of things that I would like to continue to work on, however I do not presently have the time to continue development alone. If you would be interested in working on this project, please get in touch!

This work was also presented at the CCP9 Conference 2024, with this poster.