25#include "../base/base_uses.f90"
44 TYPE reftraj_info_type
45 INTEGER :: first_snapshot = 0
46 INTEGER :: last_snapshot = 0
50 LOGICAL :: variable_volume = .false.
51 LOGICAL :: msd = .false.
54 END TYPE reftraj_info_type
58 LOGICAL :: disp_atom = .false., msd_kind = .false., msd_molecule = .false., msd_region = .false.
59 INTEGER :: num_disp_atom = 0, ref0_unit = 0
60 INTEGER,
POINTER,
DIMENSION(:) :: disp_atom_index => null()
61 REAL(kind=
dp) :: disp_atom_tol = 0.0_dp, drcom(3) = 0.0_dp, ref0_com(3) = 0.0_dp, total_mass = 0.0_dp
62 REAL(kind=
dp),
POINTER,
DIMENSION(:, :) :: disp_atom_dr => null()
63 REAL(kind=
dp),
POINTER,
DIMENSION(:, :) :: ref0_pos => null()
64 REAL(kind=
dp),
POINTER,
DIMENSION(:, :) :: ref0_com_molecule => null()
65 REAL(kind=
dp),
POINTER,
DIMENSION(:, :) :: val_msd_kind => null()
66 REAL(kind=
dp),
POINTER,
DIMENSION(:, :) :: val_msd_molecule => null()
67 REAL(kind=
dp),
POINTER,
DIMENSION(:, :) :: val_msd_region => null()
73 INTEGER :: itimes0 = 0
76 LOGICAL :: init = .false.
77 REAL(kind=
dp) :: epot = 0.0_dp, epot0 = 0.0_dp, time = 0.0_dp, time0 = 0.0_dp
78 TYPE(reftraj_info_type),
POINTER :: info => null()
82 CHARACTER(len=*),
PARAMETER,
PRIVATE :: modulen =
'reftraj_types'
98 CHARACTER(LEN=default_path_length) :: filename
100 NULLIFY (reftraj%info)
101 NULLIFY (reftraj%msd)
103 ALLOCATE (reftraj%info)
104 NULLIFY (reftraj%info%traj_parser)
105 NULLIFY (reftraj%info%cell_parser)
109 ALLOCATE (reftraj%info%traj_parser)
110 CALL parser_create(reftraj%info%traj_parser, filename, para_env=para_env)
112 CALL section_vals_val_get(reftraj_section,
"VARIABLE_VOLUME", l_val=reftraj%info%variable_volume)
113 IF (reftraj%info%variable_volume)
THEN
116 ALLOCATE (reftraj%info%cell_parser)
117 CALL parser_create(reftraj%info%cell_parser, filename, para_env=para_env)
127 l_val=reftraj%info%msd)
129 cpwarn(
"MSD calculation is incompatible with wrapping coordinates")
146 IF (
ASSOCIATED(reftraj%info%traj_parser))
THEN
148 DEALLOCATE (reftraj%info%traj_parser)
150 IF (
ASSOCIATED(reftraj%info%cell_parser))
THEN
152 DEALLOCATE (reftraj%info%cell_parser)
154 IF (
ASSOCIATED(reftraj%info))
THEN
155 DEALLOCATE (reftraj%info)
157 IF (
ASSOCIATED(reftraj%msd))
THEN
158 DEALLOCATE (reftraj%msd%ref0_pos)
159 IF (reftraj%msd%msd_kind)
THEN
160 DEALLOCATE (reftraj%msd%val_msd_kind)
162 IF (reftraj%msd%msd_molecule)
THEN
163 DEALLOCATE (reftraj%msd%val_msd_molecule)
164 DEALLOCATE (reftraj%msd%ref0_com_molecule)
166 IF (reftraj%msd%disp_atom)
THEN
167 DEALLOCATE (reftraj%msd%disp_atom_index)
168 DEALLOCATE (reftraj%msd%disp_atom_dr)
171 DEALLOCATE (reftraj%msd)
Utility routines to read data from files. Kept as close as possible to the old parser because.
subroutine, public parser_release(parser)
releases the parser
subroutine, public parser_create(parser, file_name, unit_nr, para_env, end_section_label, separator_chars, comment_char, continuation_char, quote_char, section_char, parse_white_lines, initial_variables, apply_preprocessing)
Start a parser run. Initial variables allow to @SET stuff before opening the file.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_path_length
Interface to the message passing library MPI.
initialization of the reftraj structure used to analyse previously generated trajectories
integer, parameter, public reftraj_wrap_central
integer, parameter, public reftraj_wrap_positive
subroutine, public create_reftraj(reftraj, reftraj_section, para_env)
...
integer, parameter, public reftraj_eval_energy
subroutine, public release_reftraj(reftraj)
...
integer, parameter, public reftraj_wrap_none
integer, parameter, public reftraj_eval_energy_forces
integer, parameter, public reftraj_eval_none
stores all the informations relevant to an mpi environment