provides routines for interaction with client codes: collection and distribution of data
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character, | public, | parameter | :: | delimiter | = | ";" |
communicator type providing routines to handle data interactions
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | num_clients | number of client codes |
|||
type(maps_type), | public, | dimension(:), allocatable | :: | overlap_maps | mapping of overlapping atoms |
procedure, public :: init | |
procedure, public :: handshake | |
procedure, public :: send_command | |
procedure, public :: init_overlaps | |
procedure, public :: finalize | |
procedure, public :: destroy_comm | |
procedure, public :: get_atom_species | |
procedure, public :: send_coords | |
procedure, public :: gather_coords | |
procedure, public :: gather_forces | |
procedure, public :: gather_energies | |
procedure, public :: gather_atom_fragment_count | |
procedure, public :: gather_atom_fragment_ids | |
procedure, public :: get_multipole_order | |
procedure, public :: gather_multipoles | |
procedure, public :: gather_masses | |
procedure, public :: gather_bonds | |
procedure, public :: gather_angles | |
procedure, public :: gather_int | |
procedure, public :: send_int | |
procedure, public :: gather_elements | |
procedure, public :: gather_atom_count | |
procedure, public :: gather_fragment_count | |
procedure, public :: gather_bond_count | |
procedure, public :: gather_angle_count | |
procedure, public :: gather_type_count | |
procedure, public :: issue_force_comp |
initialize communication
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(inout) | :: | comm | MPI communicator |
identify and connect clients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
character(len=*), | intent(in), | dimension(:) | :: | paths | array of paths to working folders of clients |
send a command via the CommLib
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | command | integer code of the command |
||
integer, | intent(in) | :: | dest | destination |
initialize overlap mapping
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
type(maps_type), | dimension(:) | :: | overlap_maps | list of overlap_maps |
Get the number of atoms per atomic species per code (with overlap treatment)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(in), | dimension(:) | :: | atoms_pcode | ||
integer, | intent(inout), | dimension(:,:), allocatable, target | :: | species | atom species of each atom in the system (-1 for overlapped) |
|
integer, | intent(out) | :: | num_atoms | |||
integer, | intent(out) | :: | num_species | |||
integer, | intent(inout), | dimension(:) | :: | na | ||
integer, | intent(out), | dimension(:,:), allocatable | :: | sp_map |
routine sending an exit code to each client
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this |
destructor for the commlib
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this |
get the number of fragment per each of the client code
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(inout), | dimension(:) | :: | frag_count | number of fragments per code, return value |
get the bond constraints data - atom indices and lengths
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
type(bond_type), | intent(out), | dimension(:,:), allocatable | :: | bonds | list of constrained bonds in the simulation, return value |
|
integer, | intent(inout), | dimension(:) | :: | bonds_number | number of bond constraints in the system. WARNING!!! this routine updates this value |
get the angle constraints data - atom indices and equilibrium values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
type(angle_type), | intent(out), | dimension(:,:), allocatable | :: | angles | list of angle constraints, return value |
|
integer, | intent(in), | dimension(:) | :: | angle_number | number of angle constraints |
gather element number associated to MM atom types
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(in), | dimension(:) | :: | elements_pcode | number of elements to expect per code |
|
integer, | intent(out), | dimension(:) | :: | elements | element numbers per code |
|
integer, | intent(in), | dimension(:,:) | :: | species_map |
get the number of atoms per each fragment in the system
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(in), | dimension(:) | :: | fragment_count | number of fragments per each code |
|
integer, | intent(inout), | dimension(:, :) | :: | fragment_data | number of atoms per fragment per code |
get IDs of atoms per each fragment in the system
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(in), | dimension(:) | :: | atoms_pcode | number of fragments per each code |
|
integer, | intent(in), | dimension(:, :) | :: | fragment_data | number of atoms per fragment per code |
|
integer, | intent(inout), | dimension(:, :, :) | :: | fragment_ids | ids of atoms belonging to a fragment |
get the data about atoms in the system
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
real(kind=dp), | intent(out), | dimension(:) | :: | masses | mass of each atom in the system |
|
integer, | intent(in), | dimension(:) | :: | species_pcode | number of atoms per client code |
|
integer, | intent(in), | dimension(:,:) | :: | species_map | mapping of MM species to CPMD species |
get the data about atoms in the system
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(in), | dimension(:,:), target | :: | species | atom species of each atom in the system (-1 for overlapped) |
|
real(kind=dp), | intent(inout), | dimension(:,:,:), target | :: | multipoles | multipoles of each atom in the system (0 charge for overlapped) |
|
integer, | intent(in), | dimension(:) | :: | atoms_pcode | number of atoms per client code |
|
integer, | intent(in), | dimension(:) | :: | multipoles_patom | amount of multipoles per atom per code |
gather coordinates of atoms within the system (dealing with overlaps) and store result in the tau matrix through pointers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
type(subsystem_type), | intent(in), | dimension(:) | :: | frag_code | subsystem_type belonging to each code |
gather forces acting on atoms within the system and store result in the forces matrix through pointers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
type(subsystem_type), | intent(in), | dimension(:) | :: | frag_code | subsystem_type belonging to each code |
gather MM energies from clients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
real(kind=dp), | intent(out) | :: | energy | resulting total MM energy |
||
type(subsystem_type), | intent(in), | dimension(:) | :: | frag_code | mapping of fragments per code |
get the orders of multipoles used in each client code
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(out), | dimension(:), target | :: | multipoles_orders | multipoles_orders array of orders |
send coordinates of atoms to client codes (sends a flattened array)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
type(subsystem_type), | intent(in), | dimension(:) | :: | subsystems | subsystem_type belonging to each code |
gather integer parameter from client codes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(out), | dimension(:), target | :: | data | Integer data to gather |
|
integer, | intent(in) | :: | command | MCL command to execute |
issue a command to compute forces and energies
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this |
gather integer parameter from client codes
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(in), | dimension(:), target | :: | data | Integer data to gather |
|
integer, | intent(in) | :: | command | MCL command to execute |
gather atom count from all clients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(out), | dimension(:), target | :: | atoms_pcode | Integer data to gather |
gather fragment count from all clients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(out), | dimension(:), target | :: | frags_pcode | Integer data to gather |
gather bond count from all clients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(out), | dimension(:), target | :: | bonds_pcode | Integer data to gather |
gather angle count from all clients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(out), | dimension(:), target | :: | angles_pcode | Integer data to gather |
gather atom types count from all clients
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this | |||
integer, | intent(out), | dimension(:), target | :: | types_pcode | Integer data to gather |
search for unique occurences in the array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:,:) | :: | input | original array |
|
integer, | intent(out), | dimension(:,:), allocatable | :: | output | resulting array, containing unique entries from the original one |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=:), | intent(inout), | dimension(:, :), allocatable | :: | source | ||
character(len=:), | intent(inout), | dimension(:, :), allocatable | :: | dest |