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 |
subroutine gather_atom_fragment_count(this, fragment_count, fragment_data)
class(mimic_communicator), intent(inout) :: this
!> number of fragments per each code
integer, dimension(:), intent(in) :: fragment_count
!> number of atoms per fragment per code
integer, dimension(:, :), intent(inout) :: fragment_data
integer :: n_code
integer(kind=i32), dimension(:), allocatable, target :: atoms_fragment
fragment_data(:, :) = -1
do n_code = 1, this%num_clients
allocate(atoms_fragment(fragment_count(n_code)))
call this%send_command(MCL_SEND_NUM_ATOMS_IN_FRAGMENTS, n_code)
call mcl_receive(atoms_fragment, fragment_count(n_code), MCL_DATA, n_code)
fragment_data(1 : size(atoms_fragment), n_code) = atoms_fragment
deallocate(atoms_fragment)
end do
end subroutine gather_atom_fragment_count