- reversed a recent change to "input_from_file" that has made temporary files
"input_tmp.in" to appear after running many executables
- in epw_readin.f90 and phq_readin.f90, call to "input_from_file" replaced by
"open_input_file"; added call to "close_input_file" to remove temporary file
- Various cleanup and streamlining
The idea is to use check_namelist_read so that the user know
exactly which input variable is problematic.
Also removal of a GOTO statement in epw_readin.f90
This was done by Pietro Delugas, Hari Paudyal and SP.
Compilation with gfortran and debug flags reveals a few instances of unitialized
variables and out-of-boubd errors, recently added. IMPORTANT NOTICE: until now,
variable "domag" was set to true for colinear calculations in the data file. It is
unused in that case, but it seems to me more sensible to set it to false. Noticed
when moving misplaced checks in recently added "ahc" phonon variables.
all tests pass. An extension and a workaround are needed in order to read files
generated by iotk with the simplified xml tools.
Quantum entanglement is nothing compared to phonon files entanglement.
2) Small bugfix in PHonon+U in the spin-polarized case
(symmetrization of the response occupation matrix when
the Hubbard channel is "s", which is never the case,
but in principle can be chosen as such).
- subroutine "ruotaijk" deleted and replaced by "rotate_grid_point", that does
quite the same thing but requires on input the symmetry operation in "scaled"
form, that is, suitable for directly transforming FFT grid point indices.
- subroutine "scale_sym_ops" added: trasforms rotation matrices and fractional
translations into "scaled" form, checking their consistency with the FFT grid.
Advantages: slightly cleaner, definitely safer, faster.
Usage: define local variables ftau, s_scaled as (for instance):
integer :: ftau(3,nsym), s_scaled(3,3,nsym)
Initialize ftau and s_scaled (nr1,nr2,nr3 for the chosen FFT grid):
call scale_sym_ops (nsym, s, ft, nr1, nr2, nr3, s_scaled, ftau)
Then for sym.op. "isym", the rotated (ri,rj,rk) of grid point (i,j,k) is
call rotate_grid_point( s_scaled(1,1,isym), ftau(1,isym), &
i, j, k, nr1, nr2, nr3, ri, rj, rk )
BEWARE: should be safe but it is untested for sym_band and pw2wannier
less symmetric case, the scf code may find symmetries that are not compatible
with the FFT grid (e.g., they mix axis with different FFT dimensions).
Added a check in the phonon code to ensure that this does not happen.
Noticed by Matteo Calandra.