Optimising van der Waals simulations with CASTEP codeeCSE02-09
PI/Co-PI: Prof Matt Probert, Dr Phil Hasnip - University of York; Prof Keith Refson - Royal Holloway, University of London; Dr Anthony Reilly - University of Cambridge
Technical: Dr Matthew Hodgson - University of York
eCSE Final Report: Optimising van der Waals simulations with CASTEP code
This project aimed to improve the performance of the van der Waals (vdW) interactions as implemented in CASTEP. The existing code used various "Semi-Empirical Dispersion Correction" (SEDC) schemes, but performed poorly for a small number of pathological cases, and was not parallel. Hence there were situations where CASTEP run time on machines like ARCHER was dominated by calculating these interactions.
In this project, the simple sum method used by CASTEP to calculate the vdW interaction was replaced by a modified Ewald scheme for calculating the vdW energy, force, stress and first order differential of the force for phonon calculations. This has produced a speed up of around a factor of five (in a benchmark water calculation) over the previous implementation in serial. We have also parallelized this code using MPI, whereas the previous code was only serial. Hence for large calculations on ARCHER the code is now many times faster due to the combination of both of these improvements.
As a result of this work, the inclusion of vdW interactions will no longer be a significant bottleneck in any calculation, enabling a large range of calculations to be carried out that previously were infeasible. Such interactions are crucial in the study of many molecular crystals, layered materials, etc - all of which are of great interest.
Summary of the software
CASTEP is a general purpose code for the quantum simulation of properties of materials. It has been developed in the UK for many years, and is widely used within both academia and industry. It is freely available to all UK academics subject to a simple licence agreement. It has been used as part of the acceptance test suite on successive national supercomputers, including ARCHER, and is available on ARCHER as a system binary to all registered users. CASTEP is also available for source-code download from CCPForge (https://ccpforge.cse.rl.ac.uk/gf/) for all registered users. CASTEP is also available commercially for industrial and non-UK academic users from BIOVIA (http://accelrys.com/products/collaborative-science/biovia-materials-studio/).
In this project, the previous implementation of the vdW interaction via the different SEDC schemes has now been replaced by an Ewald summation method. The new routines are now fully integrated into the main CASTEP source, and are currently subject to beta-testing within the core CASTEP developers group. The routines will be part of the next CASTEP release (due Q4 2015) and hence will be in the next ARCHER system binary and future commercial releases. The changes will not be obvious to a casual user as the user interface has not been affected, but all SEDC users will benefit from the speed boost, and affected ARCHER users will see a dramatic effect due to the parallelization.