phono3py 3.3.0__tar.gz → 3.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {phono3py-3.3.0 → phono3py-3.3.2}/CMakeLists.txt +55 -14
- {phono3py-3.3.0 → phono3py-3.3.2}/PKG-INFO +1 -1
- {phono3py-3.3.0 → phono3py-3.3.2}/c/_phono3py.cpp +0 -8
- phono3py-3.3.2/c/_recgrid.cpp +179 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/bzgrid.c +32 -89
- phono3py-3.3.2/c/bzgrid.h +44 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/collision_matrix.c +2 -2
- {phono3py-3.3.0 → phono3py-3.3.2}/c/dynmat.c +19 -45
- {phono3py-3.3.0 → phono3py-3.3.2}/c/dynmat.h +0 -5
- phono3py-3.3.0/c/phonoc_utils.c → phono3py-3.3.2/c/funcs.c +4 -4
- phono3py-3.3.0/c/phonoc_utils.h → phono3py-3.3.2/c/funcs.h +5 -5
- {phono3py-3.3.0 → phono3py-3.3.2}/c/gridsys.c +12 -8
- {phono3py-3.3.0 → phono3py-3.3.2}/c/gridsys.h +1 -1
- {phono3py-3.3.0 → phono3py-3.3.2}/c/imag_self_energy_with_g.c +3 -3
- {phono3py-3.3.0 → phono3py-3.3.2}/c/interaction.c +18 -7
- {phono3py-3.3.0 → phono3py-3.3.2}/c/interaction.h +8 -7
- {phono3py-3.3.0 → phono3py-3.3.2}/c/isotope.c +5 -5
- {phono3py-3.3.0 → phono3py-3.3.2}/c/phono3py.c +22 -136
- {phono3py-3.3.0 → phono3py-3.3.2}/c/pp_collision.c +22 -17
- {phono3py-3.3.0 → phono3py-3.3.2}/c/pp_collision.h +13 -11
- {phono3py-3.3.0 → phono3py-3.3.2}/c/real_self_energy.c +3 -3
- phono3py-3.3.2/c/recgrid.c +248 -0
- phono3py-3.3.2/c/recgrid.h +289 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/triplet.c +5 -5
- {phono3py-3.3.0 → phono3py-3.3.2}/c/triplet.h +5 -5
- {phono3py-3.3.0 → phono3py-3.3.2}/c/triplet_grid.c +71 -65
- {phono3py-3.3.0 → phono3py-3.3.2}/c/triplet_grid.h +1 -1
- {phono3py-3.3.0 → phono3py-3.3.2}/c/triplet_iw.c +20 -20
- {phono3py-3.3.0 → phono3py-3.3.2}/c/triplet_iw.h +5 -5
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/_version.py +2 -2
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/api_phono3py.py +55 -39
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/conductivity/direct_solution.py +6 -10
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/conductivity/rta.py +11 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/conductivity/utils.py +4 -4
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/create_force_constants.py +56 -29
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/load.py +39 -16
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/phono3py_script.py +3 -2
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/file_IO.py +1 -2
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon/grid.py +16 -16
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon/solver.py +2 -2
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/dataset.py +11 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/version.py +1 -1
- {phono3py-3.3.0 → phono3py-3.3.2}/test/conftest.py +16 -0
- phono3py-3.3.2/test/cui/test_phono3py_load.py +18 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/cui/test_phono3py_load_script.py +1 -1
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon/test_velocity_operator.py +1 -1
- phono3py-3.3.0/c/bzgrid.h +0 -103
- {phono3py-3.3.0 → phono3py-3.3.2}/LICENSE +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/_phono3py.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/_phononcalc.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/_phononcalc.cpp +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/collision_matrix.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/fc3.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/fc3.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/grgrid.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/grgrid.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/imag_self_energy_with_g.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/isotope.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/lagrid.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/lagrid.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/lapack_wrapper.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/lapack_wrapper.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/niggli.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/niggli.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/phono3py.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/phonoc_array.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/phonoc_const.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/phonon.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/phonon.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/phononcalc.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/phononcalc.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/real_self_energy.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/real_to_reciprocal.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/real_to_reciprocal.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/reciprocal_to_normal.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/reciprocal_to_normal.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/snf3x3.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/snf3x3.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/tetrahedron_method.c +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/c/tetrahedron_method.h +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/ctest/CMakeLists.txt +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/ctest/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/ctest/fortran/CMakeLists.txt +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/ctest/fortran/gridsysf/CMakeLists.txt +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/doc/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/AlN-LDA/BORN +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/AlN-LDA/FORCES_FC2 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/AlN-LDA/FORCES_FC3.lzma +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/AlN-LDA/POSCAR-unitcell +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/AlN-LDA/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/AlN-LDA/phono3py_disp.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/AlN-LDA/phono3py_disp_dimfc2.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/NaCl-alm/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/NaCl-alm/phono3py_params_NaCl222.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-CRYSTAL/FORCES_FC2 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-CRYSTAL/FORCES_FC3 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-CRYSTAL/README +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-CRYSTAL/TEMPLATE +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-CRYSTAL/TEMPLATE3 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-CRYSTAL/crystal.o +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-CRYSTAL/outputs.tar.gz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-LDA/FORCES_FC3 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-LDA/POSCAR-unitcell +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-LDA/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-LDA/phono3py_disp.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-LDA/vasprun_xmls.tar.lzma +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBE/FORCES_FC3 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBE/POSCAR-unitcell +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBE/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBE/phono3py_disp.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBE/vasprun_xmls.tar.lzma +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/FORCES_FC3 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/POSCAR-unitcell +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/Si-band-DOS.png +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/Si-kaccum.png +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/Si.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/phono3py_disp.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/phono3py_disp_dimfc2.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/INCAR +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/POSCAR +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/vasprun.xml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-PBEsol/vasprun_xmls.tar.lzma +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-QE/FORCES_FC3 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-QE/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-QE/Si.in +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-QE/phono3py_disp.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-QE/supercell_out.tar.lzma +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-TURBOMOLE/FORCES_FC2 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-TURBOMOLE/FORCES_FC3 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-TURBOMOLE/README +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-TURBOMOLE/control +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-TURBOMOLE/coord +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Si-TURBOMOLE/outputs.tar.gz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Wigner_La2Zr2O7/BORN +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Wigner_La2Zr2O7/POSCAR +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Wigner_La2Zr2O7/command.sh +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Wigner_La2Zr2O7/fc2.hdf5 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Wigner_La2Zr2O7/kappa-m191919.hdf5 +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/Wigner_La2Zr2O7/tc_La2Zr2O7.out.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/zb-ZnTe-PBEsol/README.md +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/zb-ZnTe-PBEsol/launch_phono3py_ZnTe_PBEsol_222.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/example/zb-ZnTe-PBEsol/phono3py_params_ZnTe.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/fortran/CMakeLists.txt +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/api_isotope.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/api_jointdos.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/conductivity/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/conductivity/base.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/conductivity/kubo.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/conductivity/wigner.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/create_force_sets.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/create_supercells.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/kaccum_script.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/phono3py_argparse.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/settings.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/show_log.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/cui/triplets_info.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/interface/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/interface/alm.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/interface/calculator.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/interface/fc_calculator.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/interface/phono3py_yaml.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/other/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/other/isotope.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/other/kaccum.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/other/tetrahedron_method.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon/func.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon/group_velocity_matrix.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon/heat_capacity_matrix.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon/velocity_operator.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/collision_matrix.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/displacement_fc3.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/fc3.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/gruneisen.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/imag_self_energy.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/interaction.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/joint_dos.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/real_self_energy.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/real_to_reciprocal.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/reciprocal_to_normal.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/spectral_function.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/phonon3/triplets.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/scripts/phono3py.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/scripts/phono3py_coleigplot.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/scripts/phono3py_kaccum.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/scripts/phono3py_kdeplot.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/scripts/phono3py_load.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/sscha/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/phono3py/sscha/sscha.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/pyproject.toml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/AgNO2_cell.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/BORN_NaCl +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/FORCES_FC3_si_pbesol +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/FORCE_SETS_NaCl +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/Si-111-222-fd.tar.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/Si-111-222-rd.tar.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/api/test_api_phono3py.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/conductivity/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/conductivity/test_kappa_LBTE.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/conductivity/test_kappa_LBTE_Wigner.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/conductivity/test_kappa_RTA.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/conductivity/test_kappa_RTA_Wigner.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/cui/phono3py_params-qe-Si222.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/file_IO/test_file_IO.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/interface/test_phono3py_yaml.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/other/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/other/test_isotope.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/other/test_kaccum.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params-Si111-rd.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params_AlN332.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params_MgO-222rd-444rd.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params_NaCl111.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params_NaCl222.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params_Si-111-222-fd.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params_Si-111-222-rd.yaml.xz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params_Si-111-222.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_params_Si111.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phono3py_si_pbesol.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon/test_grid.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/test_displacements.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/test_fc3.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/test_imag_self_energy.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/test_interaction.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/test_joint_dos.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/test_real_self_energy.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/test_spectral_function.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonon3/test_triplets.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonopy_disp_NaCl.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonopy_params-Si111-iterha.yaml.gz +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/phonopy_params_Si.yaml +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/sscha/__init__.py +0 -0
- {phono3py-3.3.0 → phono3py-3.3.2}/test/sscha/test_sscha.py +0 -0
|
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.20)
|
|
|
2
2
|
|
|
3
3
|
option(BUILD_PHPHCALC_LIB "Option to build phph calculation module" OFF)
|
|
4
4
|
option(BUILD_PHONONCALC_LIB "Option to build phonon calculation module" OFF)
|
|
5
|
+
option(BUILD_RECGRID_LIB "Option to build reciprocal space grid module" OFF)
|
|
5
6
|
option(BUILD_GRIDSYS_LIB "Option to build gridsys module" OFF)
|
|
6
7
|
option(PHONO3PY_WITH_Fortran "enable fortran interface" OFF)
|
|
7
8
|
option(PHONO3PY_USE_OMP "Option to search OpenMP library" ON)
|
|
@@ -125,27 +126,61 @@ if(BUILD_PHPHCALC_LIB
|
|
|
125
126
|
endif()
|
|
126
127
|
|
|
127
128
|
# ###################################################################################
|
|
128
|
-
#
|
|
129
|
+
# Reciprocal space grid library #
|
|
130
|
+
# ###################################################################################
|
|
131
|
+
if(BUILD_RECGRID_LIB
|
|
132
|
+
OR BUILD_PHPHCALC_LIB
|
|
133
|
+
OR BUILD_NANOBIND_MODULE)
|
|
134
|
+
# Source code
|
|
135
|
+
set(SOURCES_PHPHCALC
|
|
136
|
+
${PROJECT_SOURCE_DIR}/c/bzgrid.c ${PROJECT_SOURCE_DIR}/c/grgrid.c
|
|
137
|
+
${PROJECT_SOURCE_DIR}/c/lagrid.c ${PROJECT_SOURCE_DIR}/c/snf3x3.c
|
|
138
|
+
${PROJECT_SOURCE_DIR}/c/recgrid.c)
|
|
139
|
+
|
|
140
|
+
if(BUILD_SHARED_LIBS)
|
|
141
|
+
# Shared library
|
|
142
|
+
add_library(recgrid_lib SHARED ${SOURCES_PHPHCALC})
|
|
143
|
+
else()
|
|
144
|
+
# Static link library
|
|
145
|
+
add_library(recgrid_lib STATIC ${SOURCES_PHPHCALC})
|
|
146
|
+
endif()
|
|
147
|
+
|
|
148
|
+
if(NOT BUILD_NANOBIND_MODULE)
|
|
149
|
+
if(BUILD_SHARED_LIBS)
|
|
150
|
+
set_property(TARGET recgrid_lib PROPERTY VERSION ${SERIAL})
|
|
151
|
+
set_property(TARGET recgrid_lib PROPERTY SOVERSION ${SOSERIAL})
|
|
152
|
+
install(TARGETS recgrid_lib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
153
|
+
else()
|
|
154
|
+
set_property(TARGET recgrid_lib PROPERTY VERSION ${SERIAL})
|
|
155
|
+
set_property(TARGET recgrid_lib PROPERTY SOVERSION ${SOSERIAL})
|
|
156
|
+
set_property(TARGET recgrid_lib PROPERTY OUTPUT_NAME recgrid_lib)
|
|
157
|
+
install(TARGETS recgrid_lib ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
158
|
+
endif()
|
|
159
|
+
|
|
160
|
+
# Header file
|
|
161
|
+
install(FILES ${PROJECT_SOURCE_DIR}/c/recgrid.h
|
|
162
|
+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
163
|
+
endif()
|
|
164
|
+
endif()
|
|
165
|
+
|
|
166
|
+
# ###################################################################################
|
|
167
|
+
# Ph-ph calculation library #
|
|
129
168
|
# ###################################################################################
|
|
130
169
|
if(BUILD_PHPHCALC_LIB OR BUILD_NANOBIND_MODULE)
|
|
131
170
|
# Source code
|
|
132
171
|
set(SOURCES_PHPHCALC
|
|
133
|
-
${PROJECT_SOURCE_DIR}/c/bzgrid.c
|
|
134
172
|
${PROJECT_SOURCE_DIR}/c/collision_matrix.c
|
|
135
173
|
${PROJECT_SOURCE_DIR}/c/fc3.c
|
|
136
|
-
${PROJECT_SOURCE_DIR}/c/grgrid.c
|
|
137
174
|
${PROJECT_SOURCE_DIR}/c/imag_self_energy_with_g.c
|
|
138
175
|
${PROJECT_SOURCE_DIR}/c/interaction.c
|
|
139
176
|
${PROJECT_SOURCE_DIR}/c/isotope.c
|
|
140
|
-
${PROJECT_SOURCE_DIR}/c/lagrid.c
|
|
141
177
|
${PROJECT_SOURCE_DIR}/c/lapack_wrapper.c
|
|
142
178
|
${PROJECT_SOURCE_DIR}/c/phono3py.c
|
|
143
|
-
${PROJECT_SOURCE_DIR}/c/
|
|
179
|
+
${PROJECT_SOURCE_DIR}/c/funcs.c
|
|
144
180
|
${PROJECT_SOURCE_DIR}/c/pp_collision.c
|
|
145
181
|
${PROJECT_SOURCE_DIR}/c/real_self_energy.c
|
|
146
182
|
${PROJECT_SOURCE_DIR}/c/real_to_reciprocal.c
|
|
147
183
|
${PROJECT_SOURCE_DIR}/c/reciprocal_to_normal.c
|
|
148
|
-
${PROJECT_SOURCE_DIR}/c/snf3x3.c
|
|
149
184
|
${PROJECT_SOURCE_DIR}/c/tetrahedron_method.c
|
|
150
185
|
${PROJECT_SOURCE_DIR}/c/triplet.c
|
|
151
186
|
${PROJECT_SOURCE_DIR}/c/triplet_grid.c
|
|
@@ -156,10 +191,12 @@ if(BUILD_PHPHCALC_LIB OR BUILD_NANOBIND_MODULE)
|
|
|
156
191
|
add_library(phphcalc_lib SHARED ${SOURCES_PHPHCALC})
|
|
157
192
|
|
|
158
193
|
if(OpenMP_FOUND)
|
|
159
|
-
target_link_libraries(
|
|
160
|
-
|
|
194
|
+
target_link_libraries(
|
|
195
|
+
phphcalc_lib PRIVATE recgrid_lib BLAS::BLAS LAPACK::LAPACK
|
|
196
|
+
OpenMP::OpenMP_C)
|
|
161
197
|
else()
|
|
162
|
-
target_link_libraries(phphcalc_lib PRIVATE BLAS::BLAS
|
|
198
|
+
target_link_libraries(phphcalc_lib PRIVATE recgrid_lib BLAS::BLAS
|
|
199
|
+
LAPACK::LAPACK)
|
|
163
200
|
endif()
|
|
164
201
|
|
|
165
202
|
target_include_directories(phphcalc_lib PRIVATE ${MY_INCLUDES})
|
|
@@ -188,10 +225,10 @@ if(BUILD_PHPHCALC_LIB OR BUILD_NANOBIND_MODULE)
|
|
|
188
225
|
add_library(phphcalc_lib STATIC ${SOURCES_PHPHCALC})
|
|
189
226
|
|
|
190
227
|
if(OpenMP_FOUND)
|
|
191
|
-
target_link_libraries(phphcalc_lib BLAS::BLAS LAPACK::LAPACK
|
|
228
|
+
target_link_libraries(phphcalc_lib recgrid_lib BLAS::BLAS LAPACK::LAPACK
|
|
192
229
|
OpenMP::OpenMP_C)
|
|
193
230
|
else()
|
|
194
|
-
target_link_libraries(phphcalc_lib BLAS::BLAS LAPACK::LAPACK)
|
|
231
|
+
target_link_libraries(phphcalc_lib recgrid_lib BLAS::BLAS LAPACK::LAPACK)
|
|
195
232
|
endif()
|
|
196
233
|
|
|
197
234
|
target_include_directories(phphcalc_lib PRIVATE ${MY_INCLUDES})
|
|
@@ -236,7 +273,7 @@ if(BUILD_PHPHCALC_LIB OR BUILD_NANOBIND_MODULE)
|
|
|
236
273
|
endif()
|
|
237
274
|
|
|
238
275
|
# ###################################################################################
|
|
239
|
-
#
|
|
276
|
+
# Phonon calculation library #
|
|
240
277
|
# ###################################################################################
|
|
241
278
|
if(BUILD_PHONONCALC_LIB OR BUILD_NANOBIND_MODULE)
|
|
242
279
|
# Source code
|
|
@@ -311,7 +348,7 @@ if(BUILD_PHONONCALC_LIB OR BUILD_NANOBIND_MODULE)
|
|
|
311
348
|
endif()
|
|
312
349
|
|
|
313
350
|
# ###################################################################################
|
|
314
|
-
#
|
|
351
|
+
# gridsys #
|
|
315
352
|
# ###################################################################################
|
|
316
353
|
if(BUILD_GRIDSYS_LIB)
|
|
317
354
|
# Source code
|
|
@@ -321,7 +358,7 @@ if(BUILD_GRIDSYS_LIB)
|
|
|
321
358
|
${PROJECT_SOURCE_DIR}/c/gridsys.c
|
|
322
359
|
${PROJECT_SOURCE_DIR}/c/lagrid.c
|
|
323
360
|
${PROJECT_SOURCE_DIR}/c/niggli.c
|
|
324
|
-
${PROJECT_SOURCE_DIR}/c/
|
|
361
|
+
${PROJECT_SOURCE_DIR}/c/funcs.c
|
|
325
362
|
${PROJECT_SOURCE_DIR}/c/snf3x3.c
|
|
326
363
|
${PROJECT_SOURCE_DIR}/c/tetrahedron_method.c
|
|
327
364
|
${PROJECT_SOURCE_DIR}/c/triplet.c
|
|
@@ -388,11 +425,15 @@ if(BUILD_NANOBIND_MODULE)
|
|
|
388
425
|
${PROJECT_SOURCE_DIR}/c/_phono3py.cpp)
|
|
389
426
|
nanobind_add_module(_phononcalc STABLE_ABI ${PROJECT_SOURCE_DIR}/c/phononcalc.h
|
|
390
427
|
${PROJECT_SOURCE_DIR}/c/_phononcalc.cpp)
|
|
428
|
+
nanobind_add_module(_recgrid STABLE_ABI ${PROJECT_SOURCE_DIR}/c/recgrid.h
|
|
429
|
+
${PROJECT_SOURCE_DIR}/c/_recgrid.cpp)
|
|
391
430
|
|
|
392
431
|
target_link_libraries(_phono3py PRIVATE phphcalc_lib)
|
|
393
432
|
target_link_libraries(_phononcalc PRIVATE phononcalc_lib)
|
|
433
|
+
target_link_libraries(_recgrid PRIVATE recgrid_lib)
|
|
394
434
|
|
|
395
435
|
target_compile_definitions(_phono3py PRIVATE THM_EPSILON=1e-10)
|
|
396
436
|
install(TARGETS _phono3py LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME})
|
|
397
437
|
install(TARGETS _phononcalc LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME})
|
|
438
|
+
install(TARGETS _recgrid LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME})
|
|
398
439
|
endif()
|
|
@@ -1179,14 +1179,6 @@ NB_MODULE(_phono3py, m) {
|
|
|
1179
1179
|
m.def("triplets_integration_weights", &py_get_triplets_integration_weights);
|
|
1180
1180
|
m.def("triplets_integration_weights_with_sigma",
|
|
1181
1181
|
&py_get_triplets_integration_weights_with_sigma);
|
|
1182
|
-
m.def("grid_index_from_address", &py_get_grid_index_from_address);
|
|
1183
|
-
m.def("ir_grid_map", &py_get_ir_grid_map);
|
|
1184
|
-
m.def("gr_grid_addresses", &py_get_gr_grid_addresses);
|
|
1185
|
-
m.def("reciprocal_rotations", &py_get_reciprocal_rotations);
|
|
1186
|
-
m.def("transform_rotations", &py_transform_rotations);
|
|
1187
|
-
m.def("snf3x3", &py_get_snf3x3);
|
|
1188
|
-
m.def("bz_grid_addresses", &py_get_bz_grid_addresses);
|
|
1189
|
-
m.def("rotate_bz_grid_index", &py_rotate_bz_grid_addresses);
|
|
1190
1182
|
m.def("diagonalize_collision_matrix", &py_diagonalize_collision_matrix);
|
|
1191
1183
|
m.def("pinv_from_eigensolution", &py_pinv_from_eigensolution);
|
|
1192
1184
|
m.def("default_colmat_solver", &py_get_default_colmat_solver);
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
#include <nanobind/nanobind.h>
|
|
2
|
+
#include <nanobind/ndarray.h>
|
|
3
|
+
|
|
4
|
+
#include "recgrid.h"
|
|
5
|
+
|
|
6
|
+
namespace nb = nanobind;
|
|
7
|
+
|
|
8
|
+
long py_get_grid_index_from_address(nb::ndarray<> py_address,
|
|
9
|
+
nb::ndarray<> py_D_diag) {
|
|
10
|
+
long *address;
|
|
11
|
+
long *D_diag;
|
|
12
|
+
long gp;
|
|
13
|
+
|
|
14
|
+
address = (long *)py_address.data();
|
|
15
|
+
D_diag = (long *)py_D_diag.data();
|
|
16
|
+
|
|
17
|
+
gp = recgrid_get_grid_index_from_address(address, D_diag);
|
|
18
|
+
|
|
19
|
+
return gp;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
long py_get_ir_grid_map(nb::ndarray<> py_grid_mapping_table,
|
|
23
|
+
nb::ndarray<> py_D_diag, nb::ndarray<> py_is_shift,
|
|
24
|
+
nb::ndarray<> py_rotations) {
|
|
25
|
+
long *D_diag;
|
|
26
|
+
long *is_shift;
|
|
27
|
+
long(*rot)[3][3];
|
|
28
|
+
long num_rot;
|
|
29
|
+
|
|
30
|
+
long *grid_mapping_table;
|
|
31
|
+
long num_ir;
|
|
32
|
+
|
|
33
|
+
D_diag = (long *)py_D_diag.data();
|
|
34
|
+
is_shift = (long *)py_is_shift.data();
|
|
35
|
+
rot = (long(*)[3][3])py_rotations.data();
|
|
36
|
+
num_rot = (long)py_rotations.shape(0);
|
|
37
|
+
grid_mapping_table = (long *)py_grid_mapping_table.data();
|
|
38
|
+
|
|
39
|
+
num_ir = recgrid_get_ir_grid_map(grid_mapping_table, rot, num_rot, D_diag,
|
|
40
|
+
is_shift);
|
|
41
|
+
return num_ir;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
void py_get_gr_grid_addresses(nb::ndarray<> py_gr_grid_addresses,
|
|
45
|
+
nb::ndarray<> py_D_diag) {
|
|
46
|
+
long(*gr_grid_addresses)[3];
|
|
47
|
+
long *D_diag;
|
|
48
|
+
|
|
49
|
+
gr_grid_addresses = (long(*)[3])py_gr_grid_addresses.data();
|
|
50
|
+
D_diag = (long *)py_D_diag.data();
|
|
51
|
+
|
|
52
|
+
recgrid_get_all_grid_addresses(gr_grid_addresses, D_diag);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
long py_get_reciprocal_rotations(nb::ndarray<> py_rec_rotations,
|
|
56
|
+
nb::ndarray<> py_rotations,
|
|
57
|
+
long is_time_reversal) {
|
|
58
|
+
long(*rec_rotations)[3][3];
|
|
59
|
+
long(*rotations)[3][3];
|
|
60
|
+
long num_rot, num_rec_rot;
|
|
61
|
+
|
|
62
|
+
rec_rotations = (long(*)[3][3])py_rec_rotations.data();
|
|
63
|
+
rotations = (long(*)[3][3])py_rotations.data();
|
|
64
|
+
num_rot = (long)py_rotations.shape(0);
|
|
65
|
+
|
|
66
|
+
num_rec_rot = recgrid_get_reciprocal_point_group(
|
|
67
|
+
rec_rotations, rotations, num_rot, is_time_reversal, 1);
|
|
68
|
+
|
|
69
|
+
return num_rec_rot;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
bool py_transform_rotations(nb::ndarray<> py_transformed_rotations,
|
|
73
|
+
nb::ndarray<> py_rotations, nb::ndarray<> py_D_diag,
|
|
74
|
+
nb::ndarray<> py_Q) {
|
|
75
|
+
long(*transformed_rotations)[3][3];
|
|
76
|
+
long(*rotations)[3][3];
|
|
77
|
+
long *D_diag;
|
|
78
|
+
long(*Q)[3];
|
|
79
|
+
long num_rot, succeeded;
|
|
80
|
+
|
|
81
|
+
transformed_rotations = (long(*)[3][3])py_transformed_rotations.data();
|
|
82
|
+
rotations = (long(*)[3][3])py_rotations.data();
|
|
83
|
+
D_diag = (long *)py_D_diag.data();
|
|
84
|
+
Q = (long(*)[3])py_Q.data();
|
|
85
|
+
num_rot = (long)py_transformed_rotations.shape(0);
|
|
86
|
+
|
|
87
|
+
succeeded = recgrid_transform_rotations(transformed_rotations, rotations,
|
|
88
|
+
num_rot, D_diag, Q);
|
|
89
|
+
if (succeeded) {
|
|
90
|
+
return true;
|
|
91
|
+
} else {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
bool py_get_snf3x3(nb::ndarray<> py_D_diag, nb::ndarray<> py_P,
|
|
97
|
+
nb::ndarray<> py_Q, nb::ndarray<> py_A) {
|
|
98
|
+
long *D_diag;
|
|
99
|
+
long(*P)[3];
|
|
100
|
+
long(*Q)[3];
|
|
101
|
+
long(*A)[3];
|
|
102
|
+
long succeeded;
|
|
103
|
+
|
|
104
|
+
D_diag = (long *)py_D_diag.data();
|
|
105
|
+
P = (long(*)[3])py_P.data();
|
|
106
|
+
Q = (long(*)[3])py_Q.data();
|
|
107
|
+
A = (long(*)[3])py_A.data();
|
|
108
|
+
|
|
109
|
+
succeeded = recgrid_get_snf3x3(D_diag, P, Q, A);
|
|
110
|
+
if (succeeded) {
|
|
111
|
+
return true;
|
|
112
|
+
} else {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
long py_get_bz_grid_addresses(nb::ndarray<> py_bz_grid_addresses,
|
|
118
|
+
nb::ndarray<> py_bz_map, nb::ndarray<> py_bzg2grg,
|
|
119
|
+
nb::ndarray<> py_D_diag, nb::ndarray<> py_Q,
|
|
120
|
+
nb::ndarray<> py_PS,
|
|
121
|
+
nb::ndarray<> py_reciprocal_lattice, long type) {
|
|
122
|
+
long(*bz_grid_addresses)[3];
|
|
123
|
+
long *bz_map;
|
|
124
|
+
long *bzg2grg;
|
|
125
|
+
long *D_diag;
|
|
126
|
+
long(*Q)[3];
|
|
127
|
+
long *PS;
|
|
128
|
+
double(*reciprocal_lattice)[3];
|
|
129
|
+
long num_total_gp;
|
|
130
|
+
|
|
131
|
+
bz_grid_addresses = (long(*)[3])py_bz_grid_addresses.data();
|
|
132
|
+
bz_map = (long *)py_bz_map.data();
|
|
133
|
+
bzg2grg = (long *)py_bzg2grg.data();
|
|
134
|
+
D_diag = (long *)py_D_diag.data();
|
|
135
|
+
Q = (long(*)[3])py_Q.data();
|
|
136
|
+
PS = (long *)py_PS.data();
|
|
137
|
+
reciprocal_lattice = (double(*)[3])py_reciprocal_lattice.data();
|
|
138
|
+
|
|
139
|
+
num_total_gp =
|
|
140
|
+
recgrid_get_bz_grid_addresses(bz_grid_addresses, bz_map, bzg2grg,
|
|
141
|
+
D_diag, Q, PS, reciprocal_lattice, type);
|
|
142
|
+
|
|
143
|
+
return num_total_gp;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
long py_rotate_bz_grid_addresses(long bz_grid_index, nb::ndarray<> py_rotation,
|
|
147
|
+
nb::ndarray<> py_bz_grid_addresses,
|
|
148
|
+
nb::ndarray<> py_bz_map,
|
|
149
|
+
nb::ndarray<> py_D_diag, nb::ndarray<> py_PS,
|
|
150
|
+
long type) {
|
|
151
|
+
long(*bz_grid_addresses)[3];
|
|
152
|
+
long(*rotation)[3];
|
|
153
|
+
long *bz_map;
|
|
154
|
+
long *D_diag;
|
|
155
|
+
long *PS;
|
|
156
|
+
long ret_bz_gp;
|
|
157
|
+
|
|
158
|
+
bz_grid_addresses = (long(*)[3])py_bz_grid_addresses.data();
|
|
159
|
+
rotation = (long(*)[3])py_rotation.data();
|
|
160
|
+
bz_map = (long *)py_bz_map.data();
|
|
161
|
+
D_diag = (long *)py_D_diag.data();
|
|
162
|
+
PS = (long *)py_PS.data();
|
|
163
|
+
|
|
164
|
+
ret_bz_gp = recgrid_rotate_bz_grid_index(
|
|
165
|
+
bz_grid_index, rotation, bz_grid_addresses, bz_map, D_diag, PS, type);
|
|
166
|
+
|
|
167
|
+
return ret_bz_gp;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
NB_MODULE(_recgrid, m) {
|
|
171
|
+
m.def("grid_index_from_address", &py_get_grid_index_from_address);
|
|
172
|
+
m.def("ir_grid_map", &py_get_ir_grid_map);
|
|
173
|
+
m.def("gr_grid_addresses", &py_get_gr_grid_addresses);
|
|
174
|
+
m.def("reciprocal_rotations", &py_get_reciprocal_rotations);
|
|
175
|
+
m.def("transform_rotations", &py_transform_rotations);
|
|
176
|
+
m.def("snf3x3", &py_get_snf3x3);
|
|
177
|
+
m.def("bz_grid_addresses", &py_get_bz_grid_addresses);
|
|
178
|
+
m.def("rotate_bz_grid_index", &py_rotate_bz_grid_addresses);
|
|
179
|
+
}
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
|
|
41
41
|
#include "grgrid.h"
|
|
42
42
|
#include "lagrid.h"
|
|
43
|
+
#include "recgrid.h"
|
|
43
44
|
|
|
44
45
|
#define BZG_NUM_BZ_SEARCH_SPACE 125
|
|
45
|
-
#define GRID_TOLERANCE_FACTOR 0.01
|
|
46
46
|
static long bz_search_space[BZG_NUM_BZ_SEARCH_SPACE][3] = {
|
|
47
47
|
{0, 0, 0}, {0, 0, 1}, {0, 0, 2}, {0, 0, -2}, {0, 0, -1},
|
|
48
48
|
{0, 1, 0}, {0, 1, 1}, {0, 1, 2}, {0, 1, -2}, {0, 1, -1},
|
|
@@ -70,21 +70,26 @@ static long bz_search_space[BZG_NUM_BZ_SEARCH_SPACE][3] = {
|
|
|
70
70
|
{-1, -2, 0}, {-1, -2, 1}, {-1, -2, 2}, {-1, -2, -2}, {-1, -2, -1},
|
|
71
71
|
{-1, -1, 0}, {-1, -1, 1}, {-1, -1, 2}, {-1, -1, -2}, {-1, -1, -1}};
|
|
72
72
|
|
|
73
|
-
static void get_bz_grid_addresses_type1(
|
|
74
|
-
|
|
73
|
+
static void get_bz_grid_addresses_type1(RecgridBZGrid *bzgrid,
|
|
74
|
+
const long Qinv[3][3]);
|
|
75
|
+
static void get_bz_grid_addresses_type2(RecgridBZGrid *bzgrid,
|
|
76
|
+
const long Qinv[3][3]);
|
|
75
77
|
static void set_bz_address(long address[3], const long bz_index,
|
|
76
78
|
const long grid_address[3], const long D_diag[3],
|
|
77
79
|
const long nint[3], const long Qinv[3][3]);
|
|
78
80
|
static double get_bz_distances(long nint[3], double distances[],
|
|
79
|
-
const
|
|
81
|
+
const RecgridBZGrid *bzgrid,
|
|
82
|
+
const long grid_address[3],
|
|
80
83
|
const double tolerance);
|
|
81
84
|
static void multiply_matrix_vector_d3(double v[3], const double a[3][3],
|
|
82
85
|
const double b[3]);
|
|
86
|
+
static void multiply_matrix_vector_ld3(double v[3], const long a[3][3],
|
|
87
|
+
const double b[3]);
|
|
83
88
|
static long get_inverse_unimodular_matrix_l3(long m[3][3], const long a[3][3]);
|
|
84
89
|
static double norm_squared_d3(const double a[3]);
|
|
85
90
|
|
|
86
91
|
long bzg_rotate_grid_index(const long bz_grid_index, const long rotation[3][3],
|
|
87
|
-
const
|
|
92
|
+
const RecgridConstBZGrid *bzgrid) {
|
|
88
93
|
long i, gp, num_bzgp, num_grgp;
|
|
89
94
|
long dadrs[3], dadrs_rot[3], adrs_rot[3];
|
|
90
95
|
|
|
@@ -124,7 +129,7 @@ long bzg_rotate_grid_index(const long bz_grid_index, const long rotation[3][3],
|
|
|
124
129
|
return bzgrid->gp_map[gp];
|
|
125
130
|
}
|
|
126
131
|
|
|
127
|
-
long bzg_get_bz_grid_addresses(
|
|
132
|
+
long bzg_get_bz_grid_addresses(RecgridBZGrid *bzgrid) {
|
|
128
133
|
long det;
|
|
129
134
|
long Qinv[3][3];
|
|
130
135
|
|
|
@@ -142,91 +147,15 @@ long bzg_get_bz_grid_addresses(BZGrid *bzgrid) {
|
|
|
142
147
|
return 1;
|
|
143
148
|
}
|
|
144
149
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
long i, j;
|
|
148
|
-
double tolerance;
|
|
149
|
-
double length[3];
|
|
150
|
-
double reclatQ[3][3];
|
|
151
|
-
|
|
152
|
-
for (i = 0; i < 3; i++) {
|
|
153
|
-
for (j = 0; j < 3; j++) {
|
|
154
|
-
reclatQ[i][j] = bzgrid->reclat[i][0] * bzgrid->Q[0][j] +
|
|
155
|
-
bzgrid->reclat[i][1] * bzgrid->Q[1][j] +
|
|
156
|
-
bzgrid->reclat[i][2] * bzgrid->Q[2][j];
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
for (i = 0; i < 3; i++) {
|
|
161
|
-
length[i] = 0;
|
|
162
|
-
for (j = 0; j < 3; j++) {
|
|
163
|
-
length[i] += reclatQ[j][i] * reclatQ[j][i];
|
|
164
|
-
}
|
|
165
|
-
length[i] /= bzgrid->D_diag[i] * bzgrid->D_diag[i];
|
|
166
|
-
}
|
|
167
|
-
tolerance = length[0];
|
|
168
|
-
for (i = 1; i < 3; i++) {
|
|
169
|
-
if (tolerance < length[i]) {
|
|
170
|
-
tolerance = length[i];
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
tolerance *= GRID_TOLERANCE_FACTOR;
|
|
174
|
-
|
|
175
|
-
return tolerance;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
RotMats *bzg_alloc_RotMats(const long size) {
|
|
179
|
-
RotMats *rotmats;
|
|
180
|
-
|
|
181
|
-
rotmats = NULL;
|
|
182
|
-
|
|
183
|
-
if ((rotmats = (RotMats *)malloc(sizeof(RotMats))) == NULL) {
|
|
184
|
-
warning_print("Memory could not be allocated.");
|
|
185
|
-
return NULL;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
rotmats->size = size;
|
|
189
|
-
if (size > 0) {
|
|
190
|
-
if ((rotmats->mat = (long(*)[3][3])malloc(sizeof(long[3][3]) * size)) ==
|
|
191
|
-
NULL) {
|
|
192
|
-
warning_print("Memory could not be allocated ");
|
|
193
|
-
warning_print("(RotMats, line %d, %s).\n", __LINE__, __FILE__);
|
|
194
|
-
free(rotmats);
|
|
195
|
-
rotmats = NULL;
|
|
196
|
-
return NULL;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
return rotmats;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
void bzg_free_RotMats(RotMats *rotmats) {
|
|
203
|
-
if (rotmats->size > 0) {
|
|
204
|
-
free(rotmats->mat);
|
|
205
|
-
rotmats->mat = NULL;
|
|
206
|
-
}
|
|
207
|
-
free(rotmats);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
void bzg_multiply_matrix_vector_ld3(double v[3], const long a[3][3],
|
|
211
|
-
const double b[3]) {
|
|
212
|
-
long i;
|
|
213
|
-
double c[3];
|
|
214
|
-
for (i = 0; i < 3; i++) {
|
|
215
|
-
c[i] = a[i][0] * b[0] + a[i][1] * b[1] + a[i][2] * b[2];
|
|
216
|
-
}
|
|
217
|
-
for (i = 0; i < 3; i++) {
|
|
218
|
-
v[i] = c[i];
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
static void get_bz_grid_addresses_type1(BZGrid *bzgrid, const long Qinv[3][3]) {
|
|
150
|
+
static void get_bz_grid_addresses_type1(RecgridBZGrid *bzgrid,
|
|
151
|
+
const long Qinv[3][3]) {
|
|
223
152
|
double tolerance, min_distance;
|
|
224
153
|
double distances[BZG_NUM_BZ_SEARCH_SPACE];
|
|
225
154
|
long bzmesh[3], bz_address_double[3], nint[3], gr_adrs[3];
|
|
226
155
|
long i, j, k, boundary_num_gp, total_num_gp, bzgp, gp, num_bzmesh;
|
|
227
156
|
long count, id_shift;
|
|
228
157
|
|
|
229
|
-
tolerance =
|
|
158
|
+
tolerance = recgrid_get_tolerance_for_BZ_reduction(bzgrid);
|
|
230
159
|
for (j = 0; j < 3; j++) {
|
|
231
160
|
bzmesh[j] = bzgrid->D_diag[j] * 2;
|
|
232
161
|
}
|
|
@@ -278,13 +207,14 @@ static void get_bz_grid_addresses_type1(BZGrid *bzgrid, const long Qinv[3][3]) {
|
|
|
278
207
|
bzgrid->size = boundary_num_gp + total_num_gp;
|
|
279
208
|
}
|
|
280
209
|
|
|
281
|
-
static void get_bz_grid_addresses_type2(
|
|
210
|
+
static void get_bz_grid_addresses_type2(RecgridBZGrid *bzgrid,
|
|
211
|
+
const long Qinv[3][3]) {
|
|
282
212
|
double tolerance, min_distance;
|
|
283
213
|
double distances[BZG_NUM_BZ_SEARCH_SPACE];
|
|
284
214
|
long nint[3], gr_adrs[3];
|
|
285
215
|
long i, j, num_gp;
|
|
286
216
|
|
|
287
|
-
tolerance =
|
|
217
|
+
tolerance = recgrid_get_tolerance_for_BZ_reduction(bzgrid);
|
|
288
218
|
num_gp = 0;
|
|
289
219
|
/* The first element of gp_map is always 0. */
|
|
290
220
|
bzgrid->gp_map[0] = 0;
|
|
@@ -324,7 +254,8 @@ static void set_bz_address(long address[3], const long bz_index,
|
|
|
324
254
|
}
|
|
325
255
|
|
|
326
256
|
static double get_bz_distances(long nint[3], double distances[],
|
|
327
|
-
const
|
|
257
|
+
const RecgridBZGrid *bzgrid,
|
|
258
|
+
const long grid_address[3],
|
|
328
259
|
const double tolerance) {
|
|
329
260
|
long i, j;
|
|
330
261
|
long dadrs[3];
|
|
@@ -336,7 +267,7 @@ static double get_bz_distances(long nint[3], double distances[],
|
|
|
336
267
|
for (i = 0; i < 3; i++) {
|
|
337
268
|
q_red[i] = dadrs[i] / (2.0 * bzgrid->D_diag[i]);
|
|
338
269
|
}
|
|
339
|
-
|
|
270
|
+
multiply_matrix_vector_ld3(q_red, bzgrid->Q, q_red);
|
|
340
271
|
for (i = 0; i < 3; i++) {
|
|
341
272
|
nint[i] = lagmat_Nint(q_red[i]);
|
|
342
273
|
q_red[i] -= nint[i];
|
|
@@ -376,6 +307,18 @@ static void multiply_matrix_vector_d3(double v[3], const double a[3][3],
|
|
|
376
307
|
}
|
|
377
308
|
}
|
|
378
309
|
|
|
310
|
+
static void multiply_matrix_vector_ld3(double v[3], const long a[3][3],
|
|
311
|
+
const double b[3]) {
|
|
312
|
+
long i;
|
|
313
|
+
double c[3];
|
|
314
|
+
for (i = 0; i < 3; i++) {
|
|
315
|
+
c[i] = a[i][0] * b[0] + a[i][1] * b[1] + a[i][2] * b[2];
|
|
316
|
+
}
|
|
317
|
+
for (i = 0; i < 3; i++) {
|
|
318
|
+
v[i] = c[i];
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
379
322
|
static long get_inverse_unimodular_matrix_l3(long m[3][3], const long a[3][3]) {
|
|
380
323
|
long det;
|
|
381
324
|
long c[3][3];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* Copyright (C) 2008 Atsushi Togo */
|
|
2
|
+
/* All rights reserved. */
|
|
3
|
+
|
|
4
|
+
/* This file is part of spglib. */
|
|
5
|
+
|
|
6
|
+
/* Redistribution and use in source and binary forms, with or without */
|
|
7
|
+
/* modification, are permitted provided that the following conditions */
|
|
8
|
+
/* are met: */
|
|
9
|
+
|
|
10
|
+
/* * Redistributions of source code must retain the above copyright */
|
|
11
|
+
/* notice, this list of conditions and the following disclaimer. */
|
|
12
|
+
|
|
13
|
+
/* * Redistributions in binary form must reproduce the above copyright */
|
|
14
|
+
/* notice, this list of conditions and the following disclaimer in */
|
|
15
|
+
/* the documentation and/or other materials provided with the */
|
|
16
|
+
/* distribution. */
|
|
17
|
+
|
|
18
|
+
/* * Neither the name of the phonopy project nor the names of its */
|
|
19
|
+
/* contributors may be used to endorse or promote products derived */
|
|
20
|
+
/* from this software without specific prior written permission. */
|
|
21
|
+
|
|
22
|
+
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
|
|
23
|
+
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
|
|
24
|
+
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
|
|
25
|
+
/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE */
|
|
26
|
+
/* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
|
|
27
|
+
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, */
|
|
28
|
+
/* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */
|
|
29
|
+
/* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER */
|
|
30
|
+
/* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT */
|
|
31
|
+
/* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN */
|
|
32
|
+
/* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
|
|
33
|
+
/* POSSIBILITY OF SUCH DAMAGE. */
|
|
34
|
+
|
|
35
|
+
#ifndef __bzgrid_H__
|
|
36
|
+
#define __bzgrid_H__
|
|
37
|
+
|
|
38
|
+
#include "recgrid.h"
|
|
39
|
+
|
|
40
|
+
long bzg_rotate_grid_index(const long grid_index, const long rotation[3][3],
|
|
41
|
+
const RecgridConstBZGrid *bzgrid);
|
|
42
|
+
long bzg_get_bz_grid_addresses(RecgridBZGrid *bzgrid);
|
|
43
|
+
|
|
44
|
+
#endif
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
#include <stdio.h>
|
|
39
39
|
#include <stdlib.h>
|
|
40
40
|
|
|
41
|
+
#include "funcs.h"
|
|
41
42
|
#include "phonoc_array.h"
|
|
42
|
-
#include "phonoc_utils.h"
|
|
43
43
|
|
|
44
44
|
static void get_collision_matrix(
|
|
45
45
|
double *collision_matrix, const double *fc3_normal_squared,
|
|
@@ -255,7 +255,7 @@ static long get_inv_sinh(double *inv_sinh, const long gp,
|
|
|
255
255
|
for (i = 0; i < num_band; i++) {
|
|
256
256
|
f = frequencies[gp2 * num_band + i];
|
|
257
257
|
if (f > cutoff_frequency) {
|
|
258
|
-
inv_sinh[i] =
|
|
258
|
+
inv_sinh[i] = funcs_inv_sinh_occupation(f, temperature);
|
|
259
259
|
} else {
|
|
260
260
|
inv_sinh[i] = 0;
|
|
261
261
|
}
|