collect_identical Subroutine

public pure subroutine collect_identical(identity, mapping)

Establish a mapping between unique atom types and species

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: identity(:)

Chemical identity

integer, intent(out) :: mapping(:)

Mapping from unique atoms


Source Code

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