Inclusion of spglib support for symmetrization

Summary:

An interface to the spglib library is now quite mature and almost ready to be merged. This issue is a placeholder to organize the steps to be taken, including addressing some issues before a proper merge request.

Description:

Main code changes:

Interface to spglib: Src/spglib_f03.f90

Module with siesta objects which then calls spglib: m_syms.F90. It is enough to use this module in order to access the objects symops etc...

The symmetry init routine is called from Src/siesta_init.F, which also outputs basic information (too verbose for the moment)

One can currently enforce symmetries on:

  • structure - Src/siesta_init.F
  • Forces - Src/state_analysis.F

Options for input file:

  • ../Src/read_options.F90: impose_symmetries = fdf_get ('ImposeSymmetries', .true.)
  • ../Src/read_options.F90: syms_prec = fdf_get ('ToleranceSymmetries', 1.d-6)

Rapidly implementable other uses for the symmetries:

  • k-point grid reduction (implies completing the density matrix, maybe states as well, using symmetries)
  • reduction of perturbations in DFPT (idem). To be discussed with Miguel eventually
  • things for images and constraints that Arsalan wanted to do, with NEB or other algorithms acting on instances with different space groups.

Supporting material:

The code is currently in this branch