36#include "./base/base_uses.f90"
44 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'ipi_environment'
63 SUBROUTINE ipi_init(ipi_env, root_section, para_env, force_env_section, &
70 CHARACTER(len=*),
PARAMETER :: routinen =
'ipi_init'
76 CALL timeset(routinen, handle)
78 cpassert(
ASSOCIATED(ipi_env))
83 IF (.NOT.
ASSOCIATED(subsys_section))
THEN
87 CALL ipi_env_set(ipi_env=ipi_env, force_env_input=force_env_section)
91 CALL ipi_init_subsys(ipi_env=ipi_env, subsys=subsys, subsys_section=subsys_section)
95 CALL start_server(para_env=para_env, driver_section=driver_section, ipi_env=ipi_env)
110 SUBROUTINE ipi_init_subsys(ipi_env, subsys, subsys_section)
115 CHARACTER(len=*),
PARAMETER :: routinen =
'ipi_init_subsys'
117 INTEGER :: handle, natom
119 TYPE(
cell_type),
POINTER :: my_cell, my_cell_ref
125 CALL timeset(routinen, handle)
127 NULLIFY (atomic_kind_set, molecule_kind_set, particle_set, molecule_set, &
128 local_molecules, local_particles, my_cell, my_cell_ref)
130 particle_set => subsys%particles%els
131 atomic_kind_set => subsys%atomic_kinds%els
132 molecule_kind_set => subsys%molecule_kinds%els
133 molecule_set => subsys%molecules%els
134 my_cell => subsys%cell
135 my_cell_ref => subsys%cell_ref
143 subsys_section=subsys_section)
145 input_section=subsys_section)
149 particle_set=particle_set, &
150 local_particles=local_particles, &
151 molecule_kind_set=molecule_kind_set, &
152 molecule_set=molecule_set, &
153 local_molecules=local_molecules, &
154 force_env_section=ipi_env%force_env_input)
156 natom =
SIZE(particle_set)
158 ALLOCATE (ipi_env%ipi_forces(3, natom))
159 ipi_env%ipi_forces(:, :) = 0.0_dp
162 cell_ref=my_cell_ref, &
163 local_molecules=local_molecules, &
164 local_particles=local_particles)
169 CALL timestop(handle)
171 END SUBROUTINE ipi_init_subsys
Define the atomic kind types and their sub types.
Handles all functions related to the 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
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 ipi_env_set(ipi_env, ipi_energy, ipi_forces, subsys, atomic_kind_set, particle_set, local_particles, molecule_kind_set, molecule_set, local_molecules, force_env_input, cell_ref, sockfd)
Sets various attributes of the ipi environment.
Methods and functions on the i–PI environment.
subroutine, public ipi_init(ipi_env, root_section, para_env, force_env_section, subsys_section)
Initialize the ipi environment.
i–PI server mode: Communication with i–PI clients
subroutine, public start_server(driver_section, para_env, ipi_env)
Starts the i–PI server. Will block until it recieves a connection.
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.
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.
stores all the informations relevant to an mpi environment