[PROBLEM] canonical_configuration and small positive frequencies
flokno opened this issue · 2 comments
When creating samples via canonical_configurations
and input dispersions which have very small but positive frequencies, the resulting displacements can be very large. This comes from the fact that TDEP treats frequencies larger than lo_freqtol
(=1e-9) as positive: https://github.com/tdep-developers/tdep/blob/main/src/libolle/type_forceconstant_secondorder_aux.f90#L439
If the phonon dispersion is close to zero at a commensurate point, a large displacement will therefore be created.
One possible way out would be to check that the resulting amplitudes are not too big or something, or throw an error
A solution I have seen for this kind of problem is to set all frequencies lower than some threshold to some positive frequency, a small one but large enough to have sensible displacements. Maybe the positive frequency is something that can be inferred from the rest of the spectra ?
Compared to ignoring the low/imaginary frequencies, this allow to still excite the system on the specific directions of the mode, which helps for the next iteration.
Since at convergence everything should be positive anyway, this have no impact on the final results.
However, I think that throwing a warning when this happens is a good idea.