Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
python-version: ['3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v2
Expand Down
9 changes: 7 additions & 2 deletions phonopy_vibspec/phonons_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
from typing import Optional, List, Tuple, Union

from phonopy_vibspec import logger, GetListWithinBounds
from phonopy.units import VaspToCm
try:
from phonopy.units import VaspToCm # noqa
except ImportError:
from phonopy.physical_units import get_physical_units

from phonopy_vibspec.spectra import RamanSpectrum, InfraredSpectrum
from phonopy_vibspec.vesta import VestaVector, make_vesta_file
Expand All @@ -21,6 +24,7 @@

HUGE_MASS = 10000 # AMU

physical_units = get_physical_units()

l_logger = logger.getChild(__name__)

Expand Down Expand Up @@ -65,7 +69,8 @@ def __init__(

self.N = self.structure.get_number_of_atoms()
l_logger.info('Analyze {} modes (including acoustic)'.format(3 * self.N))
self.frequencies = numpy.sqrt(numpy.abs(eigv.real)) * numpy.sign(eigv.real) * VaspToCm # in [cm⁻¹]
self.frequencies = numpy.sqrt(numpy.abs(eigv.real)) * numpy.sign(eigv.real)
self.frequencies *= physical_units.DefaultToTHz * physical_units.THzToCm # in [cm⁻¹]

if self.frequencies[0] < -30:
l_logger.warn('The first frequency is very small: {:.3f} cm⁻¹'.format(self.frequencies[0]))
Expand Down