# Mode-resolved force constants of tetragonal BaTiO3 (P4mm, 5 atoms, Z = 1)
# from the FORCE_SETS of a 4x4x4 supercell. Writes mode-resolved-fc.yaml. At
# GM the polar GM5 set (the in-plane Ti-O displacement) is unstable,
# k = -0.812 eV/A^2 (-1.009 with the translation removed): the instability that
# drives the next transition to Amm2. The acoustic set (bands 3-5) is an
# accidental GM1 + GM5 degeneracy; it is split into its two irreps by the
# character projector (the components of that set in the YAML file), so that
# the GM1 and GM5 Hessian blocks get the right dimensions.
crystod-phonon --mode-resolved-fc -c 99_PPOSCAR_BaTiO3 --dim 4 4 4

* Structure *
  Space group: P4mm (#99)
  Formula: BaTiO3
  Primitive cell: 5 atoms, Z = 1 formula unit(s)
  Supercell: 4 x 4 x 4 (FORCE_SETS)

* Conventions *
  k = u^+ Phi(q) u^ = mu w in eV/A^2 per primitive cell, the pattern u^ normalized
  to |u^| = 1 A over the primitive cell; k/fu = k / Z; mu = 1 / sum_i |e_i|^2/m_i (amu)
  k(-transl.) (GM only): k of u^ with its uniform translation removed, renormalized
  Irrep blocks: eigenvalues of Phi(q) on the irrep subspace (eV/A^2); k < 0: unstable
  1 eV/A^2 = 1000 meV/A^2, the unit many stability analyses quote per formula unit

* Mode-resolved force constants at GM *
  q = [0.0000, 0.0000, 0.0000]
   band  irrep   freq (THz)   mu (amu)    k (eV/A^2)         k/fu  k(-transl.)
    1-2  GM5(2)     -2.9235    23.2295     -0.812369    -0.812369    -1.008910
    3-5  GM1(1)      0.0000    46.6384      0.000000     0.000000     acoustic
         GM5(2)                46.6384      0.000000     0.000000     acoustic
      6  GM1(1)      4.9896    30.5134      3.108294     3.108294     6.250751
    7-8  GM5(2)      5.0963    36.8116      3.911875     3.911875     7.549297
      9  GM1(1)      7.0253    27.4125      5.535726     5.535726     6.458775
     10  GM2(1)      8.4778    15.9994      4.705115     4.705115     4.705115
  11-12  GM5(2)      8.6432    16.0034      4.891723     4.891723     4.893099
  13-14  GM5(2)     13.5612    16.2502     12.227968    12.227968    12.268217
     15  GM1(1)     14.2846    16.0041     13.361783    13.361783    13.362900

* Irrep-resolved Hessian at GM *
  irrep       dim         trace  eigenvalues (eV/A^2)
  GM5          10     48.906548  -1.015794 -1.015794 0.000000 0.000000 4.894100 4.894100 7.722351
                                 7.722351 12.852617 12.852617
    -transl.    8     48.906548  -1.015794 -1.015794 4.894100 4.894100 7.722351 7.722351 12.852617
                                 12.852617
  GM1           4     27.972302  0.000000 4.676853 9.865458 13.429991
    -transl.    3     27.972302  4.676853 9.865458 13.429991
  GM2           1      4.705115  4.705115

* Mode-resolved force constants at M *
  q = [0.5000, 0.5000, 0.0000]
   band  irrep  freq (THz)   mu (amu)    k (eV/A^2)         k/fu
      1  M3(1)      3.0412   137.1371      5.189826     5.189826
    2-3  M5(2)      3.2642   114.2209      4.979488     4.979488
      4  M1(1)      5.6627    47.2905      6.204750     6.204750
      5  M4(1)      5.8420    15.9994      2.234231     2.234231
    6-7  M5(2)      7.9472    19.3619      5.003563     5.003563
    8-9  M5(2)      9.9644    16.2378      6.596690     6.596690
     10  M1(1)     11.9926    16.0633      9.452839     9.452839
  11-12  M5(2)     12.1705    32.0612     19.430905    19.430905
     13  M2(1)     12.2960    15.9994      9.897680     9.897680
     14  M3(1)     13.4204    16.0020     11.792390    11.792390
     15  M1(1)     20.4200    16.0010     27.299693    27.299693

* Irrep-resolved Hessian at M *
  irrep       dim         trace  eigenvalues (eV/A^2)
  M3            2     17.002989  5.184855 11.818134
  M5            8     90.929418  3.774669 3.774669 6.544902 6.544902 6.624254 6.624254 28.520884
                                 28.520884
  M1            3     43.087095  6.116833 9.663587 27.306676
  M4            1      2.234231  2.234231
  M2            1      9.897680  9.897680

* Mode-resolved force constants at X *
  q = [0.0000, 0.5000, 0.0000]
  band  irrep  freq (THz)   mu (amu)    k (eV/A^2)         k/fu
     1  X4(1)     -1.3602    36.9678     -0.279839    -0.279839
     2  X3(1)      3.1069   135.5542      5.353720     5.353720
     3  X2(1)      3.1374   135.5448      5.459121     5.459121
     4  X1(1)      4.2698   117.2537      8.746765     8.746765
     5  X1(1)      5.2129    33.2805      3.700378     3.700378
     6  X4(1)      6.1852    17.4251      2.727653     2.727653
     7  X3(1)      7.7270    24.4752      5.979324     5.979324
     8  X1(1)      7.7918    19.0192      4.724628     4.724628
     9  X3(1)      8.9725    16.0286      5.279880     5.279880
    10  X3(1)      9.5695    16.0546      6.015525     6.015525
    11  X2(1)      9.5769    16.0239      6.013366     6.013366
    12  X4(1)     12.4874    16.2715     10.381769    10.381769
    13  X1(1)     13.3172    16.0171     11.622710    11.622710
    14  X3(1)     13.9046    23.3813     18.496158    18.496158
    15  X1(1)     18.9495    16.1051     23.662317    23.662317

* Irrep-resolved Hessian at X *
  irrep       dim         trace  eigenvalues (eV/A^2)
  X4            3     13.509846  -0.283118 3.044041 10.748923
  X3            5     49.390141  4.898221 5.367816 5.572645 6.367677 27.183783
  X2            2     11.605527  5.121818 6.483709
  X1            5     57.439552  2.835249 6.574732 10.134434 12.167755 25.727383

* Mode-resolved force constants at A *
  q = [0.5000, 0.5000, 0.5000]
   band  irrep  freq (THz)   mu (amu)    k (eV/A^2)         k/fu
      1  A3(1)      3.8665   137.3248      8.400009     8.400009
    2-3  A5(2)      3.9478   134.2654      8.561909     8.561909
      4  A4(1)      5.2681    15.9994      1.816833     1.816833
    5-6  A5(2)      5.3223    16.0760      1.863304     1.863304
      7  A1(1)      8.8124    28.8661      9.172326     9.172326
    8-9  A5(2)     10.9890    46.1221     22.788916    22.788916
     10  A2(1)     12.2579    15.9994      9.836281     9.836281
  11-12  A5(2)     12.3340    16.1698     10.064882    10.064882
     13  A3(1)     12.5322    15.9994     10.281458    10.281458
     14  A1(1)     15.1065    20.1726     18.835894    18.835894
     15  A1(1)     21.5059    16.2124     30.680595    30.680595

* Irrep-resolved Hessian at A *
  irrep       dim         trace  eigenvalues (eV/A^2)
  A3            2     18.681735  8.399470 10.282265
  A5            8     88.535462  1.852590 1.852590 8.778949 8.778949 9.914214 9.914214 23.721978
                                 23.721978
  A4            1      1.816833  1.816833
  A1            3     67.516766  7.939395 25.224797 34.352574
  A2            1      9.836281  9.836281

* Mode-resolved force constants at R *
  q = [0.0000, 0.5000, 0.5000]
  band  irrep  freq (THz)   mu (amu)    k (eV/A^2)         k/fu
     1  R4(1)     -1.1672    42.2200     -0.235331    -0.235331
     2  R2(1)      3.0868   136.9355      5.338535     5.338535
     3  R3(1)      3.1886   114.9975      4.783836     4.783836
     4  R1(1)      3.1975   106.7354      4.464961     4.464961
     5  R3(1)      5.9101    16.0908      2.299698     2.299698
     6  R1(1)      7.5228    21.7815      5.043604     5.043604
     7  R3(1)      8.0426    19.5123      5.164105     5.164105
     8  R4(1)      9.7814    16.1910      6.338361     6.338361
     9  R2(1)     10.0612    16.0047      6.628948     6.628948
    10  R4(1)     10.4091    16.5432      7.334088     7.334088
    11  R1(1)     10.4772    19.8555      8.918079     8.918079
    12  R3(1)     12.1891    31.7864     19.323212    19.323212
    13  R3(1)     13.3064    16.0960     11.661056    11.661056
    14  R1(1)     14.6970    20.2759     17.919836    17.919836
    15  R1(1)     20.8002    16.4698     29.155699    29.155699

* Irrep-resolved Hessian at R *
  irrep       dim         trace  eigenvalues (eV/A^2)
  R4            3     14.020805  -0.235907 6.374435 7.882277
  R2            2     11.997703  5.286122 6.711580
  R3            5     52.687746  2.255453 3.989831 6.265895 11.563688 28.612879
  R1            5     79.905760  3.414223 6.144488 10.060786 23.788787 36.497477

* Mode-resolved force constants at Z *
  q = [0.0000, 0.0000, 0.5000]
   band  irrep  freq (THz)   mu (amu)    k (eV/A^2)         k/fu
    1-2  Z5(2)     -1.6666    35.0658     -0.398504    -0.398504
    3-4  Z5(2)      3.1790   129.4036      5.350762     5.350762
      5  Z1(1)      4.3633   127.6957      9.947412     9.947412
    6-7  Z5(2)      5.8737    18.0128      2.542761     2.542761
      8  Z1(1)      7.2230    25.4548      5.433878     5.433878
      9  Z2(1)      8.9882    15.9994      5.288684     5.288684
  10-11  Z5(2)      9.4651    16.0439      5.881048     5.881048
  12-13  Z5(2)     12.6496    16.2365     10.630282    10.630282
     14  Z1(1)     13.3331    20.5758     14.966282    14.966282
     15  Z1(1)     20.1673    17.4032     28.961622    28.961622

* Irrep-resolved Hessian at Z *
  irrep       dim         trace  eigenvalues (eV/A^2)
  Z5           10     50.095625  -0.407911 -0.407911 2.913447 2.913447 5.008069 5.008069 6.564620
                                 6.564620 10.969586 10.969586
  Z1            4     71.158983  4.959639 9.466473 19.242867 37.490003
  Z2            1      5.288684  5.288684

* Output files *
  Mode-resolved force constants written to: mode-resolved-fc.yaml
