43#include "./base/base_uses.f90"
51 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'eip_environment'
70 SUBROUTINE eip_init(eip_env, root_section, para_env, force_env_section, &
77 CHARACTER(len=*),
PARAMETER :: routinen =
'eip_init'
80 LOGICAL :: use_ref_cell
81 REAL(kind=
dp),
DIMENSION(3) :: abc
82 TYPE(
cell_type),
POINTER :: cell, cell_ref
86 CALL timeset(routinen, handle)
88 cpassert(
ASSOCIATED(eip_env))
91 NULLIFY (cell_section, colvar_section, eip_section, cell, cell_ref, &
94 IF (.NOT.
ASSOCIATED(subsys_section))
THEN
101 CALL eip_env_set(eip_env=eip_env, eip_input=eip_section, &
102 force_env_input=force_env_section)
104 CALL read_cell(cell=cell, cell_ref=cell_ref, use_ref_cell=use_ref_cell, cell_section=cell_section, &
107 CALL write_cell(cell=cell, subsys_section=subsys_section)
111 CALL eip_init_subsys(eip_env=eip_env, subsys=subsys, cell=cell, &
112 cell_ref=cell_ref, use_ref_cell=use_ref_cell, &
113 subsys_section=subsys_section)
118 CALL timestop(handle)
134 SUBROUTINE eip_init_subsys(eip_env, subsys, cell, cell_ref, use_ref_cell, subsys_section)
137 TYPE(
cell_type),
POINTER :: cell, cell_ref
138 LOGICAL,
INTENT(in) :: use_ref_cell
141 CHARACTER(len=*),
PARAMETER :: routinen =
'eip_init_subsys'
143 INTEGER :: handle, natom
152 CALL timeset(routinen, handle)
154 NULLIFY (atomic_kind_set, molecule_kind_set, particle_set, molecule_set, &
155 local_molecules, local_particles)
157 particle_set => subsys%particles%els
158 atomic_kind_set => subsys%atomic_kinds%els
159 molecule_kind_set => subsys%molecule_kinds%els
160 molecule_set => subsys%molecules%els
168 subsys_section=subsys_section)
170 input_section=subsys_section)
174 particle_set=particle_set, &
175 local_particles=local_particles, &
176 molecule_kind_set=molecule_kind_set, &
177 molecule_set=molecule_set, &
178 local_molecules=local_molecules, &
179 force_env_section=eip_env%force_env_input)
181 natom =
SIZE(particle_set)
183 ALLOCATE (eip_env%eip_forces(3, natom))
185 eip_env%eip_forces(:, :) = 0.0_dp
189 cell_ref=cell_ref, use_ref_cell=use_ref_cell, &
190 local_molecules=local_molecules, &
191 local_particles=local_particles)
196 CALL eip_init_model(eip_env=eip_env)
198 CALL timestop(handle)
200 END SUBROUTINE eip_init_subsys
209 SUBROUTINE eip_init_model(eip_env)
212 CHARACTER(len=*),
PARAMETER :: routinen =
'eip_init_model'
214 CHARACTER(LEN=default_string_length) :: eip_atomic_kind_name
222 CALL timeset(routinen, handle)
224 NULLIFY (atomic_kind_set, atomic_kind_ptr, eip_section)
229 atomic_kind_set => eip_env%subsys%atomic_kinds%els
232 DO i = 1,
SIZE(atomic_kind_set)
233 atomic_kind_ptr => eip_env%subsys%atomic_kinds%els(i)
235 name=eip_atomic_kind_name)
236 SELECT CASE (eip_atomic_kind_name)
239 keyword_name=
"EIP-Model", &
240 i_val=eip_env%eip_model)
242 cpabort(
"EIP models for other elements than Si isn't implemented yet.")
246 CALL timestop(handle)
248 END SUBROUTINE eip_init_model
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.
recursive subroutine, public read_cell(cell, cell_ref, use_ref_cell, cell_section, check_for_ref, para_env)
...
subroutine, public write_cell(cell, subsys_section, tag)
Write the cell parameters to the output unit.
Handles all functions related to the CELL.
subroutine, public cell_release(cell)
releases the given cell (see doc/ReferenceCounting.html)
subroutine, public get_cell(cell, alpha, beta, gamma, deth, orthorhombic, abc, periodic, h, h_inv, symmetry_id, tag)
Get informations about a simulation cell.
Initialize a small environment for a particular calculation.
subroutine, public cp_subsys_create(subsys, para_env, root_section, force_env_section, subsys_section, use_motion_section, qmmm, qmmm_env, exclusions, elkind)
Creates allocates and fills subsys from given input.
types that represent a subsys, i.e. a part of the system
subroutine, public cp_subsys_set(subsys, atomic_kinds, particles, local_particles, molecules, molecule_kinds, local_molecules, para_env, colvar_p, shell_particles, core_particles, gci, multipoles, results, cell)
sets various propreties of the subsys
stores a lists of integer that are local to a processor. The idea is that these integers represent ob...
subroutine, public distribution_1d_release(distribution_1d)
releases the given distribution_1d
Distribution methods for atoms, particles, or molecules.
subroutine, public distribute_molecules_1d(atomic_kind_set, particle_set, local_particles, molecule_kind_set, molecule_set, local_molecules, force_env_section, prev_molecule_kind_set, prev_local_molecules)
Distribute molecules and particles.
The environment for the empirical interatomic potential methods.
subroutine, public eip_env_set(eip_env, eip_model, eip_energy, eip_energy_var, eip_forces, coord_avg, coord_var, count, subsys, atomic_kind_set, particle_set, local_particles, molecule_kind_set, molecule_set, local_molecules, eip_input, force_env_input, cell_ref, use_ref_cell, eip_kinetic_energy, eip_potential_energy)
Sets various attributes of the eip environment.
Methods and functions on the EIP environment.
subroutine, public eip_init(eip_env, root_section, para_env, force_env_section, subsys_section)
Initialize the eip environment.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
Interface to the message passing library MPI.
Define the molecule kind structure types and the corresponding functionality.
subroutine, public write_molecule_kind_set(molecule_kind_set, subsys_section)
Write a moleculeatomic kind set data set to the output unit.
Define the data structure for the molecule information.
Define methods related to particle_type.
subroutine, public write_fist_particle_coordinates(particle_set, subsys_section, charges)
Write the atomic coordinates to the output unit.
subroutine, public write_structure_data(particle_set, cell, input_section)
Write structure data requested by a separate structure data input section to the output unit....
subroutine, public write_particle_distances(particle_set, cell, subsys_section)
Write the matrix of the particle distances to the output unit.
Define the data structure for the particle information.
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
represents a system: atoms, molecules, their pos,vel,...
structure to store local (to a processor) ordered lists of integers.
The empirical interatomic potential environment.
stores all the informations relevant to an mpi environment