## Definition of Problem

When running matdyn.x, it raises the following error:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
from frc_blk : error #         1
wrong total_weight
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Such error locates in file matdyn.f90.

## Cause and Explaination

The subroutine frc_blk in matdyn.f90 calculates the dynamical matrix at q from the force constants. It uses subroutine wsweight to calculate whether everything should be in the WS cell is there. The wsweight subroutine uses a eps parameter to determine whether a point is on the vertex. If the atom coordinates is not accurate enough, this might be wrong.

## Steps for Resolving the Problem

1. Edit file $QE_HOME/pw/src/wsweight.f90, lower the value for parameter eps, to maybe 1.0d-4. 2. Go to $QE_HOME/pw/src and run make libpw.a to recompile libpw.a.