Establish a mapping between unique atom types and species
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | identity(:) |
Chemical identity |
||
integer, | intent(out) | :: | mapping(:) |
Mapping from unique atoms |
pure subroutine collect_identical(identity, mapping) !> Chemical identity integer, intent(in) :: identity(:) !> Mapping from unique atoms integer, intent(out) :: mapping(:) integer :: iid, iat do iid = 1, size(mapping) do iat = 1, size(identity) if (identity(iat) == iid) then mapping(iid) = iat exit end if end do end do end subroutine collect_identical