Module name change from anharmonic to phono3py

This commit is contained in:
Atsushi Togo 2016-10-31 10:44:41 +09:00
parent fd1a22f3e9
commit 18fa1b1f4d
50 changed files with 143 additions and 143 deletions

View File

@ -26,7 +26,7 @@ install:
- cat __nanoversion__.txt
- python setup.py install
script: "( cd test/anharmonic ; for d in * ; do ( cd $d ; for f in test_*.py ; do python $f ; done ) ; done; cd ../.. )"
script: "( cd test/phono3py ; for d in * ; do ( cd $d ; for f in test_*.py ; do python $f ; done ) ; done; cd ../.. )"
deploy:
# testing pypi

View File

@ -3,5 +3,4 @@ graft c/anharmonic_h
graft c/spglib_h
graft c/kspclib_h
graft example
graft example-phono3py
include setup.py

View File

@ -43,7 +43,7 @@ requirements:
test:
# Python imports
imports:
- anharmonic
- phono3py
# commands:
# # You can put test commands to be run here. Use this to test that the

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -5,14 +5,14 @@ from phonopy.interface.vasp import read_vasp
from phonopy.file_IO import parse_BORN
from phonopy.units import Bohr, Hartree
from phonopy.harmonic.force_constants import show_drift_force_constants
from anharmonic.phonon3.fc3 import show_drift_fc3
from anharmonic.phonon3 import Phono3py
from anharmonic.file_IO import (parse_disp_fc3_yaml,
parse_disp_fc2_yaml,
parse_FORCES_FC2,
parse_FORCES_FC3,
read_fc3_from_hdf5,
read_fc2_from_hdf5)
from phono3py.phonon3.fc3 import show_drift_fc3
from phono3py.phonon3 import Phono3py
from phono3py.file_IO import (parse_disp_fc3_yaml,
parse_disp_fc2_yaml,
parse_FORCES_FC2,
parse_FORCES_FC3,
read_fc3_from_hdf5,
read_fc2_from_hdf5)
cell = read_vasp("POSCAR-unitcell")
mesh = [11, 11, 11]

View File

@ -34,17 +34,17 @@
import sys
from phonopy.harmonic.force_constants import show_drift_force_constants
from anharmonic.phonon3.fc3 import show_drift_fc3
from anharmonic.file_IO import (parse_disp_fc3_yaml,
parse_disp_fc2_yaml,
parse_FORCES_FC2,
parse_FORCES_FC3,
read_fc3_from_hdf5,
read_fc2_from_hdf5,
write_fc3_to_hdf5,
write_fc2_to_hdf5)
from anharmonic.cui.show_log import (show_phono3py_force_constants_settings,
print_error, file_exists)
from phono3py.phonon3.fc3 import show_drift_fc3
from phono3py.file_IO import (parse_disp_fc3_yaml,
parse_disp_fc2_yaml,
parse_FORCES_FC2,
parse_FORCES_FC3,
read_fc3_from_hdf5,
read_fc2_from_hdf5,
write_fc3_to_hdf5,
write_fc2_to_hdf5)
from phono3py.cui.show_log import (show_phono3py_force_constants_settings,
print_error, file_exists)
def create_phono3py_force_constants(phono3py,
phonon_supercell_matrix,

View File

@ -33,8 +33,8 @@
# POSSIBILITY OF SUCH DAMAGE.
import sys
from anharmonic.phonon3 import Phono3py
from anharmonic.file_IO import write_disp_fc3_yaml, write_disp_fc2_yaml
from phono3py.phonon3 import Phono3py
from phono3py.file_IO import write_disp_fc3_yaml, write_disp_fc2_yaml
def create_phono3py_supercells(unitcell,
supercell_matrix,

View File

@ -34,7 +34,7 @@
import numpy as np
from phonopy.units import VaspToTHz
from anharmonic.phonon3.triplets import get_grid_point_from_address
from phono3py.phonon3.triplets import get_grid_point_from_address
def get_phono3py_configurations(settings):
primitive_matrix = settings.get_primitive_matrix()

View File

@ -34,10 +34,10 @@
import sys
import numpy as np
from anharmonic.file_IO import (write_ir_grid_points,
write_grid_address_to_hdf5)
from anharmonic.phonon3.triplets import (get_coarse_ir_grid_points,
get_number_of_triplets)
from phono3py.file_IO import (write_ir_grid_points,
write_grid_address_to_hdf5)
from phono3py.phonon3.triplets import (get_coarse_ir_grid_points,
get_number_of_triplets)
def write_grid_points(primitive,
mesh,

View File

@ -38,8 +38,8 @@ from phonopy.structure.tetrahedron_method import TetrahedronMethod
from phonopy.phonon.tetrahedron_mesh import get_tetrahedra_frequencies
from phonopy.units import VaspToTHz
from phonopy.structure.atoms import isotope_data
from anharmonic.phonon.solver import set_phonon_c, set_phonon_py
from anharmonic.phonon3.triplets import get_bz_grid_address, gaussian
from phono3py.phonon.solver import set_phonon_c, set_phonon_py
from phono3py.phonon3.triplets import get_bz_grid_address, gaussian
def get_mass_variances(primitive):
symbols = primitive.get_chemical_symbols()
@ -164,7 +164,7 @@ class Isotope(object):
def _run_c(self):
self._set_phonon_c(self._grid_points)
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
gamma = np.zeros(len(self._band_indices), dtype='double')
if self._sigma is None:
self._set_integration_weights()
@ -202,7 +202,7 @@ class Isotope(object):
self._set_integration_weights_c(thm)
def _set_integration_weights_c(self, thm):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
unique_vertices = thm.get_unique_tetrahedra_vertices()
neighboring_grid_points = np.zeros(
len(unique_vertices) * len(self._grid_points), dtype='intc')

View File

@ -7,7 +7,7 @@ def get_phonons_at_qpoints(frequencies,
frequency_factor_to_THz,
nac_q_direction=None,
lapack_zheev_uplo='L'):
import anharmonic._lapackepy as lapackepy
import phono3py._lapackepy as lapackepy
(svecs,
multiplicity,
@ -45,7 +45,7 @@ def set_phonon_c(dm,
frequency_factor_to_THz,
nac_q_direction,
lapack_zheev_uplo):
import anharmonic._lapackepy as lapackepy
import phono3py._lapackepy as lapackepy
(svecs,
multiplicity,

View File

@ -8,23 +8,23 @@ from phonopy.harmonic.force_constants import (get_fc2, set_permutation_symmetry,
from phonopy.harmonic.displacement import get_least_displacements
from phonopy.harmonic.displacement import direction_to_displacement as \
direction_to_displacement_fc2
from anharmonic.phonon3.imag_self_energy import (get_imag_self_energy,
write_imag_self_energy,
get_linewidth,
write_linewidth)
from anharmonic.phonon3.frequency_shift import get_frequency_shift
from anharmonic.phonon3.interaction import Interaction
from anharmonic.phonon3.conductivity_RTA import get_thermal_conductivity_RTA
from anharmonic.phonon3.conductivity_LBTE import get_thermal_conductivity_LBTE
from anharmonic.phonon3.joint_dos import JointDos
from anharmonic.phonon3.displacement_fc3 import (get_third_order_displacements,
direction_to_displacement)
from anharmonic.file_IO import write_joint_dos, write_phonon_to_hdf5
from anharmonic.other.isotope import Isotope
from anharmonic.phonon3.fc3 import (get_fc3,
set_permutation_symmetry_fc3,
set_translational_invariance_fc3,
cutoff_fc3_by_zero)
from phono3py.phonon3.imag_self_energy import (get_imag_self_energy,
write_imag_self_energy,
get_linewidth,
write_linewidth)
from phono3py.phonon3.frequency_shift import get_frequency_shift
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.joint_dos import JointDos
from phono3py.phonon3.displacement_fc3 import (get_third_order_displacements,
direction_to_displacement)
from phono3py.file_IO import write_joint_dos, write_phonon_to_hdf5
from phono3py.other.isotope import Isotope
from phono3py.phonon3.fc3 import (get_fc3,
set_permutation_symmetry_fc3,
set_translational_invariance_fc3,
cutoff_fc3_by_zero)
class Phono3py(object):
def __init__(self,

View File

@ -2,8 +2,8 @@ import sys
import numpy as np
from phonopy.units import THzToEv, Kb
from phonopy.harmonic.force_constants import similarity_transformation
from anharmonic.phonon3.imag_self_energy import ImagSelfEnergy
from anharmonic.phonon3.triplets import get_triplets_third_q_list
from phono3py.phonon3.imag_self_energy import ImagSelfEnergy
from phono3py.phonon3.triplets import get_triplets_third_q_list
class CollisionMatrix(ImagSelfEnergy):
"""
@ -123,7 +123,7 @@ class CollisionMatrix(ImagSelfEnergy):
self._run_py_collision_matrix()
def _run_c_collision_matrix(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.collision_matrix(self._collision_matrix,
self._pp_strength,
self._frequencies,
@ -139,7 +139,7 @@ class CollisionMatrix(ImagSelfEnergy):
self._cutoff_frequency)
def _run_c_reducible_collision_matrix(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.reducible_collision_matrix(self._collision_matrix,
self._pp_strength,
self._frequencies,

View File

@ -2,10 +2,10 @@ import numpy as np
from phonopy.phonon.group_velocity import get_group_velocity
from phonopy.harmonic.force_constants import similarity_transformation
from phonopy.units import EV, THz, Angstrom
from anharmonic.phonon3.triplets import (get_grid_address, reduce_grid_points,
get_ir_grid_points,
from_coarse_to_dense_grid_points)
from anharmonic.other.isotope import Isotope
from phono3py.phonon3.triplets import (get_grid_address, reduce_grid_points,
get_ir_grid_points,
from_coarse_to_dense_grid_points)
from phono3py.other.isotope import Isotope
unit_to_WmK = ((THz * Angstrom) ** 2 / (Angstrom ** 3) * EV / THz /
(2 * np.pi)) # 2pi comes from definition of lifetime.

View File

@ -2,14 +2,14 @@ import sys
import numpy as np
from phonopy.phonon.degeneracy import degenerate_sets
from phonopy.units import THz, Angstrom
from anharmonic.phonon3.conductivity import Conductivity
from anharmonic.phonon3.collision_matrix import CollisionMatrix
from anharmonic.phonon3.triplets import (get_grid_points_by_rotations,
get_BZ_grid_points_by_rotations)
from anharmonic.file_IO import (write_kappa_to_hdf5,
write_collision_to_hdf5,
read_collision_from_hdf5,
write_collision_eigenvalues_to_hdf5)
from phono3py.phonon3.conductivity import Conductivity
from phono3py.phonon3.collision_matrix import CollisionMatrix
from phono3py.phonon3.triplets import (get_grid_points_by_rotations,
get_BZ_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)
from phonopy.units import THzToEv, Kb
def get_thermal_conductivity_LBTE(
@ -614,7 +614,7 @@ class Conductivity_LBTE(Conductivity):
return weights
def _symmetrize_collision_matrix(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.symmetrize_collision_matrix(self._collision_matrix)
# Average matrix elements belonging to degenerate bands
@ -646,7 +646,7 @@ class Conductivity_LBTE(Conductivity):
col_mat[:, :, :, :, :, i, j, :] = sum_col
def _symmetrize_reducible_collision_matrix(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.symmetrize_collision_matrix(self._collision_matrix)
# Average matrix elements belonging to degenerate bands
@ -722,12 +722,12 @@ class Conductivity_LBTE(Conductivity):
v[:] = e * v
v[:] = np.dot(v, v.T) # inv_col
elif method == 1:
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
w = np.zeros(num_ir_grid_points * num_band * 3, dtype='double')
phono3c.inverse_collision_matrix(
self._collision_matrix, w, i_sigma, i_temp, self._pinv_cutoff)
elif method == 2:
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
w = np.zeros(num_ir_grid_points * num_band * 3, dtype='double')
phono3c.inverse_collision_matrix_libflame(
self._collision_matrix, w, i_sigma, i_temp, self._pinv_cutoff)

View File

@ -2,11 +2,11 @@ import numpy as np
from phonopy.phonon.group_velocity import get_group_velocity
from phonopy.units import THzToEv, THz, Angstrom
from phonopy.phonon.thermal_properties import mode_cv as get_mode_cv
from anharmonic.file_IO import (write_kappa_to_hdf5, write_triplets,
read_gamma_from_hdf5, write_grid_address)
from anharmonic.phonon3.conductivity import Conductivity, unit_to_WmK
from anharmonic.phonon3.imag_self_energy import ImagSelfEnergy
from anharmonic.phonon3.triplets import get_grid_points_by_rotations
from phono3py.file_IO import (write_kappa_to_hdf5, write_triplets,
read_gamma_from_hdf5, write_grid_address)
from phono3py.phonon3.conductivity import Conductivity, unit_to_WmK
from phono3py.phonon3.imag_self_energy import ImagSelfEnergy
from phono3py.phonon3.triplets import get_grid_points_by_rotations
def get_thermal_conductivity_RTA(
interaction,

View File

@ -8,8 +8,8 @@ from phonopy.harmonic.force_constants import (similarity_transformation,
get_positions_sent_by_rot_inv,
set_translational_invariance)
from phonopy.harmonic.dynamical_matrix import get_equivalent_smallest_vectors
from anharmonic.phonon3.displacement_fc3 import (get_reduced_site_symmetry,
get_bond_symmetry)
from phono3py.phonon3.displacement_fc3 import (get_reduced_site_symmetry,
get_bond_symmetry)
def get_fc3(supercell,
disp_dataset,
@ -148,7 +148,7 @@ def distribute_fc3(fc3_least_atoms,
sys.stdout.flush()
try:
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.distribute_fc3(fc3,
fc3_least_atoms,
i,
@ -168,7 +168,7 @@ def distribute_fc3(fc3_least_atoms,
def set_permutation_symmetry_fc3(fc3):
try:
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.permutation_symmetry_fc3(fc3)
except ImportError:
num_atom = fc3.shape[0]

View File

@ -1,8 +1,8 @@
import numpy as np
from phonopy.units import THzToEv, Kb, VaspToTHz, Hbar, EV, Angstrom, THz, AMU
from phonopy.phonon.degeneracy import degenerate_sets
from anharmonic.phonon3.triplets import occupation
from anharmonic.file_IO import write_frequency_shift
from phono3py.phonon3.triplets import occupation
from phono3py.file_IO import write_frequency_shift
def get_frequency_shift(interaction,
grid_points,
@ -149,7 +149,7 @@ class FrequencyShift(object):
self._run_py_with_band_indices()
def _run_c_with_band_indices(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.frequency_shift_at_bands(self._frequency_shifts,
self._pp_strength,
self._triplets_at_q,

View File

@ -2,7 +2,7 @@ import sys
import numpy as np
from phonopy.harmonic.dynamical_matrix import DynamicalMatrix, DynamicalMatrixNAC, get_smallest_vectors
from phonopy.structure.cells import get_supercell
from anharmonic.file_IO import write_fc3_dat, write_fc2_dat
from phono3py.file_IO import write_fc3_dat, write_fc2_dat
from phonopy.units import VaspToTHz
from phonopy.structure.grid_points import get_qpoints

View File

@ -1,11 +1,11 @@
import numpy as np
from phonopy.units import VaspToTHz, Hbar, EV, Angstrom, THz, AMU
from phonopy.phonon.degeneracy import degenerate_sets
from anharmonic.phonon3.triplets import (get_triplets_integration_weights,
gaussian, occupation)
from anharmonic.file_IO import (write_gamma_detail_to_hdf5,
write_linewidth_at_grid_point,
write_imag_self_energy_at_grid_point)
from phono3py.phonon3.triplets import (get_triplets_integration_weights,
gaussian, occupation)
from phono3py.file_IO import (write_gamma_detail_to_hdf5,
write_linewidth_at_grid_point,
write_imag_self_energy_at_grid_point)
def get_imag_self_energy(interaction,
grid_points,
@ -494,7 +494,7 @@ class ImagSelfEnergy(object):
self._run_py_with_frequency_points()
def _run_c_with_band_indices(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.imag_self_energy_at_bands(self._imag_self_energy,
self._pp_strength,
self._triplets_at_q,
@ -507,7 +507,7 @@ class ImagSelfEnergy(object):
self._cutoff_frequency)
def _run_c_with_band_indices_with_g(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
if self._g_zero is None:
_g_zero = np.zeros(self._pp_strength.shape,
@ -527,7 +527,7 @@ class ImagSelfEnergy(object):
self._cutoff_frequency)
def _run_c_detailed_with_band_indices_with_g(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.detailed_imag_self_energy_with_g(
self._detailed_imag_self_energy,
self._pp_strength,
@ -539,7 +539,7 @@ class ImagSelfEnergy(object):
self._cutoff_frequency)
def _run_c_with_frequency_points(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
ise_at_f = np.zeros(self._imag_self_energy.shape[1], dtype='double')
for i, fpoint in enumerate(self._frequency_points):
phono3c.imag_self_energy(ise_at_f,
@ -555,7 +555,7 @@ class ImagSelfEnergy(object):
self._imag_self_energy[i] = ise_at_f
def _run_c_with_frequency_points_with_g(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
num_band0 = self._pp_strength.shape[1]
g_shape = list(self._g.shape)
g_shape[2] = num_band0
@ -579,7 +579,7 @@ class ImagSelfEnergy(object):
self._imag_self_energy[i] = ise_at_f
def _run_c_detailed_with_frequency_points_with_g(self):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
g = np.zeros((2,) + self._pp_strength.shape, dtype='double')
detailed_ise_at_f = np.zeros(self._detailed_imag_self_energy.shape[1:5],
dtype='double')

View File

@ -2,12 +2,12 @@ import numpy as np
from phonopy.harmonic.dynamical_matrix import (get_smallest_vectors,
get_dynamical_matrix)
from phonopy.units import VaspToTHz, Hbar, EV, Angstrom, THz, AMU, PlanckConstant
from anharmonic.phonon.solver import set_phonon_c, set_phonon_py
from anharmonic.phonon3.real_to_reciprocal import RealToReciprocal
from anharmonic.phonon3.reciprocal_to_normal import ReciprocalToNormal
from anharmonic.phonon3.triplets import (get_triplets_at_q,
get_nosym_triplets_at_q,
get_bz_grid_address)
from phono3py.phonon.solver import set_phonon_c, set_phonon_py
from phono3py.phonon3.real_to_reciprocal import RealToReciprocal
from phono3py.phonon3.reciprocal_to_normal import ReciprocalToNormal
from phono3py.phonon3.triplets import (get_triplets_at_q,
get_nosym_triplets_at_q,
get_bz_grid_address)
class Interaction(object):
def __init__(self,
@ -240,7 +240,7 @@ class Interaction(object):
return np.dot(w, v_sum) / num_band ** 2
def _run_c(self, g_zero=None):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
num_band = self._primitive.get_number_of_atoms() * 3
svecs, multiplicity = get_smallest_vectors(self._supercell,

View File

@ -2,13 +2,13 @@ import sys
import numpy as np
from phonopy.structure.symmetry import Symmetry
from phonopy.units import VaspToTHz
from anharmonic.phonon3.triplets import (get_triplets_at_q,
get_nosym_triplets_at_q,
get_tetrahedra_vertices,
get_triplets_integration_weights,
occupation)
from anharmonic.phonon3.interaction import set_phonon_c
from anharmonic.phonon3.imag_self_energy import get_frequency_points
from phono3py.phonon3.triplets import (get_triplets_at_q,
get_nosym_triplets_at_q,
get_tetrahedra_vertices,
get_triplets_integration_weights,
occupation)
from phono3py.phonon3.interaction import set_phonon_c
from phono3py.phonon3.imag_self_energy import get_frequency_points
from phonopy.harmonic.dynamical_matrix import get_dynamical_matrix
from phonopy.structure.tetrahedron_method import TetrahedronMethod
@ -74,7 +74,7 @@ class JointDos(object):
def run(self):
try:
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
self._run_c()
except ImportError:
print("Joint density of states in python is not implemented.")

View File

@ -306,7 +306,7 @@ def get_triplets_integration_weights(interaction,
if sigma:
if lang == 'C':
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
phono3c.triplets_integration_weights_with_sigma(
g,
frequency_points,
@ -364,7 +364,7 @@ def _get_triplets_reciprocal_mesh_at_q(fixed_grid_number,
mesh,
rotations,
is_time_reversal=True):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
map_triplets = np.zeros(np.prod(mesh), dtype='intc')
map_q = np.zeros(np.prod(mesh), dtype='intc')
@ -388,7 +388,7 @@ def _get_BZ_triplets_at_q(grid_point,
mesh):
"""grid_address is overwritten."""
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
weights = np.zeros_like(map_triplets)
for g in map_triplets:
@ -409,7 +409,7 @@ def _set_triplets_integration_weights_c(g,
interaction,
frequency_points,
neighboring_phonons=True):
import anharmonic._phono3py as phono3c
import phono3py._phono3py as phono3c
reciprocal_lattice = np.linalg.inv(interaction.get_primitive().get_cell())
mesh = interaction.get_mesh_numbers()

View File

@ -5,7 +5,7 @@ import numpy as np
from phonopy.cui.settings import fracval
from phonopy.phonon.tetrahedron_mesh import TetrahedronMesh
from phonopy.phonon.dos import NormalDistribution
from anharmonic.phonon3.triplets import get_ir_grid_points
from phono3py.phonon3.triplets import get_ir_grid_points
epsilon = 1.0e-8

View File

@ -3,7 +3,8 @@
import numpy as np
from phonopy.phonon.tetrahedron_mesh import TetrahedronMesh
from phonopy.harmonic.force_constants import similarity_transformation
from anharmonic.phonon3.triplets import get_ir_grid_points, get_grid_points_by_rotations
from phono3py.phonon3.triplets import (get_ir_grid_points,
get_grid_points_by_rotations)
epsilon = 1.0e-8

View File

@ -38,25 +38,25 @@ import sys
import numpy as np
from phonopy.interface.vasp import read_vasp
from phonopy.file_IO import parse_BORN, write_FORCE_SETS, parse_FORCE_SETS
from anharmonic.file_IO import read_phonon_from_hdf5
from phono3py.file_IO import read_phonon_from_hdf5
from phonopy.units import VaspToTHz, PwscfToTHz, Bohr, Rydberg, Hartree
from phonopy.version import __version__
from phonopy.interface import read_crystal_structure
from anharmonic.file_IO import (parse_disp_fc2_yaml, parse_disp_fc3_yaml,
parse_FORCES_FC2, parse_FORCES_FC3,
write_FORCES_FC2, write_FORCES_FC3)
from anharmonic.cui.settings import Phono3pyConfParser
from anharmonic.phonon3 import (Phono3py, Phono3pyJointDos, Phono3pyIsotope)
from anharmonic.phonon3.gruneisen import get_gruneisen_parameters
from anharmonic.cui.phono3py_argparse import get_parser
from anharmonic.cui.show_log import (print_phono3py, print_version, print_end,
print_error, print_error_message,
show_phono3py_settings,
show_phono3py_cells, file_exists)
from anharmonic.cui.triplets_info import write_grid_points, show_num_triplets
from anharmonic.cui.translate_settings import get_phono3py_configurations
from anharmonic.cui.create_supercells import create_phono3py_supercells
from anharmonic.cui.create_force_constants import create_phono3py_force_constants
from phono3py.file_IO import (parse_disp_fc2_yaml, parse_disp_fc3_yaml,
parse_FORCES_FC2, parse_FORCES_FC3,
write_FORCES_FC2, write_FORCES_FC3)
from phono3py.cui.settings import Phono3pyConfParser
from phono3py.phonon3 import (Phono3py, Phono3pyJointDos, Phono3pyIsotope)
from phono3py.phonon3.gruneisen import get_gruneisen_parameters
from phono3py.cui.phono3py_argparse import get_parser
from phono3py.cui.show_log import (print_phono3py, print_version, print_end,
print_error, print_error_message,
show_phono3py_settings,
show_phono3py_cells, file_exists)
from phono3py.cui.triplets_info import write_grid_points, show_num_triplets
from phono3py.cui.translate_settings import get_phono3py_configurations
from phono3py.cui.create_supercells import create_phono3py_supercells
from phono3py.cui.create_force_constants import create_phono3py_force_constants
phono3py_version = __version__

View File

@ -100,18 +100,18 @@ if platform.system() == 'Darwin':
extra_link_args += extra_link_args_lapacke
extension_phono3py = Extension(
'anharmonic._phono3py',
'phono3py._phono3py',
include_dirs=include_dirs,
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
define_macros=define_macros,
sources=sources)
packages_phono3py = ['anharmonic',
'anharmonic.cui',
'anharmonic.other',
'anharmonic.phonon',
'anharmonic.phonon3']
packages_phono3py = ['phono3py',
'phono3py.cui',
'phono3py.other',
'phono3py.phonon',
'phono3py.phonon3']
scripts_phono3py = ['scripts/phono3py',
'scripts/kaccum',
'scripts/gaccum']
@ -127,7 +127,7 @@ sources_lapackepy = ['c/_lapackepy.c',
'c/harmonic/phonoc_utils.c',
'c/harmonic/lapack_wrapper.c']
extension_lapackepy = Extension(
'anharmonic._lapackepy',
'phono3py._lapackepy',
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args,
include_dirs=include_dirs,
@ -135,7 +135,7 @@ extension_lapackepy = Extension(
if __name__ == '__main__':
version_nums = [None, None, None]
with open("anharmonic/version.py") as w:
with open("phono3py/version.py") as w:
for line in w:
if "__version__" in line:
for i, num in enumerate(line.split()[2].strip('\"').split('.')):

View File

@ -2,8 +2,8 @@ import unittest
import numpy as np
from phonopy.interface.phonopy_yaml import get_unitcell_from_phonopy_yaml
from anharmonic.phonon3.triplets import (get_grid_point_from_address,
get_grid_point_from_address_py)
from phono3py.phonon3.triplets import (get_grid_point_from_address,
get_grid_point_from_address_py)
class TestTriplets(unittest.TestCase):