Giter VIP home page Giter VIP logo

castep2shengbte's Introduction

CASTEP2ShengBTE interface

This directory contains CASTEP interface files to the ShengBTE package. ShengBTE solves the full linearized Boltzmann transport equation for phonons using an iterative method. The interface allows the user to convert the output files generated by CASTEP into a suitable format which can be used by ShengBTE. ShengBTE is NOT part of CASTEP and the CASTEP authors are not responsible for it. You can find further information about ShengBTE on http://www.shengbte.org/home

Getting Started

You can obtained the interface either as part of the CASTEP distribution, or download the most recent version from https://github.com/ganphys/castep2shengbte

The current version of the interface (castep2shengbte.py) is compatible with ShengBTE v.1.1.1 (most recent version), although it should also work with all previous versions.

Prerequisites

The interface is a python script which uses python2.7 and requires the following libraries: numpy

Before running the script the user needs a <seedname>.castep file obtained from a CASTEP Phonon run.

Installing

There is no need to install the script. If numpy is missing, please try to install them through the terminal.

numpy

sudo apt-get install python-numpy

Running castep2shengbte.py

You can run the interface by simply calling the script:

castep2shengbte.py <seedname> nx ny nz

where nx ny nz is the q-points grid.

If executed successfully, the script will create 2 output files which can be used in ShengBTE:

CONTROL
FORCE_CONSTANTS_2ND

Note that PHONON_WRITE_FORCE_CONSTANTS: true needs to be added to <seedname>.param or the force constants will not be written in <seedname>.castep.

ShengBTE notes

IMPORTANT: Third order force constants are required by ShengBTE. These are stored in a file called FORCE_CONSTANTS_3RD. Please use thirdorder.py generate FORCE_CONSTANTS_3RD. For more information about thirdorder.py, please see the thirdorder.py manual.

The CONTROL file contains the parameters used in ShengBTE. It is important to note that ngrid(:) copies the q-points grid, which is often not sufficient to converge the ShengBTE results, hence higher values should be tested.

ShengBTE use values of epsilon=1 (dielectric tensor) and born=0 (Born effective charge tensor) by default. These values can be changed in the CONTROL file by adding a few lines to the &crystal block.

Epsilon values can be obtained with OptaDOS (for more information, please check this tutorial). Here is an example of how to format the epsilon data in CONTROL:

        epsilon(:,1)=19.643 0.00 0.00,
        epsilon(:,2)=0.00 19.643 0.00,
        epsilon(:,3)=0.00 0.00 19.643,

where this block needs to be placed in &crystal

Born charges can be calculated in CASTEP. For that purpose add CALCULATE_BORN_CHARGES: true to the .param file. Born charges should be then given at the end of .castep. Again place the data in the '&crystal` block in CONTROL:

        born(:,1,1)=2.67810 0.00 0.00,
        born(:,2,1)=0.00 2.67810 0.00,
        born(:,3,1)=0.00 0.00 2.67810,
        born(:,1,2)=-2.67558 0.00 0.00,
        born(:,2,2)=0.00 -2.67558 0.00,
        born(:,3,2)=0.00 0.00 -2.67558, 

where the second digit in the brackets represents the type of the atom. For example, if there are 3 species present in the unit cell, extra 3 lines with born(:,X/Y/Z,3) need to be added in addition to the above example.

For more information on the keywords present in CONTROL and the output generated by ShengBTE, please see: https://bitbucket.org/sousaw/shengbte/overview

Author

castep2shengbte's People

Contributors

ganphys avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.