%!TEX root=./user_guide.tex
\chapter{\wannier\ as a post-processing tool} \label{ch:wann-pp}

This is a description of how to use \wannier\ as a
post-processing tool. 

The code must be run twice. On the first pass either the logical
keyword \verb#postproc_setup# must be set to \verb#.true.# in the
input file \verb#seedname.win# or the code must be run with the
command line option \verb#-pp#.  Running the code then generates the
file \verb#seedname.nnkp# which provides the information required to
construct the $M_{mn}^{(\mathbf{k,b})}$ overlaps
(Ref.~\cite{marzari-prb97}, Eq.~(25)) and $A_{mn}^{(\mathbf{k})}$
(Ref.~\cite{marzari-prb97}, Eq.~(62); Ref.~\cite{souza-prb01},
Eq.~(22)).

Once the overlaps and projection have been computed and written to
files \verb#seedname.mmn# and \verb#seedname.amn#, respectively,
set \verb#postproc_setup# to \verb#.false.# and run the code. Output is
written to the file \verb#seedname.wout#.


\section{{\tt seedname.nnkp} file}

OUTPUT, if $\verb#postproc_setup#=\verb#.true.#$

The file \verb#seedname.nnkp# provides the information needed to
determine the required overlap elements $M_{mn}^{(\mathbf{k,b})}$ and
projections $A_{mn}^{(\mathbf{k})}$. It is written automatically when
the code is invoked with the \verb#-pp# command-line option (or when
\verb#postproc_setup=.true.# in \verb#seedname.win#. There should be
no need for the user to edit this file.

Much of the information in \verb#seedname.nnkp# is arranged in blocks
delimited by the strings \verb#begin block_name# \ldots
\verb#end block_name#, as described below. 


\subsection{Keywords}
The first line of the file is a user comment, e.g., the date and time:

\verb#File written on 12Feb2006 at 15:13:12#

\noindent 
The only logical keyword is \verb#calc_only_A#, eg,

\verb#calc_only_A  :  F#

\subsection{{\tt Real\_lattice} block}
\begin{verbatim}
begin real_lattice
 2.250000   0.000000   0.000000
 0.000000   2.250000   0.000000
 0.000000   0.000000   2.250000
end real_lattice
\end{verbatim}

The real lattice vectors in units of Angstrom.


\subsection{{\tt Recip\_lattice} block}
\begin{verbatim}
begin recip_lattice
 2.792527   0.000000   0.000000
 0.000000   2.792527   0.000000
 0.000000   0.000000   2.792527
end recip_lattice
\end{verbatim}

The reciprocal lattice vectors in units of inverse Angstrom.


\subsection{{\tt Kpoints} block}
\begin{verbatim}
begin kpoints
  8
  0.00000   0.00000   0.00000
  0.00000   0.50000   0.00000
  .
  .
  .
  0.50000   0.50000   0.50000
end kpoints
\end{verbatim}

The first line in the block is the total number of k-points
\verb#num_kpts#. The subsequent \verb#num_kpts# lines specify the
k-points in crystallographic co-ordinates relative to the reciprocal
lattice vectors.


\subsection{{\tt Projections} block}
\begin{verbatim}
begin projections
   n_proj
   centre   l  mr  r   
     z-axis   x-axis   zona
   centre   l  mr  r   
     z-axis   x-axis   zona
   .
   .
end projections
\end{verbatim}

\noindent
Notes:

\verb#n_proj#: integer; the number of projection centres, equal to the
number of MLWF \verb#num_wann#.

\verb#centre#: three real numbers; projection function centre
in crystallographic co-ordinates relative to the direct lattice
vectors.

\verb#l  mr  r#: three integers; $l$ and $m_\mathrm{r}$ specify the
angular part $\Theta_{lm_{\mathrm{r}}}(\theta,\varphi)$, and
$\mathrm{r}$ specifies the radial part $R_{\mathrm{r}}(r)$ of the
projection function (see Tables~\ref{tab:angular}, \ref{tab:hybrids}
and \ref{tab:radial}). 

\verb#z-axis#: three real numbers; default is
\verb#0.0 0.0 1.0#; defines the axis from which the polar angle
$\theta$ in spherical polar coordinates is measured.

\verb#x-axis#: three real numbers; must be orthogonal to
\verb#z-axis#; default is \verb#1.0 0.0 0.0# or a vector
perpendicular to \verb#z-axis# if \verb#z-axis# is given; defines the
axis from with the azimuthal angle $\varphi$ in spherical polar
coordinates is measured.

\verb#zona#: real number; the value of $\frac{Z}{a}$ associated
with the radial part of the atomic orbital. Units are in reciprocal
Angstrom.

%%\verb#box-size#: real number; the linear dimension of the real-space
%%box (or sphere) for calculating the overlap
%%$\langle\psi_{m\mathbf{k}}|\phi_{n}\rangle$ of a wavefunction with the
%%localised projection function. Units are in Angstrom. This feature is not
%%currently used.


\subsection{{\tt spinor\_projections} block}
\begin{verbatim}
begin spinor_projections
   n_proj
   centre   l  mr  r   
    z-axis   x-axis   zona
     spin spn_quant
   centre   l  mr  r   
    z-axis   x-axis   zona
     spin spn_quant
   .
   .
end spinor_projections
\end{verbatim}

\noindent
Notes: Only one of projections and spinor\_projections should be
defined. Variables are the same as the projections block with the
addition of \verb#spin# and \verb#spn_quant#.

\verb#spin#: integer. `1' or `-1' to denote projection onto up or
down states.

\verb#spn_quant#: three real numbers. Defines the spin quantisation
axis in Cartesian coordinates.



\subsection{{\tt nnkpts} block}
\begin{verbatim}
begin nnkpts
  10
  1   2   0  0  0
  .
  .
end nnkpts
\end{verbatim}

First line: \verb#nntot#, the number of nearest neighbours belonging
to each k-point of the Monkhorst-Pack mesh

Subsequent lines: \verb#nntot#$\times$\verb#num_kpts#
lines, ie, \verb#nntot# lines of data for each k-point of the mesh. 

Each line of consists of 5 integers. The first is the
k-point number \verb#nkp#. The second to the fifth specify it's nearest
neighbours $\mathbf{k+b}$: the second integer points to the k-point
that is the periodic image of the $\mathbf{k+b}$ that we want; the
last three integers give the G-vector, in reciprocal lattice units,
that brings the k-point specified by the second integer (which is in
the first BZ) to the actual $\mathbf{k+b}$ that we need.


\subsection{{\tt exclude\_bands} block}
\begin{verbatim}
begin exclude_bands 
  8 
  1 
  2 
  .
  .
end exclude_bands
\end{verbatim}
To exclude bands (independent of k-point) from the calculation of the 
overlap and projection matrices, for example to ignore shallow-core states.
The first line is the number of states to exclude, the following lines give
the states for be excluded.


\subsection{\label{sec:auto-projections-block}{\tt auto\_projections} block}
\begin{verbatim}
begin auto_projections
   8
   0
end auto_projections
\end{verbatim}

This block is only printed if \verb#auto_projections=true# in the input.
The choice of an additional block has been made in order to maintain back-compatibility with codes that interface with \wannier, e.g. {\tt pw2wannier90}.
The first entry in the block (in the example above, \verb#8#) is the total number of target projections and it is equal to the number of sought Wannier functions.

The second entry is a reserved flag with the value of zero. The implementations of the interface codes MUST check for this value to be zero and stop otherwise. In the future, one possible extension that we plan is to combine the automatic generation of initial projections with the selection of projections via a projections block. This will allow the user to specify only a subset of initial projections in the projections block and leave the interface code to automatically generate the remaining ones. In that case the constraint on the second entry will be lifted, so that it can take on the meaning of the number of projections that need to be generated automatically.

The selected columns of the density matrix (SCDM) method~\cite{LinLin-ArXiv2017} is one way of generating the initial $A_{mn}^{(\mathbf{k})}$ in an automatic way. This has been implemented in the {\tt pw2wannier90} interface code (you need v6.3 with the files provided in the \texttt{pwscf} folder of Wannier90, or v6.4), see for instance Example 27 in the \wannier\ tutorial that shows how to use it.

N.B. Automatic generation of initial projections is not compatible with spinor-WFs yet.



\subsection{An example of projections}\label{sec:proj_example}

As a concrete example: one wishes to have a set of four sp$^3$ projection
orbitals on, say, a carbon atom at (0.5,0.5,0.5) in fractional
co-ordinates relative to the direct lattice vectors. In this case
\verb#seedname.win# will contain the following lines:

\begin{verbatim}
begin projections
 C:l=-1
end projections
\end{verbatim}

and \verb#seedname.nnkp#, generated on the first pass of
\wannier\ (with \verb#postproc_setup=T#), will contain: 

\begin{verbatim}
begin projections
   4
   0.50000    0.50000    0.50000    -1  1  1
     0.000  0.000  1.000   1.000  0.000  0.000   2.00 
   0.50000    0.50000    0.50000    -1  2  1
     0.000  0.000  1.000   1.000  0.000  0.000   2.00 
   0.50000    0.50000    0.50000    -1  3  1
     0.000  0.000  1.000   1.000  0.000  0.000   2.00 
   0.50000    0.50000    0.50000    -1  4  1
     0.000  0.000  1.000   1.000  0.000  0.000   2.00 
end projections
\end{verbatim}

where the first line tells us that in total four projections are
specified, and the subsquent lines provide the projection centre, the
angular and radial parts of the orbital (see
Section~\ref{sec:orbital-defs} for definitions), the $z$ and $x$ axes,
and the diffusivity and cut-off radius for the projection orbital.

\textsc{pwscf}, or any other \textit{ab initio} electronic structure
code, then reads \verb#seedname.nnkp# file, calculates the projections
and writes them to \verb#seedname.amn#. 


\section{{\tt seedname.mmn} file} 

INPUT. 

The file \verb#seedname.mmn# contains the overlaps
$M_{mn}^{(\mathbf{k,b})}$.

First line: a user comment, e.g., the date and time

Second line: 3 integers: \verb#num_bands#, \verb#num_kpts#,
\verb#nntot#

Then: $\verb#num_kpts#\times\verb#nntot#$ blocks of data:
 
First line of each block: 5 integers. The first specifies the
$\mathbf{k}$ (i.e., gives the ordinal corresponding to its position in
the list  of k-points in \verb#seedname.win#). The 2nd to 5th integers
specify $\mathbf{k+b}$. The  2nd integer, in particular, points to the
k-point on the list that is a  periodic image of $\mathbf{k+b}$, and
in particular is the image that is actually mentioned in the list. The 
last three integers specify the $\mathbf{G}$ vector, in  reciprocal
lattice units, that brings the k-point specified by the second
integer, and that thus lives inside the first BZ zone, to the actual
$\mathbf{k+b}$ that we need.

Subsequent $\verb#num_bands#\times\verb#num_bands#$ lines of each
block: two real numbers per line. These are the real and imaginary
parts, respectively, of the actual scalar product
$M_{mn}^{(\mathbf{k,b})}$ for $m,n \in [1,\verb#num_bands#]$. The
order of these elements is such that the first index $m$ is fastest.


\section{{\tt seedname.amn} file}

INPUT.

The file \verb#seedname.amn# contains the projection
$A_{mn}^{(\mathbf{k})}$.

First line: a user comment, e.g., the date and time

%Second line: a single integer, either 0 or 1. See below for explanation.

Second line: 3 integers: \verb#num_bands#, \verb#num_kpts#, \verb#num_wann#

                                     
Subsequently
$\verb#num_bands#\times\verb#num_wann#\times\verb#num_kpts#$ 
lines: 3 integers and 2 real numbers on each line. The first 
two integers are the band indices $m$ and $n$. The third integer specifies
the $\mathbf{k}$ by giving the ordinal corresponding to its position
in the list of $k$-points in \verb#seedname.win#. The real numbers
are the real and imaginary parts, respectively, of the actual
$A_{mn}^{(\mathbf{k})}$.

%The flag in the second line of \verb#seedname.amn# is present in order
%to give the \textit{ab initio} code some freedom to choose the shape
%of the projections itself. There are two possibilities:
%\begin{itemize}
%\item If it is 0, then
%\verb#wannier90# assumes that the projections in \verb#seedname.amn#
%have been calculated as specified in \verb#seedname.nnkp# and proceeds
%(if hybrid orbitals are required) to mix them in the correct manner to
%obtain projections onto the desired orbitals specified in
%\verb#seedname.win#
%\item If it is 1, then \verb#wannier90# ignores the specification of
%  the projection orbital shapes in \verb#seedname.win# and takes the
%  \verb#seedname.amn# file `as is', i.e., does no mixing.
%\end{itemize}

%In terms of the example of Section~\ref{sec:proj_example}, let us
%suppose that this flag is set to 0. Then 
%\verb#seedname.amn# contains the overlaps of a wavefunction
%$\psi_{m\mathbf{k}}$ with an atomic s and three p-orbitals
%$\{\verb#s#,\verb#px#,\verb#py#,\verb#pz#\}$.
%\verb#wannier90# will read 
%\verb#seedname.amn# and calculate the projection
%$A_{mn}^{(\mathbf{k})}$ of a $\psi_{m\mathbf{k}}$ onto
%four sp$^3$ orbitals  $\{\phi_{n}\}$ (specified in \verb#seedname.win# by
%\verb#l=-1#, or the string \verb#sp3#)
%by linear mixing as follows:  

%\begin{eqnarray}
%A_{mn}^{(\mathbf{k})} & = & \langle\psi_{m\mathbf{k}}|\phi_{n}\rangle
%                      \nonumber \\
%                      & = &
%                      \langle\psi_{m\mathbf{k}}|\verb#sp3-n#\rangle
%                      \nonumber \\ 
%                      & = &
% \frac{1}{2}\left[\langle\psi_{m\mathbf{k}}|\verb#s#\rangle \pm
% \langle\psi_{m\mathbf{k}}|\verb#px#\rangle \pm
% \langle\psi_{m\mathbf{k}}|\verb#py#\rangle \pm
% \langle\psi_{m\mathbf{k}}|\verb#pz#\rangle\right], \label{eq:Amn}
%\end{eqnarray} 
%
%where the matrix elements on the right-hand side are taken from
%\verb#seedname.amn#. Projections corresponding to four sp$^{3}$
%orbitals \verb#sp3-1#, \verb#sp3-2#, \verb#sp3-3#, and \verb#sp3-4# --
%see Section~\ref{sec:orbital-defs} -- are
%obtained with appropriate choice of the signs in Eq.~(\ref{eq:Amn}): 
%($+$,$+$,$+$), ($+$,$-$,$-$), ($-$,$+$,$-$) and
%($-$,$-$,$+$).


\section{{\tt seedname.dmn} file} 

INPUT. 

The file \verb#seedname.dmn# contains the data needed to construct symmetry-adapted Wannier functions~\cite{sakuma-prb13}. 
Required if \verb#site_symmetry = .true.#

First line: a user comment, e.g., the date and time

Second line: 4 integers: \verb#num_bands#, \verb#nsymmetry#, \verb#nkptirr#, \verb#num_kpts#.  \\ 
\phantom{Second line:} \verb#nsymmetry#: the number of symmetry operations   \\
\phantom{Second line:}  \verb#nkptirr#: the number of irreducible k-points

Blank line 

\verb#num_kpts# integers: 
Mapping between full k- and irreducible k-points. 
Each k-point is related to some k-point in the irreducible BZ. 
The information of this mapping is written. Each entry corresponds to a k-point in the 
full BZ, in the order in which they appear in the k-point list in \verb#seedname.win# file.
The (integer) value of each entry is the k-point index in the IBZ to which the k-point maps. 
The number of unique values is equal to the number of k-points in the IBZ.
The data is written 10 values per line. 
 
Blank line 

\verb#nkptirr# integers:  
List of irreducible k-points. 
Each entry corresponds to a k-point of the IBZ. The (integer) value of each entry
is the k-point index corresponding to the k-point list in \verb#seedname.win# file. 
The values should be between 1 and \verb#num_kpts#. The data is written 10 values per line.

Blank line 

\verb#nkptirr# blocks of  \verb#nsymmetry# integer data (each block separated by a blank line): 
List of k-points obtained by acting the symmetry operations on the irreducible k-points. 
The data is written 10 values per line.

Blank line 

$\verb#nsymmetry# \times \verb#nkptirr# $ blocks of data: \\
The information of $D$ matrix in Eq. (15) of Ref.~\cite{sakuma-prb13}. 
Each block contains $\verb#num_wann# \times \verb#num_wann#$ lines and is separated by a blank line. 
The data are stored in  \verb#d_matrix_wann(m,n,isym,ikirr)# with 
$\verb#m#, \verb#n# \in [1,\verb#num_wann#]$, $\verb#isym# \in [1,\verb#nsymmetry#]$, and $\verb#ikirr# \in [1,\verb#nkptirr#]$. 
The order of the elements is such that left indices run faster than right indices (\verb#m#: fastest,  \verb#ikirr#: slowest).
 
Blank line 

$\verb#nsymmetry# \times \verb#nkptirr# $ blocks of data: \\
The information of $\tilde d$ matrix in Eq. (17) of Ref.~\cite{sakuma-prb13}. 
Each block contains $\verb#num_bands# \times \verb#num_bands#$ lines and is separated by a blank line.
The data are stored in  \verb#d_matrix_band(m,n,isym,ikirr)# with 
$\verb#m#, \verb#n# \in [1,\verb#num_bands#]$, $\verb#isym# \in [1,\verb#nsymmetry#]$, and $\verb#ikirr# \in [1,\verb#nkptirr#]$. 
The order of the elements is such that left indices run faster than right indices (\verb#m#: fastest,  \verb#ikirr#: slowest). 


\section{{\tt seedname.eig} file}

INPUT. 

Required if any of \verb#disentanglement#, \verb#plot_bands#,
   \verb#plot_fermi_surface# or \verb#write_hr# are \verb#.true.#

The file \verb#seedname.eig# contains the Kohn-Sham eigenvalues
     $\varepsilon_{n\mathbf{k}}$ (in eV) at each point in the
     Monkhorst-Pack mesh.

Each line consist of two integers and a real number. The first integer
is the band index, the second integer gives the ordinal corresponding
to the $k$-point in the list of $k$-points in \verb#seedname.win#,
and the real number is the eigenvalue. 

E.g.,

\begin{verbatim}
           1           1  -6.43858831271328
           2           1   19.3977795287297
           3           1   19.3977795287297
           4           1   19.3977795287298
\end{verbatim}


\section{Interface with {\sc pwscf}}

Interfaces between \wannier\ and many ab-initio codes such as \pwscf, 
{\sc abinit} (\url{http://www.abinit.org}),
{\sc siesta} (\url{http://www.icmab.es/siesta/}), 
{\sc fleur}, {\sc VASP} and {\sc Wien2k} (\url{http://www.wien2k.at}) are
available.  Here we describe the
seamless interface between \wannier\ and \pwscf, a
plane-wave DFT code that comes as part of the {\sc Quantum ESPRESSO}
package (see \url{http://www.quantum-espresso.org}).
You will need
to download and compile \pwscf\ (i.e., the {\tt pw.x} code) and the
post-processing interface {\tt pw2wannier90.x}. Please refer to the
documentation that comes with the {\sc Quantum ESPRESSO} distribution
for instructions. 

\begin{enumerate}
\item Run `scf'/`nscf' calculation(s) with \verb#pw#
\item Run \wannier\ with \verb#postproc_setup#~=~\verb#.true.# to
  generate \verb#seedname.nnkp#
\item Run {\tt pw2wannier90}. First it reads an input file, e.g.,
  \verb#seedname.pw2wan#, which defines \verb#prefix# and
  \verb#outdir# for the underlying `scf' calculation, as well as the
  name of the file \verb#seedname.nnkp#, and does a consistency check
  between the direct and reciprocal lattice vectors read from
  \verb#seedname.nnkp# and those defined in the files specified by
  \verb#prefix#. \verb#pw2wannier90# generates \verb#seedname.mmn#,
  \verb#seedname.amn# and \verb#seedname.eig#. 
    \verb#seedname.dmn# and  \verb#seedname.sym# files are additionally created when  
     \verb#write_dmn = .true.# (see below). 
\item Run \verb#wannier90# with \verb#postproc_setup#~=~\verb#.false.# to
  disentangle bands (if required), localise MLWF, and use MLWF for
  plotting, bandstructures, Fermi surfaces etc.
\end{enumerate}

Examples of how the interface with \pwscf\ works are given in the
\wannier\ Tutorial. 

\subsection{{\tt seedname.pw2wan}}

A number of keywords may be specified in the {\tt pw2wannier90} input file:


\begin{itemize}

\item   \verb#outdir# -- Location to write output files. Default is \verb#`./'#

\item   \verb#prefix# -- Prefix for the \pwscf\ calculation. Default is \verb#` '#

\item   \verb#seedname# -- Seedname for the \wannier\ calculation. Default
   is \verb#`wannier'#

\item   \verb#spin_component# -- Spin component. Takes values \verb#`up'#,
   \verb#`down'# or \verb#`none'# (default).

\item   \verb#wan_mode# -- Either \verb#`standalone'# (default) or \verb#`library'#

\item   \verb#write_unk# -- Set to \verb#.true.# to write the periodic part
   of the Bloch functions for plotting in \wannier. Default is
   \verb#.false.#

\item   \verb#reduce_unk# -- Set to \verb#.true.# to reduce file-size (and
   resolution) of Bloch functions by a factor of 8. Default is
   \verb#.false.# (only relevant if
   \verb#write_unk=.true.#)\footnote{Note that there is a small bug
   with this feature in v3.2 (and subsequent patches) of {\tt
   quantum-espresso}. Please use a later version (if available) or the
   CVS version of {\tt pw2wannier90.f90}, which has been fixed.}

\item   \verb#wvfn_formatted# -- Set to \verb#.true.# to write formatted
   wavefunctions. Default is \verb#.false.# (only relevant if
   \verb#write_unk=.true.#)

\item   \verb#write_amn# -- Set to \verb#.false.# if
   $A_{mn}^{(\mathbf{k})}$ not required. Default is \verb#.true.#

\item   \verb#write_mmn# -- Set to \verb#.false.# if
   $M_{mn}^{(\mathbf{k,b})}$ not required. Default is \verb#.true.#

\item   \verb#write_spn# -- Set to \verb#.true.# to write out the matrix
   elements of $S$ between Bloch states (non-collinear spin calculation
   only). Default is \verb#.false.#

\item   \verb#spn_formatted# -- Set to \verb#.true.# to write spn data as a formatted file. Default is \verb#.false.# (only relevant if
   \verb#write_spn=.true.#)


\item   \verb#write_uHu# -- Set to \verb#.true.# to write out the matrix
   elements $$\langle u_{n{\bf k}+{\bf b}_1}\vert
H_{\bf k}\vert u_{m{\bf k}+{\bf b}_2}\rangle.
$$
Default is \verb#.false.#

\item   \verb#uHu_formatted# -- Set to \verb#.true.# to write uHu data as a formatted file. Default is \verb#.false.# (only relevant if
   \verb#write_uHu=.true.#)


\item   \verb#write_uIu# -- Set to \verb#.true.# to write out the matrix
   elements of $$\langle  u_{n{\bf k}+{\bf b}_1}\vert
u_{m{\bf k}+{\bf b}_2}\rangle.
$$ Default is \verb#.false.# 

\item   \verb#uIu_formatted# -- Set to \verb#.true.# to write uIu data as a formatted file. Default is \verb#.false.# (only relevant if
   \verb#write_uIu=.true.#)



\item   \verb#write_unkg# -- Set to \verb#.true.# to write the first few
   Fourier components of the periodic parts of the Bloch functions.

\item   \verb#write_dmn# -- Set to \verb#.true.# to construct symmetry-adapted Wannier functions.  
Default is \verb#.false.#

\item   \verb#read_sym# -- Set to \verb#.true.# to customize symmetry operations to be used in symmetry-adapted mode. 
When  \verb#read_sym = .true.#, an additional input {\tt seedname.sym} is required. 
Default is \verb#.false.#
(only relevant if \verb#write_dmn=.true.#). 



\end{itemize}

For examples of use, refer to the \wannier\ Tutorial.


\subsection{{\tt seedname.sym}}

If \verb#read_sym = .true.#, then this additional input file is required for {\tt pw2wannier90.x}\\ 
if \verb#read_sym = .false.#, then this file is written by {\tt pw2wannier90.x} (only for reference -- 
it is not used in subsequent calculations)

The file \verb#seedname.sym# contains the information of symmetry operations used to create symmetry-adapted Wannier functions.  
If \verb#read_sym = .false.# (default), {\tt pw2wannier90.x} uses the full symmetry recognized by {\tt pw.x}. 
If \verb#read_sym = .true.#, you can specify symmetry operations to be used in symmetry-adapted mode.  


First line: an integer: \verb#nsymmetry# (number of symmetry operations)

Second line: blank
 
Then:   \verb#nsymmetry# blocks of data.  
Each block (separated by a blank line) consists of four lines.  
The order of the data in each block is as follows: 
\begin{verbatim}
  R(1,1)   R(2,1)   R(3,1)
  R(1,2)   R(2,2)   R(3,2)
  R(1,3)   R(2,3)   R(3,3)
   t(1)     t(2)     t(3)   
\end{verbatim}
Here, $R$ is the rotational part of symmetry operations ($3\times3$ matrix), and  $\bf t$ is the fractional translation in the unit of ``\verb#alat#'' (refer the definition of ``\verb#alat#'' to the manual of \pwscf). 
Both data are given in Cartesian coordinates. 
The symmetry operations act on a point $\bf r$ as ${\bf r} R - {\bf t}$. 
