communicator type providing routines to handle data interactions
consider removing it - possibly redundant
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 |
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 |
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 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 |
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 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 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 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 |
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 |
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 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
check if we need to skip overlapped angles
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 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 |
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 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 |
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 |
issue a command to compute forces and energies
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(mimic_communicator), | intent(inout) | :: | this |
type mimic_communicator
!> number of client codes
integer :: num_clients
!> mapping of overlapping atoms
type(maps_type), dimension(:), allocatable :: overlap_maps
contains
procedure :: init
procedure :: handshake
procedure :: send_command
procedure :: init_overlaps
procedure :: finalize
procedure :: destroy_comm
procedure :: get_atom_species
procedure :: send_coords
procedure :: gather_coords
procedure :: gather_forces
procedure :: gather_energies
procedure :: gather_atom_fragment_count
procedure :: gather_atom_fragment_ids
procedure :: get_multipole_order
procedure :: gather_multipoles
procedure :: gather_masses
procedure :: gather_bonds
procedure :: gather_angles
procedure :: gather_int
procedure :: send_int
procedure :: gather_elements
procedure :: gather_atom_count
procedure :: gather_fragment_count
procedure :: gather_bond_count
procedure :: gather_angle_count
procedure :: gather_type_count
procedure :: issue_force_comp
end type mimic_communicator