27 #include "../../base/base_uses.f90"
34 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'al_system_init'
52 molecule, molecule_kind_set, para_env, al, al_section, &
55 TYPE(thermostat_info_type),
POINTER :: thermostat_info
56 TYPE(simpar_type),
POINTER :: simpar
57 TYPE(distribution_1d_type),
POINTER :: local_molecules
58 TYPE(molecule_type),
POINTER :: molecule(:)
59 TYPE(molecule_kind_type),
POINTER :: molecule_kind_set(:)
60 TYPE(mp_para_env_type),
POINTER :: para_env
61 TYPE(al_system_type),
POINTER :: al
62 TYPE(section_vals_type),
POINTER :: al_section
63 TYPE(global_constraint_type),
POINTER :: gci
69 molecule, molecule_kind_set, al, para_env, gci)
71 CALL restart_al(al, al_section, restart)
73 IF (.NOT. restart)
THEN
74 CALL init_al_variables(al)
83 SUBROUTINE init_al_variables(al)
84 TYPE(al_system_type),
POINTER :: al
86 al%nvt(:)%mass = al%nvt(:)%nkt*al%tau_nh**2
87 al%nvt(:)%chi = 0.0_dp
88 END SUBROUTINE init_al_variables
97 SUBROUTINE restart_al(al, al_section, restart)
98 TYPE(al_system_type),
POINTER :: al
99 TYPE(section_vals_type),
POINTER :: al_section
100 LOGICAL,
INTENT(inout) :: restart
102 INTEGER :: i, my_index, n_rep
104 TYPE(section_vals_type),
POINTER :: work_section
110 subsection_name=
"CHI")
116 IF (n_rep == al%glob_num_al)
THEN
117 DO i = 1, al%loc_num_al
118 my_index = al%map_info%index(i)
120 i_rep_val=my_index, r_val=al%nvt(i)%chi)
123 CALL cp_abort(__location__, &
124 'Number pf restartable stream not equal to the number of'// &
125 ' total thermostats!')
131 subsection_name=
"MASS")
133 IF (restart .NEQV. explicit) &
134 CALL cp_abort(__location__, &
135 "You need to define both CHI and MASS sections (or none) in the AD_LANGEVIN section")
136 restart = restart .AND. explicit
140 IF (n_rep == al%glob_num_al)
THEN
141 DO i = 1, al%loc_num_al
142 my_index = al%map_info%index(i)
144 i_rep_val=my_index, r_val=al%nvt(i)%mass)
147 CALL cp_abort(__location__, &
148 'Number pf restartable stream not equal to the number of'// &
149 ' total thermostats!')
153 END SUBROUTINE restart_al
subroutine, public initialize_al_part(thermostat_info, simpar, local_molecules, molecule, molecule_kind_set, para_env, al, al_section, gci)
...
subroutine, public al_to_particle_mapping(thermostat_info, simpar, local_molecules, molecule_set, molecule_kind_set, al, para_env, gci)
Creates the thermostatting maps.
Type for the canonical sampling through velocity rescaling.
stores a lists of integer that are local to a processor. The idea is that these integers represent ob...
Defines the basic variable types.
integer, parameter, public dp
Interface to the message passing library MPI.
Define the molecule kind structure types and the corresponding functionality.
Define the data structure for the molecule information.
Type for storing MD parameters.
Thermostat structure: module containing thermostat available for MD.