36#include "./base/base_uses.f90"
44 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'cp_symmetry'
65 CHARACTER(LEN=*),
PARAMETER :: routinen =
'write_symmetry'
67 CHARACTER(LEN=2),
ALLOCATABLE,
DIMENSION(:) :: element
68 CHARACTER(LEN=8) :: csymm, esymm
69 INTEGER :: handle, i, iw, natom, plevel
70 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: atype, z
71 LOGICAL :: check, molecular, pall, pcoor, pinertia, &
73 REAL(kind=
dp) :: eps_geo
74 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: weight
75 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: coord, scoord
81 CALL timeset(routinen, handle)
88 basis_section=input_section, &
89 print_key_path=
"PRINT%SYMMETRY", &
94 subsection_name=
"PRINT%SYMMETRY")
96 keyword_name=
"MOLECULE", l_val=molecular)
98 keyword_name=
"EPS_GEO", r_val=eps_geo)
103 natom =
SIZE(particle_set)
104 ALLOCATE (coord(3, natom), z(natom), weight(natom), atype(natom), element(natom))
109 kind_number=atype(i), element_symbol=element(i), mass=weight(i))
110 coord(1:3, i) = particle_set(i)%r(1:3)
117 keyword_name=
"STANDARD_ORIENTATION", l_val=pcoor)
119 keyword_name=
"INERTIA", l_val=pinertia)
121 keyword_name=
"SYMMETRY_ELEMENTS", l_val=psymmele)
123 keyword_name=
"ALL", l_val=pall)
125 IF (pcoor) plevel = plevel + 1
126 IF (pinertia) plevel = plevel + 10
127 IF (psymmele) plevel = plevel + 100
128 IF (pall) plevel = 1111111111
130 CALL print_symmetry(mol_sym, coord, atype, element, z, weight, iw, plevel)
133 keyword_name=
"CHECK_SYMMETRY", c_val=esymm)
135 IF (trim(esymm) /=
"NONE")
THEN
136 csymm = mol_sym%point_group_symbol
138 check = trim(adjustl(csymm)) == trim(adjustl(esymm))
139 IF (.NOT. check)
THEN
140 CALL cp_warn(__location__,
"Symmetry check failed: "// &
141 "Expected symmetry:"//trim(adjustl(esymm))// &
142 "Calculated symmetry:"//trim(adjustl(csymm)))
147 DEALLOCATE (coord, z, weight, atype, element)
154 natom =
SIZE(particle_set)
155 ALLOCATE (scoord(3, natom), atype(natom))
158 CALL get_atomic_kind(atomic_kind=particle_set(i)%atomic_kind, kind_number=atype(i))
162 CALL crys_sym_gen(crys_sym, scoord, atype, cell%hmat, delta=eps_geo, iounit=iw)
165 keyword_name=
"ROTATION_MATRICES", l_val=prmat)
167 keyword_name=
"ALL", l_val=pall)
169 IF (prmat) plevel = plevel + 1
170 IF (pall) plevel = 1111111111
171 crys_sym%plevel = plevel
175 DEALLOCATE (scoord, atype)
184 CALL timestop(handle)
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind(atomic_kind, fist_potential, element_symbol, name, mass, kind_number, natom, atom_list, rcov, rvdw, z, qeff, apol, cpol, mm_radius, shell, shell_active, damping)
Get attributes of an atomic kind.
Handles all functions related to the CELL.
subroutine, public real_to_scaled(s, r, cell)
Transform real to scaled cell coordinates. s=h_inv*r.
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
subroutine, public write_symmetry(particle_set, cell, input_section)
Write symmetry information to output.
K-points and crystal symmetry routines.
subroutine, public print_crys_symmetry(csym)
...
subroutine, public crys_sym_gen(csym, scoor, types, hmat, delta, iounit)
...
subroutine, public release_csym_type(csym)
Release the CSYM type.
Defines the basic variable types.
integer, parameter, public dp
Molecular symmetry routines.
subroutine, public molecular_symmetry(sym, eps_geo, coord, atype, weight)
Main program for symmetry analysis.
subroutine, public release_molsym(sym)
release an object of molsym type
subroutine, public print_symmetry(sym, coord, atype, element, z, weight, iw, plevel)
Print the output of the symmetry analysis.
Define the data structure for the particle information.
Definition of physical constants:
real(kind=dp), parameter, public massunit
Utilities for string manipulations.
elemental subroutine, public uppercase(string)
Convert all lower case characters in a string to upper case.
Type defining parameters related to the simulation cell.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
Container for information about molecular symmetry.