phono3py 3.3.3__tar.gz → 3.3.4__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.
Files changed (243) hide show
  1. {phono3py-3.3.3 → phono3py-3.3.4}/PKG-INFO +1 -1
  2. phono3py-3.3.4/example/AlN-LDA/FORCES_FC3.xz +0 -0
  3. phono3py-3.3.4/example/AlN-LDA/README.md +69 -0
  4. {phono3py-3.3.3 → phono3py-3.3.4}/example/NaCl-alm/README.md +1 -1
  5. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-CRYSTAL/README +1 -1
  6. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-LDA/README.md +4 -4
  7. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBE/README.md +4 -4
  8. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/README.md +6 -6
  9. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-QE/README.md +4 -4
  10. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/_version.py +2 -2
  11. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/api_phono3py.py +7 -4
  12. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/create_force_constants.py +96 -115
  13. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/load.py +44 -17
  14. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/phono3py_argparse.py +8 -7
  15. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/phono3py_script.py +24 -10
  16. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/interface/phono3py_yaml.py +27 -3
  17. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/version.py +1 -1
  18. phono3py-3.3.3/example/AlN-LDA/FORCES_FC3.lzma +0 -0
  19. phono3py-3.3.3/example/AlN-LDA/README.md +0 -65
  20. {phono3py-3.3.3 → phono3py-3.3.4}/CMakeLists.txt +0 -0
  21. {phono3py-3.3.3 → phono3py-3.3.4}/LICENSE +0 -0
  22. {phono3py-3.3.3 → phono3py-3.3.4}/README.md +0 -0
  23. {phono3py-3.3.3 → phono3py-3.3.4}/c/_phono3py.c +0 -0
  24. {phono3py-3.3.3 → phono3py-3.3.4}/c/_phono3py.cpp +0 -0
  25. {phono3py-3.3.3 → phono3py-3.3.4}/c/_phononcalc.c +0 -0
  26. {phono3py-3.3.3 → phono3py-3.3.4}/c/_phononcalc.cpp +0 -0
  27. {phono3py-3.3.3 → phono3py-3.3.4}/c/_recgrid.cpp +0 -0
  28. {phono3py-3.3.3 → phono3py-3.3.4}/c/bzgrid.c +0 -0
  29. {phono3py-3.3.3 → phono3py-3.3.4}/c/bzgrid.h +0 -0
  30. {phono3py-3.3.3 → phono3py-3.3.4}/c/collision_matrix.c +0 -0
  31. {phono3py-3.3.3 → phono3py-3.3.4}/c/collision_matrix.h +0 -0
  32. {phono3py-3.3.3 → phono3py-3.3.4}/c/dynmat.c +0 -0
  33. {phono3py-3.3.3 → phono3py-3.3.4}/c/dynmat.h +0 -0
  34. {phono3py-3.3.3 → phono3py-3.3.4}/c/fc3.c +0 -0
  35. {phono3py-3.3.3 → phono3py-3.3.4}/c/fc3.h +0 -0
  36. {phono3py-3.3.3 → phono3py-3.3.4}/c/funcs.c +0 -0
  37. {phono3py-3.3.3 → phono3py-3.3.4}/c/funcs.h +0 -0
  38. {phono3py-3.3.3 → phono3py-3.3.4}/c/grgrid.c +0 -0
  39. {phono3py-3.3.3 → phono3py-3.3.4}/c/grgrid.h +0 -0
  40. {phono3py-3.3.3 → phono3py-3.3.4}/c/gridsys.c +0 -0
  41. {phono3py-3.3.3 → phono3py-3.3.4}/c/gridsys.h +0 -0
  42. {phono3py-3.3.3 → phono3py-3.3.4}/c/imag_self_energy_with_g.c +0 -0
  43. {phono3py-3.3.3 → phono3py-3.3.4}/c/imag_self_energy_with_g.h +0 -0
  44. {phono3py-3.3.3 → phono3py-3.3.4}/c/interaction.c +0 -0
  45. {phono3py-3.3.3 → phono3py-3.3.4}/c/interaction.h +0 -0
  46. {phono3py-3.3.3 → phono3py-3.3.4}/c/isotope.c +0 -0
  47. {phono3py-3.3.3 → phono3py-3.3.4}/c/isotope.h +0 -0
  48. {phono3py-3.3.3 → phono3py-3.3.4}/c/lagrid.c +0 -0
  49. {phono3py-3.3.3 → phono3py-3.3.4}/c/lagrid.h +0 -0
  50. {phono3py-3.3.3 → phono3py-3.3.4}/c/lapack_wrapper.c +0 -0
  51. {phono3py-3.3.3 → phono3py-3.3.4}/c/lapack_wrapper.h +0 -0
  52. {phono3py-3.3.3 → phono3py-3.3.4}/c/niggli.c +0 -0
  53. {phono3py-3.3.3 → phono3py-3.3.4}/c/niggli.h +0 -0
  54. {phono3py-3.3.3 → phono3py-3.3.4}/c/phono3py.c +0 -0
  55. {phono3py-3.3.3 → phono3py-3.3.4}/c/phono3py.h +0 -0
  56. {phono3py-3.3.3 → phono3py-3.3.4}/c/phonoc_array.h +0 -0
  57. {phono3py-3.3.3 → phono3py-3.3.4}/c/phonoc_const.h +0 -0
  58. {phono3py-3.3.3 → phono3py-3.3.4}/c/phonon.c +0 -0
  59. {phono3py-3.3.3 → phono3py-3.3.4}/c/phonon.h +0 -0
  60. {phono3py-3.3.3 → phono3py-3.3.4}/c/phononcalc.c +0 -0
  61. {phono3py-3.3.3 → phono3py-3.3.4}/c/phononcalc.h +0 -0
  62. {phono3py-3.3.3 → phono3py-3.3.4}/c/pp_collision.c +0 -0
  63. {phono3py-3.3.3 → phono3py-3.3.4}/c/pp_collision.h +0 -0
  64. {phono3py-3.3.3 → phono3py-3.3.4}/c/real_self_energy.c +0 -0
  65. {phono3py-3.3.3 → phono3py-3.3.4}/c/real_self_energy.h +0 -0
  66. {phono3py-3.3.3 → phono3py-3.3.4}/c/real_to_reciprocal.c +0 -0
  67. {phono3py-3.3.3 → phono3py-3.3.4}/c/real_to_reciprocal.h +0 -0
  68. {phono3py-3.3.3 → phono3py-3.3.4}/c/recgrid.c +0 -0
  69. {phono3py-3.3.3 → phono3py-3.3.4}/c/recgrid.h +0 -0
  70. {phono3py-3.3.3 → phono3py-3.3.4}/c/reciprocal_to_normal.c +0 -0
  71. {phono3py-3.3.3 → phono3py-3.3.4}/c/reciprocal_to_normal.h +0 -0
  72. {phono3py-3.3.3 → phono3py-3.3.4}/c/snf3x3.c +0 -0
  73. {phono3py-3.3.3 → phono3py-3.3.4}/c/snf3x3.h +0 -0
  74. {phono3py-3.3.3 → phono3py-3.3.4}/c/tetrahedron_method.c +0 -0
  75. {phono3py-3.3.3 → phono3py-3.3.4}/c/tetrahedron_method.h +0 -0
  76. {phono3py-3.3.3 → phono3py-3.3.4}/c/triplet.c +0 -0
  77. {phono3py-3.3.3 → phono3py-3.3.4}/c/triplet.h +0 -0
  78. {phono3py-3.3.3 → phono3py-3.3.4}/c/triplet_grid.c +0 -0
  79. {phono3py-3.3.3 → phono3py-3.3.4}/c/triplet_grid.h +0 -0
  80. {phono3py-3.3.3 → phono3py-3.3.4}/c/triplet_iw.c +0 -0
  81. {phono3py-3.3.3 → phono3py-3.3.4}/c/triplet_iw.h +0 -0
  82. {phono3py-3.3.3 → phono3py-3.3.4}/ctest/CMakeLists.txt +0 -0
  83. {phono3py-3.3.3 → phono3py-3.3.4}/ctest/README.md +0 -0
  84. {phono3py-3.3.3 → phono3py-3.3.4}/ctest/fortran/CMakeLists.txt +0 -0
  85. {phono3py-3.3.3 → phono3py-3.3.4}/ctest/fortran/gridsysf/CMakeLists.txt +0 -0
  86. {phono3py-3.3.3 → phono3py-3.3.4}/doc/README.md +0 -0
  87. {phono3py-3.3.3 → phono3py-3.3.4}/example/AlN-LDA/BORN +0 -0
  88. {phono3py-3.3.3 → phono3py-3.3.4}/example/AlN-LDA/FORCES_FC2 +0 -0
  89. {phono3py-3.3.3 → phono3py-3.3.4}/example/AlN-LDA/POSCAR-unitcell +0 -0
  90. {phono3py-3.3.3 → phono3py-3.3.4}/example/AlN-LDA/phono3py_disp.yaml +0 -0
  91. {phono3py-3.3.3 → phono3py-3.3.4}/example/AlN-LDA/phono3py_disp_dimfc2.yaml +0 -0
  92. {phono3py-3.3.3 → phono3py-3.3.4}/example/NaCl-alm/phono3py_params_NaCl222.yaml.xz +0 -0
  93. {phono3py-3.3.3 → phono3py-3.3.4}/example/NaCl-rd/README.md +0 -0
  94. {phono3py-3.3.3 → phono3py-3.3.4}/example/NaCl-rd/phono3py_params_NaCl.yaml.xz +0 -0
  95. {phono3py-3.3.3 → phono3py-3.3.4}/example/NaCl-rd/vasprun_xmls.tar.xz +0 -0
  96. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-CRYSTAL/FORCES_FC2 +0 -0
  97. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-CRYSTAL/FORCES_FC3 +0 -0
  98. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-CRYSTAL/TEMPLATE +0 -0
  99. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-CRYSTAL/TEMPLATE3 +0 -0
  100. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-CRYSTAL/crystal.o +0 -0
  101. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-CRYSTAL/outputs.tar.gz +0 -0
  102. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-LDA/FORCES_FC3 +0 -0
  103. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-LDA/POSCAR-unitcell +0 -0
  104. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-LDA/phono3py_disp.yaml +0 -0
  105. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-LDA/vasprun_xmls.tar.lzma +0 -0
  106. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBE/FORCES_FC3 +0 -0
  107. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBE/POSCAR-unitcell +0 -0
  108. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBE/phono3py_disp.yaml +0 -0
  109. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBE/vasprun_xmls.tar.lzma +0 -0
  110. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/FORCES_FC3 +0 -0
  111. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/POSCAR-unitcell +0 -0
  112. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/Si-band-DOS.png +0 -0
  113. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/Si-kaccum.png +0 -0
  114. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/Si.py +0 -0
  115. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/phono3py_disp.yaml +0 -0
  116. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/phono3py_disp_dimfc2.yaml +0 -0
  117. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/INCAR +0 -0
  118. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/POSCAR +0 -0
  119. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/vasprun_xml_fc2/disp-fc2-00001/vasprun.xml +0 -0
  120. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-PBEsol/vasprun_xmls.tar.lzma +0 -0
  121. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-QE/FORCES_FC3 +0 -0
  122. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-QE/Si.in +0 -0
  123. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-QE/phono3py_disp.yaml +0 -0
  124. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-QE/supercell_out.tar.lzma +0 -0
  125. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-TURBOMOLE/FORCES_FC2 +0 -0
  126. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-TURBOMOLE/FORCES_FC3 +0 -0
  127. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-TURBOMOLE/README +0 -0
  128. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-TURBOMOLE/control +0 -0
  129. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-TURBOMOLE/coord +0 -0
  130. {phono3py-3.3.3 → phono3py-3.3.4}/example/Si-TURBOMOLE/outputs.tar.gz +0 -0
  131. {phono3py-3.3.3 → phono3py-3.3.4}/example/Wigner_La2Zr2O7/BORN +0 -0
  132. {phono3py-3.3.3 → phono3py-3.3.4}/example/Wigner_La2Zr2O7/POSCAR +0 -0
  133. {phono3py-3.3.3 → phono3py-3.3.4}/example/Wigner_La2Zr2O7/command.sh +0 -0
  134. {phono3py-3.3.3 → phono3py-3.3.4}/example/Wigner_La2Zr2O7/fc2.hdf5 +0 -0
  135. {phono3py-3.3.3 → phono3py-3.3.4}/example/Wigner_La2Zr2O7/kappa-m191919.hdf5 +0 -0
  136. {phono3py-3.3.3 → phono3py-3.3.4}/example/Wigner_La2Zr2O7/tc_La2Zr2O7.out.xz +0 -0
  137. {phono3py-3.3.3 → phono3py-3.3.4}/example/zb-ZnTe-PBEsol/README.md +0 -0
  138. {phono3py-3.3.3 → phono3py-3.3.4}/example/zb-ZnTe-PBEsol/launch_phono3py_ZnTe_PBEsol_222.py +0 -0
  139. {phono3py-3.3.3 → phono3py-3.3.4}/example/zb-ZnTe-PBEsol/phono3py_params_ZnTe.yaml.xz +0 -0
  140. {phono3py-3.3.3 → phono3py-3.3.4}/fortran/CMakeLists.txt +0 -0
  141. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/__init__.py +0 -0
  142. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/api_isotope.py +0 -0
  143. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/api_jointdos.py +0 -0
  144. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/conductivity/__init__.py +0 -0
  145. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/conductivity/base.py +0 -0
  146. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/conductivity/direct_solution.py +0 -0
  147. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/conductivity/kubo.py +0 -0
  148. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/conductivity/rta.py +0 -0
  149. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/conductivity/utils.py +0 -0
  150. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/conductivity/wigner.py +0 -0
  151. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/__init__.py +0 -0
  152. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/create_force_sets.py +0 -0
  153. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/create_supercells.py +0 -0
  154. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/kaccum_script.py +0 -0
  155. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/settings.py +0 -0
  156. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/show_log.py +0 -0
  157. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/cui/triplets_info.py +0 -0
  158. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/file_IO.py +0 -0
  159. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/interface/__init__.py +0 -0
  160. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/interface/alm.py +0 -0
  161. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/interface/calculator.py +0 -0
  162. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/interface/fc_calculator.py +0 -0
  163. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/other/__init__.py +0 -0
  164. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/other/isotope.py +0 -0
  165. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/other/kaccum.py +0 -0
  166. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/other/tetrahedron_method.py +0 -0
  167. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon/__init__.py +0 -0
  168. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon/func.py +0 -0
  169. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon/grid.py +0 -0
  170. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon/group_velocity_matrix.py +0 -0
  171. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon/heat_capacity_matrix.py +0 -0
  172. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon/solver.py +0 -0
  173. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon/velocity_operator.py +0 -0
  174. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/__init__.py +0 -0
  175. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/collision_matrix.py +0 -0
  176. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/dataset.py +0 -0
  177. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/displacement_fc3.py +0 -0
  178. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/fc3.py +0 -0
  179. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/gruneisen.py +0 -0
  180. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/imag_self_energy.py +0 -0
  181. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/interaction.py +0 -0
  182. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/joint_dos.py +0 -0
  183. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/real_self_energy.py +0 -0
  184. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/real_to_reciprocal.py +0 -0
  185. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/reciprocal_to_normal.py +0 -0
  186. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/spectral_function.py +0 -0
  187. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/phonon3/triplets.py +0 -0
  188. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/scripts/phono3py.py +0 -0
  189. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/scripts/phono3py_coleigplot.py +0 -0
  190. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/scripts/phono3py_kaccum.py +0 -0
  191. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/scripts/phono3py_kdeplot.py +0 -0
  192. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/scripts/phono3py_load.py +0 -0
  193. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/sscha/__init__.py +0 -0
  194. {phono3py-3.3.3 → phono3py-3.3.4}/phono3py/sscha/sscha.py +0 -0
  195. {phono3py-3.3.3 → phono3py-3.3.4}/pyproject.toml +0 -0
  196. {phono3py-3.3.3 → phono3py-3.3.4}/test/AgNO2_cell.yaml +0 -0
  197. {phono3py-3.3.3 → phono3py-3.3.4}/test/BORN_NaCl +0 -0
  198. {phono3py-3.3.3 → phono3py-3.3.4}/test/FORCES_FC3_si_pbesol +0 -0
  199. {phono3py-3.3.3 → phono3py-3.3.4}/test/FORCE_SETS_NaCl +0 -0
  200. {phono3py-3.3.3 → phono3py-3.3.4}/test/Si-111-222-fd.tar.xz +0 -0
  201. {phono3py-3.3.3 → phono3py-3.3.4}/test/Si-111-222-rd.tar.xz +0 -0
  202. {phono3py-3.3.3 → phono3py-3.3.4}/test/api/test_api_phono3py.py +0 -0
  203. {phono3py-3.3.3 → phono3py-3.3.4}/test/conductivity/__init__.py +0 -0
  204. {phono3py-3.3.3 → phono3py-3.3.4}/test/conductivity/test_kappa_LBTE.py +0 -0
  205. {phono3py-3.3.3 → phono3py-3.3.4}/test/conductivity/test_kappa_LBTE_Wigner.py +0 -0
  206. {phono3py-3.3.3 → phono3py-3.3.4}/test/conductivity/test_kappa_RTA.py +0 -0
  207. {phono3py-3.3.3 → phono3py-3.3.4}/test/conductivity/test_kappa_RTA_Wigner.py +0 -0
  208. {phono3py-3.3.3 → phono3py-3.3.4}/test/conftest.py +0 -0
  209. {phono3py-3.3.3 → phono3py-3.3.4}/test/cui/phono3py_params-qe-Si222.yaml.xz +0 -0
  210. {phono3py-3.3.3 → phono3py-3.3.4}/test/cui/test_phono3py_load.py +0 -0
  211. {phono3py-3.3.3 → phono3py-3.3.4}/test/cui/test_phono3py_load_script.py +0 -0
  212. {phono3py-3.3.3 → phono3py-3.3.4}/test/file_IO/test_file_IO.py +0 -0
  213. {phono3py-3.3.3 → phono3py-3.3.4}/test/interface/test_phono3py_yaml.py +0 -0
  214. {phono3py-3.3.3 → phono3py-3.3.4}/test/other/__init__.py +0 -0
  215. {phono3py-3.3.3 → phono3py-3.3.4}/test/other/test_isotope.py +0 -0
  216. {phono3py-3.3.3 → phono3py-3.3.4}/test/other/test_kaccum.py +0 -0
  217. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params-Si111-rd.yaml.xz +0 -0
  218. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params_AlN332.yaml.xz +0 -0
  219. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params_MgO-222rd-444rd.yaml.xz +0 -0
  220. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params_NaCl111.yaml +0 -0
  221. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params_NaCl222.yaml.xz +0 -0
  222. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params_Si-111-222-fd.yaml.xz +0 -0
  223. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params_Si-111-222-rd.yaml.xz +0 -0
  224. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params_Si-111-222.yaml +0 -0
  225. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_params_Si111.yaml +0 -0
  226. {phono3py-3.3.3 → phono3py-3.3.4}/test/phono3py_si_pbesol.yaml +0 -0
  227. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon/__init__.py +0 -0
  228. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon/test_grid.py +0 -0
  229. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon/test_velocity_operator.py +0 -0
  230. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/__init__.py +0 -0
  231. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/test_displacements.py +0 -0
  232. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/test_fc3.py +0 -0
  233. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/test_imag_self_energy.py +0 -0
  234. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/test_interaction.py +0 -0
  235. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/test_joint_dos.py +0 -0
  236. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/test_real_self_energy.py +0 -0
  237. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/test_spectral_function.py +0 -0
  238. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonon3/test_triplets.py +0 -0
  239. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonopy_disp_NaCl.yaml +0 -0
  240. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonopy_params-Si111-iterha.yaml.gz +0 -0
  241. {phono3py-3.3.3 → phono3py-3.3.4}/test/phonopy_params_Si.yaml +0 -0
  242. {phono3py-3.3.3 → phono3py-3.3.4}/test/sscha/__init__.py +0 -0
  243. {phono3py-3.3.3 → phono3py-3.3.4}/test/sscha/test_sscha.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phono3py
3
- Version: 3.3.3
3
+ Version: 3.3.4
4
4
  Summary: This is the phono3py module.
5
5
  Author-Email: Atsushi Togo <atztogo@gmail.com>
6
6
  License: Copyright (c) 2015-2024, Phonopy. All rights reserved.
@@ -0,0 +1,69 @@
1
+ This is the example of the wurtzite-type AlN phono3py calculation. The VASP code
2
+ was used with 500 eV and LDA as XC functional. The experimental lattice
3
+ parameters were used and the internal positions of atoms were relaxed by
4
+ calculation. The 3x3x2 and 5x5x3 supercells were chosen for fc3 and fc2. The
5
+ 6x6x4, 2x2x2, 1x1x2 k-point sampling meshes with Gamma-centre in the basal plane
6
+ and off-Gamma-centre along c-axis were employed for the unit cell, fc3
7
+ supercell, and fc2 supercell, respectively. For the DFPT calculation of Born
8
+ effective charges and dielectric constant, the 12x12x8 k-point sampling mesh
9
+ with the similar shift was used.
10
+
11
+ Then the forces were calculated with the above settings. `FORCES_FC3` and
12
+ `FORCES_FC2` were created with subtracting residual forces of perfect supercell
13
+ from all displaced supercell forces.
14
+
15
+ Perfect and displaced supercells were created by
16
+
17
+ ```bash
18
+ % phono3py --dim 3 3 2 -c POSCAR-unitcell -d
19
+ ```
20
+
21
+ In the example directory, `FORCES_FC3` is compressed to `FORCES_FC3.xz`. After
22
+ unzipping `FORCES_FC3.xz` (e.g., using `xz -d`), to obtain `fc3.hdf5` and
23
+ `fc2.hdf5` using symfc (the results without using symfc, i.e., finite difference
24
+ method, are shown at the bottom of this README)
25
+
26
+ ```bash
27
+ % phono3py-load --symfc -v
28
+ ```
29
+
30
+ Lattice thermal conductivity is calculated by
31
+
32
+ ```bash
33
+ % phono3py-load --mesh 40 --br --ts 300
34
+ ```
35
+
36
+ `kappa-m15158.hdf5` is written as the result. Parameters for non-analytical term
37
+ correction (NAC) is automatically read from those stored in `phono3py_disp.yaml` or
38
+ `BORN` file. The lattice thermal conductivity is calculated as k_xx=242.8 and
39
+ k_zz=226.5 W/m-K at 300 K. Without NAC, k_xx=233.6 and k_zz=222.2.
40
+
41
+ Use of larger supercell for fc2 may change the shape of phonon band structure.
42
+ To see it, first regenerate `phono3py_disp.yaml` with `--dim-fc2` option,
43
+
44
+ ```bash
45
+ % phono3py --dim 3 3 2 --dim-fc2 5 5 3 -c POSCAR-unitcell -d
46
+ ```
47
+
48
+ Then re-create force constants and calculate thermal conductivity,
49
+
50
+ ```bash
51
+ % phono3py-load --symfc -v
52
+ % phono3py-load --br --mesh=40 --ts 300
53
+ ```
54
+
55
+ If `phono3py_disp.yaml` is renamed to `phono3py_disp_dimfc2.yaml`, it can be
56
+ specified at the first argument of `phono3py-load` command:
57
+
58
+ ```bash
59
+ % phono3py-load phono3py_disp_dimfc2.yaml --symfc -v
60
+ % phono3py-load phono3py_disp_dimfc2.yaml --br --mesh=40 --ts 300
61
+ ```
62
+
63
+ k_xx=240.2 and k_zz=230.1 are obtained. In the case of this example, we can see
64
+ that the larger fc2 supercell contributes little, which means that the 3x3x2
65
+ supercell was good enough to obtain a good shape of phonon band structure.
66
+
67
+ Using the finite difference method implemented in phono3py, lattice thermal
68
+ conductivities are obtained as k_xx=251.2 and k_zz=233,4 without using the large
69
+ fc2 supercell and k_xx=249.4 k_zz=236.9 using the large fc2 supercell.
@@ -29,4 +29,4 @@ lattice thermal conductivity at 300 K is calculated by
29
29
  % phono3py-load phono3py_params_NaCl222.yaml.xz --mesh 50 --ts 300 --br
30
30
  ```
31
31
 
32
- The result is ~7.2 W/m-K at 300 K.
32
+ The result is ~7.3 W/m-K at 300 K.
@@ -23,7 +23,7 @@ for the CRYSTAL interface, so the -c crystal.o parameter is not needed
23
23
 
24
24
  4) Create force constant files fc2.hdf5 and fc3.hdf5:
25
25
 
26
- phono3py --crystal --dim="2 2 2" --dim-fc2="4 4 4" --sym-fc
26
+ phono3py --crystal --dim="2 2 2" --dim-fc2="4 4 4" --fc-symmetry
27
27
 
28
28
  5) Thermal conductivity calculation:
29
29
 
@@ -13,18 +13,18 @@ conventional unit cell to the primitive cell.
13
13
  To create `fc3.hdf5` and `fc2.hdf5`,
14
14
 
15
15
  ```
16
- % phono3py --sym-fc
16
+ % phono3py-load
17
17
  ```
18
18
 
19
19
  Using 11x11x11 sampling mesh, lattice thermal conductivity is calculated by
20
20
 
21
21
  ```
22
- % phono3py --mesh 11 11 11 --fc3 --fc2 --br
22
+ % phono3py-load --mesh 11 11 11 --br --ts 300
23
23
  ```
24
24
 
25
25
  `kappa-m111111.hdf5` is written as the result. The lattice thermal conductivity
26
- is calculated as 112.5 W/m-K at 300 K. This becomes, with 19x19x19 sampling
27
- mesh, 127.0 W/m-K.
26
+ is calculated as 112.4 W/m-K at 300 K. This becomes, with 19x19x19 sampling
27
+ mesh, 128.2 W/m-K.
28
28
 
29
29
  Accumulated lattice thermal conductivity is calculated using `phono3py-kaccum`
30
30
  script.
@@ -13,18 +13,18 @@ conventional unit cell to the primitive cell.
13
13
  To create `fc3.hdf5` and `fc2.hdf5`,
14
14
 
15
15
  ```
16
- % phono3py --sym-fc
16
+ % phono3py-load
17
17
  ```
18
18
 
19
19
  Using 11x11x11 sampling mesh, lattice thermal conductivity is calculated by
20
20
 
21
21
  ```
22
- % phono3py --mesh 11 11 11 --fc3 --fc2 --br
22
+ % phono3py-load --mesh 11 11 11 --fc3 --fc2 --br
23
23
  ```
24
24
 
25
25
  `kappa-m111111.hdf5` is written as the result. The lattice thermal conductivity
26
- is calculated as 119.3 W/m-K at 300 K. This becomes, with 19x19x19 sampling
27
- mesh, 132.4 W/m-K.
26
+ is calculated as 119.5 W/m-K at 300 K. This becomes, with 19x19x19 sampling
27
+ mesh, 130.1 W/m-K.
28
28
 
29
29
  Accumulated lattice thermal conductivity is calculated using `phono3py-kaccum`
30
30
  script.
@@ -13,18 +13,18 @@ the conventional unit cell to the primitive cell.
13
13
  To create `fc3.hdf5` and `fc2.hdf5`,
14
14
 
15
15
  ```
16
- % phono3py --sym-fc
16
+ % phono3py-load
17
17
  ```
18
18
 
19
19
  Using 11x11x11 sampling mesh, lattice thermal conductivity is calculated by
20
20
 
21
21
  ```
22
- % phono3py --mesh 11 11 11 --fc3 --fc2 --br
22
+ % phono3py-load --mesh 11 11 11 --br
23
23
  ```
24
24
 
25
25
  `kappa-m111111.hdf5` is written as the result. The lattice thermal conductivity
26
- is calculated as 109.0 W/m-K at 300 K. This becomes, with 19x19x19 sampling
27
- mesh, 123.2 W/m-K.
26
+ is calculated as 109.1 W/m-K at 300 K. This becomes, with 19x19x19 sampling
27
+ mesh, 124.4 W/m-K.
28
28
 
29
29
  Accumulated lattice thermal conductivity is calculated using `phono3py-kaccum`
30
30
  script.
@@ -80,11 +80,11 @@ In this example directory, the dataset is renamed to
80
80
  at `vasprun_xml_fc2/disp-fc2-00001/vasprun.xml`. `FORCES_FC2` is generated by
81
81
 
82
82
  ```
83
- % phono3py phono3py_disp_dimfc2.yaml --cf2 vasprun_xml_fc2/disp-fc2-00001/vasprun.xml
83
+ % phono3py -c phono3py_disp_dimfc2.yaml --cf2 vasprun_xml_fc2/disp-fc2-00001/vasprun.xml
84
84
  ```
85
85
 
86
86
  A lattice thermal conductivity calculation is performed by, e.g.,
87
87
  ```
88
88
  % phono3py-load phono3py_disp_dimfc2.yaml --mesh 11 11 11 --br --ts 300
89
89
  ```
90
- The result is 108.0 W/m-K, and with the 19x19x19 mesh, 125.4 W/m-K.
90
+ The result is 107.9 W/m-K, and with the 19x19x19 mesh, 125.4 W/m-K.
@@ -13,18 +13,18 @@ the conventional unit cell to the primitive cell.
13
13
  To create `fc3.hdf5` and `fc2.hdf5`,
14
14
 
15
15
  ```
16
- % phono3py --sym-fc
16
+ % phono3py-load
17
17
  ```
18
18
 
19
19
  Using 11x11x11 sampling mesh, lattice thermal conductivity is calculated by
20
20
 
21
21
  ```
22
- % phono3py --mesh 11 11 11 --fc3 --fc2 --br
22
+ % phono3py-load --mesh 11 11 11 --br --ts 300
23
23
  ```
24
24
 
25
25
  `kappa-m111111.hdf5` is written as the result. The lattice thermal conductivity
26
- is calculated as 118.9 W/m-K at 300 K. This becomes, with 19x19x19 sampling
27
- mesh, 129.9 W/m-K.
26
+ is calculated as 121.3 W/m-K at 300 K. This becomes, with 19x19x19 sampling
27
+ mesh, 135.4 W/m-K.
28
28
 
29
29
  The .out files for supercells are found in `supercell_out.tar.lzma`. If phono3py
30
30
  is properly installed, the following command should work.
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '3.3.3'
16
- __version_tuple__ = version_tuple = (3, 3, 3)
15
+ __version__ = version = '3.3.4'
16
+ __version_tuple__ = version_tuple = (3, 3, 4)
@@ -1487,6 +1487,9 @@ class Phono3py:
1487
1487
  fc2 = None
1488
1488
  if fc_calculator_options is not None and "|" in fc_calculator_options:
1489
1489
  fc2 = None
1490
+ # fc2 should not be set if phonon_supercell_matrix is available.
1491
+ if self._phonon_supercell_matrix is not None:
1492
+ fc2 = None
1490
1493
 
1491
1494
  # Normally self._fc2 is overwritten in produce_fc2
1492
1495
  if self._fc2 is None:
@@ -1527,6 +1530,9 @@ class Phono3py:
1527
1530
  else:
1528
1531
  disp_dataset = self._phonon_dataset
1529
1532
 
1533
+ if not forces_in_dataset(disp_dataset):
1534
+ raise RuntimeError("Forces are not set in the dataset.")
1535
+
1530
1536
  if is_compact_fc:
1531
1537
  p2s_map = self._phonon_primitive.p2s_map
1532
1538
  else:
@@ -1548,10 +1554,7 @@ class Phono3py:
1548
1554
  )
1549
1555
  else:
1550
1556
  if "displacements" in disp_dataset:
1551
- msg = (
1552
- "fc_calculator has to be set to produce force "
1553
- "constans from this dataset for fc2."
1554
- )
1557
+ msg = "fc_calculator to solve fc2 has to be set."
1555
1558
  raise RuntimeError(msg)
1556
1559
  self._fc2 = get_phonopy_fc2(
1557
1560
  self._phonon_supercell,
@@ -37,11 +37,10 @@
37
37
  from __future__ import annotations
38
38
 
39
39
  import copy
40
- import os
41
40
  import pathlib
42
41
  import sys
43
42
  from dataclasses import asdict
44
- from typing import Optional, Union
43
+ from typing import Literal, Optional, Union
45
44
 
46
45
  import numpy as np
47
46
  from phonopy.cui.phonopy_script import file_exists, print_error
@@ -81,6 +80,7 @@ def create_phono3py_force_constants(
81
80
  settings,
82
81
  ph3py_yaml: Optional[Phono3pyYaml] = None,
83
82
  phono3py_yaml_filename: Optional[str] = None,
83
+ calculator: Optional[str] = None,
84
84
  input_filename: Optional[str] = None,
85
85
  output_filename: Optional[str] = None,
86
86
  log_level=1,
@@ -118,15 +118,12 @@ def create_phono3py_force_constants(
118
118
  if settings.read_fc3:
119
119
  _read_phono3py_fc3(phono3py, symmetrize_fc3r, input_filename, log_level)
120
120
  else: # fc3 from FORCES_FC3 or ph3py_yaml
121
- _create_phono3py_fc3(
121
+ _read_dataset_fc3(
122
122
  phono3py,
123
123
  ph3py_yaml,
124
124
  phono3py_yaml_filename,
125
- symmetrize_fc3r,
126
- settings.is_compact_fc,
127
125
  settings.cutoff_pair_distance,
128
- fc_calculator,
129
- fc_calculator_options,
126
+ calculator,
130
127
  settings.use_pypolymlp,
131
128
  settings.mlp_params,
132
129
  settings.displacement_distance,
@@ -134,6 +131,14 @@ def create_phono3py_force_constants(
134
131
  settings.random_seed,
135
132
  log_level,
136
133
  )
134
+ phono3py.produce_fc3(
135
+ symmetrize_fc3r=symmetrize_fc3r,
136
+ is_compact_fc=settings.is_compact_fc,
137
+ fc_calculator=extract_fc2_fc3_calculators(fc_calculator, 3),
138
+ fc_calculator_options=extract_fc2_fc3_calculators(
139
+ fc_calculator_options, 3
140
+ ),
141
+ )
137
142
 
138
143
  cutoff_distance = settings.cutoff_fc3_distance
139
144
  if cutoff_distance is not None and cutoff_distance > 0:
@@ -168,15 +173,20 @@ def create_phono3py_force_constants(
168
173
  if settings.read_fc2:
169
174
  _read_phono3py_fc2(phono3py, symmetrize_fc2, input_filename, log_level)
170
175
  else:
171
- _create_phono3py_fc2(
172
- phono3py,
173
- ph3py_yaml,
174
- symmetrize_fc2,
175
- settings.is_compact_fc,
176
- fc_calculator,
177
- fc_calculator_options,
178
- log_level,
176
+ if phono3py.dataset is None or phono3py.phonon_supercell_matrix is not None:
177
+ _read_dataset_fc2(
178
+ phono3py,
179
+ ph3py_yaml,
180
+ calculator,
181
+ log_level,
182
+ )
183
+ phono3py.produce_fc2(
184
+ symmetrize_fc2=symmetrize_fc2,
185
+ is_compact_fc=settings.is_compact_fc,
186
+ fc_calculator=extract_fc2_fc3_calculators(fc_calculator, 2),
187
+ fc_calculator_options=extract_fc2_fc3_calculators(fc_calculator_options, 2),
179
188
  )
189
+
180
190
  if output_filename is None:
181
191
  filename = "fc2.hdf5"
182
192
  else:
@@ -201,7 +211,8 @@ def parse_forces(
201
211
  cutoff_pair_distance=None,
202
212
  force_filename: str = "FORCES_FC3",
203
213
  phono3py_yaml_filename: Optional[str] = None,
204
- fc_type=None,
214
+ fc_type: Literal["fc3", "phonon_fc2"] = "fc3",
215
+ calculator: Optional[str] = None,
205
216
  log_level=0,
206
217
  ):
207
218
  """Read displacements and forces.
@@ -215,53 +226,39 @@ def parse_forces(
215
226
  """
216
227
  filename_read_from: Optional[str] = None
217
228
  dataset = None
218
- calculator = phono3py.calculator
229
+
230
+ if phono3py.phonon_supercell is None or fc_type == "fc3":
231
+ natom = len(phono3py.supercell)
232
+ else:
233
+ natom = len(phono3py.phonon_supercell)
219
234
 
220
235
  # Get dataset from ph3py_yaml. dataset can be None.
221
236
  # physical_units can be overwritten if calculator is found in ph3py_yaml.
222
237
  if ph3py_yaml:
223
238
  dataset = _extract_dataset_from_ph3py_yaml(ph3py_yaml, fc_type)
224
- if dataset and ph3py_yaml.calculator:
225
- calculator = ph3py_yaml.calculator
239
+ if dataset:
240
+ filename_read_from = phono3py_yaml_filename
226
241
 
227
242
  physical_units = get_default_physical_units(calculator)
228
243
 
229
- if phono3py.phonon_supercell is None or fc_type == "fc3":
230
- natom = len(phono3py.supercell)
231
- else:
232
- natom = len(phono3py.phonon_supercell)
233
-
234
- if dataset:
235
- filename_read_from = phono3py_yaml_filename
236
-
237
- # Units of displacements and forces are converted. If forces don't
238
- # exist, the convesion will not be performed for forces.
239
- if calculator is not None:
240
- _convert_unit_in_dataset(
241
- dataset,
242
- distance_to_A=physical_units["distance_to_A"],
243
- force_to_eVperA=physical_units["force_to_eVperA"],
244
+ # Forces are not yet found in dataset. Then try to read from FORCES_FC3 or
245
+ # FORCES_FC2.
246
+ if force_filename is not None:
247
+ if dataset is None or (dataset is not None and not forces_in_dataset(dataset)):
248
+ dataset = _read_FORCES_FC3_or_FC2(
249
+ natom, dataset, fc_type, filename=force_filename, log_level=log_level
244
250
  )
245
-
246
- # Try to read FORCES_FC* if type-2 and return dataset.
247
- # None is returned unless type-2.
248
- # can emit FileNotFoundError.
249
- if dataset is None or (dataset is not None and not forces_in_dataset(dataset)):
250
- _dataset = read_type2_dataset(
251
- natom, filename=force_filename, log_level=log_level
251
+ if dataset:
252
+ filename_read_from = force_filename
253
+
254
+ # Units of displacements and forces are converted. If forces don't
255
+ # exist, the convesion will not be performed for forces.
256
+ if calculator is not None:
257
+ _convert_unit_in_dataset(
258
+ dataset,
259
+ distance_to_A=physical_units["distance_to_A"],
260
+ force_to_eVperA=physical_units["force_to_eVperA"],
252
261
  )
253
- # Do not overwrite dataset when _dataset is None.
254
- if _dataset:
255
- filename_read_from = force_filename
256
- dataset = _dataset
257
-
258
- # Units of displacements and forces are converted.
259
- if calculator is not None:
260
- _convert_unit_in_dataset(
261
- dataset,
262
- distance_to_A=physical_units["distance_to_A"],
263
- force_to_eVperA=physical_units["force_to_eVperA"],
264
- )
265
262
 
266
263
  assert dataset is not None
267
264
 
@@ -286,29 +283,6 @@ def parse_forces(
286
283
  if log_level:
287
284
  print("Cutoff-pair-distance: %f" % cutoff_pair_distance)
288
285
 
289
- # Type-1 FORCES_FC*.
290
- # dataset comes either from disp_fc*.yaml or phono3py*.yaml.
291
- if not forces_in_dataset(dataset):
292
- if force_filename is not None:
293
- if fc_type == "fc3":
294
- parse_FORCES_FC3(dataset, filename=force_filename)
295
- else:
296
- parse_FORCES_FC2(dataset, filename=force_filename)
297
-
298
- if log_level:
299
- print(
300
- f'Sets of supercell forces were read from "{force_filename}".',
301
- flush=True,
302
- )
303
-
304
- # Unit of displacements is already converted.
305
- # Therefore, only unit of forces is converted.
306
- if calculator is not None:
307
- _convert_unit_in_dataset(
308
- dataset,
309
- force_to_eVperA=physical_units["force_to_eVperA"],
310
- )
311
-
312
286
  return dataset
313
287
 
314
288
 
@@ -437,32 +411,49 @@ def _read_phono3py_fc2(phono3py, symmetrize_fc2, input_filename, log_level):
437
411
  phono3py.fc2 = phonon_fc2
438
412
 
439
413
 
440
- def read_type2_dataset(natom, filename="FORCES_FC3", log_level=0) -> Optional[dict]:
441
- """Read type-2 FORCES_FC3."""
414
+ def _read_FORCES_FC3_or_FC2(
415
+ natom: int,
416
+ dataset: Optional[dict],
417
+ fc_type: str,
418
+ filename: str = "FORCES_FC3",
419
+ log_level: int = 0,
420
+ ) -> Optional[dict]:
421
+ """Read FORCES_FC3 or FORCES_FC2.
422
+
423
+ Read the first line of forces file to determine the type of the file.
424
+
425
+ """
442
426
  if filename is None or not pathlib.Path(filename).exists():
443
427
  return None
444
428
 
445
429
  with open(filename, "r") as f:
446
430
  len_first_line = get_length_of_first_line(f)
447
- if len_first_line == 6:
448
- dataset = get_dataset_type2(f, natom)
431
+ if len_first_line == 6: # Type-2
432
+ _dataset = get_dataset_type2(f, natom)
449
433
  if log_level:
450
- n_disp = len(dataset["displacements"])
434
+ n_disp = len(_dataset["displacements"])
451
435
  print(f'{n_disp} snapshots were found in "{filename}".')
452
- else:
453
- dataset = None
436
+ return _dataset
437
+
438
+ # Type-1
439
+ if fc_type == "fc3":
440
+ parse_FORCES_FC3(dataset, filename)
441
+ else:
442
+ parse_FORCES_FC2(dataset, filename)
443
+ if log_level:
444
+ print(
445
+ f'Sets of supercell forces were read from "{filename}".',
446
+ flush=True,
447
+ )
454
448
  return dataset
455
449
 
456
450
 
457
- def _create_phono3py_fc3(
451
+ def _read_dataset_fc3(
458
452
  phono3py: Phono3py,
459
453
  ph3py_yaml: Optional[Phono3pyYaml],
460
454
  phono3py_yaml_filename: Optional[str],
461
- symmetrize_fc3r: bool,
462
- is_compact_fc: bool,
463
455
  cutoff_pair_distance: Optional[float],
464
- fc_calculator: Optional[str],
465
- fc_calculator_options: Optional[str],
456
+ calculator: Optional[str],
466
457
  use_pypolymlp: bool,
467
458
  mlp_params: Union[str, dict, PypolymlpParams],
468
459
  displacement_distance: Optional[float],
@@ -484,16 +475,15 @@ def _create_phono3py_fc3(
484
475
  when the former value is smaller than the later.
485
476
 
486
477
  """
487
- _ph3py_yaml = _get_default_ph3py_yaml(ph3py_yaml)
488
-
489
478
  try:
490
479
  dataset = parse_forces(
491
480
  phono3py,
492
- ph3py_yaml=_ph3py_yaml,
481
+ ph3py_yaml=ph3py_yaml,
493
482
  cutoff_pair_distance=cutoff_pair_distance,
494
483
  force_filename="FORCES_FC3",
495
484
  phono3py_yaml_filename=phono3py_yaml_filename,
496
485
  fc_type="fc3",
486
+ calculator=calculator,
497
487
  log_level=log_level,
498
488
  )
499
489
  except RuntimeError as e:
@@ -518,12 +508,6 @@ def _create_phono3py_fc3(
518
508
  )
519
509
  else:
520
510
  phono3py.dataset = dataset
521
- phono3py.produce_fc3(
522
- symmetrize_fc3r=symmetrize_fc3r,
523
- is_compact_fc=is_compact_fc,
524
- fc_calculator=extract_fc2_fc3_calculators(fc_calculator, 3),
525
- fc_calculator_options=extract_fc2_fc3_calculators(fc_calculator_options, 3),
526
- )
527
511
 
528
512
 
529
513
  def run_pypolymlp_to_compute_forces(
@@ -653,13 +637,10 @@ def run_pypolymlp_to_compute_phonon_forces(
653
637
  ph3py.evaluate_phonon_mlp()
654
638
 
655
639
 
656
- def _create_phono3py_fc2(
640
+ def _read_dataset_fc2(
657
641
  phono3py: Phono3py,
658
642
  ph3py_yaml: Optional[Phono3pyYaml],
659
- symmetrize_fc2,
660
- is_compact_fc,
661
- fc_calculator,
662
- fc_calculator_options,
643
+ calculator,
663
644
  log_level,
664
645
  ):
665
646
  """Read forces and produce fc2.
@@ -667,19 +648,22 @@ def _create_phono3py_fc2(
667
648
  force_filename is either "FORCES_FC2" or "FORCES_FC3".
668
649
 
669
650
  """
670
- if phono3py.phonon_supercell_matrix is None:
651
+ # _ph3py_yaml = _get_default_ph3py_yaml(ph3py_yaml)
652
+
653
+ if phono3py.phonon_supercell_matrix is not None:
654
+ force_filename = "FORCES_FC2"
655
+ elif phono3py.dataset is None:
671
656
  force_filename = "FORCES_FC3"
672
657
  else:
673
- force_filename = "FORCES_FC2"
674
-
675
- _ph3py_yaml = _get_default_ph3py_yaml(ph3py_yaml)
658
+ raise RuntimeError("Force filename is not determined.")
676
659
 
677
660
  try:
678
661
  dataset = parse_forces(
679
662
  phono3py,
680
- ph3py_yaml=_ph3py_yaml,
663
+ ph3py_yaml=ph3py_yaml,
681
664
  force_filename=force_filename,
682
665
  fc_type="phonon_fc2",
666
+ calculator=calculator,
683
667
  log_level=log_level,
684
668
  )
685
669
  except RuntimeError as e:
@@ -690,18 +674,15 @@ def _create_phono3py_fc2(
690
674
  except FileNotFoundError as e:
691
675
  file_exists(e.filename, log_level)
692
676
 
693
- phono3py.phonon_dataset = dataset
694
- phono3py.produce_fc2(
695
- symmetrize_fc2=symmetrize_fc2,
696
- is_compact_fc=is_compact_fc,
697
- fc_calculator=extract_fc2_fc3_calculators(fc_calculator, 2),
698
- fc_calculator_options=extract_fc2_fc3_calculators(fc_calculator_options, 2),
699
- )
677
+ if phono3py.phonon_supercell_matrix is not None:
678
+ phono3py.phonon_dataset = dataset
679
+ elif phono3py.dataset is None:
680
+ phono3py.dataset = dataset
700
681
 
701
682
 
702
683
  def _get_default_ph3py_yaml(ph3py_yaml: Optional[Phono3pyYaml]):
703
684
  _ph3py_yaml = ph3py_yaml
704
- if _ph3py_yaml is None and os.path.isfile("phono3py_disp.yaml"):
685
+ if _ph3py_yaml is None and pathlib.Path("phono3py_disp.yaml").exists():
705
686
  _ph3py_yaml = Phono3pyYaml()
706
687
  _ph3py_yaml.read("phono3py_disp.yaml")
707
688
  return _ph3py_yaml