contains type definitions for MiMiC
insert sanity checks (e.g. check that field dimensions fit with cell parameters)
perhaps split into several modules
map for overlapping atoms, represents many-to-one relation
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | id | id of the atom in the code, which should handle it |
|||
| integer, | public, | dimension(:), allocatable | :: | codes | ids of codes in which this atom is present (excluding the current one) |
||
| integer, | public, | dimension(:), allocatable | :: | atoms | atom ids of this atom in other codes |
| procedure, public :: init => init_map | |
| procedure, public :: add_entry => add_map_entry | |
| procedure, private :: copy => copy_map | |
| generic, public :: assignment(=) => copy |
collection of maps for overlap mapping (for one client)
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | id | id - possibly redundant |
|||
| type(map_type), | public, | dimension(:), allocatable | :: | maps | list of maps |
| procedure, public :: add_entry => add_maps_entry | |
| procedure, private :: copy => copy_maps | |
| generic, public :: assignment(=) => copy |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | atom_i | first atom of the bond |
|||
| integer, | public | :: | atom_j | second atom of the bond |
|||
| real(kind=dp), | public | :: | length | equilibrium length of the bond |
| procedure, public :: copy => copy_bond | |
| generic, public :: assignment(=) => copy |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | atom_i | first atom of the angle |
|||
| integer, | public | :: | atom_j | second atom of the angle |
|||
| integer, | public | :: | atom_k | third atom of the angle |
|||
| real(kind=dp), | public | :: | angle | equilibrium value of the angle |
| procedure, public :: copy => copy_angle | |
| generic, public :: assignment(=) => copy |
system sizes type, used to allocate structures
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | num_atoms | = | 0 | maximum number of atoms per MM species (after overlaps) |
|
| integer, | public | :: | num_species | = | 0 | total number of species (after overlaps) |
|
| integer, | public, | dimension(:), allocatable | :: | atoms_pcode | total number of atoms per code |
||
| integer, | public, | dimension(:), allocatable | :: | multipoles_order | Maximal order of multipoles per code |
||
| integer, | public, | dimension(:), allocatable | :: | multipoles_patom | number of multipole values per atoms (computed from the order) |
||
| integer, | public, | dimension(:), allocatable | :: | frag_num | number of fragments per code |
||
| integer, | public, | dimension(:), allocatable | :: | atoms_pspecies | number of atoms per species |
||
| integer, | public, | dimension(:,:), allocatable | :: | atoms_pfragment | number of atoms per fragment per code |
||
| integer, | public, | dimension(:), allocatable | :: | nbonds_pcode | number of bond constraints per code |
||
| integer, | public, | dimension(:), allocatable | :: | nangles_pcode | number of angle constraints per code |
||
| integer, | public, | dimension(:), allocatable | :: | types_length_pcode | total length of the delimeted string with atom types |
||
| integer, | public, | dimension(:), allocatable | :: | types_pcode | total number of atom types in the system |
||
| integer, | public | :: | id_start | ID of the atom to begin electrostatic treatment |
|||
| integer, | public | :: | id_end | ID of the atom to finish electrostatic treatment |
type holding the data about the system, used in allocation of internal structures
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | dimension(:, :), allocatable | :: | species | list of atomic species per atom and per code |
||
| integer, | public, | dimension(:,:,:), allocatable | :: | atom_fragment_ids | list of atom ids per fragment per code |
||
| real(kind=dp), | public, | dimension(:), allocatable | :: | masses | list of atomic masses per atom and per code |
||
| real(kind=dp), | public, | dimension(:,:,:), allocatable | :: | multipole_values | multipole values per atom per code |
||
| type(bond_type), | public, | dimension(:,:), allocatable | :: | bonds | list of bond constraints per code |
||
| type(angle_type), | public, | dimension(:,:), allocatable | :: | angles | list of angle constraints per code |
||
| character(len=:), | public, | dimension(:,:), allocatable | :: | atom_types | list of atom types per code |
||
| integer, | public, | dimension(:), allocatable | :: | elements | integer representation of element number |
||
| integer, | public, | dimension(:,:), allocatable | :: | species_map | mapping between classical and CPMD species |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(map_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | id | |||
| integer, | intent(in), | dimension(:) | :: | codes | ||
| integer, | intent(in), | dimension(:) | :: | atoms |
add an overlap entry to the map
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(map_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | code_id | id of the code, treating the overlapped atom |
||
| integer, | intent(in) | :: | atom_id | id of an overlapped atom within its treating code |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(angle_type), | intent(out) | :: | dest | |||
| class(angle_type), | intent(in) | :: | source |
add an entry to the maps collection
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(maps_type), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | original_atom_id | id of an atom within its original code |
||
| integer, | intent(in) | :: | target_code_id | id of the code which is going to treat this atom |
||
| integer, | intent(in) | :: | target_atom_id | id of an atom within the target code |