hackingmaterials / amset Goto Github PK
View Code? Open in Web Editor NEWElectronic transport properties from first-principles calculations
Home Page: https://hackingmaterials.lbl.gov/amset/
License: Other
Electronic transport properties from first-principles calculations
Home Page: https://hackingmaterials.lbl.gov/amset/
License: Other
The new version of numpy no longer supports the float and complex data types. When I use it, I get an error message and the following prompt: The program can run normally after changing np.float and np.complex to np.float64 and np.complex128 in the code.
`np.complex` was a deprecated alias for the builtin `complex`. To avoid this error in existing code, use `complex` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.complex128` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
np.float was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Dear Sir/Madam, Thanks for the AMSET...
I have following queries. Can you please answer my doubts...
Thanks in Advance...
Dependabot can't evaluate your Python dependency files.
As a result, Dependabot couldn't check whether any of your dependencies are out-of-date.
The error Dependabot encountered was:
InstallationError("Invalid requirement: 'interpolation=2.1.2' (from line 2 of /home/dependabot/dependabot-updater/dependabot_tmp_dir/requirements-optional.txt)\nHint: = is not a valid operator. Did you mean == ?")
Currently, the Amset
class is very monolithic, with the core.py
file running to almost 4,000 lines of code. To improve maintainability, I think it would be good to refactor out bits of the class into separate subclasses.
Initially, I think the plotting and io functions are ideal candidates for refactoring. We could do what pymatgen
and other packages do, and just have an AmsetPlotter
class that takes the Amset
class as an initialization parameter.
I tried GaAs example. I found that the experiment's intrinsic carrier concentration is just 1.7e6. But if I reduce the doping concentration to 1.7e6, the following error appears. Is the method not suitable for low doping content or semiconductors?
Traceback (most recent call last):
File "~/miniconda3/lib/python3.9/site-packages/amset/core/data.py", line 219, in
set_doping_and_temperatures
) = self.dos.get_fermi(
File "~/miniconda3/lib/python3.9/site-packages/amset/electronic_structure/dos.py", line 224, in get_fermi raise ValueError(
ValueError: Could not find fermi within 100.0% of
concentration=2.652506335351714e-19
Dependabot can't evaluate your Python dependency files.
As a result, Dependabot couldn't check whether any of your dependencies are out-of-date.
The error Dependabot encountered was:
InstallationError("Invalid requirement: 'pawpyseed=0.6.1' (from line 1 of /home/dependabot/dependabot-updater/dependabot_tmp_dir/requirements-optional.txt)\nHint: = is not a valid operator. Did you mean == ?")
Dear Sir,
1)Using the command amset phonon-frequency, two frequencies were obtained max. freq and eff. freq. Shall we use the use max. frequency instead of eff.frequency for AMSET calculations which matches with examples cases like GaAs and Si.
2) I understand that we can take the average of longitudinal elastic constants (C11 + C22 + C33) to determine the elastic constants. Please let us know whether full elastic tensor have been implemented in current version.
3) Is it fine to calculate properties with AMSET without wave-functions dump option. I have included LORBIT=11 in my calculation and use only the vasprun.xml.
Dependabot can't evaluate your Python dependency files.
As a result, Dependabot couldn't check whether any of your dependencies are out-of-date.
The error Dependabot encountered was:
InstallationError("Invalid requirement: 'interpolation=2.1.2' (from line 2 of /home/dependabot/dependabot-updater/dependabot_tmp_dir/requirements-optional.txt)\nHint: = is not a valid operator. Did you mean == ?")
Hi @utf , can you please replace the email address in README. That email of mine is no longer active (I am pretty sure the lab removed it after I left)
Great code, congrats!
This is a license question. amset is licensed under BSD (?) as per: https://github.com/hackingmaterials/amset/blob/master/LICENSE
However it uses GPLv3 licensed BoltzTrap (https://gitlab.com/sousaw/BoltzTraP2/blob/public/LICENSE.txt), for example in amset/amset/transport.py:
from BoltzTraP2.bandlib import fermiintegrals, calc_Onsager_coefficients, DOS, \
lambda_to_tau, BTPDOS
This makes the amset code also GPLv3. Can you please clarify and/or (hopefully) correct me if I'm wrong.
Currently, Amset requires a pymatgen Vasprun
object as an input parameter. As we only need the structural and eigenvalue properties from this object, we should transition to requiring a pymatgen BandStructure
object instead.
This will make Amset compatible with codes other than VASP.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
Dear developers!
I get the following error ValueError(f"Expected {n_expected} points but found {n_mapped}”
in amset deform read module after running amset deform read
command. I've tried different k-point sets as well as generation of deformations without using symmetry but nothing of this helped. It is interesting that the issue does not occur for another system for which I tried AMSET. I saw this thread regarding the issue but no solution was posted. Please fix this bug or let me know if I can try some different settings to overcome it. I can provide any additional information regarding my calculations, if necessary.
Best regards,
Anton
It would be nice to have a way to run AMSET from the command line.
This should be in the form of a script that takes a vasprun as input and optional arguments should as dielectric constants etc.
The script should write the model_params to a dict so that users can just reload them for future runs.
If an amsetrun.json is provided as input then amset should be loaded without being run.
Also is proprietary since 4/21/2022. It could be an optional dependency? See.
Dear Developer,
Thank you for this wonderful code.
After upgrading the amset to recent release (0.3.1) I get the following error in deformation potential extraction step (amset deform read). The older version worked fine for the same system.
Traceback (most recent call last):
File "/home/alex/.local/bin/amset", line 8, in
sys.exit(cli())
File "/home/alex/.local/lib/python3.6/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/home/alex/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/alex/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/alex/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/alex/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/alex/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/alex/.local/lib/python3.6/site-packages/amset/tools/deformation.py", line 188, in read
if "bands" in kwargs and kwargs["ibands"] is not None:
KeyError: 'ibands'
Any insights will be helpful.
One more on related noted: (This is not tested on recent version- as for me deform read step does not work)
When I try to extract deformation for a 2D materials- if I use say n x n x 1 k-grid, the "amset deform read" throws out an error. It only works if I use finite kpoints along z direction such as n x n x 2 k-grid. Not sure why there need to be finite k-mesh in all three directions.
Any thoughts on these will be helpful.
Best,
Alex kent
Any plans to add a fireworks workflow for running AMSET through atomate
?
Simon Mellaerts on MatSci.org asks:
Is there an easy way to obtain .dat/.txt files when using “amset plot xxx.json”, in addition to obtain the pdf/png file? In a similar way, as one can use the ‘–gnuplot’ tag in phonopy?
As a suggestion, from someone who was briefly confused: the documentation at https://github.com/hackingmaterials/amset/blob/main/docs/src/using.md has a call-out box containing this:
Obtaining best performance
To obtain the best performance, it is recommended to run
export OMP_NUM_THREADS=1
before running AMSET.
It wasn't clear to me whether this meant I would simply be running AMSET in serial by doing so until I searched the Discourse and found the nworkers
setting. I think it might be worth clarifying that there, possibly with something like:
Obtaining best performance
To obtain the best performance, it is recommended to run
export OMP_NUM_THREADS=1
before running AMSET.
Use thenworkers
setting in the settings file if you want to run AMSET using multiple cores.
Currently the dislocation directions defaults to the c lattice direction.
This should be controllable via an option.
I had an additional question for which I opened a new issue such that other new users can easily find the information needed.
I played a bit with the performance settings (energy_cutoff, fd_tol, dos_estep, symprec) and found quite some changes in the resulting mobility. Is it in general correct to minimize/maximize these values to increase the accuracy of the calculations or are there some inconsistencies for minimizing/maximizing these settings?
In addition is there some preference in minimizing/maximizing one of these settings?
Getting an odd error from pip install amset
on M1 MacBook Pro. Anyone seen this before?
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
mpy_e28db8833d8c4d28b325d122e2851bbe/numpy/_build_utils/src/apple_sgemv_fix.c
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
clang: error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=3 -DHAVE_CBLAS -Ibuild/src.macosx-12-arm64-3.10/numpy/core/src/umath -Ibuild/src.macosx-12-arm64-3.10/numpy/core/src/npymath -Ibuild/src.macosx-12-arm64-3.10/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-12-arm64-3.10/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/Users/janosh/.venv/py310/include -I/opt/homebrew/Cellar/[email protected]/3.10.2/Frameworks/Python.framework/Versions/3.10/include/python3.10 -Ibuild/src.macosx-12-arm64-3.10/numpy/core/src/common -Ibuild/src.macosx-12-arm64-3.10/numpy/core/src/npymath -c numpy/core/src/multiarray/alloc.c -o build/temp.macosx-12-arm64-3.10/numpy/core/src/multiarray/alloc.o -MMD -MF build/temp.macosx-12-arm64-3.10/numpy/core/src/multiarray/alloc.o.d -faltivec -I/System/Library/Frameworks/vecLib.framework/Headers" failed with exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install backend dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Dear,
To become familiar with AMSET, I tried to re-do the example of Si that is provided with the code, with the only difference that I did the band structure calculation myself. In the attached file you can find my VASP input file that I used, I performed a hybrid functional calculation with spin-orbit coupling taken into account. However, I obtain an error which I tried to trace back in the code but I was not able to find the issue. You can find my output of the amset run in the attached file. For the settings file I simply used the same file as of the Si example with only minor changes for the input values. I hope you can help me out. Thank you in advance for your help.
Kind regards,
Simon
Dear Developers,
In the PRB 2015 paper, the anisotropic dependence is averaged. I just wonder whether the new version of amset can be used to calculate anisotropic mobilities?Thank you!
Hao Zhang
The __main__
method of core.py
should be removed and possibly refactored into a script or integration test.
Use of the BoltztrapRunner without the SOC option means SOC won't work currently.
Get a basic version of the documentation up and running.
We can use sphinx-apidoc to automatically generate documentation for the api based on docstrings.
This should probably wait until after we have done some of the refactoring mentioned in #38.
Dear amset users,
How to fix the TypeError like below. Thank you!
[root@admin GaAs]# python GaAs.py
/public/software/anaconda3/lib/python3.6/site-packages/pymatgen/io/vasp/outputs.py:886: UserWarning: No POTCAR file with matching TITEL fields was found in /public/src/phys/amset/test_files/GaAs_mp-2534
" was found in {}".format(os.path.abspath(p)))
2019-06-05 19:23:24 INFO bs_is_isotropic: True
2019-06-05 19:23:24 DEBUG n-Ecut: 0.258519909 eV
2019-06-05 19:23:24 DEBUG p-Ecut: 0.17234660599999999 eV
Traceback (most recent call last):
File "GaAs.py", line 41, in
temperatures=[300, 600],
File "/public/software/anaconda3/lib/python3.6/site-packages/amset-0.1.0-py3.6.egg/amset/core.py", line 326, in from_vasprun
return Amset(band_structure, num_electrons, material_params, **kwargs)
File "/public/software/anaconda3/lib/python3.6/site-packages/amset-0.1.0-py3.6.egg/amset/core.py", line 263, in init
interpolation_type=interpolation)
File "/public/software/anaconda3/lib/python3.6/site-packages/amset-0.1.0-py3.6.egg/amset/interpolate/init.py", line 52, in get_interpolater
return BoltzTraP2Interpolater(band_structure, num_electrons)
File "/public/software/anaconda3/lib/python3.6/site-packages/amset-0.1.0-py3.6.egg/amset/interpolate/boltztrap2.py", line 40, in init
band_structure, num_electrons, **kwargs)
File "/public/software/anaconda3/lib/python3.6/site-packages/amset-0.1.0-py3.6.egg/amset/interpolate/base.py", line 47, in init
self.initialize()
File "/public/software/anaconda3/lib/python3.6/site-packages/amset-0.1.0-py3.6.egg/amset/interpolate/boltztrap2.py", line 53, in initialize
magmom=None)
TypeError: get_equivalences() got an unexpected keyword argument 'magmom'
Dear Developers,
According to the manual, the value of elastic_constant is obtained by averaging the direction-dependent elastic constant. Do you calculate this parameter by averaging the TOTAL_ELASTIC_MODULI generating by VASP when setting "IBRION=6"? If this value is calculated by averaging, how to obtain the anisotropic mobility?Thank you!
Hao Zhang
Please submit help issues to: https://matsci.org/c/amset
GitHub issues is no longer used except for development purposes.
Dear Developers,
Is amset suitable for 2D materials, in which vaccum is considered along the c-direction?
Dear Developers,
I have installed the new version of amset, but I met errors when running Si and GaAs examples. I have listed the error messages here. Could you please tell me how to fix this problem? Thank you!
Hao
------------------GaAs: It ran to the end, but error messages appeared.---------------
Timing and memory usage:
├── interpolation time: 98.3702 s
├── dos time: 14.5644 s
├── scattering time: 7.0594 s
├── transport time: 173.0009 s
├── writing time: 0.0019 s
├── total time: 293.1251 s
└── max memory: 6108.3 MB
amset exiting on 29 May 2020 at 07:57
ERROR: amset exiting on 29 May 2020 at 07:57
Traceback (most recent call last):
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/matplotlib/style/core.py", line 114, in use
rc = rc_params_from_file(style, use_default_template=False)
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/matplotlib/__init__.py", line 984, in rc_params_from_file
config_from_file = _rc_params_in_file(fname, fail_on_error)
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/matplotlib/__init__.py", line 914, in _rc_params_in_file
with _open_file_or_url(fname) as fd:
File "/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/cont
extlib.py", line 113, in __enter__
return next(self.gen)
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/matplotlib/__init__.py", line 900, in _open_file_or_url
with open(fname, encoding=encoding) as f:
FileNotFoundError: [Errno 2] No such file or directory:
'/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/amset/plot/amset_base.mplstyle'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "GaAs.py", line 32, in <module>
plt = plotter.get_plot()
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/sumo/plotting/__init__.py", line 60, in wrapper
matplotlib.pyplot.style.use(list_style)
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/matplotlib/style/core.py", line 117, in use
raise IOError(
OSError:
'/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/amset/plot/amset_base.mplstyle' not found in the style
library and input is not a valid URL or path; see `style.available`
for list of available styles
------------------------------Si: It failed at the step of calculating transport.----------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ TRANSPORT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Calculating conductivity, Seebeck, and electronic thermal
conductivity
ERROR: amset exiting on 29 May 2020 at 07:47
Traceback (most recent call last):
File "Si.py", line 28, in <module>
amset_data = runner.run()
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/amset/core/run.py", line 68, in run
mem_usage, (amset_data, usage_stats) = memory_usage(
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/memory_profiler.py", line 343, in memory_usage
returned = f(*args, **kw)
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/amset/core/run.py", line 123, in _run_wrapper
amset_data, transport_time = self._do_transport(amset_data)
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/amset/core/run.py", line 206, in _do_transport
transport_properties = solve_boltzman_transport_equation(
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/amset/core/transport.py", line 38, in
solve_boltzman_transport_equation
sigma, seebeck, kappa = _calculate_transport_properties(
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/amset/core/transport.py", line 189, in
_calculate_transport_properties
sigma[n, t], seebeck[n, t], kappa[n, t], _ =
calc_Onsager_coefficients(
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/BoltzTraP2/bandlib.py", line 492, in
calc_Onsager_coefficients
pL11 = np.linalg.pinv(L11[iT, imu])
File "<__array_function__ internals>", line 5, in pinv
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/numpy/linalg/linalg.py", line 1961, in pinv
u, s, vt = svd(a, full_matrices=False, hermitian=hermitian)
File "<__array_function__ internals>", line 5, in svd
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/numpy/linalg/linalg.py", line 1626, in svd
u, s, vh = gufunc(a, signature=signature, extobj=extobj)
File
"/public/home/hao/.conda/envs/my_pymatgen/lib/python3.8/site-
packages/numpy/linalg/linalg.py", line 106, in
_raise_linalgerror_svd_nonconvergence
raise LinAlgError("SVD did not converge")
numpy.linalg.LinAlgError: SVD did not converge
Dear developer,
I recently met an error when trying to calculate the relaxation time of SnS compound. I have attached my amset.log and my setting.yaml. It seems that error happens when the code is trying to calculate the band overlap. But I didn't use any tags related to SOC or spin polarization in my INCAR. Hope you can tell me where it goes wrong. Thank you very much!
Best,
Zhi
When we try to repeat the example of PbTe, the calculated low-frequency dielectric constant (epsilon_s) using vasp is 26 rather than the 44 value in the example. Besides, we want to know how to get the epsilon_inf and W_POP value. Thank you.
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.