Merge pull request #330 from phonopy/pre-commit-ci-update-config

[pre-commit.ci] pre-commit autoupdate
This commit is contained in:
Atsushi Togo 2024-01-30 10:38:13 +09:00 committed by GitHub
commit e913bbe073
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
140 changed files with 146 additions and 17 deletions

View File

@ -35,7 +35,7 @@ repos:
- "--ignore=E203,W503,E501"
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
args:

View File

@ -1,4 +1,5 @@
"""Sphinx configuration of phonopy documentation."""
# -*- coding: utf-8 -*-
#
# phonopy documentation build configuration file, created by

View File

@ -1,4 +1,5 @@
"""Example of QHA calculation by Al."""
import numpy as np
import yaml
from yaml import CLoader as Loader

View File

@ -1,4 +1,5 @@
"""Example by corundum Al2O3."""
import numpy as np
import phonopy

View File

@ -1,4 +1,5 @@
"""Example of calculation of irreps of MgB2."""
import numpy as np
import phonopy

View File

@ -1,4 +1,5 @@
"""Example of band structure and group velocity calculation by NaCl."""
from typing import List
import numpy as np

View File

@ -1,4 +1,5 @@
"""NaCl band structure calculation example."""
import phonopy
from phonopy.phonon.band_structure import get_band_qpoints

View File

@ -1,4 +1,5 @@
"""Group velocity example by NaCl."""
import matplotlib.pyplot as plt
import numpy as np

View File

@ -1,4 +1,5 @@
"""Example to read and write FORCE_CONSTANTS file."""
import phonopy
from phonopy.file_IO import parse_FORCE_CONSTANTS, write_FORCE_CONSTANTS

View File

@ -1,4 +1,5 @@
"""Example to obtain PhonopyYaml instance."""
import phonopy
from phonopy.interface.phonopy_yaml import PhonopyYaml

View File

@ -1,4 +1,5 @@
"""Example of NaCl calculation."""
from typing import List
import numpy as np

View File

@ -1,4 +1,5 @@
"""QHA example of Si."""
import tarfile
import matplotlib.pyplot as plt

View File

@ -1,4 +1,5 @@
"""Example to calculate mode Grueneisen parameters."""
from typing import List
import numpy as np

View File

@ -1,4 +1,5 @@
"""A script to generate supercells with displacements for LAMMPS."""
import phonopy
from phonopy.interface.calculator import write_supercells_with_displacements
from phonopy.interface.phonopy_yaml import read_cell_yaml

View File

@ -1,4 +1,5 @@
"""Phonon calculation code: Phonopy."""
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""API of mode Grueneisen parameter calculation."""
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonopy class."""
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""API for QHA calculation."""
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Routines for command user interface."""
# Copyright (C) 2021 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Routines to collect crystal structure information."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Utilities to create force sets for main CUI script."""
# Copyright (C) 2020 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonopy loader."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Helper methods of phonopy loader."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonopy command line argument parser."""
# Copyright (C) 2016 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonopy command user interface."""
# Copyright (C) 2020 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonopy input and command option tools."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#
@ -1639,9 +1640,9 @@ class PhonopyConfParser(ConfParser):
if "rd_temperature" in arg_list:
if self._args.rd_temperature is not None:
self._confs[
"random_displacement_temperature"
] = self._args.rd_temperature
self._confs["random_displacement_temperature"] = (
self._args.rd_temperature
)
if "temperature" in arg_list:
if self._args.temperature is not None:
@ -1660,11 +1661,7 @@ class PhonopyConfParser(ConfParser):
if "random_seed" in arg_list:
if self._args.random_seed:
seed = self._args.random_seed
if (
np.issubdtype(type(seed), np.integer)
and seed >= 0
and seed < 2**32
):
if np.issubdtype(type(seed), np.integer) and seed >= 0 and seed < 2**32:
self._confs["random_seed"] = seed
if "include_fc" in arg_list:

View File

@ -1,4 +1,5 @@
"""Show symmetry information invoked by --symmetry command option."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonopy exceptions."""
# Copyright (C) 2022 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""File I/O related routines."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Mode Grueneisen paramater calculation."""
# Copyright (C) 2017 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Mode Grueneisen parameter band structure calculation."""
# Copyright (C) 2012 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Mode Grueneisen parameter calculation."""
# Copyright (C) 2012 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Mode Grueneisen parameters calculation on sampling mesh."""
# Copyright (C) 2012 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Routines of pre-phonon calculations."""
# Copyright (C) 2021 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Calculation of derivative of dynamical matrix with respect to q."""
# Copyright (C) 2013 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Routines to handle displacements in supercells."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Transform dynamical matrix to force constants."""
# Copyright (C) 2014 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Force constants calculation."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Routines for user and calculator interfaces to phonopy."""
# Copyright (C) 2019 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""ABACUS calculator interface."""
# Copyright (C) 2022 Yuyang Ji
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Abinit calculator interface."""
# Copyright (C) 2014 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""FHIaims calculator interface."""
# FHIaims.py - IO routines for phonopy-FHI-aims
# methods compatible with the corresponding ones from ase.io.aims
# only minimal subset of functionality required within phonopy context is implemented

View File

@ -1,4 +1,5 @@
"""ALM force constants interface."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Routines to handle various calculator interfaces."""
# Copyright (C) 2014 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""CASTEP calculator interface."""
# Copyright (C) 2014 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Tests for CIF tools."""
# Copyright (C) 2016 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""CP2K calculator interface."""
# vim: set fileencoding=utf-8 :
# Copyright (C) 2017-2019 Tiziano Müller
# All rights reserved.

View File

@ -1,4 +1,5 @@
"""CRYSTAL calculator interface."""
# Copyright (C) 2016 Antti J. Karttunen (antti.j.karttunen@iki.fi)
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""DFTB+ calculator interface."""
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Elk calculator interface."""
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Force constants calculator interface."""
# Copyright (C) 2019 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Fleur calculator interface."""
# Copyright (C) 2021 Alexander Neukirchen
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""hiPhive force constants calculator interface."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""LAMMPS calculator interface."""
# Copyright (C) 2023 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""phonopy.yaml reader and writer."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""QE calculator interface."""
# Copyright (C) 2014 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""SIESTA calculator interface."""
# Copyright (C) 2015 Henrique Pereira Coutada Miranda
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""CRYSTAL calculator interface."""
# Copyright (C) 2019 Antti J. Karttunen (antti.j.karttunen@iki.fi)
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""VASP calculator interface."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Wien2k calculator interface."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Routines of phonon and post-phonon calculations."""
# Copyright (C) 2021 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Convert phonon results to animation formats."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Character table datasets of point groups."""
# Copyright (C) 2020 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Utility routines to handle degeneracy."""
# Copyright (C) 2014 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Calculation of density of states."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Group velocity calculation."""
# Copyright (C) 2013 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Calculate irreducible representation from eigenvectors."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonon calculation on sampling mesh."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Create atomic displacements."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Calculate phonon state moments."""
# Copyright (C) 2016 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonon calculation at specific q-points."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Calculate random displacements from phonons at finite temperatures."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Linear tetrahedron method on regular grid."""
# copyright (C) 2013 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Calculations of thermal displacements."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonon thermal properties at constant volume."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Quasi harmonic approximation."""
# Copyright (C) 2012 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Core routines for QHA."""
# Copyright (C) 2012 Atsushi Togo
# All rights reserved.
#
@ -1123,9 +1124,7 @@ class QHA:
msg += ["At least 5 volume points are needed for the fitting."]
raise RuntimeError("\n".join(msg))
dsdv_t = np.dot(
parameters[:4], np.array([4 * x**3, 3 * x**2, 2 * x, 1])
)
dsdv_t = np.dot(parameters[:4], np.array([4 * x**3, 3 * x**2, 2 * x, 1]))
self._volume_entropy_parameters.append(parameters)
try:

View File

@ -1,4 +1,5 @@
"""Calculation of free energy of one-electronic states."""
# Copyright (C) 2018 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Equation of states and fitting routine."""
# Copyright (C) 2012 Atsushi Togo
# All rights reserved.
#
@ -80,11 +81,7 @@ def get_eos(eos):
x = (v / p[3]) ** (1.0 / 3)
xi = 3.0 / 2 * (p[2] - 1)
return p[0] + (
9
* p[1]
* p[3]
/ (xi**2)
* (1 + (xi * (1 - x) - 1) * np.exp(xi * (1 - x)))
9 * p[1] * p[3] / (xi**2) * (1 + (xi * (1 - x) - 1) * np.exp(xi * (1 - x)))
)
if eos == "murnaghan":

View File

@ -1,4 +1,5 @@
"""Routines to calculate power spectrum from MD data."""
# Copyright (C) 2021 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Calculate dynamic structure factor at harmonic level."""
# Copyright (C) 2016 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Routines to analyze MD velocity data."""
# Copyright (C) 2016 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Crystal structure routines in direct and reciprocal spaces."""
# Copyright (C) 2021 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""PhonopyAtoms class and routines related to atoms."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Use first Brillouin zone (WignerSeitz cell) to locate q-points."""
# Copyright (C) 2013 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Primitive cell and supercell, and related utilities."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Tools to manage displacement dataset."""
# Copyright (C) 2020 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Calculation of Smith normal form of 3x3 matrix."""
# Copyright (C) 2020 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Crystal symmetry routines."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Core routine of linear tetrahedon method on regular grid."""
# Copyright (C) 2013 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Band unfolding routines."""
# Copyright (C) 2019 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Band unfolding calculation."""
# Copyright (C) 2015 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Collection of physical units."""
# Copyright (C) 2011 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Utility functions."""
# Copyright (C) 2022 Atsushi Togo
# All rights reserved.
#

View File

@ -1,4 +1,5 @@
"""Phonopy version number only."""
# Copyright (C) 2013 Atsushi Togo
# All rights reserved.
#

View File

@ -7,6 +7,7 @@ Custom parameter setting can be written in site.cfg.
Examples are written at _get_params_from_site_cfg().
"""
import os
import pathlib
import shutil

View File

@ -1,4 +1,5 @@
"""Pytest configuration."""
from __future__ import annotations
from collections.abc import Callable

View File

@ -1,4 +1,5 @@
"""Tests for mode Grueneisen parameter calculations."""
import numpy as np
from phonopy.api_gruneisen import PhonopyGruneisen

View File

@ -1,4 +1,5 @@
"""Tests for routines in derivative_dynmat.py."""
import numpy as np
from phonopy import Phonopy

View File

@ -1,4 +1,5 @@
"""Tests for displacements."""
import itertools
from copy import deepcopy
from typing import Optional

Some files were not shown because too many files have changed in this diff Show More