fermisurfaces / ifermi Goto Github PK
View Code? Open in Web Editor NEWFermi surface generation, analysis and visualisation.
Home Page: https://fermisurfaces.github.io/IFermi/
License: MIT License
Fermi surface generation, analysis and visualisation.
Home Page: https://fermisurfaces.github.io/IFermi/
License: MIT License
I am sorry if this is not the place but I can not create a new account at the support forum:
New registrations are not allowed from your IP address (maximum limit reached). Contact a staff member.
I need to ask something about the surface smoothing and increasing number of faces in the surface. My objective is to smooth the surface at the plot without open3d.
I cant get the surface smooth and decimator_method to work. whatever values I use for thee options the results are allways the same.
at some point I got a warning for 'decimation need open3d' but after installing this requirement I get planar surfaces as shown in the figure 'with open3d', instead of expected result. I would appreciate a clue about to where to start debugging.
RE: openjournals/joss-reviews#3089
Describe the bug
When I use ifermi plot
, I receive the following error message:
Start : This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:1
+ Start "file:///home/arosen/ifermi/fermi-surface.html"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
To Reproduce
ifermi plot
on an example vasprun.xml
(e.g. vasprun.zip).Expected behavior
A plot. There is no plot.
Hypothesis
Again, perhaps this is a Windows thing. I am running IFermi on the Ubuntu subsystem for Windows since two of my common Linux workstation had issues with the installation (see #17).
efermi changes from the efermi in vasprun.xml after interpolation.
Just an FYI, it's currently pointed to https://github.com/asearle13/IFermi
Describe the bug
When plotting a specific band index that has multiple disconnected surfaces, some surfaces are plotted as different colors. This happens in both matplotlib and plotly (I do not have the other libraries configured to test).
To Reproduce
Here is a minimal set of code to reproduce this. Please replace MGB2_PATH with a path to the example MgB2 vasprun.xml:
from pymatgen.io.vasp.outputs import Vasprun
from ifermi.interpolate import FourierInterpolator
from ifermi.surface import FermiSurface
from ifermi.plot import FermiSurfacePlotter
from pymatgen.electronic_structure.core import Spin
vr=Vasprun('MGB2_PATH/vasprun.xml')
bs = vr.get_band_structure()
interpolator = FourierInterpolator(bs)
dense_bs = interpolator.interpolate_bands(interpolation_factor=5)
dense_kpoints = kpoints_from_bandstructure(dense_bs)
fs = FermiSurface.from_band_structure(dense_bs, wigner_seitz=True)
plotter = FermiSurfacePlotter(fs)
plot = plotter.get_plot(plot_type="plotly", plot_index={Spin.up: 6})
plot.show()
Expected behavior
You should see one band (with multiple components) plotted with different colors. Perhaps this is an intended behavior, but it does not happen when no plot_index is specified. In another case with a different material where one band had many small pockets, the pockets on the boundary of the 1BZ in one octant were all multicolored, but the rest of the pockets were the same color.
RE: openjournals/joss-reviews#3089
Describe the bug
Running ifermi plot --reciprocal-cell
(as noted here) yields Error: no such option: --reciprocal-cell
. Indeed, ifermi plot -h
indicates it is not present in the list (nor is -r
). Is this supposed to be --no-wigner
?
Some meshes output from IFermi have a very large number of triangles due to the resolution of the input, even if the resulting surface is actually not that complicated. For long-term storage of Fermi surfaces or retrieval over a web API, it would be helpful to be able to reduce the sizes of the meshes.
I've had a look what's out there and it looks like it's a common feature request in trimesh
and is actively being worked on in sk-image
: scikit-image/scikit-image#4537
In the mean time, perhaps using the methods from vtk
would be suitable, see here and here.
I might take a look at implementing this myself if there was interest in including this, but I don't have a lot of vtk
experience so would have to see how IFermi
is using vtk
currently. I was imagining some sort of method on FermiSurface
like decimate_mesh(factor)
.
For example, readable errors should be printed if:
The Fermi surface nesting function
where
The bare static electron susceptibility (
where
These defintions can be referred to
Once the band structures at a dense k-grid is obtained by the FFT interpolation method, the above two properties of the Fermi surface can be calculated easily through the summation.
RE: openjournals/joss-reviews#3089
Describe the bug
Upon running ifermi plot
, it appears that an .html file is generated and an attempt is made to view the plot. I think it would be nice to have an optional flag to generate the plot but not show it. In my case, I'm SSH'd into a Linux machine without x-forwarding, and the code calls a web browser that I can't actually view and have to manually cancel out of every time I generate a plot via the command line interface.
as a follow up to yesterday question, I am trying to smooth a surface by increasing interpolation factor.
I am working with not so high number of kpoints, the interpolatied mesh has about 500k kpoints. However, the step of generating the fermi surface takes too long sometimes crashing the execution. I can see that the bottleneck is somewhere in the _calculate_band_isosruface method but cant tell exactly where, with only one cpu going to 100%. I guess the suspect for this must be the marching_cube method but I dont see a way to make it behave better.
For larger kpoints also this line gives problems, but I guess this is not so easy to evercome.
The reason for me on digging into this is that with old Xcrysden very good renders of the same isosurface can be acheved in almos no time. the disadvantage in that case is that I can not come with a solution to automate the generation of the surfaces and is too much mouse click dependent.
Once again, thank you so much for the support.
Trying to install IFermi, as described in Installation notes in documentation:
conda create --name ifermi pip cmake numpy
conda activate ifermi
conda install -c conda-forge pymatgen boltztrap2 pyfftw
pip install ifermi
(exactly on this step: conda install -c conda-forge pymatgen boltztrap2 pyfftw)
lead to
pyfftw -> numpy[version='>=1.18.5,<2.0a0'] -> numpy-base[version='1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.11.3|1.14.3|1.14.3|1.14.3|1.14.3|1.14.3|1.14.3|1.14.4|1.14.4|1.14.4|1.14.4|1.14.4|1.14.4|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.5|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.14.6|1.15.0|1.15.0|1.15.0|1.15.0|1.15.0|1.15.0|1.15.0|1.15.0|1.15.1|1.15.1|1.15.1|1.15.1|1.15.1|1.15.1|1.15.1|1.15.1|1.15.1|1.15.1|1.15.1|1.15.1|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.2|1.15.3|1.15.3|1.15.3|1.15.3|1.15.3|1.15.3|1.15.4|1.15.4|1.15.4|1.15.4|1.15.4|1.15.4|1.15.4|1.15.4|1.15.4|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.0|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.1|1.16.2|1.16.2|1.16.2|1.16.2|1.16.2|1.16.2|1.16.3|1.16.3|1.16.3|1.16.3|1.16.3|1.16.3|1.16.4|1.16.4|1.16.4|1.16.4|1.16.4|1.16.4|1.16.5|1.16.5|1.16.5|1.16.5|1.16.5|1.16.5|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.16.6|1.17.2.*|1.17.3.*|1.17.4.*|1.18.1.*|1.18.5.*|1.19.1|1.19.1|1.19.1|1.19.1|1.19.1|1.19.1|1.19.2|1.19.2|1.19.2|1.19.2|1.19.2|1.19.2|1.19.2|1.19.2|1.20.1|1.20.1|1.20.1|1.20.1|1.20.1|1.20.1|1.20.2|1.20.2|1.20.2|1.20.2|1.20.2|1.20.2|1.20.3|1.20.3|1.20.3|1.20.3|1.20.3|1.20.3|1.21.2|1.17.0|1.17.0|1.17.0|1.17.0|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|1.9.3|>=1.9.3,<2.0a0',build='py27h2b20989_6|py27hdbf6ddf_6|py36hdbf6ddf_6|py27hdbf6ddf_7|py37h2b20989_7|py27hdbf6ddf_7|py36hdbf6ddf_8|py36h2b20989_8|py37hdbf6ddf_8|py37h2b20989_8|py27h2b20989_8|py27hdbf6ddf_8|py35hdbf6ddf_8|py35h2b20989_8|py27h7cdd4dd_9|py37h3dfced4_9|py36h3dfced4_9|py36h81de0dd_9|py37h81de0dd_9|py27h74e8950_9|py37h74e8950_10|py35h74e8950_10|py36h74e8950_10|py27h81de0dd_10|py35h81de0dd_10|py37h2f8d375_10|py27h2f8d375_10|py37h2f8d375_11|py27h2f8d375_11|py36hde5b4d6_11|py27hde5b4d6_11|py37h2f8d375_12|py27h2f8d375_12|py36h2f8d375_12|py27hde5b4d6_12|py38hde5b4d6_12|py36h0ea5e3f_1|py36h9be14a7_1|py27h9be14a7_1|py35h9be14a7_1|py27h2b20989_0|py36h2b20989_0|py35h2b20989_0|py27hdbf6ddf_0|py36hdbf6ddf_0|py36h2b20989_0|py27h2b20989_0|py36hdbf6ddf_0|py27hdbf6ddf_0|py36h2b20989_1|py37h2b20989_1|py27hdbf6ddf_1|py37hdbf6ddf_1|py36h2b20989_2|py27hdbf6ddf_2|py37hdbf6ddf_2|py36hdbf6ddf_2|py37hdbf6ddf_3|py36hdbf6ddf_3|py27h2b20989_3|py27hdbf6ddf_3|py27hdbf6ddf_4|py37hdbf6ddf_4|py36h2b20989_4|py36hdbf6ddf_4|py35hdbf6ddf_4|py35h2b20989_4|py37h2f8d375_4|py27h2f8d375_4|py35h81de0dd_4|py38h2f8d375_4|py38hde5b4d6_4|py36h2f8d375_5|py27h2f8d375_5|py36hde5b4d6_5|py37h7cdd4dd_0|py35h7cdd4dd_0|py36h3dfced4_0|py35h3dfced4_0|py35h74e8950_0|py27h74e8950_0|py36h74e8950_0|py36h81de0dd_0|py35h81de0dd_0|py27h2f8d375_0|py37h2f8d375_0|py37h2f8d375_0|py27h2f8d375_0|py37h81de0dd_0|py27h81de0dd_0|py35h81de0dd_0|py35h2f8d375_0|py36h81de0dd_0|py36h2f8d375_1|py37h81de0dd_1|py37h2f8d375_1|py27h2f8d375_0|py37h2f8d375_0|py36h81de0dd_0|py27h2f8d375_0|py36h81de0dd_0|py27hde5b4d6_0|py27h2f8d375_0|py27hde5b4d6_0|py36h2f8d375_1|py37hde5b4d6_1|py36hde5b4d6_1|py27h2f8d375_0|py27hde5b4d6_0|py27h2f8d375_1|py37h2f8d375_1|py36h2f8d375_1|py37hde5b4d6_1|py27h2f8d375_0|py27hde5b4d6_0|py27h2f8d375_0|py27hde5b4d6_0|py36hde5b4d6_0|py27h2f8d375_0|py27hde5b4d6_0|py36hde5b4d6_0|py37h2f8d375_0|py27hde5b4d6_0|py36hde5b4d6_0|py36hde5b4d6_0|py38hde5b4d6_0|py27hde5b4d6_0|py39hfb011de_1|py39h76555f2_1|py39h41b4c56_3|py38h41b4c56_3|py37h41b4c56_3|py36hdc34a94_3|py38hdc34a94_3|py38h75fe3a5_0|py38hfa32c7d_0|py36hfa32c7d_0|py38h75fe3a5_0|py36hfa32c7d_0|py38hfa32c7d_0|py39h2ae0177_0|py39h34387ca_0|py38h7d8b39e_0|py38hfae3a4d_0|py37he2ba247_0|py39hfae3a4d_0|py37h74d4b33_0|py38h74d4b33_0|py38h39b7dee_0|py37h39b7dee_0|py38h79a1101_0|py39h2b8c604_0|py310h2b8c604_0|py310h79a1101_0|py38h2b8c604_0|py37h79a1101_0|py37h2b8c604_0|py39h79a1101_0|py39h39b7dee_0|py39h74d4b33_0|py37hfae3a4d_0|py39he2ba247_0|py38he2ba247_0|py39h7d8b39e_0|py38h34387ca_0|py37h7d8b39e_0|py37h34387ca_0|py39h0f7b65f_0|py36h75fe3a5_0|py37h75fe3a5_0|py37hfa32c7d_0|py37h75fe3a5_0|py36h75fe3a5_0|py37hfa32c7d_0|py37hdc34a94_3|py39hdc34a94_3|py36h41b4c56_3|py27h2f8d375_0|py38h2f8d375_0|py37hde5b4d6_0|py36h2f8d375_0|py37h2f8d375_0|py36hde5b4d6_0|py37hde5b4d6_0|py37h2f8d375_0|py36h2f8d375_0|py37hde5b4d6_0|py27h2f8d375_0|py36h2f8d375_0|py37hde5b4d6_0|py37h2f8d375_0|py36h2f8d375_0|py37hde5b4d6_0|py36h2f8d375_0|py37h2f8d375_0|py36hde5b4d6_0|py37hde5b4d6_0|py36h2f8d375_0|py37h2f8d375_0|py27hde5b4d6_1|py36hde5b4d6_1|py37hde5b4d6_0|py36hde5b4d6_0|py36h2f8d375_0|py37h2f8d375_0|py27hde5b4d6_1|py27h2f8d375_1|py37h2f8d375_1|py36hde5b4d6_0|py36h2f8d375_0|py37hde5b4d6_0|py37h2f8d375_0|py37hde5b4d6_0|py36hde5b4d6_0|py27h81de0dd_0|py37h81de0dd_0|py36h2f8d375_0|py37h2f8d375_0|py37h81de0dd_0|py27h81de0dd_0|py36h2f8d375_0|py36h81de0dd_1|py27h81de0dd_1|py27h2f8d375_1|py36h2f8d375_0|py36h2f8d375_0|py35h2f8d375_0|py37h81de0dd_0|py27h81de0dd_0|py37h74e8950_0|py37h3dfced4_0|py27h3dfced4_0|py36h7cdd4dd_0|py27h7cdd4dd_0|py37hde5b4d6_5|py27hde5b4d6_5|py37h2f8d375_5|py36h81de0dd_4|py37h81de0dd_4|py36h2f8d375_4|py27h81de0dd_4|py35h2f8d375_4|py37h2b20989_4|py27h2b20989_4|py37h2b20989_3|py36h2b20989_3|py37h2b20989_2|py27h2b20989_2|py27h2b20989_1|py36hdbf6ddf_1|py35hdbf6ddf_0|py35hdbf6ddf_0|py35h0ea5e3f_1|py27h0ea5e3f_1|py38h2f8d375_12|py36hde5b4d6_12|py37hde5b4d6_12|py37hde5b4d6_11|py36h2f8d375_11|py35h2f8d375_10|py36h2f8d375_10|py36h81de0dd_10|py37h81de0dd_10|py27h74e8950_10|py35h81de0dd_9|py27h81de0dd_9|py36h74e8950_9|py37h74e8950_9|py35h74e8950_9|py27h3dfced4_9|py35h3dfced4_9|py37h7cdd4dd_9|py35h7cdd4dd_9|py36h7cdd4dd_9|py37hdbf6ddf_7|py36hdbf6ddf_7|py36h2b20989_7|py27h2b20989_7|py37h2b20989_7|py37hdbf6ddf_7|py35h2b20989_7|py35hdbf6ddf_7|py36h2b20989_7|py36hdbf6ddf_7|py27h2b20989_7|py37hdbf6ddf_6|py37h2b20989_6|py36h2b20989_6']
Package gdbm conflicts for:
pyfftw -> pypy3.7[version='>=7.3.7'] -> gdbm[version='>=1.18,<1.19.0a0']
boltztrap2 -> pypy3.7[version='>=7.3.3'] -> gdbm[version='>=1.18,<1.19.0a0']
Package ca-certificates conflicts for:
python=3.10 -> openssl[version='>=3.0.0,<4.0a0'] -> ca-certificates
pyfftw -> python[version='>=2.7,<2.8.0a0'] -> ca-certificates
Package pypy3.7 conflicts for:
pyfftw -> pypy3.7[version='>=7.3.3|>=7.3.7']
pyfftw -> numpy[version='>=1.18.5,<2.0a0'] -> pypy3.7[version='7.3.*|7.3.3.*|7.3.4.*|7.3.5.*|7.3.7.*|>=7.3.4|>=7.3.5']
Package setuptools conflicts for:
boltztrap2 -> matplotlib-base -> setuptools
pymatgen -> cython -> setuptools[version='<60.0.0']
python=3.10 -> pip -> setuptools
Package wheel conflicts for:
python=3.10 -> pip -> wheel
pymatgen -> pip -> wheel
Package spglib conflicts for:
boltztrap2 -> spglib
pymatgen -> spglib[version='>=1.9.9.44']The following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.24=0
- feature:|@/linux-64::__glibc==2.24=0
- boltztrap2 -> libgcc-ng[version='>=9.3.0'] -> __glibc[version='>=2.17']
- pymatgen -> vtk[version='>=6.0.0'] -> __glibc[version='>=2.17|>=2.17,<3.0.a0']
- python=3.10 -> libgcc-ng[version='>=7.5.0'] -> __glibc[version='>=2.17']
Your installed version is: 2.24
The mu parameter in the FermiSurface. FromBandstructure should be converted to whatever units are used here:
https://github.com/ajsearle97/IFermi/blame/master/ifermi/interpolator.py#L95
because otherwise the fermi surface will not be located to the units of the input bandstructure. I didnt see a comment about this in the source code comments.
thank you for all the help!
Dear developers,
I am using ifermi and find it very useful. I am kind of interested in visualizing the 2d fermi slices in 3d because sometimes the 3d plotter requires too much memory and time.
I tried to plot the isoline and properties from the fermislice in 3d, then I found that the isoline segments are 2d segments on the x-y plane. Would it be possible to output the 3d isoline segments in the FermiSlice.from_fermi_surface
function?
An example would be like the following:
Best,
Dongsheng
Hi @ajsearle97
Just wondering if you can upload the latest version of your code on here? I'd like to plot a Fermi surface for the project I'm working on and it'd be great if I could use this code!
RE: openjournals/joss-reviews#3089
Perhaps you could include information for people who want to run the unit tests locally? Might be useful for those where the standard "pip install" doesn't work smoothly.
In the documentation you state that there is CI. If it's publically accessible through Travis-CI or similar then perhaps you could provide a link so that users can verify the latest version is working as expected.
Dear Developers,
Thank you for the code IFermi.
I cannot reproduce the BiSb example as reported in the documentation section.
There is an inconsistency in internal routine while interpolating the properties (velocities and spin) from band structure data. Please check and let me know if I get this incorrect.
Please Note:
ifermi plot --mu -0.85 -i 5 --slice 0 0 1 0 --property spin --hide-cell --hide-labels --projection-axis 0 1 0 --property-colormap RdBu
The error output is pasted over here. Please check. I am looking for your reply.
Screenshot of O/P
Thanks
Rahul Verma
Research Scholar
TIFR Mumbai
Describe the bug
RuntimeError: Undefined plan with nthreads. This is a bug
Exception ignored in: 'pyfftw.pyfftw._fftw_plan_with_nthreads_null'
Traceback (most recent call last):
File "/home/weitao/software/anaconda3/envs/ifermi/lib/python3.9/site-packages/pyfftw/builders/_utils.py", line 285, in _Xfftn
FFTW_object = pyfftw.FFTW(input_array, output_array, axes, direction,
RuntimeError: Undefined plan with nthreads. This is a bug
conda list
ifermi 0.3.1 pypi_0 pypi
conda 23.5.2
conda-list.txt
Expected behavior
A clear and concise description of what you expected to happen.
IFermi currently supports spglib
version 2.2.0. To take VASP-like input and put it into spglib, IFermi currently converts to an ASE Atoms
-like format, such as in the following code.
IFermi/src/ifermi/interpolate.py
Lines 128 to 131 in a681674
However, using ASE Atoms-like input for spglib is deprecated, and is completely absent in spglib 2.3.0.
At present, installing the latest version of spglib
causes IFermi to fail.
The current work-around is to downgrade spglib to 2.2.0 or less.
A fix would involve converting the structures to spglib cell format manually, before passing to spglib, rather than relying on ASEAtomsAdaptor
. A fix would be required before further upgrading spglib to 2.3.0 or greater.
RE: openjournals/joss-reviews#3089
In the main README, the example Python code crashes at isosurface.properties_norms
because the surface does not have face properties. I would suggest one of two options:
isosurface.properties_norms
and isosurface.scalar_projection((0, 0, 1)
to exclude the property mapping altogether orfrom pymatgen.io.vasp.outputs import Vasprun
from ifermi.surface import FermiSurface
from ifermi.interpolate import FourierInterpolator
from ifermi.plot import FermiSlicePlotter, FermiSurfacePlotter, save_plot, show_plot
from ifermi.kpoints import kpoints_from_bandstructure
# load VASP calculation outputs
vr = Vasprun("vasprun.xml")
bs = vr.get_band_structure()
# interpolate the energies onto a dense k-point mesh
interpolator = FourierInterpolator(bs)
dense_bs, velocities = interpolator.interpolate_bands(return_velocities=True)
dense_kpoints = kpoints_from_bandstructure(dense_bs)
# generate the Fermi surface and calculate the dimensionality
fs = FermiSurface.from_band_structure(
dense_bs, mu=0.0, wigner_seitz=True, calculate_dimensionality=True,
property_data=velocities, property_kpoints=dense_kpoints
)
# number of isosurfaces in the Fermi surface
fs.n_surfaces
# number of isosurfaces for each Spin channel
fs.n_surfaces_per_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
fs_plotter = FermiSurfacePlotter(fs)
plot = fs_plotter.get_plot()
# generate Fermi slice along the (0 0 1) plane going through the Γ-point.
fermi_slice = fs.get_fermi_slice((0, 0, 1))
# number of isolines in the slice
fermi_slice.n_lines
# do the lines have segment properties
fermi_slice.has_properties
# plot slice
slice_plotter = FermiSlicePlotter(fermi_slice)
plot = slice_plotter.get_plot()
save_plot(plot, "fermi-slice.png") # saves the plot to a file
show_plot(plot) # displays an interactive plot
RE: openjournals/joss-reviews#3089
I tried to install ifermi using my usual approach, which is within a new conda environment:
conda create --name ifermi
conda activate ifermi
conda install pip
pip install ifermi
This did not work as I think the combination of conda/pip meant that there were problems with the cmake
command needed to install the boltztrap2
and pyfftw
dependencies (full output attached).
So instead I did the following:
conda create --name ifermi
conda activate ifermi
conda install -c conda-forge boltztrap2==20.7.1
conda install -c conda-forge pyfftw==0.12.0
conda install pip
pip install ifermi
where I've pinned the conda-forge installs to the versions specified in requirements. iFermi installed without errors, though I haven't been able to run the tests (will raise a separate issue).
This isn't a bug as I installed within a conda environment, which is not what is specified in the documentation. And the problem of conda/pip not playing nicely is one that goes well beyond this project. But as a decent proportion of researchers seem to be using conda I thought I'd flag it up. The optimum solution would be to distribute a conda package (though then you'd need to think about whether the dependencies are available on conda also...), but documenting the above (maybe on the message board) would help others who use conda.
first of all, thank you for the hard work!
I have been using IFermi for hardworking the fermisurfaces on an high-throughoutput scheme. I have found a few ponts where the code could be improbed:
1: fermisurface_plotter.plotter does not return the plot objects.
2: the smooth algorith did not reurn a the desired surface , when the not smoothed algo actually did.
I modified a few lines of the code to try to fix this. Would you pleas consider the changes?:
master...mdforti:isosurfaceoffset
I dont have experience on big projects, so I probably should ask before sending the pull request.
Once again thank you for all the help I got from this code.
RE: openjournals/joss-reviews#3089
The documentation looks very thorough and useful. I noticed a couple of smaller things:
Hello,
One of the attractiveness of Ifermi that I like is its feature to provide the area of Fermi surface by "ifermi info".
I think, the area calculated in this feature is the surface area of the Fermi surface layer.
I wonder, if a feature exists/ can be added in IFermi that calculates the area/volume enclosed by the Fermi surface to the boundaries of the First Brillouin Zone. The feature will be useful to estimate the number of carriers as they are explained this example below from Alloul's Introduction to the Physics of Electrons in Solids textbook.
Thank you very much for your help and consideration.
Is there a way to view/display Fermi surface in repeated reciprocal unit cell? I have hexagonal Billion zone and have a very tiny iso-energy surface (tiny pocket) at H point (one of the corner of the BZ). Viewing it on one BZ does not show how the full pocket looks like. Was wondering if you have command lines or something I can change in my source files to achieve this.
Thank you and best regards
Perhaps matsci.org as a place?
I was trying to install Ifermi in the conda environment (ubuntu 22.04.4), but the step "pip install Ifermi" is giving these errors:
"error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "/home/matteo/anaconda3/envs/ifermi/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/matteo/anaconda3/envs/ifermi/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/matteo/anaconda3/envs/ifermi/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "/home/matteo/anaconda3/envs/ifermi/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/matteo/anaconda3/envs/ifermi/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/tmp/pip-build-env-i11hsye6/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
import setuptools.version
File "/tmp/pip-build-env-i11hsye6/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/tmp/pip-build-env-i11hsye6/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.