IFermi

IFermi: A python library for Fermi surface generation and analysis - Published in JOSS (2021)

https://github.com/fermisurfaces/ifermi

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README and JOSS metadata
  • Academic publication links
  • Committers with academic emails
    2 of 15 committers (13.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

fermi-slice fermi-surface vasp

Keywords from Contributors

cryptocurrencies graph-generation workflows computational-chemistry materials-science mesh simulations energy-system

Scientific Fields

Sociology Social Sciences - 87% confidence
Mathematics Computer Science - 84% confidence
Last synced: 4 months ago · JSON representation

Repository

Fermi surface generation, analysis and visualisation.

Basic Info
Statistics
  • Stars: 95
  • Watchers: 8
  • Forks: 36
  • Open Issues: 16
  • Releases: 15
Topics
fermi-slice fermi-surface vasp
Created over 6 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License

README.md

IFermi logo


📖 Official Documentation 📖

🙋 Support Forum 🙋

📝 JOSS Paper 📝

IFermi is a Python (3.9+) library and set of command-line tools for the generation, analysis, and visualisation of Fermi surfaces and Fermi slices. The goal of the library is to provide fully featured FermiSurface and FermiSlice objects that allow for easy manipulation and analysis. The main features include:

  • Interpolation of electronic band structures onto dense k-point meshes.
  • Extraction of Fermi surfaces and Fermi slices from electronic band structures.
  • Projection of arbitrary properties onto Fermi surfaces and Fermi slices.
  • Tools to calculate Fermi surface dimensionality, orientation, and averaged projections, including Fermi velocities.
  • Interactive visualisation of Fermi surfaces and slices, with support for mayavi, plotly and matplotlib.
  • Generation and visualisation of spin-texture.

IFermi's command-line tools only work with VASP calculations but support for additional DFT packages will be added in the future.

Example Fermi surfaces

Quick start

The online documentation provides a full description of the available command-line options.

Analysis

Fermi surface properties, including dimensionality and orientation can be extracted from a vasprun.xml file using:

bash ifermi info --property velocity

```

Fermi Surface Summary

# surfaces: 5 Area: 32.75 Å⁻² Avg velocity: 9.131e+05 m/s

Isosurfaces ~~~~~~~~~~~

  Band    Area [Å⁻²]    Velocity avg [m/s]   Dimensionality    Orientation
------  ------------  --------------------  ----------------  -------------
     6         1.944             7.178e+05         2D           (0, 0, 1)
     7         4.370             9.092e+05      quasi-2D        (0, 0, 1)
     7         2.961             5.880e+05         2D           (0, 0, 1)
     8         3.549             1.105e+06      quasi-2D        (0, 0, 1)
     8         3.549             1.105e+06      quasi-2D        (0, 0, 1)

```

Visualisation

Three-dimensional Fermi surfaces can be visualized from a vasprun.xml file using:

bash ifermi plot

The two-dimensional slice of a Fermi surface along the plane specified by the miller indices (j k l) and distance d can be plotted from a vasprun.xml file using:

bash ifermi plot --slice j k l d

Python library

The ifermi command line tools are build on the IFermi Python library. Here is an example of how to load DFT calculation outputs, interpolate the energies onto a dense mesh, generate a Fermi surface, calculate Fermi surface properties, and visualise the surface. A more complete summary of the API is given in the API introduction page and in the API Reference page in the documentation.

```python from pymatgen.io.vasp.outputs import Vasprun from ifermi.surface import FermiSurface from ifermi.interpolate import FourierInterpolator from ifermi.plot import FermiSlicePlotter, FermiSurfacePlotter, saveplot, showplot from ifermi.kpoints import kpointsfrombandstructure

load VASP calculation outputs

vr = Vasprun("vasprun.xml") bs = vr.getbandstructure()

interpolate the energies onto a dense k-point mesh

interpolator = FourierInterpolator(bs) densebs, velocities = interpolator.interpolatebands(return_velocities=True)

generate the Fermi surface and calculate the dimensionality

fs = FermiSurface.frombandstructure( densebs, mu=0.0, wignerseitz=True, calculate_dimensionality=True )

generate the Fermi surface and calculate the group velocity at the

center of each triangular face

densekpoints = kpointsfrombandstructure(densebs) fs = FermiSurface.frombandstructure( densebs, mu=0.0, wignerseitz=True, calculatedimensionality=True, propertydata=velocities, propertykpoints=densekpoints )

number of isosurfaces in the Fermi surface

fs.n_surfaces

number of isosurfaces for each Spin channel

fs.nsurfacesper_spin

the total area of the Fermi surface

fs.area

the area of each isosurface

fs.area_surfaces

loop over all isosurfaces and check their properties

the isosurfaces are given as a list for each spin channel

for spin, isosurfaces in fs.isosurfaces.items(): for isosurface in isosurfaces: # the dimensionality (does the surface cross periodic boundaries) isosurface.dimensionality

    # what is the orientation
    isosurface.orientation

    # does the surface have face properties
    isosurface.has_properties

    # calculate the norms of the properties
    isosurface.properties_norms

    # calculate scalar projection of properties on to [0 0 1] vector
    isosurface.scalar_projection((0, 0, 1))

    # uniformly sample the surface faces to a consistent density
    isosurface.sample_uniform(0.1)

plot the Fermi surface

fsplotter = FermiSurfacePlotter(fs) plot = fsplotter.get_plot()

generate Fermi slice along the (0 0 1) plane going through the Γ-point.

fermislice = fs.getfermi_slice((0, 0, 1))

number of isolines in the slice

fermislice.nlines

do the lines have segment properties

fermislice.hasproperties

plot slice

sliceplotter = FermiSlicePlotter(fermislice) plot = sliceplotter.getplot()

saveplot(plot, "fermi-slice.png") # saves the plot to a file showplot(plot) # displays an interactive plot ```

Citing IFermi

If you find IFermi useful, please encourage its development by citing the following paper in your research output:

Ganose, A. M., Searle, A., Jain, A., Griffin, S. M., IFermi: A python library for Fermi surface generation and analysis. Journal of Open Source Software, 2021, 6 (59), 3089

Installation

The recommended way to install IFermi is in a conda environment.

bash conda create --name ifermi pip cmake numpy conda activate ifermi conda install -c conda-forge pymatgen boltztrap2 pyfftw pip install ifermi `

IFermi is currently compatible with Python 3.9+ and relies on a number of open-source python packages, specifically:

Running tests

The integration tests can be run to ensure IFermi has been installed correctly. First download the IFermi source and install the test requirements.

git clone https://github.com/fermisurfaces/IFermi.git cd IFermi pip install .[tests]

The tests can be run in the IFermi folder using:

bash pytest

Need Help?

Ask questions about the IFermi Python API and command-line tools on the IFermi support forum. If you've found an issue with IFermi, please submit a bug report here.

What’s new?

Track changes to IFermi through the changelog.

Contributing

We greatly appreciate any contributions in the form of a pull request. Additional information on contributing to IFermi can be found here. We maintain a list of all contributors here.

License

IFermi is made available under the MIT License (see LICENSE file).

Acknowledgements

Developed by Amy Searle and Alex Ganose. Sinéad Griffin designed and led the project.

Owner

  • Name: Fermi Surfaces
  • Login: fermisurfaces
  • Kind: organization

Software for the generation, analysis and visualisation of Fermi surfaces.

JOSS Publication

IFermi: A python library for Fermi surface generation and analysis
Published
March 17, 2021
Volume 6, Issue 59, Page 3089
Authors
Alex M. Ganose ORCID
Energy Technologies Area, Lawrence Berkeley National Laboratory, Berkeley, California 94720, USA
Amy Searle
Materials Science Division, Lawrence Berkeley National Laboratory, Berkeley, California 94720, USA, Molecular Foundry, Lawrence Berkeley National Laboratory, Berkeley, California 94720, USA, Clarendon Laboratory, Department of Physics, University of Oxford, OX1 3PU, UK
Anubhav Jain ORCID
Energy Technologies Area, Lawrence Berkeley National Laboratory, Berkeley, California 94720, USA
Sinéad M. Griffin ORCID
Materials Science Division, Lawrence Berkeley National Laboratory, Berkeley, California 94720, USA, Molecular Foundry, Lawrence Berkeley National Laboratory, Berkeley, California 94720, USA
Editor
Daniel S. Katz ORCID
Tags
electronic structure fermi surface spin texture materials science chemistry physics

GitHub Events

Total
  • Issues event: 5
  • Watch event: 7
  • Delete event: 30
  • Issue comment event: 11
  • Push event: 40
  • Pull request review event: 31
  • Pull request event: 69
  • Fork event: 4
  • Create event: 40
Last Year
  • Issues event: 5
  • Watch event: 7
  • Delete event: 30
  • Issue comment event: 11
  • Push event: 40
  • Pull request review event: 31
  • Pull request event: 69
  • Fork event: 4
  • Create event: 40

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 777
  • Total Committers: 15
  • Avg Commits per committer: 51.8
  • Development Distribution Score (DDS): 0.573
Past Year
  • Commits: 48
  • Committers: 2
  • Avg Commits per committer: 24.0
  • Development Distribution Score (DDS): 0.208
Top Committers
Name Email Commits
Alex Ganose a****e@g****m 332
dependabot[bot] 4****] 313
Amy Searle 4****7 39
ajsearle97 a****e@g****m 35
dependabot-preview[bot] 2****] 17
utf a****e@g****m 10
Matthew Horton m****n@g****m 9
Amy Jade Searle a****e@A****l 8
Paul Neves p****7@g****m 5
Amy a****e@b****u 3
Amy Jade Searle a****e@A****l 2
Patrick Huck p****k@l****v 1
Anubhav Jain a****r@g****m 1
Katherine Inzani k****i@K****l 1
Amy Jade Searle a****e@a****n 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 15
  • Total pull requests: 363
  • Average time to close issues: 6 months
  • Average time to close pull requests: 16 days
  • Total issue authors: 15
  • Total pull request authors: 5
  • Average comments per issue: 1.07
  • Average comments per pull request: 0.46
  • Merged pull requests: 221
  • Bot issues: 1
  • Bot pull requests: 356
Past Year
  • Issues: 6
  • Pull requests: 90
  • Average time to close issues: 2 days
  • Average time to close pull requests: 9 days
  • Issue authors: 6
  • Pull request authors: 1
  • Average comments per issue: 0.67
  • Average comments per pull request: 0.14
  • Merged pull requests: 54
  • Bot issues: 1
  • Bot pull requests: 90
Top Authors
Issue Authors
  • bfield1 (1)
  • paulneves77 (1)
  • Rahullmp (1)
  • alealv11 (1)
  • Dongsheng-Wen (1)
  • weotao (1)
  • utf (1)
  • krmtenzin (1)
  • KYZeng111 (1)
  • Lattay (1)
  • dependabot[bot] (1)
  • JaeMinHan24 (1)
  • houzf (1)
  • 230182 (1)
  • Moon121212 (1)
Pull Request Authors
  • dependabot[bot] (355)
  • utf (3)
  • paulneves77 (2)
  • tschaume (2)
  • dependabot-preview[bot] (1)
Top Labels
Issue Labels
dependencies (1)
Pull Request Labels
dependencies (356) python (15) fix (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 255 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 4
    (may contain duplicates)
  • Total versions: 19
  • Total maintainers: 2
pypi.org: ifermi

Fermi surface plotting tool from DFT output

  • Versions: 16
  • Dependent Packages: 1
  • Dependent Repositories: 4
  • Downloads: 255 Last month
Rankings
Dependent packages count: 4.7%
Dependent repos count: 7.5%
Average: 8.6%
Downloads: 13.4%
Maintainers (2)
Last synced: 4 months ago
conda-forge.org: ifermi

IFermi is a Python (3.6+) library and set of command-line tools for the generation, analysis, and visualisation of Fermi surfaces and Fermi slices. The goal of the library is to provide fully featured FermiSurface and FermiSlice objects that allow for easy manipulation and analysis.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 32.0%
Dependent repos count: 34.0%
Stargazers count: 37.3%
Average: 38.6%
Dependent packages count: 51.2%
Last synced: 4 months ago

Dependencies

.github/workflows/docs.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/deploy.yml actions
  • actions/checkout v3 composite
  • actions/create-release v1 composite
  • actions/setup-python v4 composite
  • peaceiris/actions-gh-pages v3 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/testing.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • fastify/github-action-merge-dependabot v3 composite
  • pre-commit/action v3.0.0 composite
pyproject.toml pypi
  • BoltzTraP2 *
  • click *
  • matplotlib *
  • meshcut *
  • monty *
  • networkx *
  • numpy *
  • plotly *
  • psutil *
  • pyfftw *
  • pymatgen >=2017.12.30
  • scikit-image *
  • scipy *
  • spglib *
  • tabulate *
  • trimesh *