MiMiC main contains all API calls
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(mimic_communicator), | public | :: | communicator | communicator handling data collection |
|||
integer, | public, | parameter | :: | CENTROID | = | 1 | sort fragments according to distance between centroids |
integer, | public, | parameter | :: | CENTER_OF_MASS | = | 2 | sort fragments according to distance between center-of-mass |
integer, | public, | parameter | :: | CENTER_OF_CHARGE | = | 3 | sort fragments according to distance between center-of-charge for charged fragments and center-of-mass for neutral fragments |
integer, | public, | parameter | :: | MINIMUM_DISTANCE | = | 4 | sort fragments according to minimum distance |
integer, | public, | parameter | :: | ATOM_WISE | = | 5 | sort atoms according to distance from quantum fragment centroid |
initialize MiMiC
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | comm | MPI communicator |
initialize error handling
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | process_id | process id (preferrably MPI rank) |
||
procedure(handle), | optional | pointer | :: | error_handler | optional external error handler |
MiMiC initialization routine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | dimension(:) | :: | paths | paths to client codes |
set the number of clients (needed for non-root processes)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | num | number of clients |
initialize overlap maps using the input file data
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:,:) | :: | overlaps | overlaps in the format: code_id : atom_id => code_id : atom_id (e.g. code_one : atom_three => code_two : atom_one) |
MiMiC destruction routine - deallocates all arrays and shuts down communicator
wrapper to request sizes of MM parts (number of atoms/species/fragments)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sizes_type), | intent(out) | :: | sizes | sizes data Todocheck if it can be made intent(out) |
||
type(system_type), | intent(out) | :: | system_data | atom species of each atom in the system are stored here (-1 for overlapped) Todocheck if it can be made intent(out) |
return data about atomic species, masses and multipoles in the MM part
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(sizes_type), | intent(inout) | :: | sizes | sizes data of the MM part |
||
type(system_type), | intent(inout) | :: | system_data | system data Todointent(out)? |
allocates fragments for MM part
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
|
real(kind=dp), | intent(in), | dimension(:) | :: | factors | factors applied to forces contribution (by code) Todoclarify if this is also for energies, potential, etc. |
|
real(kind=dp), | intent(in), | dimension(:,:,:) | :: | tau | coordinate matrix of CPMD |
|
real(kind=dp), | intent(in), | dimension(:,:,:) | :: | force | force matrix of CPMD |
|
integer, | dimension(:) | :: | num_qm_atoms | number of quantum atoms per species |
||
integer, | intent(in) | :: | total_species | total number of species |
||
real(kind=dp), | intent(in), | dimension(:) | :: | cov_radii | covalent radius of each species |
|
type(sizes_type), | intent(in) | :: | sizes | sizes data |
||
type(system_type), | intent(inout) | :: | system_data | system data |
allocates quantum fragment (at the moment one per simulation)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(quantum_fragment_type), | intent(inout) | :: | quantum_fragment | quantum subsystem |
||
integer, | intent(in), | dimension(:) | :: | n_sp_atoms | number of atoms per quantum species |
|
real(kind=dp), | intent(in), | dimension(:) | :: | charges | ionic charges |
|
real(kind=dp), | intent(in), | dimension(3) | :: | origin | point of origin of quantum box |
|
real(kind=dp), | intent(in), | dimension(3,3) | :: | box | quantum box vectors |
|
integer, | intent(in), | dimension(3) | :: | n_points | number of points in the electronic grid in each direction |
|
integer, | intent(in), | dimension(3) | :: | n_points_r | real number of points in the electronic grid in each direction |
|
real(kind=dp), | intent(in), | dimension(:,:,:) | :: | rho | electronic density matrix |
|
real(kind=dp), | intent(in), | dimension(:,:,:) | :: | extf | external field on the electronic grid |
|
real(kind=dp), | intent(in), | dimension(:,:,:) | :: | tau | coordinate matrix of CPMD |
|
real(kind=dp), | intent(in), | dimension(:,:,:) | :: | force | force matrix of CPMD |
wrapper to request coordinates of MM part
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
wrapper to request MM forces
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
wrapper to request MM energies
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
|
real(kind=dp), | intent(out) | :: | energy | energy from external programs |
sort fragments into short- and long-range according to distance criterion
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | intent(inout) | :: | subsystem | array of subsystems associated with client codes |
||
type(quantum_fragment_type), | intent(in) | :: | quantum_fragment | the quantum fragment |
||
real(kind=dp), | intent(in) | :: | cutoff_distance | distance cutoff |
||
integer, | intent(in) | :: | sorting_method | sorting method (centroid, center_of_mass, center_of_charge, minimum_distance) |
compute folded tensors for long-range electrostatics
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
|
type(quantum_fragment_type), | intent(inout) | :: | quantum_fragment | quantum subsystem |
||
real(kind=dp), | intent(out), | dimension(:,:), allocatable | :: | tensors | array with tensors |
|
real(kind=dp), | intent(out), | dimension(:,:), allocatable | :: | tensor_sums | array with tensor sums |
|
integer, | intent(in), | dimension(:) | :: | atom_start | first atom id in the chunk |
|
integer, | intent(in), | dimension(:) | :: | atom_end | last atom id in the chunk |
compute interaction energy
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
|
type(quantum_fragment_type), | intent(inout) | :: | quantum_fragment | quantum subsystem |
||
real(kind=dp), | intent(out) | :: | energy | interaction energy |
||
integer, | intent(in), | dimension(:) | :: | sr_atom_start | index of the first short-range atom for this process |
|
integer, | intent(in), | dimension(:) | :: | sr_atom_end | index of the last short-range atom for this process |
|
real(kind=dp), | intent(in), | dimension(:,:), allocatable | :: | tensor_sums | Array stroing tensor sums |
compute forces from electrostatic interactions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
|
type(quantum_fragment_type), | intent(inout) | :: | quantum_fragment | quantum subsystem |
||
integer, | intent(in) | :: | x_start | index of the first yz-plane for this process |
||
integer, | intent(in) | :: | x_end | index of the last yz-plane for this process |
||
integer, | intent(in), | dimension(:) | :: | gr_sr_atom_start | index of the first short-range atom for this process group |
|
integer, | intent(in), | dimension(:) | :: | gr_sr_atom_end | index of the last short-range atom for this process group |
|
integer, | intent(in), | dimension(:) | :: | gr_lr_atom_start | index of the first long-ange atom for this process group |
|
integer, | intent(in), | dimension(:) | :: | gr_lr_atom_end | index of the last long-range atom for this process group |
|
integer, | intent(in), | dimension(:) | :: | pr_sr_atom_start | index of the first short-range atom for this process |
|
integer, | intent(in), | dimension(:) | :: | pr_sr_atom_end | index of the last short-range atom for this process |
|
integer, | intent(in), | dimension(:) | :: | pr_lr_atom_start | index of the first long-ange atom for this process |
|
integer, | intent(in), | dimension(:) | :: | pr_lr_atom_end | index of the last long-range atom for this process |
|
logical, | intent(in) | :: | root | logical for root process |
compute electrostatic potential
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | array of subsystems associated with client codes |
|
type(quantum_fragment_type), | intent(inout) | :: | quantum_fragment | quantum subsystem |
||
integer, | intent(in) | :: | x_start | index of the first yz-plane for this process |
||
integer, | intent(in) | :: | x_end | index of the last yz-plane for this process |
||
integer, | intent(in), | dimension(:) | :: | sr_atom_start | index of the first short-range atom for this process |
|
integer, | intent(in), | dimension(:) | :: | sr_atom_end | index of the last short-range atom for this process |
|
real(kind=dp), | intent(inout), | dimension(:,:), allocatable | :: | tensor_sums | Array stroing tensor sums |
compute multipoles of the quantum fragment
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(quantum_fragment_type), | intent(inout) | :: | quantum_fragment | quantum subsystem |
||
integer, | intent(in) | :: | order | order of the multipole expansion |
||
integer, | intent(in) | :: | x_start | index of the first yz-plane for this process |
||
integer, | intent(in) | :: | x_end | index of the last yz-plane for this process |
apply MIC to the whole system with respect to a pivot point
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in), | dimension(3,3) | :: | box | vectors of the encompassing box |
|
real(kind=dp), | intent(in), | dimension(3) | :: | pivot | pivot point |
|
class(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | classical fragments |
re-center the quantum box
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(out), | dimension(3) | :: | r_diff | resulting translation vector |
|
class(subsystem_type), | intent(in), | dimension(:) | :: | subsystem | classical subsystem |
|
class(quantum_fragment_type), | intent(in) | :: | quantum_fragment | quantum fragment |
Routine to count the number of interdependent constraints amoung bonds
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | dimension(:), allocatable | :: | nconn | number of dependencies per bond |
|
integer, | intent(out), | dimension(:, :), allocatable | :: | conn_map | dependency map |
|
type(bond_type), | intent(in), | dimension(:,:) | :: | bonds | list of bond constraints |
|
integer, | intent(in), | dimension(:) | :: | bonds_pcode | number of bonds per code |
Routine that does translation of the whole system with a given vector
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(quantum_fragment_type), | intent(inout) | :: | quantum_fragment | |||
type(subsystem_type), | intent(inout), | dimension(:) | :: | subsystems | ||
real(kind=dp), | dimension(3) | :: | shift | Vector of translation to apply |
Routine that prints timings accumulated during the current run of MiMiC