Skip to content

Commit

Permalink
Replace expired BoltzTraP link (#3929)
Browse files Browse the repository at this point in the history
* update BoltzTraP link

* correct BoltzTraP case in docstring

* remove unused gitignore items
  • Loading branch information
DanielYang59 authored Jul 24, 2024
1 parent 8e39294 commit 44b8c6e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 24 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
__pycache__/
.DS_Store
pymatgen.egg-info
dependencies/PyCifRW-3.3/PyCifRW.egg-info
dependencies/spglib*/pyspglib.egg-info
dependencies/spglib*/build
*.o
*.so
*.pyc
Expand All @@ -26,7 +23,6 @@ setuptools*
.cache
.tox
.eggs/
gulptmp_4_1
.coverage
.*_cache
# VS Code
Expand Down
37 changes: 17 additions & 20 deletions src/pymatgen/electronic_structure/boltztrap.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
"""This module provides classes to run and analyze boltztrap on pymatgen band
structure objects. Boltztrap is a software interpolating band structures and
computing materials properties from this band structure using Boltzmann
semi-classical transport theory.
"""This module provides classes to run and analyze BoltzTraP on pymatgen band
structure objects. BoltzTraP is a software developed by Georg Madsen to
interpolate band structures and compute materials properties from this
band structure using Boltzmann semi-classical transport theory.
Boltztrap has been developed by Georg Madsen.
http://www.icams.de/content/research/software-development/boltztrap/
https://www.tuwien.at/en/tch/tc/theoretical-materials-chemistry/boltztrap
You need version 1.2.3 or higher
References are:
References:
Madsen, G. K. H., and Singh, D. J. (2006).
BoltzTraP. A code for calculating band-structure dependent quantities.
Computer Physics Communications, 175, 67-71
Expand Down Expand Up @@ -60,13 +57,13 @@


class BoltztrapRunner(MSONable):
"""This class is used to run Boltztrap on a band structure object."""
"""This class is used to run BoltzTraP on a band structure object."""

@requires(
which("x_trans"),
"BoltztrapRunner requires the executables 'x_trans' to be in PATH. Please download "
"Boltztrap at http://www.icams.de/content/research/software-development/boltztrap/ "
"and follow the instructions in the README to compile Bolztrap accordingly. "
"BoltzTraP at https://www.tuwien.at/en/tch/tc/theoretical-materials-chemistry/boltztrap "
"and follow the instructions in the README to compile BoltzTraP accordingly. "
"Then add x_trans to your path",
)
def __init__(
Expand Down Expand Up @@ -144,7 +141,7 @@ def __init__(
electron occupations. If the band structure comes from a soc
computation, you should set soc to True (default False)
doping:
the fixed doping levels you want to compute. Boltztrap provides
the fixed doping levels you want to compute. BoltzTraP provides
both transport values depending on electron chemical potential
(fermi energy) and for a series of fixed carrier
concentrations. By default, this is set to 1e16 to 1e22 in
Expand Down Expand Up @@ -734,7 +731,7 @@ def __init__(
bz_kpoints=None,
fermi_surface_data=None,
) -> None:
"""Constructor taking directly all the data generated by Boltztrap. You
"""Constructor taking directly all the data generated by BoltzTraP. You
won't probably use it directly but instead use the from_files and
from_dict methods.
Expand All @@ -760,7 +757,7 @@ def __init__(
each Fermi level in mu_steps]}
The units are m^3/C
doping: The different doping levels that have been given to
Boltztrap. The format is {'p':[],'n':[]} with an array of
BoltzTraP. The format is {'p':[],'n':[]} with an array of
doping levels. The units are cm^-3
mu_doping: Gives the electron chemical potential (or Fermi level)
for a given set of doping.
Expand Down Expand Up @@ -802,7 +799,7 @@ def __init__(
intrans: a dictionary of inputs e.g. {"scissor": 0.0}
carrier_conc: The concentration of carriers in electron (or hole)
per unit cell
dos: The dos computed by Boltztrap given as a pymatgen Dos object
dos: The dos computed by BoltzTraP given as a pymatgen Dos object
dos_partial: Data for the partial DOS projected on sites and
orbitals
vol: Volume of the unit cell in angstrom cube (A^3)
Expand Down Expand Up @@ -837,13 +834,13 @@ def __init__(
self.fermi_surface_data = fermi_surface_data

def get_symm_bands(self, structure: Structure, efermi, kpt_line=None, labels_dict=None):
"""Useful to read bands from Boltztrap output and get a BandStructureSymmLine object
"""Useful to read bands from BoltzTraP output and get a BandStructureSymmLine object
comparable with that one from a DFT calculation (if the same kpt_line is
provided). Default kpt_line and labels_dict is the standard path of high symmetry
k-point for the specified structure. They could be extracted from the
BandStructureSymmLine object that you want to compare with. efermi variable must
be specified to create the BandStructureSymmLine object (usually it comes from DFT
or Boltztrap calc).
or BoltzTraP calc).
"""
try:
if kpt_line is None:
Expand Down Expand Up @@ -1640,7 +1637,7 @@ def get_carrier_concentration(self):

def get_hall_carrier_concentration(self):
"""Get the Hall carrier concentration (in cm^-3). This is the trace of
the Hall tensor (see Boltztrap source code) Hall carrier concentration
the Hall tensor (see BoltzTraP source code) Hall carrier concentration
are not always exactly the same than carrier concentration.
Returns:
Expand Down Expand Up @@ -1770,7 +1767,7 @@ def parse_intrans(path_dir):
path_dir: (str) dir containing the boltztrap.intrans file
Returns:
dict: various inputs that had been used in the Boltztrap run.
dict: various inputs that had been used in the BoltzTraP run.
"""
intrans = {}
with open(f"{path_dir}/boltztrap.intrans") as file:
Expand Down

0 comments on commit 44b8c6e

Please sign in to comment.