2003-01-20 05:58:50 +08:00
|
|
|
!
|
|
|
|
! Copyright (C) 2001 PWSCF group
|
|
|
|
! This file is distributed under the terms of the
|
|
|
|
! GNU General Public License. See the file `License'
|
|
|
|
! in the root directory of the present distribution,
|
|
|
|
! or http://www.gnu.org/copyleft/gpl.txt .
|
|
|
|
!
|
|
|
|
!-----------------------------------------------------------------------
|
2003-02-08 00:04:36 +08:00
|
|
|
subroutine write_dyn_on_file (xq, phi, nat, iudyn)
|
2003-01-20 05:58:50 +08:00
|
|
|
!-----------------------------------------------------------------------
|
2004-01-23 23:08:03 +08:00
|
|
|
USE kinds, only : DP
|
2003-02-08 00:04:36 +08:00
|
|
|
implicit none
|
2003-01-20 05:58:50 +08:00
|
|
|
! input variables
|
2003-02-08 00:04:36 +08:00
|
|
|
integer :: iudyn, nat
|
2003-01-20 05:58:50 +08:00
|
|
|
! unit number
|
|
|
|
! number of atom in the unit cell
|
2003-02-08 00:04:36 +08:00
|
|
|
complex(kind=DP) :: phi (3, 3, nat, nat)
|
2003-01-20 05:58:50 +08:00
|
|
|
! the dynamical matrix
|
2003-02-08 00:04:36 +08:00
|
|
|
real(kind=DP) :: xq (3)
|
2003-01-20 05:58:50 +08:00
|
|
|
! the q vector
|
|
|
|
! local variables
|
|
|
|
|
2003-02-08 00:04:36 +08:00
|
|
|
integer :: na, nb, icar, jcar
|
2003-01-20 05:58:50 +08:00
|
|
|
! counters on atoms
|
|
|
|
! cartesian coordinate counters
|
2003-02-08 00:04:36 +08:00
|
|
|
write (iudyn, 9000) (xq (icar), icar = 1, 3)
|
|
|
|
do na = 1, nat
|
|
|
|
do nb = 1, nat
|
|
|
|
write (iudyn, '(2i3)') na, nb
|
|
|
|
do icar = 1, 3
|
2003-01-20 05:58:50 +08:00
|
|
|
write (iudyn, '(3e24.12)') (phi (icar, jcar, na, nb) , jcar = 1, &
|
|
|
|
3)
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
enddo
|
|
|
|
|
2003-02-08 00:04:36 +08:00
|
|
|
return
|
2003-01-20 05:58:50 +08:00
|
|
|
9000 format(/,5x,'Dynamical Matrix in cartesian axes', &
|
|
|
|
& //,5x,'q = ( ',3f14.9,' ) ',/)
|
|
|
|
end subroutine write_dyn_on_file
|