26#include "./base/base_uses.f90"
34 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'fp_types'
40 LOGICAL :: use_fp = .false.
42 INTEGER :: central_atom = -1
43 INTEGER,
DIMENSION(:),
POINTER :: inner_atoms => null(), outer_atoms => null()
44 REAL(kind=
dp) :: inner_radius = 0.0_dp, outer_radius = 0.0_dp
45 REAL(kind=
dp) :: strength = 0.0_dp, smooth_width = 0.0_dp
46 LOGICAL :: bias = .false.
47 REAL(kind=
dp) :: temperature = 0.0_dp
51 INTEGER :: i1 = -1, i2 = -1, o1 = -1, o2 = -1
52 REAL(kind=
dp) :: ri1 = 0.0_dp, ri2 = 0.0_dp, ro1 = 0.0_dp, ro2 = 0.0_dp
53 REAL(kind=
dp) :: weight = 0.0_dp, comb_weight = 0.0_dp, bias_weight = 0.0_dp
54 REAL(kind=
dp) :: energy = 0.0_dp, bias_energy = 0.0_dp, restraint_energy = 0.0_dp
66 TYPE(
fp_type),
INTENT(OUT) :: fp_env
68 fp_env%use_fp = .false.
69 NULLIFY (fp_env%inner_atoms)
70 NULLIFY (fp_env%outer_atoms)
71 NULLIFY (fp_env%print_section)
80 TYPE(
fp_type),
INTENT(INOUT) :: fp_env
82 IF (
ASSOCIATED(fp_env%inner_atoms))
DEALLOCATE (fp_env%inner_atoms)
83 IF (
ASSOCIATED(fp_env%outer_atoms))
DEALLOCATE (fp_env%outer_atoms)
85 fp_env%use_fp = .false.
97 TYPE(
fp_type),
INTENT(INOUT) :: fp_env
100 CHARACTER(len=*),
PARAMETER :: routinen =
'fp_env_read'
103 INTEGER,
DIMENSION(:),
POINTER :: tmplist
105 CALL timeset(routinen, handle)
107 IF (fp_env%use_fp)
THEN
111 ALLOCATE (fp_env%inner_atoms(
SIZE(tmplist, 1)))
112 fp_env%inner_atoms = tmplist
115 ALLOCATE (fp_env%outer_atoms(
SIZE(tmplist, 1)))
116 fp_env%outer_atoms = tmplist
128 CALL timestop(handle)
140 TYPE(
fp_type),
INTENT(IN) :: fp_env
143 CHARACTER(len=*),
PARAMETER :: routinen =
'fp_env_write'
145 INTEGER :: handle, output_unit
149 CALL timeset(routinen, handle)
152 IF (fp_env%use_fp)
THEN
155 IF (output_unit > 0)
THEN
156 WRITE (unit=output_unit, fmt=
"(T2,A,T79,A)") &
157 "FP| Flexible partitioning is ",
"ON"
158 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
159 "FP| Central atom ", fp_env%central_atom
160 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
161 "FP| number of inner atoms",
SIZE(fp_env%inner_atoms, 1)
162 WRITE (unit=output_unit, fmt=
"(1(T2,8I8))") fp_env%inner_atoms
163 WRITE (unit=output_unit, fmt=
"(T2,A,T71,I10)") &
164 "FP| number of outer atoms",
SIZE(fp_env%outer_atoms, 1)
165 WRITE (unit=output_unit, fmt=
"(1(T2,8I8))") fp_env%outer_atoms
166 WRITE (unit=output_unit, fmt=
"(T2,A,T61,F20.10)") &
167 "FP| inner radius [a.u.] ", fp_env%inner_radius
168 WRITE (unit=output_unit, fmt=
"(T2,A,T61,F20.10)") &
169 "FP| outer radius [a.u.] ", fp_env%outer_radius
170 WRITE (unit=output_unit, fmt=
"(T2,A,T61,F20.10)") &
171 "FP| reflecting restraint strength ", fp_env%strength
172 IF (fp_env%bias)
THEN
173 WRITE (unit=output_unit, fmt=
"(T2,A,T79,A)") &
174 "FP| Flexible partitioning bias is ",
"ON"
175 WRITE (unit=output_unit, fmt=
"(T2,A,T61,F20.10)") &
176 "FP| bias temperature [kT a.u.]", fp_env%temperature
177 WRITE (unit=output_unit, fmt=
"(T2,A,T61,F20.10)") &
178 "FP| smooth width [a.u.] ", fp_env%smooth_width
180 WRITE (unit=output_unit, fmt=
"(T2,A,T78,A)") &
181 "FP| Flexible partitioning bias is",
"OFF"
186 CALL timestop(handle)
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,...
types used in the flexible partitioning scheme
subroutine, public fp_env_write(fp_env, fp_section)
writes information concerning the fp_env to the output
subroutine, public fp_env_release(fp_env)
...
subroutine, public fp_env_read(fp_env, fp_section)
reads the corresponding input section and stores it in the fp_env
pure subroutine, public fp_env_create(fp_env)
create retain release the flexible partitioning environment
Defines the basic variable types.
integer, parameter, public dp
type of a logger, at the moment it contains just a print level starting at which level it should be l...