Giter Club home page Giter Club logo

effmass's Introduction

Effmass

PyPI version Documentation Status Tests Status Test Coverage DOI License: MIT JOSS status OpenSSF Best Practices fair-software.eu

πŸ’ƒ 31/5/23: Effmass-2.3.1 has been released!!
πŸ’ƒ Effmass now has more options for locating extrema of a particular type: by direction or band type (conduction/valence/frontier).
⚠️ The Data class was renamed DataVasp in effmass versions 2.0.0+. You may need to update your scripts!

effmass is a peer-reviewed Python (3.6+) package for calculating various definitions of effective mass from the electronic bandstructure of a semiconducting material. It consists of a core Segment class that calculates the effective mass and other associated properties of selected bandstructure segments. The programme also contains functions for locating bandstructure extrema, constructing segments and plotting approximations to the dispersion. There is a command line interface for calculating parabolic effective mass values, and an API for the more complex, non-parabolic definitions of effective mass.

If you use effmass for your published research please cite accordingly.

What's new?

πŸ’ƒ effmass now has more options for locating extrema of a particular type: by direction or band type (conduction/valence/frontier). There are updated usage examples in the tutorial.

πŸ’ƒ effmass now interfaces with more codes:

  • it can read in Castep output data (in addition to Vasp and FHI-aims)
  • it can work with ASE bandstructure objects
  • it can work with Octopus output files

πŸ’ƒ effmass now includes a command line interface

As a result of these changes, and with view to supporting more DFT codes in the future, the Data class has been renamed to DataVasp ⚠️ On updating to the latest version of effmass you may need to update your scripts / Jupyter Notebook to reflect this change ⚠️

Features

effmass can:

Read in a bandstructure: It is assumed you have used a DFT calculator to walk through a 1D slice of the Brillouin Zone, capturing the maxima and minima of interest. effmass uses the Python package vasppy for parsing VASP output.

Locate extrema: These correspond to the valence band maxima and conduction band minima. Maxima and minima within a certain energy range can also be located.

Calculate curvature, transport and optical effective masses: The curvature (aka inertial) and transport masses are calculated using the derivatives of a fitted polynomial function. The optical effective mass can also be calculated assuming a Kane dispersion.

Assess the extent of non-parabolicity: Parameters of the Kane quasi-linear dispersion are calculated to quantify the extent of non-parabolicity over a given energy range.

Calculate the quasi-fermi level for a given carrier concentration: Using density-of-states data and assuming no thermal smearing, effmass can calculate the energy to which states are occupied. This is a useful approximation to the quasi-Fermi level. Note: this is only supported for VASP and requires the output file DOSCAR.

Plot fits to the dispersion: Selected bandstructure segments and approximations to the dispersion (assuming a Kane, quadratic, or higher order fit) can be visualised.

Depending on the functionality and level of approximation you are looking for, it may be that one of the packages listed here will suit your needs better.

Supported Codes

effmass currently supports VASP, FHI-Aims, Castep, ASE, and Octopus. In the near future we hope to play nicely with other codes that interface with the ASE bandstructure class, and pymatgen. We especially welcome contributions that will help make effmass available to more researchers.

Other effective mass codes

There are other codes that can calculate effective mass. The best effective mass code depends on your use case.

  • You may find Sumo bandstats easier to use if you are looking for a basic parabolic fit.
  • Amset can be used to calculate the effective mass across the whole Brillouin Zone (useful if your CBM/VBM is not at a high symmetry point, for example). Further details can be found on MatSci discussion forum here

You may find that someone else has already calculated the effective mass you need - there are 10,000's DFT-calculated effective mass values on MPContribs here.

Installation

effmass can be installed using the Python package manager pip:

pip install effmass

If you use conda/anaconda, the safest thing to do is to create a new environment and then install effmass:

conda create -n effmass python
conda activate effmass
pip install effmass

If you wish, you can install the very latest version of effmass from GitHub with the commands below. Note: The latest GitHub version may include more features and data format support that the latest release, but it is not a stable release, so may have more issues than usual. If you are unsure, use one of the above install methods instead.

git clone https://github.com/lucydot/effmass.git
cd effmass
pip install .

Command Line Interface

The command line interface provides basic functionality for calculating parabolic effective masses. For those who have a basic familiarity with Python there is an API which provides access to all features, including non-parabolic effective mass definitions.

To start the command line interface simply type

effmass

and follow the prompts. You are asked if you would like to print a plot of the segments found - we recommend that you do this, to check that the segments are "sensible". You are also asked if you would like to print a summary file - again, we recommend that you do this, so that you have a record of the CLI options chosen.

Documentation

  • An overview of the features of effmass, along with example code for Vasp and FHI-aims output data, is contained in a Jupyter notebook here.
  • Additional Jupyter notebook examples for the Castep and ASE interfaces are here.
  • The API documentation is here.
  • Further details about the various effective mass definitions implemented in effmass can be found in Phys. Rev. B 99 (8), 085207, which is also available on arXiv.
  • The source code is available as a git repository at https://github.com/lucydot/effmass.

Running notebook examples

If you want to run the jupyter notebook examples/tutorials you will also need to install notebook:

pip install notebook

To run the notebook, run the following command at the Terminal (Mac/Linux) or Command Prompt (Windows):

jupyter notebook

This will open a web browser tab, which you can use to navigate to the notebook examples.

Publications using effmass

A number of publications have used effmass.

effmass was initially developed for a project that has been published as Impact of nonparabolic electronic band structure on the optical and transport properties of photovoltaic materials Phys. Rev. B 99 (8), 085207. This paper is also avaiable on arXiv. The paper directory contains the Vasp input data (POSCAR), Vasp output data (OUTCAR/PROCAR) and band structures generated for this study.

Questions, bug reports, feature requests

Please use the Github issue tracker for any questions, feature requests or bug reports. Please do not contact the developers via email unless there is a specific reason you do not want the conversation to be public. If we do not respond within a reasonable timeframe, then please feel free to reach out to Lucy via email; Github notifications have a nasty habit of getting lost.

Development

If you would like to contribute please do so via a pull request. All contributors must read and respect the code of conduct. In particular, we welcome contributions which would extend effmass so that it is able to parse output from other electronic structure codes.

Version numbers

For versioning we are following the guidelines here. This allows automatic versioning according to the latest tag on Github.

Test PYPI

When testing a build on the test PYPI site it is important to point to the actual PYPI for the dependencies..its a GOTCHA... pip install -i https://pypi.org/pypi/ --extra-index-url https://test.pypi.org/simple effmass==2.3.4.dev3

Tests

Automated testing of the latest commit happens here.

You can also run tests locally:

pip install effmass[tests]
cd effmass
python -m pytest

Citing effmass

If you use this code in your research, please cite the following paper:

Whalley, Lucy D. (2018). effmass - an effective mass package. The Journal of Open Source Software, 3(28) 797. Link to paper here.

Bibtex

@misc{Whalley_JOSS2018,
  author       = {Lucy D. Whalley},
  title        = {effmass: An effective mass package},
  volume       = {3},
  issue        = {28},
  pages        = {797},
  month        = {Aug},
  year         = {2018},
  doi          = {10.21105/joss.00797},
  url          = {http://joss.theoj.org/papers/10.21105/joss.00797}
}

Contributors

Lead developer: Lucy Whalley, a.k.a lucydot

Contributors:
Eisuke Kawashima (tests), a.k.a e-kwsm //
Florian Knoop (bugs, tweaks and script improvements), a.k.a flokno //
William Taylor (auto-versioning and build system requirements), a.k.a musicmrman99 //
Austin Fatt (support for Ocotpus), a.k.a afatt //
Matthias Goloumb (Support for FHI-Aims), a.k.a MatthiasGolomb //
Katarina Brlec (Support for vasprun files) a.k.a brlec //
Sean Kavanagh (Documentation), a.k.a kavanase //
Benjamin Morgan (Vasppy compatability), a.k.a bjmorgan //

effmass's People

Contributors

afatt avatar bjmorgan avatar brlec avatar e-kwsm avatar flokno avatar kavanase avatar lucydot avatar matthiasgolomb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

effmass's Issues

Effmass interface with Pymatgen

Have Effmass interface with pymatgen. This should enable effmass to work with the various codes that pymatgen can parse (which doesn't include Castep, hence separate issue #24). I think this would fix issue #16 and #19 as pymatgen can work with vasprun.xml and Quantum-espresso (pwscf).

Update documentation

The documentation has a basic tutorial workflow. However there should be some FAQs added:

  • how to adjust the fermi level and update CBM/VBM (especially useful when there is no occupancy data)
  • how to specify a particular band/k-point when the one you want is automatically found

Also change structure of documentation so that inputs section is extended to cover various DFT calculators.

Broken link to notebook from docs

The link to the Jupyter example works on the README page, but fails from the homepage of the RTD manual (https://effmass.readthedocs.io/en/latest/). I'm not sure why, as the link in the actual README file looks fine?

My theories are

  • there is some strange markdown conversion going on, or
  • you fixed it already and the RTD build is stale.

Effmass command line interface

Create a CLI for the most basic (and probably commonly used) analysis: a parabolic effective mass for each maxima/minima within a certain energy range. Could print out: start point of segment, end point of segment, least squares effective mass, finite difference effective mass. One command for each calculator type: effmass-vasp, effmass-aims, effmass-castep. User would have to specify the filepath(s) only.

inconsistent segments

Hi,

I'm using effmass module to determine the effective masses of some layered materials. However, there is a problem that I could not find a solution yet. I'd appreciate your help and suggestions.

When I plot effective masses in different directions for different HfS2 bulk systems (optimized with different levels), efmass shows a segment that does not available in other plot. All band structure calculations were performed using FHI-aims with HSE06+SOC level. The first plot shows effmass plot for HSE06+SOC@PBE+D3 and the second one shows for HSE06+SOC@PBE+D4.
image
image
Because of that reason effective masses in directions [100] and [110] are incomparable. Thanks in advance

Extracting effective masses just for specific directions on VB and CB in a specific range on x-axis

Hi,

I like to ask you something. Even though efmass works nicely, I'd like to extract effective masses for specific directions on VB and CB in the path GMKG. Since I work with hundreds of band structures, checking all band structures manually is really time-consuming. I'd appreciate your suggestions. I am using band structures generated with FHI-aims.

For example, I'd like to extract effective masses at directions [100], [120], and [110] for VB and CB in the path GMKG like in the following plot

image

IndexError: list index out of range with FHI-aims

Dear Lucy,

I'm getting following error while using effmass for FHI-aims band structure calculation:

IndexError                                Traceback (most recent call last)
Input In [8], in <cell line: 1>()
----> 1 mos2_mos2_hhh = inputs.DataAims('hhh/')

File ~\anaconda3\lib\site-packages\effmass\inputs.py:688, in DataAims.__init__(self, directory_path, output_name)
    686 kpoints[int(kpoint_counter), 2] = float(words[3])
    687 for i in range(number_of_bands):
--> 688     energies[i, int(kpoint_counter)] = float(words[5 + 2 * i])
    689     occupancy[i, int(kpoint_counter)] = float(words[4 + 2 * i])
    690 kpoint_counter += 1

IndexError: list index out of range

I have tried the all the possible solutions mentioned in similar issues posted and installed effmass using all posible methods. However, nothing solved the problem.

You can find my input files attached to this post
hhh.zip

generate_segments docstring

The docstring for effmass.extrema.generate_segments seems to be outdated:

Generates a list of Segment objects.

Args:
    extrema_array (array(int)): A 2-dimensional array of size (number of extrema, 2). Each row corresponds to an extrema and contains [:attr:`~effmass.inputs.Data.bands` index, :attr:`~effmass.inputs.Data.kpoints` index]. See :func:`find_extrema_indices`.
    Settings (Settings): instance of the :class:`Settings` class.
    Data (Data): instance of the :class:`Data` class.
    truncate_dir_change (bool): If True, truncates eigenstates when there is a change in direction. If False, there is no truncation. Defaults to True.

Returns:
    list(Segments): A list of :class:`Segment` objects.

There is no extrema_array argument?

Error loading a spin-polarised calculation

I ran an LDA band structure for MgO. With no spin enabled it reads in ok, but when I set ISPIN=2 and recalculated the band structure effmass seems to have trouble reading the files.

Are spin-polarized calculations supported? I see that effmass.inputs.Data has an attribute for the number of spin channels, but I get an error while the object is being instantiated.

spin_test.zip

Improve label placement in output plots

The label placements in the bandstructure plots are ugly. In some cases they obscure the axes.
It would be nice to find a more attractive and sensible way to label each Segment.
Marked as a good first issue as it is a quite self-contained task. A good one for someone with Python knowledge, but not no domain-specific computational chemistry knowledge.

Compatability with BandUP

(From Issue #27, @cai-xiaomeng)

Hi!

Does Effmass support supercell band data (band folding) processing?

I already do the band unfolding of supercell by using BandUp program, now how to use Effmass to deal with the unfolded band structure data?

Inputs doesnt read VASP OUTCAR PROCAR

Hi

I am trying to follow your jupyter demo and gave this input:

from effmass import inputs, analysis, extrema, outputs, dos, ev_to_hartree
settings = inputs.Settings(extrema_search_depth=0.075, energy_range=0.25)
data = inputs.Data(r"C:\Users\gr426\PycharmProjects\effmass\OUTCAR",r"C:\Users\gr426\PycharmProjects\effmass\PROCAR", ignore=216)

but got this error:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Users\gr426\AppData\Roaming\Python\Python37\site-packages\effmass\inputs.py", line 115, in __init__
    energies[i] = vasp_data.bands[:, 1:].reshape(
TypeError: list indices must be integers or slices, not tuple

The OUTCAR and PROCAR files were taken from effmass/tests/data Ge_SP_OUTCAR and Ge_SP_PROCAR.

Are there working sample files that I can try? Please advise.

Refactor the `extrema` module

The extrema module is feeling pretty clunky!

An improvement might be to create a new Bandstructure class within extrema.py, with each of the functions in the module mapped to Bandstructure methods. Might also rename extrema.py to bandstructure.py.

command line interface

Hey, Lucy. Thank you for this great instrument. Today I was trying to run it via command line. I have performed installation using pip install effmass but when I try to run it I got "effmass" is not recognized as an internal or external command.
Maybe problem on my side, but other stuff seems to work fine.

How to select segments

Hi Lucy,
I have a problem when using your code for my DFT analysis. I can't select a certain segment when I prefer to calculate effective mass along some certain directions in K-paths. I have tried to change the value of "extrema_search_depth" and "energy_range", but it doesn't work. It would be so great if you can give me some advices. Thanks very much.

Sincerely,

Wuliji

Effective masses undetectable in a command line?

In my use of effmass in a command line, the detection of effective masses in an electronic band structure sometimes fails.

My purpose in the use of effmass is the quick evalution of effective masses in various insulators.
Below is an example of my calculation and analysis.
ο½₯ DFT code: VASP
ο½₯ chemical composition: BaO2
ο½₯ space group: _I_4/mmm
ο½₯ cell: primitive unit cell (fully relaxed before the evaluation of a band structure)
ο½₯ k points to evaluate band structures : created by the SeeK-path program in vise, which has been developed by Y. Kumagai.
ο½₯ how to use effmass: command line

As an important supplement, regardless of the type of XC potential (GGA or HF/DFT hybrid), band structures in my calculations have been obtained through SCF calculations with explicit lists of k points.

This is a band structure of BaO2, which was drawn by vise.
Its VBM and CBM are on the M points.
The names of high-symmetry k points in this band structure are defined in SeeK-path.
band_BaO2_PBEsol.pdf

Two cases of k-point distance (k-point density) in zero-weighed k points were tested.
k-point distance is controlled by vise.
Case 1) rougher k points
As shown in a png file and a txt file, six hole effective masses along the M-to-gamma and M-to-S directions, and three electron effective masses along the same directions were detected.
RougherKpoints.zip

Case 2) finer k points
Unlike in Case 1, hole/electron effective masses along the M-to-S direction were NOT detected.
In the case of even finer k points, the detection of effective masses still failed.
To improve the reliability of effective mass, I would like to use the finest possible k-point distance.
FinerKpoints.zip

What could be the source of this difference?
Could you please provide any methods to improve the accuracy of detection?

Handling negative occupancy

effmass should give a warning when there are negative occupancies generated from using the tetrahedron or MP-smearing scheme in vasp. See this PR.

Publications list

There should be a publications list page which lists the publications that have used Effmass (3 listed on Google Scholar, + one from Matthias that has not been picked up as a citation for some reason)

`python setup.py` test fails

python setup.py test fails with:

    (pytest.lazy_fixture('MAPI_settings_object'), 0.025, 0.25),
AttributeError: module 'pytest' has no attribute 'lazy_fixture'

Tests are working correctly with python -m pytest as recommended by the README, but this might trip people up.

FHI-AIMS: ValueError

Hello. Running effmass with FHI-AIMS (version 200112.2) outputs is giving me the following error:

Traceback (most recent call last):
File "/usr/bin/effmass", line 8, in
sys.exit(cli())
File "/home/esteve/.local/lib/python3.6/site-packages/effmass/cli.py", line 83, in cli
data = inputs.DataAims(pathname)
File "/home/esteve/.local/lib/python3.6/site-packages/effmass/inputs.py", line 541, in init
self.CBM = extrema._calc_CBM(occupancy, energies)
File "/home/esteve/.local/lib/python3.6/site-packages/effmass/extrema.py", line 46, in _calc_CBM
return np.amin(energy_unoccupied)
File "<array_function internals>", line 6, in amin
File "/usr/lib64/python3.6/site-packages/numpy/core/fromnumeric.py", line 2831, in amin
keepdims=keepdims, initial=initial, where=where)
File "/usr/lib64/python3.6/site-packages/numpy/core/fromnumeric.py", line 85, in _wrapreduction
return reduction(axis=axis, out=out, **passkwargs)
File "/usr/lib64/python3.6/site-packages/numpy/ma/core.py", line 5701, in min
axis=axis, out=out, **kwargs).view(type(self))
File "/usr/lib64/python3.6/site-packages/numpy/core/_methods.py", line 43, in _amin
return umr_minimum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation minimum which has no identity

Could you tell me how to solve this problem, please?

Thank you in advance.

Sort out dependencies

Anyone who installs effmass automatically installs the dependencies for development (in particular, pytest for testing). I should fix this so that these are only installed if requested.

AssertionError

Hi

I am getting the following error. And what will be the command prompt if I want to select specific band index and k-point index?

Welcome to effmass 2.0.0 🎈
? Which DFT code have you used to generate the bandstructure? Vasp
? What's the path to your Vasp output files? ./../band_gaino/
? How many k-points should I ignore at the start of the file? (useful for hybrid calculations) 0
? How far (in eV) from the CBM (VBM) would you like me to search for minima (maxima)? 0.05
? What would you like the energy range (in eV) of each segment to be? 0.5
? Which values would you like me to calculate? done (2 selections)
? Would you like me to save a plot of the band segments? Yes
? Would you like me to save a summary file? Yes
Reading in data...
Traceback (most recent call last):
File "/anaconda3/bin/effmass", line 33, in
sys.exit(load_entry_point('effmass==2.1.0', 'console_scripts', 'effmass')())
File "/anaconda3/lib/python3.7/site-packages/effmass-2.1.0-py3.7.egg/effmass/cli.py", line 86, in cli
File "/anaconda3/lib/python3.7/site-packages/effmass-2.1.0-py3.7.egg/effmass/inputs.py", line 346, in init
File "/anaconda3/lib/python3.7/site-packages/vasppy-0.7.1.0-py3.7.egg/vasppy/procar.py", line 300, in from_file
pcar._read_from_file( filename=filename )
File "/anaconda3/lib/python3.7/site-packages/vasppy-0.7.1.0-py3.7.egg/vasppy/procar.py", line 326, in _read_from_file
self.parse_projections()
File "/anaconda3/lib/python3.7/site-packages/vasppy-0.7.1.0-py3.7.egg/vasppy/procar.py", line 227, in parse_projections
assert( self._number_of_bands * self._number_of_k_points == len( self.projection_data ) )
AssertionError

Question / potential feature request: obtain band structure from vasprun.xml instead of PROCAR

Perhaps this is a stupid question (sorry if it is), but is it really required to have a PROCAR file (only obtained if one runs VASP with LORBIT = 11) to obtain the full band structure? pymatgen is able to parse it from vasprun.xml without the user having to run VASP with any additional parameters, and since effmass depends on pymatgen anyway, it would be great (IMHO) if that was provided as an alternative option for how to obtain it.

Or is there some advantage to PROCAR that I'm not seeing?

Reword documentation

Function docstring for analysis._fermi_function() could be improved: at the moment it is not clear if the probability refers to the probability of the valence band being occupied by an electron or a hole.

bk option in effective mass

Dear Lucy,

Thank you for this nice code.

As reported by several other users I am also having issue where effmass does not locate correct CBM. I was playing with the bk options in effmass.extrema.generate_segments but unforunately I can.t get it working.

Below is how i am calling it. I am interested in effective mass of band #20, and K-point 40

segments = extrema.generate_segments(settings, data, bk=[20,40])

But this give me error:

379 kpoints_list = []
380 band_list = []
--> 381 for band, kpoint in extrema_array: # flatten CB and VB arrays to a single array
382 kpoints_before = get_kpoints_before(
383 band,

TypeError: cannot unpack non-iterable int object

i am not sure how to resolve this. it will be very helpful if you could provide a working example with "bk" option.

Many thanks,
alex

Partial occupancy problems

The code seems to be quite sensitive to partial occupancies. My first attempt with a poorly-converged calculation raised some vasppy errors; I think it didn't like occupancy "-0.0000" but didn't quite get to the bottom of it. A healthier calculation with some slight partial occupancy is giving me:

partial occupancy, particle type unknown. Please set Segment.ptype manually.
cannot determine bandedge energy as particle type unknown. Please set Segment.ptype.

How is a user meant to proceed from there? The docstring for a Segment gives

ptype (str): The quasi particle type, determined by occupancy of the eigenstate.

but there isn't a list of valid values.

It would be nice to either have some guidance for this case or a big warning that partial occupancies are not tolerated. It can be hard to avoid them, though.

Fix Link

Fix Link to effective mass PRB paper in documentation.

how to efficiently select the input parameters for the targeted bands

Dear Lucy,

I hope this message finds you well.

I have a small question while I am using effmass. Please see the attached files.
I actually would like to estimate the effective mass for the band of VBM and CBM. A case is attached for Cs2AgBiBr6, which has the indirect band gap nature. I feel it is a bit difficult for me to get the suitable input parameters for my interested bands.

Please see the figure named "0_0.7_0.5.png", which is corresponding to the input below:
How many k-points should I ignore at the start of the file? (useful for hybrid calculations) [0]
How far (in eV) from the CBM (VBM) would you like me to search for minima (maxima)? 0.7
What would you like the energy range (in eV) of each segment to be? 0.5

The figure named "0_1_0.5.png" is corresponding to:
How many k-points should I ignore at the start of the file? (useful for hybrid calculations) 0
How far (in eV) from the CBM (VBM) would you like me to search for minima (maxima)? 1
What would you like the energy range (in eV) of each segment to be? 0.5

I played quite a lot of combinations about those parameters not just the two cased I showed you. It seems effmass is always trying to avoid the VBM without considering its effective mass. Do you have some suggestions how we can select the input parameters for the targeted bands? I am generally interested in the VBM and CBM region.

Many thanks for your time and looking forward to hearing from you.

Cs2AgBiBr6.zip

Best regards,
Haiyuan Wang.

partial occupancies error

Hi Lucy,
I am currently using your code effmass for my research and have faced an error which I haven't been able to solve. I am not very versed with using python so pardon me for stupid questions.
So actually the error comes as "You have partial occupancy numbers in Data.occupancy ....... You should check that the attributes Data.VBM, Data.CBM and Data.fermi_energy are correct, and if not, set them manually"
I am using your jupyter notebook example. I can't really figure out where or how I can set them manually.
It would be great if you could give me any suggestion regarding this

Assertion Error

Hi Lucy
I am getting this error. The calculation is HSE and the fermi level is inside the conduction band, but there is a gap before the same.
Can you tell me how to solve this?
I have used both the command line interface as well as your example notebook format. This error comes when I try to load the PROCAR and OUTCAR file. I have used pip for installation.
Reading in data...
Traceback (most recent call last):
File "/home/suman/.local/bin/effmass", line 8, in
sys.exit(cli())
File "/home/suman/.local/lib/python3.8/site-packages/effmass/cli.py", line 87, in cli
data = inputs.DataVasp(pathname+"/OUTCAR",pathname+"/PROCAR", ignore=int(ignore))
File "/home/suman/.local/lib/python3.8/site-packages/effmass/inputs.py", line 402, in init
self.check_data(self.spin_channels, self.number_of_kpoints, self.number_of_bands,
File "/home/suman/.local/lib/python3.8/site-packages/effmass/inputs.py", line 137, in check_data
assert (CBM >
AssertionError: The CBM energy is lower than than the VBM energy

Segment selection

Hi,
I'm using effmass with FHI-AIMS inputs/outputs and I would like to extract the effective mass for specific segments.
I am aware there is an option called "extrema.generate_segments" that performs that task.
However, I'm struggling with this since I don't know how to use the argument "bk" properly.
Could you, please, provide some examples using the "extrema.generate_segments" option with the bk argument?

Best regards,
MarΓ­a

info file output by Octopus

Hello @afatt,

I am trying to calculate the effective mass from the Octopus output.
However, when I tried to use the outputs obtained from the Octopus tutorial, I obtained the following error.

File "/<path>/octopuspy/info.py", line 74, in get_lattice_vectors
    index = self._info.index(match)
            ^^^^^^^^^^^^^^^^^^^^^^^
ValueError: '  Lattice Vectors [A]' is not in list

I checked with less and indeed did not find "Lattice Vectors [A]" in the info file.
("UnitsOutput = eV_Angstrom" was added to inp and we have confirmed that Lattice Vectors [A] is output to standard output.)

I would like to compare the input files, so could you please show me the inp when you get the tests/data_octopus.
Or could you tell me how to get "Lattice Vectors [A]" to show up in info?

Sincerely,

TS

Feature request: Printable representation of Segment

It would be nice if Segment objects had a standard printable representation, such as 2.3 eV [0 0 0] -> [1 0 1]. This can can be implemented by providing a __str__ method. It would make it easier to keep track of them and work with them interactively. The method implied in the tutorial is to repeatedly call plot_segments until you're sure you have the index of the one you want.

SciPy is not imported, leading to errors in printing results

effmass/analysis.py imports integrate by name, however the mass_integration function uses the qualified scipy.integrate.quad. This leads to an error in line outputs.print_results(segments[-1], data, settings), which fails with the following traceback:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-26-204cc925e032> in <module>()
----> 1 outputs.print_results(segments[-1], data, settings)

~/Projects/joss-reviews/effmass/effmass/outputs.py in print_results(segment, data, settings, polyfit_order)
    136                   polyfit_order=polyfit_order)]))
    137     print("optical mass at band edge (assuming the Kane dispersion) is {:.2f}".
--> 138           format(segment.optical_effmass_kane_dispersion()))
    139 
    140     plt.figure(figsize=(8, 8))

~/Projects/joss-reviews/effmass/effmass/analysis.py in optical_effmass_kane_dispersion(self, fermi_level, temp, alpha, mass_bandedge, upper_limit)
    488             alpha=alpha,
    489             mass_bandedge=mass_bandedge,
--> 490             upper_limit=upper_limit)
    491         bottom = self.weight_integration(
    492             fermi_level=fermi_level,

~/Projects/joss-reviews/effmass/effmass/analysis.py in mass_integration(self, fermi_level, temp, alpha, mass_bandedge, upper_limit)
    334         fermi_level = self.fermi_energy if fermi_level is None else fermi_level
    335 
--> 336         result = scipy.integrate.quad(
    337             self._mass_integrand,
    338             0,

NameError: name 'scipy' is not defined

Fixing scipy.integrate.quad -> integrate.quad should fix this.

I also suggest writing a test for this code path.

(Part of openjournals/joss-reviews#797)

FHI-aims: IndexError: list index out of range

Running effmass for FHI-aims output gives me following error:

Traceback (most recent call last):
  File "/home/-----/.conda/envs/ase-env/bin/effmass", line 8, in <module>
    sys.exit(cli())
  File "/home/-----/.conda/envs/ase-env/lib/python3.6/site-packages/effmass/cli.py", line 83, in cli
    data = inputs.DataAims(pathname)
  File "/home/-----/.conda/envs/ase-env/lib/python3.6/site-packages/effmass/inputs.py", line 475, in __init__
    path_list.append(int(words[8]))
IndexError: list index out of range

How can I solve this problem?

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.