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 |
subroutine mimic_translate(quantum_fragment, subsystems, shift)
type(quantum_fragment_type), intent(inout) :: quantum_fragment
type(subsystem_type), dimension(:), intent(inout) :: subsystems
!> Vector of translation to apply
real(dp), dimension(3) :: shift
integer :: i_c, i_a
call timer_start("mimic_translate")
do i_c = 1, size(subsystems)
!$OMP PARALLEL DO PRIVATE(i_a)
do i_a = 1, size(subsystems(i_c)%atoms)
if (.not. subsystems(i_c)%atoms(i_a)%overlapped) then
subsystems(i_c)%atoms(i_a)%coordinate = subsystems(i_c)%atoms(i_a)%coordinate + shift
end if
end do ! i_a
!$OMP END PARALLEL DO
end do ! i_c
!$OMP PARALLEL DO PRIVATE(i_a)
do i_a = 1, quantum_fragment%num_nuclei
quantum_fragment%nuclei(i_a)%coordinate = quantum_fragment%nuclei(i_a)%coordinate + shift
end do
!$OMP END PARALLEL DO
call timer_stop
end subroutine mimic_translate