1
2! Copyright (C) 2013 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine symmetry
7use modmain
8use modvars
9implicit none
10! inverse of the lattice vector matrix
11call r3minv(avec,ainv)
12! find Bravais lattice symmetries
13call findsymlat
14! use only the identity if required
15if (symtype.eq.0) nsymlat=1
16! find the crystal symmetries and shift atomic positions if required
17call findsymcrys
18! find the site symmetries
19call findsymsite
20! check if fixed spin moments are invariant under the symmetry group
21call checkfsm
22! check if real symmetric first-variational eigen solver can be used
23if (.not.tsyminv) tefvr=.false.
24! write to VARIABLES.OUT
25call writevars('nsymlat',iv=nsymlat)
26call writevars('symlat',nv=9*nsymlat,iva=symlat)
27call writevars('nsymcrys',iv=nsymcrys)
28call writevars('vtlsymc',nv=3*nsymcrys,rva=vtlsymc)
29call writevars('lsplsymc',nv=nsymcrys,iva=lsplsymc)
30call writevars('lspnsymc',nv=nsymcrys,iva=lspnsymc)
31end subroutine
32
33