9
$\begingroup$

I am doing a phonon calculation for a phase using a 2x2x1 supercell (after geometry optimization of the structure). I am getting an error when computing the DOS and band structure after computing the force sets. The crystal structure of the initial and the final structures are the same. Here is the error.

*phonopy -p -s band.conf
        _
  _ __ | |__   ___  _ __   ___   _ __  _   _
 | '_ \| '_ \ / _ \| '_ \ / _ \ | '_ \| | | |
 | |_) | | | | (_) | | | | (_) || |_) | |_| |
 | .__/|_| |_|\___/|_| |_|\___(_) .__/ \__, |
 |_|                            |_|    |___/
                                  1.12.6-r32
Python version 2.7.12
Spglib version 1.10.3
Band structure mode
Settings:
  Supercell: [2 2 1]
Spacegroup: P6_3/mcm (193)
Computing force constants...
Encounter some problem in compute_permutation.
Traceback (most recent call last):
  File "/usr/local/bin/phonopy", line 659, in <module>
    computation_algorithm=settings.get_fc_computation_algorithm())
  File "/usr/local/lib/python2.7/dist-packages/phonopy/api_phonopy.py", line 372, in produce_force_constants
    computation_algorithm=computation_algorithm)
  File "/usr/local/lib/python2.7/dist-packages/phonopy/api_phonopy.py", line 1299, in _run_force_constants_from_forces
    computation_algorithm=computation_algorithm)
  File "/usr/local/lib/python2.7/dist-packages/phonopy/harmonic/force_constants.py", line 87, in get_fc2
    computation_algorithm=computation_algorithm)
  File "/usr/local/lib/python2.7/dist-packages/phonopy/harmonic/force_constants.py", line 704, in _get_force_constants_disps
    computation_algorithm=computation_algorithm)
  File "/usr/local/lib/python2.7/dist-packages/phonopy/harmonic/force_constants.py", line 261, in solve_force_constants
    symprec)
  File "/usr/local/lib/python2.7/dist-packages/phonopy/harmonic/force_constants.py", line 579, in _solve_force_constants_svd
    symprec)
  File "/usr/local/lib/python2.7/dist-packages/phonopy/harmonic/force_constants.py", line 275, in get_positions_sent_by_rot_inv
    symprec)
  File "/usr/local/lib/python2.7/dist-packages/phonopy/harmonic/force_constants.py", line 853, in _compute_permutation_for_rotation
    symprec)
  File "/usr/local/lib/python2.7/dist-packages/phonopy/harmonic/force_constants.py", line 889, in _compute_permutation_c
    permutation_error()
  File "/usr/local/lib/python2.7/dist-packages/phonopy/harmonic/force_constants.py", line 877, in permutation_error
    raise ValueError("Input forces are not enough to calculate force constants, "
ValueError: Input forces are not enough to calculate force constants, or something wrong (e.g. crystal structure does not match).*

What should I do?

$\endgroup$
6
  • $\begingroup$ +1. Welcome to our site and thanks for asking your question here! I'll send it to some people that use Phonopy and see what happens. We hope to see much more of you here! $\endgroup$ Aug 5 '20 at 16:35
  • $\begingroup$ I suppose you might have forgotten to calculate force constants or there must be some error in their calculation. Do you have a proper FORCE_SETS file? $\endgroup$ Aug 6 '20 at 19:49
  • $\begingroup$ I have calculated the FORCE_SETS file without any error. So the FORCE_SET file should be the proper one I guess. $\endgroup$ Aug 8 '20 at 18:40
  • $\begingroup$ Hi @Nirajamoharana, is it possible that you updated phonopy after you first calculated displaced supercells? There is surely an error in the number of displaced supercells calculated to construct the force constant matrix (as PromM points out in his answer). Maybe across versions, phonopy changed how it plays with symmetry (spglib or otherwise). $\endgroup$ Nov 30 '20 at 20:04
  • 1
    $\begingroup$ Hi @HitanshuSachania, there is no update in the versions of phonopy. Sometimes higher tolerance of symmetry of the structure may cause this type of error. A lower symmetry setting can solve the issue. (In my case it worked) $\endgroup$ Dec 1 '20 at 11:34
6
$\begingroup$

I have never used Phonopy, so we will have to wait for an actual user for a full answer.

However, I can make some general statements about phonon calculations that could plausibly explain your error. The starting point of any phonon calculation is the construction of the matrix of force constants:

$$ D_{\alpha i;\alpha'i'}(\mathbf{R}_p,\mathbf{R}_{p'})=\frac{\partial^2E}{\partial u_{p\alpha i}\partial u_{p'\alpha'i'}}, $$

where $E$ is the potential energy surface, $u_{p\alpha i}$ is the displacement of an atom in a cell located at $\mathbf{R}_p$ in the supercell, $\alpha$ is the atom of the basis you are moving, and $i$ is the Cartesian direction in which you are moving the atom. Essentially, the matrix of force constants captures the lowest-order non-zero non-constant term in the Taylor expansion of the energy of the atoms about their equilibrium position, so it allows you to study their harmonic vibrations.

For a supercell containing $N_{p}$ primitive cells (in your case $N_p=2\times2\times1=4$) and a system with $N_{\mathrm{at}}$ atoms per primitive cell, there are at total of $3N_{p}N_{\mathrm{at}}-3$ degrees of freedom, where the $3$ comes from the $3$ possible Cartesian directions, and the $-3$ comes from the trivial translational modes.

The discussion above suggests that you would naively need a total of $3N_{p}N_{\mathrm{at}}-3$ calculations to determine all force constants. In reality, you can use symmetry to reduce the number of force constants you need to calculate explicitly. Most phonon codes do this, and my guess would be that Phonopy should also do this. Most probably, Phonopy suggests that you calculate a subset of the force constants based on symmetry, and then uses these as input to build the full matrix of force constants. The error that there are not enough force constants suggests that the symmetry finder failed, so it requested fewer force constants than it needed in reality.

As I said, this is not a direct answer because I have never used Phonopy. But while we are waiting for a direct answer, my suggestion would be to check whether symmetry is treated correctly in your calculation.

$\endgroup$
4
$\begingroup$

This error (input forces are not enough to calculate force constants) may arise when you are trying to plot the band structure or the density of state plots for some systems. Sometimes setting a higher symmetry tolerance for a structure may cause this type of error. A lower symmetry setting can solve the issue. The following command can be used in phonopy before plotting the DOS or BS:

 phonopy --tolerance=1e-4 -p mesh.conf  

or

 phonopy --tolerance=1e-4 -p band.conf

Hope it helps.

$\endgroup$
2
  • 2
    $\begingroup$ Thanks for figuring out the answer to your question and sharing it so others in the future might find it helpful! +1. I just changed the format of your commands, please double check to see if it's right. $\endgroup$ Dec 1 '20 at 17:43
  • $\begingroup$ This solved the error for me too! Thanks! $\endgroup$ Jan 26 at 16:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.