phono3py 3.3.2__tar.gz → 3.3.3__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.2 → phono3py-3.3.3}/PKG-INFO +1 -1
- phono3py-3.3.3/example/NaCl-rd/README.md +80 -0
- phono3py-3.3.3/example/NaCl-rd/phono3py_params_NaCl.yaml.xz +0 -0
- phono3py-3.3.3/example/NaCl-rd/vasprun_xmls.tar.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/_version.py +2 -2
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/create_force_constants.py +31 -33
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/create_force_sets.py +7 -2
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/create_supercells.py +13 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/load.py +2 -2
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/phono3py_script.py +77 -33
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/settings.py +1 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/show_log.py +19 -8
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/file_IO.py +57 -20
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/version.py +1 -1
- {phono3py-3.3.2 → phono3py-3.3.3}/CMakeLists.txt +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/LICENSE +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/_phono3py.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/_phono3py.cpp +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/_phononcalc.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/_phononcalc.cpp +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/_recgrid.cpp +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/bzgrid.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/bzgrid.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/collision_matrix.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/collision_matrix.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/dynmat.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/dynmat.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/fc3.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/fc3.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/funcs.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/funcs.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/grgrid.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/grgrid.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/gridsys.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/gridsys.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/imag_self_energy_with_g.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/imag_self_energy_with_g.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/interaction.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/interaction.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/isotope.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/isotope.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/lagrid.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/lagrid.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/lapack_wrapper.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/lapack_wrapper.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/niggli.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/niggli.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/phono3py.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/phono3py.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/phonoc_array.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/phonoc_const.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/phonon.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/phonon.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/phononcalc.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/phononcalc.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/pp_collision.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/pp_collision.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/real_self_energy.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/real_self_energy.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/real_to_reciprocal.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/real_to_reciprocal.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/recgrid.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/recgrid.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/reciprocal_to_normal.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/reciprocal_to_normal.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/snf3x3.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/snf3x3.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/tetrahedron_method.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/tetrahedron_method.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/triplet.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/triplet.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/triplet_grid.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/triplet_grid.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/triplet_iw.c +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/c/triplet_iw.h +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/ctest/CMakeLists.txt +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/ctest/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/ctest/fortran/CMakeLists.txt +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/ctest/fortran/gridsysf/CMakeLists.txt +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/doc/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/AlN-LDA/BORN +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/AlN-LDA/FORCES_FC2 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/AlN-LDA/FORCES_FC3.lzma +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/AlN-LDA/POSCAR-unitcell +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/AlN-LDA/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/AlN-LDA/phono3py_disp.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/AlN-LDA/phono3py_disp_dimfc2.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/NaCl-alm/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/NaCl-alm/phono3py_params_NaCl222.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-CRYSTAL/FORCES_FC2 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-CRYSTAL/FORCES_FC3 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-CRYSTAL/README +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-CRYSTAL/TEMPLATE +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-CRYSTAL/TEMPLATE3 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-CRYSTAL/crystal.o +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-CRYSTAL/outputs.tar.gz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-LDA/FORCES_FC3 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-LDA/POSCAR-unitcell +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-LDA/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-LDA/phono3py_disp.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-LDA/vasprun_xmls.tar.lzma +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBE/FORCES_FC3 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBE/POSCAR-unitcell +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBE/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBE/phono3py_disp.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBE/vasprun_xmls.tar.lzma +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/FORCES_FC3 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/POSCAR-unitcell +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/Si-band-DOS.png +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/Si-kaccum.png +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/Si.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/phono3py_disp.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/phono3py_disp_dimfc2.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/INCAR +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/POSCAR +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/vasprun.xml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-PBEsol/vasprun_xmls.tar.lzma +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-QE/FORCES_FC3 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-QE/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-QE/Si.in +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-QE/phono3py_disp.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-QE/supercell_out.tar.lzma +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-TURBOMOLE/FORCES_FC2 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-TURBOMOLE/FORCES_FC3 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-TURBOMOLE/README +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-TURBOMOLE/control +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-TURBOMOLE/coord +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Si-TURBOMOLE/outputs.tar.gz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Wigner_La2Zr2O7/BORN +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Wigner_La2Zr2O7/POSCAR +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Wigner_La2Zr2O7/command.sh +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Wigner_La2Zr2O7/fc2.hdf5 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Wigner_La2Zr2O7/kappa-m191919.hdf5 +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/Wigner_La2Zr2O7/tc_La2Zr2O7.out.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/zb-ZnTe-PBEsol/README.md +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/zb-ZnTe-PBEsol/launch_phono3py_ZnTe_PBEsol_222.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/example/zb-ZnTe-PBEsol/phono3py_params_ZnTe.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/fortran/CMakeLists.txt +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/api_isotope.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/api_jointdos.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/api_phono3py.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/conductivity/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/conductivity/base.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/conductivity/direct_solution.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/conductivity/kubo.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/conductivity/rta.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/conductivity/utils.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/conductivity/wigner.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/kaccum_script.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/phono3py_argparse.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/cui/triplets_info.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/interface/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/interface/alm.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/interface/calculator.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/interface/fc_calculator.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/interface/phono3py_yaml.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/other/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/other/isotope.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/other/kaccum.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/other/tetrahedron_method.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon/func.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon/grid.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon/group_velocity_matrix.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon/heat_capacity_matrix.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon/solver.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon/velocity_operator.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/collision_matrix.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/dataset.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/displacement_fc3.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/fc3.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/gruneisen.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/imag_self_energy.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/interaction.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/joint_dos.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/real_self_energy.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/real_to_reciprocal.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/reciprocal_to_normal.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/spectral_function.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/phonon3/triplets.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/scripts/phono3py.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/scripts/phono3py_coleigplot.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/scripts/phono3py_kaccum.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/scripts/phono3py_kdeplot.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/scripts/phono3py_load.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/sscha/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/phono3py/sscha/sscha.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/pyproject.toml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/AgNO2_cell.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/BORN_NaCl +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/FORCES_FC3_si_pbesol +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/FORCE_SETS_NaCl +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/Si-111-222-fd.tar.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/Si-111-222-rd.tar.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/api/test_api_phono3py.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/conductivity/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/conductivity/test_kappa_LBTE.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/conductivity/test_kappa_LBTE_Wigner.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/conductivity/test_kappa_RTA.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/conductivity/test_kappa_RTA_Wigner.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/conftest.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/cui/phono3py_params-qe-Si222.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/cui/test_phono3py_load.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/cui/test_phono3py_load_script.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/file_IO/test_file_IO.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/interface/test_phono3py_yaml.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/other/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/other/test_isotope.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/other/test_kaccum.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params-Si111-rd.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params_AlN332.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params_MgO-222rd-444rd.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params_NaCl111.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params_NaCl222.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params_Si-111-222-fd.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params_Si-111-222-rd.yaml.xz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params_Si-111-222.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_params_Si111.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phono3py_si_pbesol.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon/test_grid.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon/test_velocity_operator.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/test_displacements.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/test_fc3.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/test_imag_self_energy.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/test_interaction.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/test_joint_dos.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/test_real_self_energy.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/test_spectral_function.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonon3/test_triplets.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonopy_disp_NaCl.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonopy_params-Si111-iterha.yaml.gz +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/phonopy_params_Si.yaml +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/sscha/__init__.py +0 -0
- {phono3py-3.3.2 → phono3py-3.3.3}/test/sscha/test_sscha.py +0 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Example of using random directional displacements
|
|
2
|
+
|
|
3
|
+
## How to use symfc
|
|
4
|
+
|
|
5
|
+
This example utilizes an NaCl calculation result from A. Togo and A. Seko, J.
|
|
6
|
+
Chem. Phys. 160, 211001 (2024). Supercells of 2x2x2 and 4x4x4 conventional unit
|
|
7
|
+
cells are chosen for the third-order force constants (fc3) and second-order
|
|
8
|
+
force constants (fc2), respectively. Displacement-force datasets consisting of
|
|
9
|
+
100 supercells for fc3 and 2 supercells for fc2 are extracted and stored in
|
|
10
|
+
`phono3py_params_NaCl.yaml.xz`. Random directional displacements of a constant
|
|
11
|
+
0.03 Angstrom are used.
|
|
12
|
+
|
|
13
|
+
To calculate force constants, an external force constants calculator is
|
|
14
|
+
necessary. Here, the symfc tool (available at https://github.com/symfc/symfc) is
|
|
15
|
+
used, which can be easily installed via pip or conda.
|
|
16
|
+
|
|
17
|
+
The `fc3.hdf5` and `fc2.hdf5` are computed using the command:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
% phono3py-load phono3py_params_NaCl.yaml.xz --symfc -v
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Lattice thermal conductivity (LTC) is calculated with the following command:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
% phono3py-load phono3py_params_NaCl.yaml.xz --br --ts 300 --mesh 50
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
By this, LTC is obtained around 8.3 W/m-k.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## How to use pypolymlp
|
|
33
|
+
|
|
34
|
+
When supercell energies are included in `phono3py_params.yaml` like file, the
|
|
35
|
+
polynomial machine learning potential (poly-MLP) by pypolymlp can be used to
|
|
36
|
+
calculate fc3 by the following command:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
% phono3py-load phono3py_params_NaCl.yaml.xz --pypolymlp --symfc --rd 400 -v
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
the procedure below is performed:
|
|
43
|
+
|
|
44
|
+
1. Poly-MLPs are computed from the displacement-force dataset for fc3. This is
|
|
45
|
+
activated by `--pypolymlp` option.
|
|
46
|
+
2. 800=400+400 supercells for random directional displacements are generated,
|
|
47
|
+
where 400+400 means 400 supercells with random displacements (u) and 400
|
|
48
|
+
supercells with opposite displacement vectors (-u). This is activated by
|
|
49
|
+
`--rd 400` option. The default displacement distance is 0.001 Angstrom in
|
|
50
|
+
`--pypolymlp` mode. Since random displacements are generated `--symfc` has to
|
|
51
|
+
be specified for fc3. In this example, random displacements are used for fc2,
|
|
52
|
+
too, `--symfc` is applied to both of fc3 and fc2. Without `--rd` option,
|
|
53
|
+
systematic displacements are generated, for which the option `--fc-calc "symfc|"`
|
|
54
|
+
has to be specified instead of `--symfc` (equivalent to `--fc-calc "symfc|symfc")`).
|
|
55
|
+
3. Forces on atoms in these 800 supercells are calculated using poly-MLP.
|
|
56
|
+
4. Force constants are calculated.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
The `fc3.hdf5` and `fc2.hdf5` are obtained. Using these force constants, LTC is
|
|
60
|
+
calculated by
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
% phono3py-load phono3py_params_NaCl.yaml.xz --br --ts 300 --mesh 50
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
and the LTC value of around 8.2 W/m-k is obtained.
|
|
67
|
+
|
|
68
|
+
## Generating phono3py_params.yaml from vasprun.xml's
|
|
69
|
+
|
|
70
|
+
`phono3py_params.yaml` is generated from
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
% phono3py phono3py_disp.yaml --cf3 NaCl-vasprun/vasprun-{00001..00100}.xml --cf2 NaCl-vasprun/vasprun-ph0000{1,2}.xml --sp
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
This command reads electronic energies of supercells from `vasprun.xml`s and
|
|
77
|
+
writes them into `phono3py_params.yaml`, too. Here, `phono3py_disp.yaml` is not
|
|
78
|
+
included in this example, but `phono3py_params_NaCl.yaml.xz` can be used to run
|
|
79
|
+
this example since corresponding information of displacements is included in
|
|
80
|
+
this file, too.
|
|
Binary file
|
|
Binary file
|
|
@@ -168,14 +168,9 @@ def create_phono3py_force_constants(
|
|
|
168
168
|
if settings.read_fc2:
|
|
169
169
|
_read_phono3py_fc2(phono3py, symmetrize_fc2, input_filename, log_level)
|
|
170
170
|
else:
|
|
171
|
-
if phono3py.phonon_supercell_matrix is None:
|
|
172
|
-
force_filename = "FORCES_FC3"
|
|
173
|
-
else:
|
|
174
|
-
force_filename = "FORCES_FC2"
|
|
175
171
|
_create_phono3py_fc2(
|
|
176
172
|
phono3py,
|
|
177
173
|
ph3py_yaml,
|
|
178
|
-
force_filename,
|
|
179
174
|
symmetrize_fc2,
|
|
180
175
|
settings.is_compact_fc,
|
|
181
176
|
fc_calculator,
|
|
@@ -219,20 +214,22 @@ def parse_forces(
|
|
|
219
214
|
|
|
220
215
|
"""
|
|
221
216
|
filename_read_from: Optional[str] = None
|
|
222
|
-
|
|
217
|
+
dataset = None
|
|
223
218
|
calculator = phono3py.calculator
|
|
219
|
+
|
|
224
220
|
# Get dataset from ph3py_yaml. dataset can be None.
|
|
225
221
|
# physical_units can be overwritten if calculator is found in ph3py_yaml.
|
|
226
|
-
|
|
222
|
+
if ph3py_yaml:
|
|
223
|
+
dataset = _extract_dataset_from_ph3py_yaml(ph3py_yaml, fc_type)
|
|
227
224
|
if dataset and ph3py_yaml.calculator:
|
|
228
225
|
calculator = ph3py_yaml.calculator
|
|
229
226
|
|
|
230
227
|
physical_units = get_default_physical_units(calculator)
|
|
231
228
|
|
|
232
|
-
if fc_type == "
|
|
233
|
-
natom = len(phono3py.phonon_supercell)
|
|
234
|
-
else:
|
|
229
|
+
if phono3py.phonon_supercell is None or fc_type == "fc3":
|
|
235
230
|
natom = len(phono3py.supercell)
|
|
231
|
+
else:
|
|
232
|
+
natom = len(phono3py.phonon_supercell)
|
|
236
233
|
|
|
237
234
|
if dataset:
|
|
238
235
|
filename_read_from = phono3py_yaml_filename
|
|
@@ -269,20 +266,18 @@ def parse_forces(
|
|
|
269
266
|
assert dataset is not None
|
|
270
267
|
|
|
271
268
|
if "natom" in dataset and dataset["natom"] != natom:
|
|
272
|
-
|
|
269
|
+
raise RuntimeError(
|
|
273
270
|
"Number of atoms in supercell is not consistent with "
|
|
274
|
-
'"
|
|
271
|
+
f'"{filename_read_from}".'
|
|
275
272
|
)
|
|
276
|
-
raise RuntimeError(msg)
|
|
277
273
|
|
|
278
274
|
if log_level and filename_read_from is not None:
|
|
279
275
|
print(
|
|
280
|
-
'Displacement dataset for
|
|
281
|
-
% (fc_type, filename_read_from)
|
|
276
|
+
f'Displacement dataset for {fc_type} was read from "{filename_read_from}".'
|
|
282
277
|
)
|
|
283
278
|
|
|
284
279
|
# Overwrite dataset['cutoff_distance'] when necessary.
|
|
285
|
-
if cutoff_pair_distance:
|
|
280
|
+
if fc_type == "fc3" and cutoff_pair_distance:
|
|
286
281
|
if "cutoff_distance" not in dataset or (
|
|
287
282
|
"cutoff_distance" in dataset
|
|
288
283
|
and cutoff_pair_distance < dataset["cutoff_distance"]
|
|
@@ -295,10 +290,10 @@ def parse_forces(
|
|
|
295
290
|
# dataset comes either from disp_fc*.yaml or phono3py*.yaml.
|
|
296
291
|
if not forces_in_dataset(dataset):
|
|
297
292
|
if force_filename is not None:
|
|
298
|
-
if fc_type == "
|
|
299
|
-
parse_FORCES_FC2(dataset, filename=force_filename)
|
|
300
|
-
else:
|
|
293
|
+
if fc_type == "fc3":
|
|
301
294
|
parse_FORCES_FC3(dataset, filename=force_filename)
|
|
295
|
+
else:
|
|
296
|
+
parse_FORCES_FC2(dataset, filename=force_filename)
|
|
302
297
|
|
|
303
298
|
if log_level:
|
|
304
299
|
print(
|
|
@@ -452,10 +447,8 @@ def read_type2_dataset(natom, filename="FORCES_FC3", log_level=0) -> Optional[di
|
|
|
452
447
|
if len_first_line == 6:
|
|
453
448
|
dataset = get_dataset_type2(f, natom)
|
|
454
449
|
if log_level:
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
% (len(dataset["displacements"]), "FORCES_FC3")
|
|
458
|
-
)
|
|
450
|
+
n_disp = len(dataset["displacements"])
|
|
451
|
+
print(f'{n_disp} snapshots were found in "{filename}".')
|
|
459
452
|
else:
|
|
460
453
|
dataset = None
|
|
461
454
|
return dataset
|
|
@@ -663,7 +656,6 @@ def run_pypolymlp_to_compute_phonon_forces(
|
|
|
663
656
|
def _create_phono3py_fc2(
|
|
664
657
|
phono3py: Phono3py,
|
|
665
658
|
ph3py_yaml: Optional[Phono3pyYaml],
|
|
666
|
-
force_filename,
|
|
667
659
|
symmetrize_fc2,
|
|
668
660
|
is_compact_fc,
|
|
669
661
|
fc_calculator,
|
|
@@ -675,6 +667,11 @@ def _create_phono3py_fc2(
|
|
|
675
667
|
force_filename is either "FORCES_FC2" or "FORCES_FC3".
|
|
676
668
|
|
|
677
669
|
"""
|
|
670
|
+
if phono3py.phonon_supercell_matrix is None:
|
|
671
|
+
force_filename = "FORCES_FC3"
|
|
672
|
+
else:
|
|
673
|
+
force_filename = "FORCES_FC2"
|
|
674
|
+
|
|
678
675
|
_ph3py_yaml = _get_default_ph3py_yaml(ph3py_yaml)
|
|
679
676
|
|
|
680
677
|
try:
|
|
@@ -682,7 +679,7 @@ def _create_phono3py_fc2(
|
|
|
682
679
|
phono3py,
|
|
683
680
|
ph3py_yaml=_ph3py_yaml,
|
|
684
681
|
force_filename=force_filename,
|
|
685
|
-
fc_type="
|
|
682
|
+
fc_type="phonon_fc2",
|
|
686
683
|
log_level=log_level,
|
|
687
684
|
)
|
|
688
685
|
except RuntimeError as e:
|
|
@@ -752,12 +749,13 @@ def _to_ndarray(array, dtype="double"):
|
|
|
752
749
|
return array
|
|
753
750
|
|
|
754
751
|
|
|
755
|
-
def _extract_dataset_from_ph3py_yaml(
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
752
|
+
def _extract_dataset_from_ph3py_yaml(
|
|
753
|
+
ph3py_yaml: Optional[Phono3pyYaml], fc_type
|
|
754
|
+
) -> Optional[dict]:
|
|
755
|
+
if ph3py_yaml.phonon_supercell is None or fc_type == "fc3":
|
|
756
|
+
if ph3py_yaml.dataset is not None:
|
|
757
|
+
return copy.deepcopy(ph3py_yaml.dataset)
|
|
760
758
|
else:
|
|
761
|
-
if ph3py_yaml
|
|
762
|
-
|
|
763
|
-
return
|
|
759
|
+
if ph3py_yaml.phonon_dataset is not None:
|
|
760
|
+
return copy.deepcopy(ph3py_yaml.phonon_dataset)
|
|
761
|
+
return None
|
|
@@ -107,6 +107,8 @@ def create_FORCES_FC3_and_FORCES_FC2(
|
|
|
107
107
|
print("%s could not be created." % "FORCES_FC2")
|
|
108
108
|
print_error()
|
|
109
109
|
sys.exit(1)
|
|
110
|
+
else:
|
|
111
|
+
calc_dataset_fc2 = None
|
|
110
112
|
|
|
111
113
|
if settings.save_params:
|
|
112
114
|
fc3_yaml_filename = "phono3py_params.yaml"
|
|
@@ -349,7 +351,10 @@ def _get_force_sets_fc3(
|
|
|
349
351
|
|
|
350
352
|
|
|
351
353
|
def _set_forces_and_nac_params(
|
|
352
|
-
ph3py_yaml: Phono3pyYaml,
|
|
354
|
+
ph3py_yaml: Phono3pyYaml,
|
|
355
|
+
settings,
|
|
356
|
+
calc_dataset_fc3: dict,
|
|
357
|
+
calc_dataset_fc2: Optional[dict],
|
|
353
358
|
):
|
|
354
359
|
if "first_atoms" in ph3py_yaml.dataset:
|
|
355
360
|
count = len(ph3py_yaml.dataset["first_atoms"])
|
|
@@ -375,7 +380,7 @@ def _set_forces_and_nac_params(
|
|
|
375
380
|
calc_dataset_fc3["supercell_energies"], dtype="double"
|
|
376
381
|
)
|
|
377
382
|
|
|
378
|
-
if settings.create_forces_fc2:
|
|
383
|
+
if settings.create_forces_fc2 and calc_dataset_fc2:
|
|
379
384
|
if "first_atoms" in ph3py_yaml.phonon_dataset:
|
|
380
385
|
for i, d in enumerate(ph3py_yaml.phonon_dataset["first_atoms"]):
|
|
381
386
|
d["forces"] = calc_dataset_fc2["forces"][i]
|
|
@@ -35,8 +35,10 @@
|
|
|
35
35
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
36
36
|
|
|
37
37
|
from phonopy.interface.calculator import write_supercells_with_displacements
|
|
38
|
+
from phonopy.structure.cells import print_cell
|
|
38
39
|
|
|
39
40
|
from phono3py import Phono3py
|
|
41
|
+
from phono3py.cui.show_log import print_supercell_matrix
|
|
40
42
|
from phono3py.interface.calculator import (
|
|
41
43
|
get_additional_info_to_write_fc2_supercells,
|
|
42
44
|
get_additional_info_to_write_supercells,
|
|
@@ -92,6 +94,16 @@ def create_phono3py_supercells(
|
|
|
92
94
|
if log_level:
|
|
93
95
|
print("")
|
|
94
96
|
print('Unit cell was read from "%s".' % optional_structure_info[0])
|
|
97
|
+
print("-" * 32 + " unit cell " + "-" * 33) # 32 + 11 + 33 = 76
|
|
98
|
+
print_cell(phono3py.unitcell)
|
|
99
|
+
print("-" * 76)
|
|
100
|
+
print_supercell_matrix(
|
|
101
|
+
phono3py.supercell_matrix, phono3py.phonon_supercell_matrix
|
|
102
|
+
)
|
|
103
|
+
if phono3py.primitive_matrix is not None:
|
|
104
|
+
print("Primitive matrix:")
|
|
105
|
+
for v in phono3py.primitive_matrix:
|
|
106
|
+
print(" %s" % v)
|
|
95
107
|
print("Displacement distance: %s" % distance)
|
|
96
108
|
|
|
97
109
|
ids = []
|
|
@@ -125,6 +137,7 @@ def create_phono3py_supercells(
|
|
|
125
137
|
print("Number of displacement supercell files created: %d" % num_disp_files)
|
|
126
138
|
|
|
127
139
|
if phono3py.phonon_supercell_matrix is not None:
|
|
140
|
+
num_disps = len(phono3py.phonon_supercells_with_displacements)
|
|
128
141
|
additional_info = get_additional_info_to_write_fc2_supercells(
|
|
129
142
|
interface_mode, phono3py.phonon_supercell_matrix
|
|
130
143
|
)
|
|
@@ -588,9 +588,9 @@ def _get_dataset_phonon_dataset_or_fc2(
|
|
|
588
588
|
)
|
|
589
589
|
elif (
|
|
590
590
|
forces_fc2_filename is not None or pathlib.Path("FORCES_FC2").exists()
|
|
591
|
-
) and ph3py.phonon_supercell_matrix:
|
|
591
|
+
) and ph3py.phonon_supercell_matrix is not None:
|
|
592
592
|
if forces_fc2_filename is None:
|
|
593
|
-
force_filename =
|
|
593
|
+
force_filename = "FORCES_FC2"
|
|
594
594
|
else:
|
|
595
595
|
force_filename = forces_fc2_filename
|
|
596
596
|
phonon_dataset = _get_dataset_for_fc2(
|
|
@@ -36,8 +36,10 @@
|
|
|
36
36
|
|
|
37
37
|
from __future__ import annotations
|
|
38
38
|
|
|
39
|
+
import argparse
|
|
39
40
|
import datetime
|
|
40
41
|
import sys
|
|
42
|
+
from typing import Optional
|
|
41
43
|
|
|
42
44
|
import numpy as np
|
|
43
45
|
from phonopy.cui.collect_cell_info import collect_cell_info
|
|
@@ -75,7 +77,7 @@ from phono3py.cui.load import (
|
|
|
75
77
|
set_dataset_and_force_constants,
|
|
76
78
|
)
|
|
77
79
|
from phono3py.cui.phono3py_argparse import get_parser
|
|
78
|
-
from phono3py.cui.settings import Phono3pyConfParser
|
|
80
|
+
from phono3py.cui.settings import Phono3pyConfParser, Phono3pySettings
|
|
79
81
|
from phono3py.cui.show_log import (
|
|
80
82
|
show_general_settings,
|
|
81
83
|
show_phono3py_cells,
|
|
@@ -212,7 +214,7 @@ def get_run_mode(settings):
|
|
|
212
214
|
return run_mode
|
|
213
215
|
|
|
214
216
|
|
|
215
|
-
def start_phono3py(**argparse_control):
|
|
217
|
+
def start_phono3py(**argparse_control) -> tuple[argparse.Namespace, int]:
|
|
216
218
|
"""Parse arguments and set some basic parameters."""
|
|
217
219
|
parser, deprecated = get_parser(**argparse_control)
|
|
218
220
|
args = parser.parse_args()
|
|
@@ -310,7 +312,9 @@ def get_input_output_filenames_from_args(args):
|
|
|
310
312
|
return input_filename, output_filename
|
|
311
313
|
|
|
312
314
|
|
|
313
|
-
def get_cell_info(
|
|
315
|
+
def get_cell_info(
|
|
316
|
+
settings: Phono3pySettings, cell_filename: str, log_level: int
|
|
317
|
+
) -> dict:
|
|
314
318
|
"""Return calculator interface and crystal structure information."""
|
|
315
319
|
cell_info = collect_cell_info(
|
|
316
320
|
supercell_matrix=settings.supercell_matrix,
|
|
@@ -513,6 +517,58 @@ def grid_addresses_to_grid_points(grid_addresses, bz_grid):
|
|
|
513
517
|
return bz_grid.grg2bzg[grid_points]
|
|
514
518
|
|
|
515
519
|
|
|
520
|
+
def create_supercells_with_displacements(
|
|
521
|
+
settings: Phono3pySettings,
|
|
522
|
+
cell_info: dict,
|
|
523
|
+
confs_dict: dict,
|
|
524
|
+
unitcell_filename: str,
|
|
525
|
+
interface_mode: Optional[str],
|
|
526
|
+
load_phono3py_yaml: bool,
|
|
527
|
+
symprec: float,
|
|
528
|
+
log_level: int,
|
|
529
|
+
):
|
|
530
|
+
"""Create supercells and write displacements."""
|
|
531
|
+
if (
|
|
532
|
+
settings.create_displacements
|
|
533
|
+
or settings.random_displacements
|
|
534
|
+
or settings.random_displacements_fc2
|
|
535
|
+
):
|
|
536
|
+
phono3py = create_phono3py_supercells(
|
|
537
|
+
cell_info,
|
|
538
|
+
settings,
|
|
539
|
+
symprec,
|
|
540
|
+
interface_mode=interface_mode,
|
|
541
|
+
log_level=log_level,
|
|
542
|
+
)
|
|
543
|
+
|
|
544
|
+
store_nac_params(
|
|
545
|
+
phono3py,
|
|
546
|
+
settings,
|
|
547
|
+
cell_info["phonopy_yaml"],
|
|
548
|
+
unitcell_filename,
|
|
549
|
+
log_level,
|
|
550
|
+
nac_factor=Hartree * Bohr,
|
|
551
|
+
load_phonopy_yaml=load_phono3py_yaml,
|
|
552
|
+
)
|
|
553
|
+
|
|
554
|
+
if log_level:
|
|
555
|
+
if phono3py.supercell.magnetic_moments is None:
|
|
556
|
+
print("Spacegroup: %s" % phono3py.symmetry.get_international_table())
|
|
557
|
+
else:
|
|
558
|
+
print(
|
|
559
|
+
"Number of symmetry operations in supercell: %d"
|
|
560
|
+
% len(phono3py.symmetry.symmetry_operations["rotations"])
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
finalize_phono3py(
|
|
564
|
+
phono3py,
|
|
565
|
+
confs_dict,
|
|
566
|
+
log_level,
|
|
567
|
+
write_displacements=True,
|
|
568
|
+
filename="phono3py_disp.yaml",
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
|
|
516
572
|
def store_force_constants(
|
|
517
573
|
phono3py: Phono3py,
|
|
518
574
|
settings,
|
|
@@ -853,7 +909,7 @@ def main(**argparse_control):
|
|
|
853
909
|
# warnings.simplefilter("error")
|
|
854
910
|
load_phono3py_yaml = argparse_control.get("load_phono3py_yaml", False)
|
|
855
911
|
|
|
856
|
-
if "args" in argparse_control: #
|
|
912
|
+
if "args" in argparse_control: # This is for pytest.
|
|
857
913
|
args = argparse_control["args"]
|
|
858
914
|
log_level = args.log_level
|
|
859
915
|
else:
|
|
@@ -926,29 +982,16 @@ def main(**argparse_control):
|
|
|
926
982
|
######################################################
|
|
927
983
|
# Create supercells with displacements and then exit #
|
|
928
984
|
######################################################
|
|
929
|
-
if settings.
|
|
930
|
-
|
|
931
|
-
cell_info,
|
|
985
|
+
if not settings.use_pypolymlp:
|
|
986
|
+
create_supercells_with_displacements(
|
|
932
987
|
settings,
|
|
933
|
-
|
|
934
|
-
interface_mode=interface_mode,
|
|
935
|
-
log_level=log_level,
|
|
936
|
-
)
|
|
937
|
-
|
|
938
|
-
if phono3py.supercell.magnetic_moments is None:
|
|
939
|
-
print("Spacegroup: %s" % phono3py.symmetry.get_international_table())
|
|
940
|
-
else:
|
|
941
|
-
print(
|
|
942
|
-
"Number of symmetry operations in supercell: %d"
|
|
943
|
-
% len(phono3py.symmetry.symmetry_operations["rotations"])
|
|
944
|
-
)
|
|
945
|
-
|
|
946
|
-
finalize_phono3py(
|
|
947
|
-
phono3py,
|
|
988
|
+
cell_info,
|
|
948
989
|
confs_dict,
|
|
990
|
+
unitcell_filename,
|
|
991
|
+
interface_mode,
|
|
992
|
+
load_phono3py_yaml,
|
|
993
|
+
symprec,
|
|
949
994
|
log_level,
|
|
950
|
-
write_displacements=True,
|
|
951
|
-
filename="phono3py_disp.yaml",
|
|
952
995
|
)
|
|
953
996
|
|
|
954
997
|
#######################
|
|
@@ -1067,15 +1110,16 @@ def main(**argparse_control):
|
|
|
1067
1110
|
##################################
|
|
1068
1111
|
# Non-analytical term correction #
|
|
1069
1112
|
##################################
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1113
|
+
if settings.is_nac:
|
|
1114
|
+
store_nac_params(
|
|
1115
|
+
phono3py,
|
|
1116
|
+
settings,
|
|
1117
|
+
cell_info["phonopy_yaml"],
|
|
1118
|
+
unitcell_filename,
|
|
1119
|
+
log_level,
|
|
1120
|
+
nac_factor=Hartree * Bohr,
|
|
1121
|
+
load_phonopy_yaml=load_phono3py_yaml,
|
|
1122
|
+
)
|
|
1079
1123
|
|
|
1080
1124
|
###################
|
|
1081
1125
|
# Force constants #
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
36
36
|
|
|
37
37
|
import sys
|
|
38
|
+
from collections.abc import Sequence
|
|
39
|
+
from typing import Optional, Union
|
|
38
40
|
|
|
39
41
|
import numpy as np
|
|
40
42
|
from phonopy.structure.cells import print_cell
|
|
@@ -68,6 +70,23 @@ def show_general_settings(
|
|
|
68
70
|
print("Calculator interface: %s" % phono3py.calculator)
|
|
69
71
|
print('Crystal structure was read from "%s".' % cell_filename)
|
|
70
72
|
|
|
73
|
+
print_supercell_matrix(supercell_matrix, phonon_supercell_matrix)
|
|
74
|
+
|
|
75
|
+
if is_primitive_axes_auto:
|
|
76
|
+
print("Primitive matrix (Auto):")
|
|
77
|
+
for v in primitive_matrix:
|
|
78
|
+
print(" %s" % v)
|
|
79
|
+
elif primitive_matrix is not None:
|
|
80
|
+
print("Primitive matrix:")
|
|
81
|
+
for v in primitive_matrix:
|
|
82
|
+
print(" %s" % v)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def print_supercell_matrix(
|
|
86
|
+
supercell_matrix: Union[Sequence, np.ndarray],
|
|
87
|
+
phonon_supercell_matrix: Optional[Union[Sequence, np.ndarray]] = None,
|
|
88
|
+
):
|
|
89
|
+
"""Print supercell matrix."""
|
|
71
90
|
if (np.diag(np.diag(supercell_matrix)) - supercell_matrix).any():
|
|
72
91
|
print("Supercell matrix (dim):")
|
|
73
92
|
for v in supercell_matrix:
|
|
@@ -81,14 +100,6 @@ def show_general_settings(
|
|
|
81
100
|
print(" %s" % v)
|
|
82
101
|
else:
|
|
83
102
|
print("Phonon supercell (dim-fc2): %s" % np.diag(phonon_supercell_matrix))
|
|
84
|
-
if is_primitive_axes_auto:
|
|
85
|
-
print("Primitive matrix (Auto):")
|
|
86
|
-
for v in primitive_matrix:
|
|
87
|
-
print(" %s" % v)
|
|
88
|
-
elif primitive_matrix is not None:
|
|
89
|
-
print("Primitive matrix:")
|
|
90
|
-
for v in primitive_matrix:
|
|
91
|
-
print(" %s" % v)
|
|
92
103
|
|
|
93
104
|
|
|
94
105
|
def show_phono3py_cells(phono3py: Phono3py):
|
|
@@ -38,7 +38,7 @@ from __future__ import annotations
|
|
|
38
38
|
import os
|
|
39
39
|
import warnings
|
|
40
40
|
from collections.abc import Sequence
|
|
41
|
-
from typing import Optional, Union
|
|
41
|
+
from typing import Optional, TextIO, Union
|
|
42
42
|
|
|
43
43
|
import h5py
|
|
44
44
|
import numpy as np
|
|
@@ -46,7 +46,11 @@ from phonopy.cui.load_helper import read_force_constants_from_hdf5
|
|
|
46
46
|
|
|
47
47
|
# This import is deactivated for a while.
|
|
48
48
|
# from phonopy.file_IO import write_force_constants_to_hdf5
|
|
49
|
-
from phonopy.file_IO import
|
|
49
|
+
from phonopy.file_IO import (
|
|
50
|
+
check_force_constants_indices,
|
|
51
|
+
get_cell_from_disp_yaml,
|
|
52
|
+
write_FORCE_SETS,
|
|
53
|
+
)
|
|
50
54
|
|
|
51
55
|
from phono3py.version import __version__
|
|
52
56
|
|
|
@@ -196,33 +200,71 @@ def write_FORCES_FC2(disp_dataset, forces_fc2=None, fp=None, filename="FORCES_FC
|
|
|
196
200
|
else:
|
|
197
201
|
w = fp
|
|
198
202
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
if "first_atoms" in disp_dataset:
|
|
204
|
+
for i, disp1 in enumerate(disp_dataset["first_atoms"]):
|
|
205
|
+
w.write("# File: %-5d\n" % (i + 1))
|
|
206
|
+
w.write("# %-5d " % (disp1["number"] + 1))
|
|
207
|
+
w.write("%20.16f %20.16f %20.16f\n" % tuple(disp1["displacement"]))
|
|
208
|
+
if "forces" in disp1 and forces_fc2 is None:
|
|
209
|
+
force_set = disp1["forces"]
|
|
210
|
+
else:
|
|
211
|
+
force_set = forces_fc2[i]
|
|
212
|
+
for forces in force_set:
|
|
213
|
+
w.write("%15.10f %15.10f %15.10f\n" % tuple(forces))
|
|
214
|
+
else:
|
|
215
|
+
if "forces" in disp_dataset:
|
|
216
|
+
write_FORCE_SETS(disp_dataset, filename="FORCES_FC2")
|
|
205
217
|
else:
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
218
|
+
if forces_fc2 is None:
|
|
219
|
+
raise RuntimeError("No forces are found.")
|
|
220
|
+
dataset = disp_dataset.copy()
|
|
221
|
+
dataset["forces"] = forces_fc2
|
|
222
|
+
write_FORCE_SETS(dataset, filename="FORCES_FC2")
|
|
209
223
|
|
|
210
224
|
if fp is None:
|
|
211
225
|
w.close()
|
|
212
226
|
|
|
213
227
|
|
|
214
|
-
def write_FORCES_FC3(
|
|
228
|
+
def write_FORCES_FC3(
|
|
229
|
+
disp_dataset: dict,
|
|
230
|
+
forces_fc3: Optional[Sequence] = None,
|
|
231
|
+
fp: Optional[TextIO] = None,
|
|
232
|
+
filename: str = "FORCES_FC3",
|
|
233
|
+
):
|
|
215
234
|
"""Write FORCES_FC3.
|
|
216
235
|
|
|
217
236
|
fp : IO object, optional, default=None
|
|
218
237
|
When this is given, FORCES_FC3 content is written into this IO object.
|
|
219
238
|
|
|
220
239
|
"""
|
|
221
|
-
if
|
|
222
|
-
|
|
240
|
+
if "first_atoms" in disp_dataset:
|
|
241
|
+
if fp is None:
|
|
242
|
+
with open(filename, "w") as w:
|
|
243
|
+
_write_FORCES_FC3_typeI(disp_dataset, w, forces_fc3=forces_fc3)
|
|
244
|
+
else:
|
|
245
|
+
_write_FORCES_FC3_typeI(disp_dataset, fp, forces_fc3=forces_fc3)
|
|
223
246
|
else:
|
|
224
|
-
|
|
247
|
+
if "forces" in disp_dataset:
|
|
248
|
+
write_FORCE_SETS(disp_dataset, filename="FORCES_FC3")
|
|
249
|
+
else:
|
|
250
|
+
if forces_fc3 is None:
|
|
251
|
+
raise RuntimeError("No forces are found.")
|
|
252
|
+
dataset = disp_dataset.copy()
|
|
253
|
+
dataset["forces"] = forces_fc3
|
|
254
|
+
write_FORCE_SETS(dataset, filename="FORCES_FC3")
|
|
225
255
|
|
|
256
|
+
|
|
257
|
+
def _write_FORCES_FC3_typeI(
|
|
258
|
+
disp_dataset: dict,
|
|
259
|
+
w: Optional[TextIO],
|
|
260
|
+
forces_fc3: Optional[Sequence] = None,
|
|
261
|
+
):
|
|
262
|
+
"""Write FORCES_FC3.
|
|
263
|
+
|
|
264
|
+
w : TextIO object, optional, default=None
|
|
265
|
+
When this is given, FORCES_FC3 content is written into this IO object.
|
|
266
|
+
|
|
267
|
+
"""
|
|
226
268
|
natom = disp_dataset["natom"]
|
|
227
269
|
num_disp1 = len(disp_dataset["first_atoms"])
|
|
228
270
|
count = num_disp1
|
|
@@ -253,15 +295,10 @@ def write_FORCES_FC3(disp_dataset, forces_fc3=None, fp=None, filename="FORCES_FC
|
|
|
253
295
|
w.write("%15.10f %15.10f %15.10f\n" % tuple(force))
|
|
254
296
|
file_count += 1
|
|
255
297
|
else:
|
|
256
|
-
# for forces in forces_fc3[i]:
|
|
257
|
-
# w.write("%15.10f %15.10f %15.10f\n" % (tuple(forces)))
|
|
258
298
|
for _ in range(natom):
|
|
259
299
|
w.write("%15.10f %15.10f %15.10f\n" % (0, 0, 0))
|
|
260
300
|
count += 1
|
|
261
301
|
|
|
262
|
-
if fp is None:
|
|
263
|
-
w.close()
|
|
264
|
-
|
|
265
302
|
|
|
266
303
|
def write_fc3_to_hdf5(fc3, filename="fc3.hdf5", p2s_map=None, compression="gzip"):
|
|
267
304
|
"""Write fc3 in fc3.hdf5.
|