The Groningen research group of professor of theoretical and computational chemistry Shirin Faraji has developed a toolkit that drastically speeds up calculations on photochemical processes thanks to artificial intelligence.

AI photochemistry

The influence of light on a simple molecule like hydrogen is fairly easy to calculate. There’s sufficient knowledge about the atoms, the bonding between them, the electron structure and their behaviour when absorbing a photon. Once the molecules get bigger and contain different and larger atoms, the computational costs quickly become prohibitive, because you then have to go through all the possible interactions between the atoms to find an outcome. Artificial intelligence can help reduce the search space by cutting off unlikely paths. That can cut down the calculation time considerably.

‘My background is in theoretical chemistry’, says Faraji, who received a vidi grant from NWO for her work. ‘My interest in artificial intelligence developed while hiking. When you first hike a route, it takes a lot of time, because you hesitate at splits, take a wrong turn here or there, and so on. The next time you’re faster already and after a while it’s become a routine.’

‘In one case, our software reduced the number of mathematical steps from 20,000 to 5,000’

A computer goes through such learning processes much faster, Faraji realized. In a way, a hiking route can be compared to the path a molecule takes after being hit by a photon. The same pattern recognition techniques that Google Maps uses to quickly find the shortest route should, in theory, also work in photochemistry.

Mathematical Steps

The open-source software developed by Faraji and her group is called PySurf and provides general-purpose tools to calculate photochemical processes faster. Sulphur dioxide and pyrazine (a six-ring with four carbon and two nitrogen atoms), two molecules whose photochemistry is well known, became test subjects during the testing phase to determine whether the software cuts off the right sub branches. ‘In one case, our software reduced the number of computational steps from 20,000 to 5,000,’ says Faraji. ‘That’s a significant improvement. PySurf is built so that you can easily add new methods to further reduce the computation time.’

For example, the datasets the program uses consist of the coordinates of atoms with their associated energy levels. The algorithms learn the connection between the two, so that when new coordinates are created, the computer knows how to quickly find the corresponding energy level.

In practical cases, this often involves molecules with thirty or more atoms. When adding more atoms, the search space grows exponentially. You could think of natural processes such as photosynthesis, but also the design of new materials for solar panels and photopharmacology, for example.


The first version of the software was released in December. Research groups in Germany and the United States are already working with it, although it is too early to publish results. Moreover, Faraji is only halfway through her vidi trajectory; in the coming years she will release new, increasingly powerful versions.

Faraji hopes that many researchers will download her open source package, if only to learn from it. ‘PySurf can work with a lot of existing software. Our package has been designed in such a way that others can get started with it easily and quickly. After all, the new generation of chemists must learn to work with data science.’