{"library":"phono3py","title":"Phono3py: Anharmonic Lattice Dynamics","description":"Phono3py is a Python package for calculating anharmonic lattice dynamics properties, such as lattice thermal conductivity and phonon lifetimes, using a supercell approach and third-order force constants. It is commonly used in conjunction with first-principles calculation codes (e.g., VASP, Quantum ESPRESSO) that provide the necessary force information. The current version is 3.30.1. It maintains an active development and release cadence, often in sync with its harmonic counterpart, Phonopy.","language":"python","status":"active","last_verified":"Fri May 15","install":{"commands":["pip install phono3py"],"cli":{"name":"phono3py","version":"usage: phono3py [-h] [--abinit] [--crystal] [--qe] [--turbomole] [--vasp]"}},"imports":["from phono3py import Phono3py","from phonopy.structure.atoms import PhonopyAtoms"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import numpy as np\nfrom phonopy import Phonopy\nfrom phonopy.structure.atoms import PhonopyAtoms\nfrom phono3py import Phono3py\n\n# Define a simple silicon unit cell (diamond structure) for demonstration\na = 5.43  # Lattice parameter for Si\n\n# Unit cell basis vectors (face-centered cubic)\nlattice = np.array([\n    [a/2, a/2, 0],\n    [a/2, 0, a/2],\n    [0, a/2, a/2]\n])\n\n# Atoms in the unit cell (fractional coordinates)\npositions = np.array([\n    [0, 0, 0],\n    [0.25, 0.25, 0.25]\n])\nsymbols = ['Si', 'Si']\n\n# Create a PhonopyAtoms object for the unit cell\nunit_cell = PhonopyAtoms(cell=lattice, scaled_positions=positions, symbols=symbols)\n\n# Define supercell matrix (e.g., 2x2x2 supercell)\nsupercell_matrix = np.diag([2, 2, 2])\n\n# Initialize Phonopy object (a prerequisite for Phono3py)\nphonon = Phonopy(unit_cell, supercell_matrix)\n\n# Define a primitive matrix if different from the unit cell. \n# For FCC structures, a typical primitive cell matrix is:\nprimitive_matrix = np.array([\n    [0, 0.5, 0.5],\n    [0.5, 0, 0.5],\n    [0.5, 0.5, 0]\n])\n\n# Initialize Phono3py object with the Phonopy object and supercell matrix\nph3 = Phono3py(phonon, supercell_matrix, primitive_matrix=primitive_matrix)\n\nprint(\"Phono3py object initialized successfully.\")\nprint(f\"Number of atoms in primitive cell: {ph3.primitive.numbers.shape[0]}\")\nprint(f\"Number of atoms in supercell: {ph3.supercell.numbers.shape[0]}\")","lang":"python","description":"This quickstart demonstrates how to initialize the core `Phono3py` object. It sets up a dummy silicon unit cell and supercell, then creates a `Phonopy` object, which is passed to `Phono3py`. This is the fundamental first step before loading force constants and running calculations.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"3.31.1","pypi_latest":"3.31.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":40,"avg_install_s":12.3,"avg_import_s":1.02,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"phono3py","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"phono3py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":12.9,"import_time_s":0.69,"mem_mb":19.8,"disk_size":"339M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"phono3py","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"phono3py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":12.2,"import_time_s":1.1,"mem_mb":22.3,"disk_size":"362M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"phono3py","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"phono3py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":11.9,"import_time_s":1.37,"mem_mb":22.1,"disk_size":"347M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"phono3py","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"phono3py","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":12.1,"import_time_s":0.9,"mem_mb":19,"disk_size":"345M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"phono3py","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"phono3py","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":25.3,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}