AlmaBTE  1.3
A solver of the space- and time-dependent Boltzmann transport equation for phonons
vasp_io.cpp File Reference

Definitions corresponding to vasp_io.hpp. More...

#include <utility>
#include <iostream>
#include <fstream>
#include <boost/format.hpp>
#include <vasp_io.hpp>
#include <utilities.hpp>
#include <exceptions.hpp>
Include dependency graph for vasp_io.cpp:

Functions

std::unique_ptr< Crystal_structure > alma::load_POSCAR (const char *filename)
 Build a Crystal_structure object from a VASP POSCAR file. More...
 
std::unique_ptr< Harmonic_ifcs > alma::load_FORCE_CONSTANTS (const char *filename, const Crystal_structure &cell, const int na, const int nb, const int nc)
 Create a Harmonic_ifcs object from the information stored in a Phonopy FORCE_CONSTANTS file. More...
 
Eigen::ArrayXXd alma::load_FORCE_CONSTANTS_raw (const char *filename)
 Load the data in a FORCE_CONSTANTS file and return it as a raw matrix. More...
 
std::unique_ptr< Dielectric_parameters > alma::load_BORN (const char *filename)
 Create a Dielectric_parameters object from a Phonopy BORN file. More...
 
std::unique_ptr< std::vector< Thirdorder_ifcs > > alma::load_FORCE_CONSTANTS_3RD (const char *filename, const Crystal_structure &cell)
 Create a std::vector of Thirdorder_ifcs objects from a FORCE_CONSTANTS_3RD file. More...
 

Detailed Description

Definitions corresponding to vasp_io.hpp.

Function Documentation

◆ load_BORN()

std::unique_ptr< Dielectric_parameters > alma::load_BORN ( const char *  filename)

Create a Dielectric_parameters object from a Phonopy BORN file.

Note that the first line is ignored and VASP's default units are assumed.

Parameters
[in]filename- path to the BORN file
Returns
a Dielectric_parameters object containing all the information in the BORN file.

◆ load_FORCE_CONSTANTS()

std::unique_ptr< Harmonic_ifcs > alma::load_FORCE_CONSTANTS ( const char *  filename,
const Crystal_structure cell,
const int  na,
const int  nb,
const int  nc 
)

Create a Harmonic_ifcs object from the information stored in a Phonopy FORCE_CONSTANTS file.

Parameters
[in]filename- path to the FORCE_CONSTANTS file
[in]cell- description of the unit cell
[in]na- number of unit cells along the first axis
[in]nb- number of unit cells along the second axis
[in]nc- number of unit cells along the third axis
Returns
a Harmonic_ifcs object with the structure contained in the file.

◆ load_FORCE_CONSTANTS_3RD()

std::unique_ptr< std::vector< Thirdorder_ifcs > > alma::load_FORCE_CONSTANTS_3RD ( const char *  filename,
const Crystal_structure cell 
)

Create a std::vector of Thirdorder_ifcs objects from a FORCE_CONSTANTS_3RD file.

The format of the file is described in the ShengBTE documentation.

Parameters
[in]filename- path to the BORN file
[in]cell- description of the unit cell
Returns
a std::vector of Thirdorder_ifcs objects containing all the information in the file.

◆ load_FORCE_CONSTANTS_raw()

Eigen::ArrayXXd alma::load_FORCE_CONSTANTS_raw ( const char *  filename)

Load the data in a FORCE_CONSTANTS file and return it as a raw matrix.

Parameters
[in]filename- path to the FORCE_CONSTANTS file
Returns
a matrix with the force constants in the file. Each row or column corresponds to a degree of freedom, with atom indices running slower than coordinates.

◆ load_POSCAR()

std::unique_ptr< Crystal_structure > alma::load_POSCAR ( const char *  filename)

Build a Crystal_structure object from a VASP POSCAR file.

Parameters
[in]filename- path to the POSCAR file
Returns
a Crystal_structure object with the structure contained in the file