Research work · 2015

A Python interface to CASTEP

Greg Corbett, James R. Kermode, Dominik B. Jochym, Keith Refson

Warwick Research Archive Portal (University of Warwick)

Abstract

This report documents a successful pilot project and feasibility study for adding a Python interface to the CASTEP first principles materials modelling code. Such an interface will allow the growing Python community within the scientific computing field access to CASTEP functionality, without the requirement of learning Fortran. To achieve this, changes have been made to the CASTEP source code to allow: - Serially re-entrant calling of a major task routine, specifically electronic_minimisation(). - Automated generation of a Python interface. The reasoning behind these changes has been documented and coding practices that may hinder a full move to serial re-entrancy in future have been noted. To demonstrate the success of the project, top-level task control logic has been written in Python -- using the Fortran 2003 computational core to perform multiple calls to electronic_minimisation().

Download PDF

DOI: 10.5286/raltr.2015004