File: calc-fc.py

package info (click to toggle)
python-symfc 1.5.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,980 kB
  • sloc: python: 10,485; makefile: 12
file content (16 lines) | stat: -rw-r--r-- 389 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Calculate force constants using symfc."""

import phonopy

from symfc import Symfc

ph = phonopy.load("phonopy_NaCl444_rd.yaml.xz", produce_fc=False)
symfc = Symfc(
    ph.supercell,
    displacements=ph.dataset["displacements"],
    forces=ph.dataset["forces"],
    log_level=1,
).run(orders=[2])

ph.force_constants = symfc.force_constants[2]
ph.auto_band_structure(plot=True).show()