mirror of https://github.com/phonopy/phono3py.git
Introduce isort
This commit is contained in:
parent
239965e961
commit
53c90add93
|
@ -29,3 +29,9 @@ repos:
|
||||||
rev: 6.1.1
|
rev: 6.1.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pydocstyle
|
- id: pydocstyle
|
||||||
|
|
||||||
|
- repo: https://github.com/pycqa/isort
|
||||||
|
rev: 5.8.0
|
||||||
|
hooks:
|
||||||
|
- id: isort
|
||||||
|
name: isort (python)
|
||||||
|
|
|
@ -34,6 +34,13 @@ phono3py repository.
|
||||||
"python.linting.pycodestyleEnabled": false,
|
"python.linting.pycodestyleEnabled": false,
|
||||||
"python.linting.pydocstyleEnabled": true,
|
"python.linting.pydocstyleEnabled": true,
|
||||||
"python.formatting.provider": "black",
|
"python.formatting.provider": "black",
|
||||||
|
"python.formatting.blackArgs": ["--line-length=88"],
|
||||||
|
"python.sortImports.args": ["--profile", "black"],
|
||||||
|
"[python]": {
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.organizeImports": true
|
||||||
|
},
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- Use of pre-commit (https://pre-commit.com/) is encouraged.
|
- Use of pre-commit (https://pre-commit.com/) is encouraged.
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
"""Example to run thermal conductivity of Si."""
|
"""Example to run thermal conductivity of Si."""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.interface.vasp import read_vasp
|
from phonopy.interface.vasp import read_vasp
|
||||||
from phono3py import Phono3py
|
|
||||||
import phono3py
|
import phono3py
|
||||||
|
from phono3py import Phono3py
|
||||||
|
|
||||||
|
|
||||||
def run_thermal_conductivity():
|
def run_thermal_conductivity():
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
"""Launch script of ZnTe AiiDA calculation using aiida-phononpy."""
|
"""Launch script of ZnTe AiiDA calculation using aiida-phononpy."""
|
||||||
from phonopy.interface.vasp import read_vasp_from_strings
|
|
||||||
from aiida.manage.configuration import load_profile
|
|
||||||
from aiida.orm import Float, Bool, Str
|
|
||||||
from aiida.plugins import DataFactory, WorkflowFactory
|
|
||||||
from aiida.engine import submit
|
from aiida.engine import submit
|
||||||
|
from aiida.manage.configuration import load_profile
|
||||||
|
from aiida.orm import Bool, Float, Str
|
||||||
|
from aiida.plugins import DataFactory, WorkflowFactory
|
||||||
from aiida_phonopy.common.utils import phonopy_atoms_to_structure
|
from aiida_phonopy.common.utils import phonopy_atoms_to_structure
|
||||||
|
from phonopy.interface.vasp import read_vasp_from_strings
|
||||||
|
|
||||||
load_profile()
|
load_profile()
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
from phono3py.version import __version__ # noqa F401
|
|
||||||
from phono3py.api_phono3py import Phono3py # noqa F401
|
|
||||||
from phono3py.api_jointdos import Phono3pyJointDos # noqa F401
|
|
||||||
from phono3py.api_isotope import Phono3pyIsotope # noqa F401
|
from phono3py.api_isotope import Phono3pyIsotope # noqa F401
|
||||||
|
from phono3py.api_jointdos import Phono3pyJointDos # noqa F401
|
||||||
|
from phono3py.api_phono3py import Phono3py # noqa F401
|
||||||
from phono3py.cui.load import load # noqa F401
|
from phono3py.cui.load import load # noqa F401
|
||||||
|
from phono3py.version import __version__ # noqa F401
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import VaspToTHz
|
from phonopy.units import VaspToTHz
|
||||||
|
|
||||||
from phono3py.other.isotope import Isotope
|
from phono3py.other.isotope import Isotope
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,12 +34,12 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import VaspToTHz
|
|
||||||
from phonopy.structure.symmetry import Symmetry
|
from phonopy.structure.symmetry import Symmetry
|
||||||
from phono3py.phonon3.joint_dos import JointDos
|
from phonopy.units import VaspToTHz
|
||||||
from phono3py.phonon.grid import BZGrid
|
|
||||||
|
|
||||||
from phono3py.file_IO import write_joint_dos
|
from phono3py.file_IO import write_joint_dos
|
||||||
|
from phono3py.phonon3.joint_dos import JointDos
|
||||||
|
from phono3py.phonon.grid import BZGrid
|
||||||
|
|
||||||
|
|
||||||
class Phono3pyJointDos:
|
class Phono3pyJointDos:
|
||||||
|
|
|
@ -34,59 +34,61 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.structure.symmetry import Symmetry
|
from phonopy.harmonic.displacement import (
|
||||||
from phonopy.structure.cells import (
|
directions_to_displacement_dataset,
|
||||||
get_supercell,
|
get_least_displacements,
|
||||||
get_primitive,
|
|
||||||
guess_primitive_matrix,
|
|
||||||
shape_supercell_matrix,
|
|
||||||
get_primitive_matrix,
|
|
||||||
)
|
|
||||||
from phonopy.structure.atoms import PhonopyAtoms
|
|
||||||
from phonopy.structure.dataset import get_displacements_and_forces
|
|
||||||
from phonopy.units import VaspToTHz
|
|
||||||
from phonopy.harmonic.force_constants import (
|
|
||||||
symmetrize_force_constants,
|
|
||||||
symmetrize_compact_force_constants,
|
|
||||||
set_translational_invariance,
|
|
||||||
set_permutation_symmetry,
|
|
||||||
)
|
)
|
||||||
from phonopy.harmonic.force_constants import get_fc2 as get_phonopy_fc2
|
from phonopy.harmonic.force_constants import get_fc2 as get_phonopy_fc2
|
||||||
from phonopy.interface.fc_calculator import get_fc2
|
from phonopy.harmonic.force_constants import (
|
||||||
from phonopy.harmonic.displacement import (
|
set_permutation_symmetry,
|
||||||
get_least_displacements,
|
set_translational_invariance,
|
||||||
directions_to_displacement_dataset,
|
symmetrize_compact_force_constants,
|
||||||
|
symmetrize_force_constants,
|
||||||
|
)
|
||||||
|
from phonopy.interface.fc_calculator import get_fc2
|
||||||
|
from phonopy.structure.atoms import PhonopyAtoms
|
||||||
|
from phonopy.structure.cells import (
|
||||||
|
get_primitive,
|
||||||
|
get_primitive_matrix,
|
||||||
|
get_supercell,
|
||||||
|
guess_primitive_matrix,
|
||||||
|
shape_supercell_matrix,
|
||||||
|
)
|
||||||
|
from phonopy.structure.dataset import get_displacements_and_forces
|
||||||
|
from phonopy.structure.symmetry import Symmetry
|
||||||
|
from phonopy.units import VaspToTHz
|
||||||
|
|
||||||
|
from phono3py.interface.fc_calculator import get_fc3
|
||||||
|
from phono3py.interface.phono3py_yaml import Phono3pyYaml
|
||||||
|
from phono3py.phonon3.conductivity_LBTE import get_thermal_conductivity_LBTE
|
||||||
|
from phono3py.phonon3.conductivity_RTA import get_thermal_conductivity_RTA
|
||||||
|
from phono3py.phonon3.dataset import get_displacements_and_forces_fc3
|
||||||
|
from phono3py.phonon3.displacement_fc3 import (
|
||||||
|
direction_to_displacement,
|
||||||
|
get_third_order_displacements,
|
||||||
|
)
|
||||||
|
from phono3py.phonon3.fc3 import cutoff_fc3_by_zero
|
||||||
|
from phono3py.phonon3.fc3 import get_fc3 as get_phono3py_fc3
|
||||||
|
from phono3py.phonon3.fc3 import (
|
||||||
|
set_permutation_symmetry_compact_fc3,
|
||||||
|
set_permutation_symmetry_fc3,
|
||||||
|
set_translational_invariance_compact_fc3,
|
||||||
|
set_translational_invariance_fc3,
|
||||||
)
|
)
|
||||||
from phono3py.version import __version__
|
|
||||||
from phono3py.phonon3.imag_self_energy import (
|
from phono3py.phonon3.imag_self_energy import (
|
||||||
get_imag_self_energy,
|
get_imag_self_energy,
|
||||||
write_imag_self_energy,
|
write_imag_self_energy,
|
||||||
)
|
)
|
||||||
|
from phono3py.phonon3.interaction import Interaction
|
||||||
from phono3py.phonon3.real_self_energy import (
|
from phono3py.phonon3.real_self_energy import (
|
||||||
get_real_self_energy,
|
get_real_self_energy,
|
||||||
write_real_self_energy,
|
write_real_self_energy,
|
||||||
)
|
)
|
||||||
from phono3py.phonon3.spectral_function import run_spectral_function
|
from phono3py.phonon3.spectral_function import run_spectral_function
|
||||||
from phono3py.phonon3.interaction import Interaction
|
|
||||||
from phono3py.phonon3.conductivity_RTA import get_thermal_conductivity_RTA
|
|
||||||
from phono3py.phonon3.conductivity_LBTE import get_thermal_conductivity_LBTE
|
|
||||||
from phono3py.phonon3.displacement_fc3 import (
|
|
||||||
get_third_order_displacements,
|
|
||||||
direction_to_displacement,
|
|
||||||
)
|
|
||||||
from phono3py.phonon3.fc3 import (
|
|
||||||
set_permutation_symmetry_fc3,
|
|
||||||
set_permutation_symmetry_compact_fc3,
|
|
||||||
set_translational_invariance_fc3,
|
|
||||||
set_translational_invariance_compact_fc3,
|
|
||||||
cutoff_fc3_by_zero,
|
|
||||||
)
|
|
||||||
from phono3py.phonon3.fc3 import get_fc3 as get_phono3py_fc3
|
|
||||||
from phono3py.phonon.grid import BZGrid
|
from phono3py.phonon.grid import BZGrid
|
||||||
from phono3py.phonon3.dataset import get_displacements_and_forces_fc3
|
from phono3py.version import __version__
|
||||||
from phono3py.interface.phono3py_yaml import Phono3pyYaml
|
|
||||||
from phono3py.interface.fc_calculator import get_fc3
|
|
||||||
|
|
||||||
|
|
||||||
class Phono3py(object):
|
class Phono3py(object):
|
||||||
|
|
|
@ -35,33 +35,35 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
from phonopy.cui.phonopy_script import file_exists, print_error
|
||||||
|
from phonopy.file_IO import get_dataset_type2
|
||||||
from phonopy.harmonic.force_constants import (
|
from phonopy.harmonic.force_constants import (
|
||||||
show_drift_force_constants,
|
show_drift_force_constants,
|
||||||
symmetrize_force_constants,
|
|
||||||
symmetrize_compact_force_constants,
|
symmetrize_compact_force_constants,
|
||||||
|
symmetrize_force_constants,
|
||||||
)
|
)
|
||||||
from phonopy.file_IO import get_dataset_type2
|
|
||||||
from phonopy.cui.phonopy_script import print_error, file_exists
|
|
||||||
from phonopy.interface.calculator import get_default_physical_units
|
from phonopy.interface.calculator import get_default_physical_units
|
||||||
from phono3py.phonon3.fc3 import show_drift_fc3
|
|
||||||
|
from phono3py.cui.show_log import show_phono3py_force_constants_settings
|
||||||
from phono3py.file_IO import (
|
from phono3py.file_IO import (
|
||||||
parse_disp_fc3_yaml,
|
get_length_of_first_line,
|
||||||
parse_disp_fc2_yaml,
|
parse_disp_fc2_yaml,
|
||||||
|
parse_disp_fc3_yaml,
|
||||||
parse_FORCES_FC2,
|
parse_FORCES_FC2,
|
||||||
parse_FORCES_FC3,
|
parse_FORCES_FC3,
|
||||||
read_fc3_from_hdf5,
|
|
||||||
read_fc2_from_hdf5,
|
read_fc2_from_hdf5,
|
||||||
write_fc3_to_hdf5,
|
read_fc3_from_hdf5,
|
||||||
write_fc2_to_hdf5,
|
write_fc2_to_hdf5,
|
||||||
get_length_of_first_line,
|
write_fc3_to_hdf5,
|
||||||
)
|
)
|
||||||
from phono3py.cui.show_log import show_phono3py_force_constants_settings
|
from phono3py.interface.phono3py_yaml import Phono3pyYaml
|
||||||
from phono3py.phonon3.fc3 import (
|
from phono3py.phonon3.fc3 import (
|
||||||
set_permutation_symmetry_fc3,
|
set_permutation_symmetry_fc3,
|
||||||
set_translational_invariance_fc3,
|
set_translational_invariance_fc3,
|
||||||
|
show_drift_fc3,
|
||||||
)
|
)
|
||||||
from phono3py.interface.phono3py_yaml import Phono3pyYaml
|
|
||||||
|
|
||||||
|
|
||||||
def create_phono3py_force_constants(
|
def create_phono3py_force_constants(
|
||||||
|
|
|
@ -33,14 +33,15 @@
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
from phonopy.interface.calculator import write_supercells_with_displacements
|
||||||
|
|
||||||
from phono3py import Phono3py
|
from phono3py import Phono3py
|
||||||
from phono3py.file_IO import write_disp_fc3_yaml, write_disp_fc2_yaml
|
from phono3py.file_IO import write_disp_fc2_yaml, write_disp_fc3_yaml
|
||||||
from phono3py.interface.calculator import (
|
from phono3py.interface.calculator import (
|
||||||
get_additional_info_to_write_fc2_supercells,
|
get_additional_info_to_write_fc2_supercells,
|
||||||
get_additional_info_to_write_supercells,
|
get_additional_info_to_write_supercells,
|
||||||
get_default_displacement_distance,
|
get_default_displacement_distance,
|
||||||
)
|
)
|
||||||
from phonopy.interface.calculator import write_supercells_with_displacements
|
|
||||||
|
|
||||||
|
|
||||||
def create_phono3py_supercells(
|
def create_phono3py_supercells(
|
||||||
|
|
|
@ -1,16 +1,21 @@
|
||||||
"""Phono3py kaccum command line script."""
|
"""Phono3py kaccum command line script."""
|
||||||
import sys
|
|
||||||
import argparse
|
import argparse
|
||||||
import numpy as np
|
import sys
|
||||||
|
|
||||||
import h5py
|
import h5py
|
||||||
|
import numpy as np
|
||||||
from phonopy.cui.settings import fracval
|
from phonopy.cui.settings import fracval
|
||||||
from phonopy.structure.cells import get_primitive
|
|
||||||
from phonopy.structure.symmetry import Symmetry
|
|
||||||
from phonopy.interface.calculator import read_crystal_structure
|
from phonopy.interface.calculator import read_crystal_structure
|
||||||
from phonopy.phonon.dos import NormalDistribution
|
from phonopy.phonon.dos import NormalDistribution
|
||||||
from phonopy.structure.cells import get_primitive_matrix, guess_primitive_matrix
|
from phonopy.structure.cells import (
|
||||||
from phono3py.phonon.grid import BZGrid, get_ir_grid_points
|
get_primitive,
|
||||||
|
get_primitive_matrix,
|
||||||
|
guess_primitive_matrix,
|
||||||
|
)
|
||||||
|
from phonopy.structure.symmetry import Symmetry
|
||||||
|
|
||||||
from phono3py.other.tetrahedron_method import get_integration_weights
|
from phono3py.other.tetrahedron_method import get_integration_weights
|
||||||
|
from phono3py.phonon.grid import BZGrid, get_ir_grid_points
|
||||||
|
|
||||||
epsilon = 1.0e-8
|
epsilon = 1.0e-8
|
||||||
|
|
||||||
|
|
|
@ -35,15 +35,17 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import typing
|
import typing
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phono3py import Phono3py
|
import phonopy.cui.load_helper as load_helper
|
||||||
from phono3py.interface.phono3py_yaml import Phono3pyYaml
|
|
||||||
from phono3py.cui.create_force_constants import parse_forces, forces_in_dataset
|
|
||||||
from phono3py.file_IO import read_fc3_from_hdf5, read_fc2_from_hdf5
|
|
||||||
from phono3py.phonon3.fc3 import show_drift_fc3
|
|
||||||
from phonopy.harmonic.force_constants import show_drift_force_constants
|
from phonopy.harmonic.force_constants import show_drift_force_constants
|
||||||
from phonopy.interface.calculator import get_default_physical_units
|
from phonopy.interface.calculator import get_default_physical_units
|
||||||
import phonopy.cui.load_helper as load_helper
|
|
||||||
|
from phono3py import Phono3py
|
||||||
|
from phono3py.cui.create_force_constants import forces_in_dataset, parse_forces
|
||||||
|
from phono3py.file_IO import read_fc2_from_hdf5, read_fc3_from_hdf5
|
||||||
|
from phono3py.interface.phono3py_yaml import Phono3pyYaml
|
||||||
|
from phono3py.phonon3.fc3 import show_drift_fc3
|
||||||
|
|
||||||
|
|
||||||
def load(
|
def load(
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from phonopy.cui.phonopy_argparse import fix_deprecated_option_names
|
from phonopy.cui.phonopy_argparse import fix_deprecated_option_names
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,7 +42,9 @@ def get_parser(fc_symmetry=False, is_nac=False, load_phono3py_yaml=False):
|
||||||
"""Return ArgumentParser instance."""
|
"""Return ArgumentParser instance."""
|
||||||
deprecated = fix_deprecated_option_names(sys.argv)
|
deprecated = fix_deprecated_option_names(sys.argv)
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
from phonopy.interface.calculator import add_arguments_of_calculators
|
from phonopy.interface.calculator import add_arguments_of_calculators
|
||||||
|
|
||||||
from phono3py.interface.calculator import calculator_info
|
from phono3py.interface.calculator import calculator_info
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Phono3py command-line-tool")
|
parser = argparse.ArgumentParser(description="Phono3py command-line-tool")
|
||||||
|
|
|
@ -34,61 +34,62 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.file_IO import write_FORCE_SETS, parse_FORCE_SETS, is_file_phonopy_yaml
|
|
||||||
from phonopy.units import VaspToTHz, Bohr, Hartree
|
|
||||||
from phonopy.cui.collect_cell_info import collect_cell_info
|
from phonopy.cui.collect_cell_info import collect_cell_info
|
||||||
from phonopy.cui.create_force_sets import check_number_of_force_files
|
from phonopy.cui.create_force_sets import check_number_of_force_files
|
||||||
from phonopy.interface.calculator import (
|
|
||||||
get_force_sets,
|
|
||||||
get_default_physical_units,
|
|
||||||
get_interface_mode,
|
|
||||||
)
|
|
||||||
from phonopy.cui.phonopy_argparse import show_deprecated_option_warnings
|
from phonopy.cui.phonopy_argparse import show_deprecated_option_warnings
|
||||||
from phonopy.phonon.band_structure import get_band_qpoints
|
|
||||||
from phonopy.cui.phonopy_script import (
|
from phonopy.cui.phonopy_script import (
|
||||||
store_nac_params,
|
file_exists,
|
||||||
|
files_exist,
|
||||||
|
get_fc_calculator_params,
|
||||||
print_end,
|
print_end,
|
||||||
print_error,
|
print_error,
|
||||||
print_error_message,
|
print_error_message,
|
||||||
print_version,
|
print_version,
|
||||||
file_exists,
|
store_nac_params,
|
||||||
files_exist,
|
|
||||||
get_fc_calculator_params,
|
|
||||||
)
|
)
|
||||||
|
from phonopy.file_IO import is_file_phonopy_yaml, parse_FORCE_SETS, write_FORCE_SETS
|
||||||
|
from phonopy.interface.calculator import (
|
||||||
|
get_default_physical_units,
|
||||||
|
get_force_sets,
|
||||||
|
get_interface_mode,
|
||||||
|
)
|
||||||
|
from phonopy.phonon.band_structure import get_band_qpoints
|
||||||
from phonopy.structure.cells import isclose as cells_isclose
|
from phonopy.structure.cells import isclose as cells_isclose
|
||||||
from phono3py.version import __version__
|
from phonopy.units import Bohr, Hartree, VaspToTHz
|
||||||
from phono3py.file_IO import (
|
|
||||||
parse_disp_fc2_yaml,
|
from phono3py import Phono3py, Phono3pyIsotope, Phono3pyJointDos
|
||||||
parse_disp_fc3_yaml,
|
from phono3py.cui.create_force_constants import create_phono3py_force_constants
|
||||||
read_phonon_from_hdf5,
|
from phono3py.cui.create_supercells import create_phono3py_supercells
|
||||||
write_phonon_to_hdf5,
|
|
||||||
parse_FORCES_FC2,
|
|
||||||
write_FORCES_FC2,
|
|
||||||
write_FORCES_FC3,
|
|
||||||
get_length_of_first_line,
|
|
||||||
write_fc3_to_hdf5,
|
|
||||||
write_fc2_to_hdf5,
|
|
||||||
)
|
|
||||||
from phono3py.cui.settings import Phono3pyConfParser
|
|
||||||
from phono3py.cui.load import set_dataset_and_force_constants
|
from phono3py.cui.load import set_dataset_and_force_constants
|
||||||
from phono3py import Phono3py, Phono3pyJointDos, Phono3pyIsotope
|
|
||||||
from phono3py.phonon3.gruneisen import run_gruneisen_parameters
|
|
||||||
from phono3py.phonon.grid import get_grid_point_from_address
|
|
||||||
from phono3py.cui.phono3py_argparse import get_parser
|
from phono3py.cui.phono3py_argparse import get_parser
|
||||||
|
from phono3py.cui.settings import Phono3pyConfParser
|
||||||
from phono3py.cui.show_log import (
|
from phono3py.cui.show_log import (
|
||||||
show_general_settings,
|
show_general_settings,
|
||||||
show_phono3py_settings,
|
|
||||||
show_phono3py_cells,
|
show_phono3py_cells,
|
||||||
|
show_phono3py_settings,
|
||||||
|
)
|
||||||
|
from phono3py.cui.triplets_info import show_num_triplets, write_grid_points
|
||||||
|
from phono3py.file_IO import (
|
||||||
|
get_length_of_first_line,
|
||||||
|
parse_disp_fc2_yaml,
|
||||||
|
parse_disp_fc3_yaml,
|
||||||
|
parse_FORCES_FC2,
|
||||||
|
read_phonon_from_hdf5,
|
||||||
|
write_fc2_to_hdf5,
|
||||||
|
write_fc3_to_hdf5,
|
||||||
|
write_FORCES_FC2,
|
||||||
|
write_FORCES_FC3,
|
||||||
|
write_phonon_to_hdf5,
|
||||||
)
|
)
|
||||||
from phono3py.cui.triplets_info import write_grid_points, show_num_triplets
|
|
||||||
from phono3py.cui.create_supercells import create_phono3py_supercells
|
|
||||||
from phono3py.cui.create_force_constants import create_phono3py_force_constants
|
|
||||||
from phono3py.interface.phono3py_yaml import (
|
from phono3py.interface.phono3py_yaml import (
|
||||||
Phono3pyYaml,
|
Phono3pyYaml,
|
||||||
displacements_yaml_lines_type1,
|
displacements_yaml_lines_type1,
|
||||||
)
|
)
|
||||||
|
from phono3py.phonon3.gruneisen import run_gruneisen_parameters
|
||||||
|
from phono3py.phonon.grid import get_grid_point_from_address
|
||||||
|
from phono3py.version import __version__
|
||||||
|
|
||||||
# import logging
|
# import logging
|
||||||
# logging.basicConfig()
|
# logging.basicConfig()
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.cui.settings import Settings, ConfParser, fracval
|
from phonopy.cui.settings import ConfParser, Settings, fracval
|
||||||
|
|
||||||
|
|
||||||
class Phono3pySettings(Settings):
|
class Phono3pySettings(Settings):
|
||||||
|
|
|
@ -34,9 +34,12 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.structure.cells import print_cell
|
from phonopy.structure.cells import print_cell
|
||||||
|
|
||||||
|
from phono3py.cui.settings import Phono3pySettings
|
||||||
|
|
||||||
|
|
||||||
def show_general_settings(
|
def show_general_settings(
|
||||||
settings, run_mode, phono3py, cell_filename, input_filename, output_filename
|
settings, run_mode, phono3py, cell_filename, input_filename, output_filename
|
||||||
|
@ -106,12 +109,11 @@ def show_phono3py_cells(phono3py, settings):
|
||||||
print("-" * 76)
|
print("-" * 76)
|
||||||
|
|
||||||
|
|
||||||
def show_phono3py_force_constants_settings(settings):
|
def show_phono3py_force_constants_settings(settings: Phono3pySettings):
|
||||||
"""Show force constants settings."""
|
"""Show force constants settings."""
|
||||||
read_fc3 = settings.read_fc3
|
read_fc3 = settings.read_fc3
|
||||||
read_fc2 = settings.read_fc2
|
read_fc2 = settings.read_fc2
|
||||||
symmetrize_fc3r = settings.is_symmetrize_fc3_r or settings.fc_symmetry
|
symmetrize_fc3r = settings.is_symmetrize_fc3_r or settings.fc_symmetry
|
||||||
symmetrize_fc3q = settings.is_symmetrize_fc3_q
|
|
||||||
symmetrize_fc2 = settings.is_symmetrize_fc2 or settings.fc_symmetry
|
symmetrize_fc2 = settings.is_symmetrize_fc2 or settings.fc_symmetry
|
||||||
|
|
||||||
print("-" * 29 + " Force constants " + "-" * 30)
|
print("-" * 29 + " Force constants " + "-" * 30)
|
||||||
|
@ -132,10 +134,6 @@ def show_phono3py_force_constants_settings(settings):
|
||||||
"Imposing translational and index exchange symmetry to fc3: "
|
"Imposing translational and index exchange symmetry to fc3: "
|
||||||
"%s" % symmetrize_fc3r
|
"%s" % symmetrize_fc3r
|
||||||
)
|
)
|
||||||
print(
|
|
||||||
("Imposing symmetry of index exchange to fc3 in reciprocal " "space: %s")
|
|
||||||
% symmetrize_fc3q
|
|
||||||
)
|
|
||||||
|
|
||||||
if settings.cutoff_fc3_distance is not None:
|
if settings.cutoff_fc3_distance is not None:
|
||||||
print("FC3 cutoff distance: %s" % settings.cutoff_fc3_distance)
|
print("FC3 cutoff distance: %s" % settings.cutoff_fc3_distance)
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phono3py.file_IO import write_ir_grid_points, write_grid_address_to_hdf5
|
|
||||||
|
from phono3py.file_IO import write_grid_address_to_hdf5, write_ir_grid_points
|
||||||
from phono3py.phonon3.triplets import get_triplets_at_q
|
from phono3py.phonon3.triplets import get_triplets_at_q
|
||||||
from phono3py.phonon.grid import get_ir_grid_points
|
from phono3py.phonon.grid import get_ir_grid_points
|
||||||
|
|
||||||
|
|
|
@ -35,13 +35,15 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import warnings
|
import warnings
|
||||||
import numpy as np
|
|
||||||
import h5py
|
import h5py
|
||||||
|
import numpy as np
|
||||||
|
from phonopy.cui.load_helper import read_force_constants_from_hdf5
|
||||||
|
|
||||||
# This import is deactivated for a while.
|
# This import is deactivated for a while.
|
||||||
# from phonopy.file_IO import write_force_constants_to_hdf5
|
# from phonopy.file_IO import write_force_constants_to_hdf5
|
||||||
from phonopy.file_IO import check_force_constants_indices, get_cell_from_disp_yaml
|
from phonopy.file_IO import check_force_constants_indices, get_cell_from_disp_yaml
|
||||||
from phonopy.cui.load_helper import read_force_constants_from_hdf5
|
|
||||||
from phono3py.version import __version__
|
from phono3py.version import __version__
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
from phonopy.interface.phonopy_yaml import PhonopyYaml
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
from phonopy.interface.phonopy_yaml import PhonopyYaml
|
||||||
|
|
||||||
|
|
||||||
class Phono3pyYaml(PhonopyYaml):
|
class Phono3pyYaml(PhonopyYaml):
|
||||||
|
|
|
@ -34,20 +34,22 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix
|
from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix
|
||||||
|
from phonopy.phonon.tetrahedron_mesh import get_tetrahedra_frequencies
|
||||||
|
from phonopy.structure.atoms import isotope_data
|
||||||
from phonopy.structure.symmetry import Symmetry
|
from phonopy.structure.symmetry import Symmetry
|
||||||
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
||||||
from phonopy.phonon.tetrahedron_mesh import get_tetrahedra_frequencies
|
|
||||||
from phonopy.units import VaspToTHz
|
from phonopy.units import VaspToTHz
|
||||||
from phonopy.structure.atoms import isotope_data
|
|
||||||
from phono3py.other.tetrahedron_method import (
|
from phono3py.other.tetrahedron_method import (
|
||||||
get_integration_weights,
|
get_integration_weights,
|
||||||
get_unique_grid_points,
|
get_unique_grid_points,
|
||||||
)
|
)
|
||||||
from phono3py.phonon.solver import run_phonon_solver_c, run_phonon_solver_py
|
|
||||||
from phono3py.phonon.grid import BZGrid
|
|
||||||
from phono3py.phonon.func import gaussian
|
from phono3py.phonon.func import gaussian
|
||||||
|
from phono3py.phonon.grid import BZGrid
|
||||||
|
from phono3py.phonon.solver import run_phonon_solver_c, run_phonon_solver_py
|
||||||
|
|
||||||
|
|
||||||
def get_mass_variances(primitive):
|
def get_mass_variances(primitive):
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import THzToEv, Kb, Hbar, EV, Angstrom, THz, AMU
|
from phonopy.units import AMU, EV, Angstrom, Hbar, Kb, THz, THzToEv
|
||||||
|
|
||||||
|
|
||||||
def gaussian(x, sigma):
|
def gaussian(x, sigma):
|
||||||
|
|
|
@ -36,11 +36,11 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.harmonic.force_constants import similarity_transformation
|
from phonopy.harmonic.force_constants import similarity_transformation
|
||||||
from phonopy.structure.cells import (
|
from phonopy.structure.cells import (
|
||||||
get_primitive_matrix_by_centring,
|
|
||||||
estimate_supercell_matrix,
|
estimate_supercell_matrix,
|
||||||
|
get_primitive_matrix_by_centring,
|
||||||
get_reduced_bases,
|
get_reduced_bases,
|
||||||
)
|
)
|
||||||
from phonopy.structure.grid_points import length2mesh, extract_ir_grid_points
|
from phonopy.structure.grid_points import extract_ir_grid_points, length2mesh
|
||||||
|
|
||||||
|
|
||||||
class BZGrid:
|
class BZGrid:
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import VaspToTHz
|
|
||||||
from phonopy.structure.cells import sparse_to_dense_svecs
|
from phonopy.structure.cells import sparse_to_dense_svecs
|
||||||
|
from phonopy.units import VaspToTHz
|
||||||
|
|
||||||
|
|
||||||
def run_phonon_solver_c(
|
def run_phonon_solver_c(
|
||||||
|
|
|
@ -34,7 +34,8 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import THzToEv, Kb
|
from phonopy.units import Kb, THzToEv
|
||||||
|
|
||||||
from phono3py.phonon3.imag_self_energy import ImagSelfEnergy
|
from phono3py.phonon3.imag_self_energy import ImagSelfEnergy
|
||||||
from phono3py.phonon3.interaction import Interaction
|
from phono3py.phonon3.interaction import Interaction
|
||||||
|
|
||||||
|
|
|
@ -33,19 +33,21 @@
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import warnings
|
|
||||||
import textwrap
|
import textwrap
|
||||||
from typing import Optional, List
|
import warnings
|
||||||
|
from typing import List, Optional
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.phonon.group_velocity import GroupVelocity
|
|
||||||
from phonopy.harmonic.force_constants import similarity_transformation
|
from phonopy.harmonic.force_constants import similarity_transformation
|
||||||
|
from phonopy.phonon.group_velocity import GroupVelocity
|
||||||
from phonopy.phonon.thermal_properties import mode_cv as get_mode_cv
|
from phonopy.phonon.thermal_properties import mode_cv as get_mode_cv
|
||||||
from phonopy.units import THzToEv, EV, THz, Angstrom
|
from phonopy.units import EV, Angstrom, THz, THzToEv
|
||||||
|
|
||||||
from phono3py.file_IO import write_pp_to_hdf5
|
from phono3py.file_IO import write_pp_to_hdf5
|
||||||
from phono3py.phonon3.triplets import get_all_triplets
|
|
||||||
from phono3py.phonon3.interaction import Interaction
|
|
||||||
from phono3py.other.isotope import Isotope
|
from phono3py.other.isotope import Isotope
|
||||||
from phono3py.phonon.grid import get_ir_grid_points, get_grid_points_by_rotations
|
from phono3py.phonon3.interaction import Interaction
|
||||||
|
from phono3py.phonon3.triplets import get_all_triplets
|
||||||
|
from phono3py.phonon.grid import get_grid_points_by_rotations, get_ir_grid_points
|
||||||
|
|
||||||
unit_to_WmK = (
|
unit_to_WmK = (
|
||||||
(THz * Angstrom) ** 2 / (Angstrom ** 3) * EV / THz / (2 * np.pi)
|
(THz * Angstrom) ** 2 / (Angstrom ** 3) * EV / THz / (2 * np.pi)
|
||||||
|
|
|
@ -37,23 +37,25 @@ import sys
|
||||||
import time
|
import time
|
||||||
import warnings
|
import warnings
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.phonon.degeneracy import degenerate_sets
|
from phonopy.phonon.degeneracy import degenerate_sets
|
||||||
from phonopy.phonon.group_velocity import GroupVelocity
|
from phonopy.phonon.group_velocity import GroupVelocity
|
||||||
|
from phonopy.units import Kb, THzToEv
|
||||||
|
|
||||||
|
from phono3py.file_IO import (
|
||||||
|
read_collision_from_hdf5,
|
||||||
|
read_pp_from_hdf5,
|
||||||
|
write_collision_eigenvalues_to_hdf5,
|
||||||
|
write_collision_to_hdf5,
|
||||||
|
write_kappa_to_hdf5,
|
||||||
|
write_unitary_matrix_to_hdf5,
|
||||||
|
)
|
||||||
|
from phono3py.phonon3.collision_matrix import CollisionMatrix
|
||||||
from phono3py.phonon3.conductivity import Conductivity, all_bands_exist, unit_to_WmK
|
from phono3py.phonon3.conductivity import Conductivity, all_bands_exist, unit_to_WmK
|
||||||
from phono3py.phonon3.conductivity import write_pp as _write_pp
|
from phono3py.phonon3.conductivity import write_pp as _write_pp
|
||||||
from phono3py.phonon3.interaction import Interaction
|
from phono3py.phonon3.interaction import Interaction
|
||||||
from phono3py.phonon3.collision_matrix import CollisionMatrix
|
|
||||||
from phono3py.phonon.grid import get_grid_points_by_rotations
|
from phono3py.phonon.grid import get_grid_points_by_rotations
|
||||||
from phono3py.file_IO import (
|
|
||||||
write_kappa_to_hdf5,
|
|
||||||
write_collision_to_hdf5,
|
|
||||||
read_collision_from_hdf5,
|
|
||||||
write_collision_eigenvalues_to_hdf5,
|
|
||||||
write_unitary_matrix_to_hdf5,
|
|
||||||
read_pp_from_hdf5,
|
|
||||||
)
|
|
||||||
from phonopy.units import THzToEv, Kb
|
|
||||||
|
|
||||||
|
|
||||||
class Conductivity_LBTE(Conductivity):
|
class Conductivity_LBTE(Conductivity):
|
||||||
|
|
|
@ -34,19 +34,21 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
|
||||||
from phonopy.phonon.group_velocity import GroupVelocity
|
from phonopy.phonon.group_velocity import GroupVelocity
|
||||||
|
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
||||||
|
|
||||||
from phono3py.file_IO import (
|
from phono3py.file_IO import (
|
||||||
write_kappa_to_hdf5,
|
|
||||||
read_gamma_from_hdf5,
|
read_gamma_from_hdf5,
|
||||||
write_gamma_detail_to_hdf5,
|
|
||||||
read_pp_from_hdf5,
|
read_pp_from_hdf5,
|
||||||
|
write_gamma_detail_to_hdf5,
|
||||||
|
write_kappa_to_hdf5,
|
||||||
)
|
)
|
||||||
from phono3py.phonon3.conductivity import Conductivity, all_bands_exist, unit_to_WmK
|
from phono3py.phonon3.conductivity import Conductivity, all_bands_exist, unit_to_WmK
|
||||||
from phono3py.phonon3.conductivity import write_pp as _write_pp
|
from phono3py.phonon3.conductivity import write_pp as _write_pp
|
||||||
from phono3py.phonon3.interaction import Interaction
|
|
||||||
from phono3py.phonon3.imag_self_energy import ImagSelfEnergy, average_by_degeneracy
|
from phono3py.phonon3.imag_self_energy import ImagSelfEnergy, average_by_degeneracy
|
||||||
|
from phono3py.phonon3.interaction import Interaction
|
||||||
from phono3py.phonon3.triplets import get_all_triplets
|
from phono3py.phonon3.triplets import get_all_triplets
|
||||||
from phono3py.phonon.grid import get_grid_points_by_rotations
|
from phono3py.phonon.grid import get_grid_points_by_rotations
|
||||||
|
|
||||||
|
|
|
@ -35,14 +35,14 @@
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.harmonic.displacement import (
|
from phonopy.harmonic.displacement import (
|
||||||
get_least_displacements,
|
|
||||||
directions_axis,
|
directions_axis,
|
||||||
get_displacement,
|
get_displacement,
|
||||||
|
get_least_displacements,
|
||||||
is_minus_displacement,
|
is_minus_displacement,
|
||||||
)
|
)
|
||||||
from phonopy.structure.atoms import PhonopyAtoms
|
from phonopy.structure.atoms import PhonopyAtoms
|
||||||
from phonopy.structure.symmetry import Symmetry
|
|
||||||
from phonopy.structure.cells import get_smallest_vectors
|
from phonopy.structure.cells import get_smallest_vectors
|
||||||
|
from phonopy.structure.symmetry import Symmetry
|
||||||
|
|
||||||
|
|
||||||
def direction_to_displacement(
|
def direction_to_displacement(
|
||||||
|
|
|
@ -33,27 +33,29 @@
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import sys
|
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.harmonic.force_constants import (
|
from phonopy.harmonic.force_constants import (
|
||||||
get_fc2,
|
|
||||||
similarity_transformation,
|
|
||||||
distribute_force_constants,
|
distribute_force_constants,
|
||||||
solve_force_constants,
|
get_fc2,
|
||||||
get_rotated_displacement,
|
|
||||||
get_positions_sent_by_rot_inv,
|
|
||||||
get_nsym_list_and_s2pp,
|
get_nsym_list_and_s2pp,
|
||||||
)
|
get_positions_sent_by_rot_inv,
|
||||||
from phono3py.phonon3.displacement_fc3 import (
|
get_rotated_displacement,
|
||||||
get_reduced_site_symmetry,
|
similarity_transformation,
|
||||||
get_bond_symmetry,
|
solve_force_constants,
|
||||||
get_smallest_vector_of_atom_pair,
|
|
||||||
)
|
)
|
||||||
from phonopy.structure.atoms import PhonopyAtoms
|
from phonopy.structure.atoms import PhonopyAtoms
|
||||||
from phonopy.structure.cells import compute_all_sg_permutations, Primitive
|
from phonopy.structure.cells import Primitive, compute_all_sg_permutations
|
||||||
from phonopy.structure.symmetry import Symmetry
|
from phonopy.structure.symmetry import Symmetry
|
||||||
|
|
||||||
|
from phono3py.phonon3.displacement_fc3 import (
|
||||||
|
get_bond_symmetry,
|
||||||
|
get_reduced_site_symmetry,
|
||||||
|
get_smallest_vector_of_atom_pair,
|
||||||
|
)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,12 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix
|
from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix
|
||||||
from phonopy.units import VaspToTHz
|
|
||||||
from phonopy.structure.grid_points import get_qpoints
|
|
||||||
from phonopy.structure.cells import sparse_to_dense_svecs
|
from phonopy.structure.cells import sparse_to_dense_svecs
|
||||||
|
from phonopy.structure.grid_points import get_qpoints
|
||||||
|
from phonopy.units import VaspToTHz
|
||||||
|
|
||||||
|
|
||||||
def run_gruneisen_parameters(
|
def run_gruneisen_parameters(
|
||||||
|
|
|
@ -35,16 +35,18 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import Hbar, EV, THz
|
|
||||||
from phonopy.phonon.degeneracy import degenerate_sets
|
from phonopy.phonon.degeneracy import degenerate_sets
|
||||||
from phono3py.phonon3.interaction import Interaction
|
from phonopy.units import EV, Hbar, THz
|
||||||
from phono3py.phonon3.triplets import get_triplets_integration_weights
|
|
||||||
from phono3py.phonon.func import bose_einstein
|
|
||||||
from phono3py.file_IO import (
|
from phono3py.file_IO import (
|
||||||
write_gamma_detail_to_hdf5,
|
write_gamma_detail_to_hdf5,
|
||||||
write_imag_self_energy_at_grid_point,
|
write_imag_self_energy_at_grid_point,
|
||||||
)
|
)
|
||||||
|
from phono3py.phonon3.interaction import Interaction
|
||||||
|
from phono3py.phonon3.triplets import get_triplets_integration_weights
|
||||||
|
from phono3py.phonon.func import bose_einstein
|
||||||
|
|
||||||
|
|
||||||
def get_imag_self_energy(
|
def get_imag_self_energy(
|
||||||
|
|
|
@ -34,21 +34,26 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix
|
from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix
|
||||||
from phonopy.structure.cells import Primitive, sparse_to_dense_svecs
|
from phonopy.structure.cells import (
|
||||||
from phonopy.structure.symmetry import Symmetry
|
Primitive,
|
||||||
from phonopy.units import VaspToTHz, Hbar, EV, Angstrom, THz, AMU
|
compute_all_sg_permutations,
|
||||||
from phonopy.structure.cells import compute_all_sg_permutations
|
sparse_to_dense_svecs,
|
||||||
from phono3py.phonon.grid import (
|
|
||||||
get_ir_grid_points,
|
|
||||||
get_grid_points_by_rotations,
|
|
||||||
BZGrid,
|
|
||||||
)
|
)
|
||||||
from phono3py.phonon.solver import run_phonon_solver_c, run_phonon_solver_py
|
from phonopy.structure.symmetry import Symmetry
|
||||||
|
from phonopy.units import AMU, EV, Angstrom, Hbar, THz, VaspToTHz
|
||||||
|
|
||||||
from phono3py.phonon3.real_to_reciprocal import RealToReciprocal
|
from phono3py.phonon3.real_to_reciprocal import RealToReciprocal
|
||||||
from phono3py.phonon3.reciprocal_to_normal import ReciprocalToNormal
|
from phono3py.phonon3.reciprocal_to_normal import ReciprocalToNormal
|
||||||
from phono3py.phonon3.triplets import get_triplets_at_q, get_nosym_triplets_at_q
|
from phono3py.phonon3.triplets import get_nosym_triplets_at_q, get_triplets_at_q
|
||||||
|
from phono3py.phonon.grid import (
|
||||||
|
BZGrid,
|
||||||
|
get_grid_points_by_rotations,
|
||||||
|
get_ir_grid_points,
|
||||||
|
)
|
||||||
|
from phono3py.phonon.solver import run_phonon_solver_c, run_phonon_solver_py
|
||||||
|
|
||||||
|
|
||||||
class Interaction:
|
class Interaction:
|
||||||
|
|
|
@ -33,24 +33,25 @@
|
||||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import warnings
|
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import VaspToTHz
|
from phonopy.harmonic.dynamical_matrix import DynamicalMatrix, get_dynamical_matrix
|
||||||
from phonopy.structure.cells import Primitive
|
from phonopy.structure.cells import Primitive
|
||||||
from phonopy.harmonic.dynamical_matrix import DynamicalMatrix
|
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
||||||
|
from phonopy.units import VaspToTHz
|
||||||
|
|
||||||
|
from phono3py.phonon3.imag_self_energy import get_frequency_points
|
||||||
from phono3py.phonon3.triplets import (
|
from phono3py.phonon3.triplets import (
|
||||||
get_triplets_at_q,
|
|
||||||
get_nosym_triplets_at_q,
|
get_nosym_triplets_at_q,
|
||||||
get_tetrahedra_vertices,
|
get_tetrahedra_vertices,
|
||||||
|
get_triplets_at_q,
|
||||||
get_triplets_integration_weights,
|
get_triplets_integration_weights,
|
||||||
)
|
)
|
||||||
from phono3py.phonon.solver import run_phonon_solver_c
|
|
||||||
from phono3py.phonon.func import bose_einstein
|
from phono3py.phonon.func import bose_einstein
|
||||||
from phono3py.phonon.grid import BZGrid
|
from phono3py.phonon.grid import BZGrid
|
||||||
from phono3py.phonon3.imag_self_energy import get_frequency_points
|
from phono3py.phonon.solver import run_phonon_solver_c
|
||||||
from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix
|
|
||||||
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
|
||||||
|
|
||||||
|
|
||||||
class JointDos(object):
|
class JointDos(object):
|
||||||
|
|
|
@ -34,15 +34,17 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import Hbar, EV, THz
|
|
||||||
from phonopy.phonon.degeneracy import degenerate_sets
|
from phonopy.phonon.degeneracy import degenerate_sets
|
||||||
from phono3py.phonon.func import bose_einstein
|
from phonopy.units import EV, Hbar, THz
|
||||||
|
|
||||||
from phono3py.file_IO import (
|
from phono3py.file_IO import (
|
||||||
write_real_self_energy_at_grid_point,
|
write_real_self_energy_at_grid_point,
|
||||||
write_real_self_energy_to_hdf5,
|
write_real_self_energy_to_hdf5,
|
||||||
)
|
)
|
||||||
from phono3py.phonon3.imag_self_energy import get_frequency_points
|
from phono3py.phonon3.imag_self_energy import get_frequency_points
|
||||||
|
from phono3py.phonon.func import bose_einstein
|
||||||
|
|
||||||
|
|
||||||
def get_real_self_energy(
|
def get_real_self_energy(
|
||||||
|
|
|
@ -34,17 +34,19 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phono3py.phonon3.imag_self_energy import (
|
|
||||||
run_ise_at_frequency_points_batch,
|
|
||||||
get_frequency_points,
|
|
||||||
ImagSelfEnergy,
|
|
||||||
)
|
|
||||||
from phono3py.phonon3.real_self_energy import imag_to_real
|
|
||||||
from phono3py.file_IO import (
|
from phono3py.file_IO import (
|
||||||
write_spectral_function_at_grid_point,
|
write_spectral_function_at_grid_point,
|
||||||
write_spectral_function_to_hdf5,
|
write_spectral_function_to_hdf5,
|
||||||
)
|
)
|
||||||
|
from phono3py.phonon3.imag_self_energy import (
|
||||||
|
ImagSelfEnergy,
|
||||||
|
get_frequency_points,
|
||||||
|
run_ise_at_frequency_points_batch,
|
||||||
|
)
|
||||||
|
from phono3py.phonon3.real_self_energy import imag_to_real
|
||||||
|
|
||||||
|
|
||||||
def run_spectral_function(
|
def run_spectral_function(
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
||||||
|
|
||||||
from phono3py.phonon.func import gaussian
|
from phono3py.phonon.func import gaussian
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,9 @@ Formulae implemented are based on these papers:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.units import VaspToTHz
|
|
||||||
from phonopy.harmonic.dynmat_to_fc import DynmatToForceConstants
|
from phonopy.harmonic.dynmat_to_fc import DynmatToForceConstants
|
||||||
|
from phonopy.units import VaspToTHz
|
||||||
|
|
||||||
from phono3py.phonon.func import mode_length
|
from phono3py.phonon.func import mode_length
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,3 +7,6 @@ extend-ignore = "E203,W503"
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
line-length = 88
|
line-length = 88
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
profile = "black"
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import h5py
|
import h5py
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import argparse
|
|
||||||
|
|
||||||
epsilon = 1.0e-8
|
epsilon = 1.0e-8
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import numpy as np
|
|
||||||
import h5py
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
from scipy import stats
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import h5py
|
||||||
|
import numpy as np
|
||||||
|
from scipy import stats
|
||||||
|
|
||||||
epsilon = 1.0e-8
|
epsilon = 1.0e-8
|
||||||
|
|
||||||
|
|
15
setup.py
15
setup.py
|
@ -1,17 +1,18 @@
|
||||||
"""Phono3py setup.py."""
|
"""Phono3py setup.py."""
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import numpy
|
|
||||||
import platform
|
import platform
|
||||||
|
import sys
|
||||||
import sysconfig
|
import sysconfig
|
||||||
|
|
||||||
|
import numpy
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from setuptools import setup, Extension
|
from setuptools import Extension, setup
|
||||||
|
|
||||||
use_setuptools = True
|
use_setuptools = True
|
||||||
print("setuptools is used.")
|
print("setuptools is used.")
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from distutils.core import setup, Extension
|
from distutils.core import Extension, setup
|
||||||
|
|
||||||
use_setuptools = False
|
use_setuptools = False
|
||||||
print("distutils is used.")
|
print("distutils is used.")
|
||||||
|
@ -114,10 +115,8 @@ elif os.path.isfile("libopenblas.py"):
|
||||||
# Example of libopenblas.py
|
# Example of libopenblas.py
|
||||||
# extra_link_args_lapacke += ['-lopenblas']
|
# extra_link_args_lapacke += ['-lopenblas']
|
||||||
|
|
||||||
from libopenblas import (
|
from libopenblas import extra_link_args_lapacke as obl_extra_link_args_lapacke
|
||||||
extra_link_args_lapacke as obl_extra_link_args_lapacke,
|
from libopenblas import include_dirs_lapacke as obl_include_dirs_lapacke
|
||||||
include_dirs_lapacke as obl_include_dirs_lapacke,
|
|
||||||
)
|
|
||||||
|
|
||||||
extra_link_args_lapacke = obl_extra_link_args_lapacke
|
extra_link_args_lapacke = obl_extra_link_args_lapacke
|
||||||
include_dirs_lapacke = obl_include_dirs_lapacke
|
include_dirs_lapacke = obl_include_dirs_lapacke
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
"""Pytest conftest.py."""
|
"""Pytest conftest.py."""
|
||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
import phonopy
|
import phonopy
|
||||||
import phono3py
|
import pytest
|
||||||
from phonopy.interface.phonopy_yaml import read_cell_yaml
|
from phonopy.interface.phonopy_yaml import read_cell_yaml
|
||||||
|
|
||||||
|
import phono3py
|
||||||
|
|
||||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
store_dense_gp_map = True
|
store_dense_gp_map = True
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
"""Test for kaccum.py."""
|
"""Test for kaccum.py."""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from phono3py.cui.kaccum import KappaDOS, _get_mfp
|
from phono3py.cui.kaccum import KappaDOS, _get_mfp
|
||||||
from phono3py.phonon.grid import get_ir_grid_points
|
from phono3py.phonon.grid import get_ir_grid_points
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
"""Tests for isotope scatterings."""
|
"""Tests for isotope scatterings."""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from phono3py import Phono3pyIsotope
|
from phono3py import Phono3pyIsotope
|
||||||
|
|
||||||
si_pbesol_iso = [
|
si_pbesol_iso = [
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
"""Tests for grids."""
|
"""Tests for grids."""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
from phonopy.structure.tetrahedron_method import TetrahedronMethod
|
||||||
|
|
||||||
from phono3py.phonon.grid import (
|
from phono3py.phonon.grid import (
|
||||||
get_grid_point_from_address,
|
|
||||||
get_grid_point_from_address_py,
|
|
||||||
BZGrid,
|
BZGrid,
|
||||||
_get_grid_points_by_rotations,
|
|
||||||
_get_grid_points_by_bz_rotations_c,
|
_get_grid_points_by_bz_rotations_c,
|
||||||
_get_grid_points_by_bz_rotations_py,
|
_get_grid_points_by_bz_rotations_py,
|
||||||
|
_get_grid_points_by_rotations,
|
||||||
|
get_grid_point_from_address,
|
||||||
|
get_grid_point_from_address_py,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
"""Tests of displacements.py."""
|
"""Tests of displacements.py."""
|
||||||
import phono3py
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from phono3py.phonon3.displacement_fc3 import get_smallest_vector_of_atom_pair
|
|
||||||
|
|
||||||
|
import phono3py
|
||||||
|
from phono3py.phonon3.displacement_fc3 import get_smallest_vector_of_atom_pair
|
||||||
|
|
||||||
distances_NaCl = [
|
distances_NaCl = [
|
||||||
0.0000000,
|
0.0000000,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
"""Tests for fc3."""
|
"""Tests for fc3."""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from phono3py.phonon3.fc3 import cutoff_fc3_by_zero
|
from phono3py.phonon3.fc3 import cutoff_fc3_by_zero
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""Test Interaction class."""
|
"""Test Interaction class."""
|
||||||
import pytest
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import pytest
|
||||||
|
|
||||||
from phono3py.phonon3.interaction import Interaction
|
from phono3py.phonon3.interaction import Interaction
|
||||||
|
|
||||||
itr_RTA_Si = [
|
itr_RTA_Si = [
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
"""Tests for joint-density-of-states."""
|
"""Tests for joint-density-of-states."""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from phono3py.api_jointdos import Phono3pyJointDos
|
from phono3py.api_jointdos import Phono3pyJointDos
|
||||||
|
|
||||||
si_freq_points = [
|
si_freq_points = [
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
"""Test for real_self_energy.py."""
|
"""Test for real_self_energy.py."""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from phono3py.phonon3.real_self_energy import ImagToReal
|
from phono3py.phonon3.real_self_energy import ImagToReal
|
||||||
|
|
||||||
si_pbesol_Delta = [
|
si_pbesol_Delta = [
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
"""Test spectral_function.py."""
|
"""Test spectral_function.py."""
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from phono3py.phonon3.spectral_function import SpectralFunction
|
from phono3py.phonon3.spectral_function import SpectralFunction
|
||||||
|
|
||||||
shifts = [
|
shifts = [
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
"""Tests for SSCHA routines."""
|
"""Tests for SSCHA routines."""
|
||||||
import pytest
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import pytest
|
||||||
|
from phonopy.phonon.qpoints import QpointsPhonon
|
||||||
|
from phonopy.phonon.random_displacements import RandomDisplacements
|
||||||
|
|
||||||
from phono3py.sscha.sscha import (
|
from phono3py.sscha.sscha import (
|
||||||
DispCorrMatrix,
|
DispCorrMatrix,
|
||||||
DispCorrMatrixMesh,
|
DispCorrMatrixMesh,
|
||||||
SupercellPhonon,
|
SupercellPhonon,
|
||||||
ThirdOrderFC,
|
ThirdOrderFC,
|
||||||
)
|
)
|
||||||
from phonopy.phonon.qpoints import QpointsPhonon
|
|
||||||
from phonopy.phonon.random_displacements import RandomDisplacements
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ModuleNotFoundError
|
ModuleNotFoundError
|
||||||
|
|
Loading…
Reference in New Issue