Virtual brains 

Software for better drug research with less laboratory animals

Bas van ’t Hof from VORtech helped brain researchers by building software to compute how drugs spread through the brain. With this software, the researchers can now see what their theoretical work implies, allowing for more efficient drug development with fewer laboratory animals. 

How do drugs get distributed in the brain?

Beatrice Guastella, student at Leiden University, worked on models to describe how drugs spread in the brain. This kind of models is used to find better drugs for treating, for example, Parkinson’s disease and brain tumours. A model is more practical than animal testing because it gives results for any point in the brain at any moment, which animal testing cannot. 

Beatrice developed mathematical equations to describe the chemical and physical processes in the brain. But these equations are so complex that it is hard to understand what they actually imply for the spreading of drugs. That is why she wanted to have the equations translated into software. Solving the equations for concrete cases would give her a far better understanding of the dynamics in the model. Also, the software can be used for virtual testing in brain drug research.  

The best possible software

This is where Bas van ‘t Hof from VORtech got involved. For more than twenty years, Bas has worked on many different computer models, in all kinds of programming languages and for all kinds of applications. As Bas says: “When I started at VORtech twenty five years ago, I mostly worked at software to describe water flow in coastal areas. Later, I did a lot of work on software for the oil industry. These days, my projects are usually shorter. Now, I’m working on software to compute ship movements in high detail. In all those years, I programmed in all common programming languages, from Fortran to Python”. 

As projects at VORtech usually build on existing codes and are limited by budget constraints, the developers mostly have to make the best of what is already there.  Bas thought it would be nice to be involved in a new piece of software and build it properly right from the start. So a sabbatical would be a perfect opportunity. He contacted Vivi Rottschäfer, associate professor at Leiden University (and full professor at the University of Amsterdam) to see if something like that could be arranged in her group. Professor Rottschäfer immediately made the connection to the work of Beatrice and arranged a position for Bas for one day per week to develop the software. Bas could start right away even as Beatrice was still working, as there was already a basis in the work of PhD-candidate Esmee Vendel. 

This assignment allowed Bas to make the best software that he could with all his years of experience. And he surely needed this experience as the model is extremely complex. There are cells that are modelled as points (0 dimensions), blood vessels that are modelled as lines (1 dimension) and fluids around the vessels that are modelled in three dimensions. The transport through the walls of the blood vessels is nonlinear, which requires a careful design of the numerical method. 

Managing complexity

According to Bas: “When you turn such a complex model into software, you must start with a very good design. Otherwise, you will soon get stuck in the complexity and the software becomes very hard to extend or debug.” For this reason, Bas constructed the software from elementary building blocks, each with a well-defined functionality, that are coupled in ever larger combinations. “This has the additional benefit that these building blocks can, in principle, also be used for other, similar applications,” says Bas. 

Next to these building blocks, Bas developed all sorts of useful functionality that is more generally useful. This included, for example, a test framework to compare images, functionality to couple C++-code to Python code in a better way than Boost, and functionality for timing of the computations.  

Bas really enjoyed the collaboration with Beatrice. As Bas says: “She could clearly explain to me what had to be programmed. And she could spot errors in the code as she noticed outcomes that she wouldn’t have expected. I could never have seen that myself.” 

A strong foundation

Both the mathematical work and the software are not finished. The research raises new ideas and new questions. The researchers can now extend the software themselves, based on the strong foundation that Bas created. Still, professor Rottschäfer has her reservations: “Building good software should be left to professionals. Researchers can surely do some programming, but they do not have the knowledge and experience to design it properly and make it extendable and reliable. And it’s certainly not the best use of their talents.”