|
|
@ -150,7 +150,7 @@ module io
|
|
|
|
subroutine write_lmp(file)
|
|
|
|
subroutine write_lmp(file)
|
|
|
|
!This subroutine writes out a .lmp style dump file
|
|
|
|
!This subroutine writes out a .lmp style dump file
|
|
|
|
character(len=100), intent(in) :: file
|
|
|
|
character(len=100), intent(in) :: file
|
|
|
|
integer :: write_num, i, iatom, type_interp(max_basisnum*max_esize**3)
|
|
|
|
integer :: write_num, i, iatom, type_interp(max_basisnum*max_esize**3), interp_num
|
|
|
|
real(kind=dp) :: r_interp(3, max_basisnum*max_esize**3), mass
|
|
|
|
real(kind=dp) :: r_interp(3, max_basisnum*max_esize**3), mass
|
|
|
|
|
|
|
|
|
|
|
|
open(unit=11, file=trim(adjustl(file)), action='write', status='replace',position='rewind')
|
|
|
|
open(unit=11, file=trim(adjustl(file)), action='write', status='replace',position='rewind')
|
|
|
@ -192,13 +192,15 @@ module io
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
|
|
!Write refined element atomic positions
|
|
|
|
!Write refined element atomic positions
|
|
|
|
|
|
|
|
interp_num = 0
|
|
|
|
do i = 1, ele_num
|
|
|
|
do i = 1, ele_num
|
|
|
|
call interpolate_atoms(type_ele(i), size_ele(i), lat_ele(i), r_node(:,:,:,i), type_interp, r_interp)
|
|
|
|
call interpolate_atoms(type_ele(i), size_ele(i), lat_ele(i), r_node(:,:,:,i), type_interp, r_interp)
|
|
|
|
select case(trim(adjustl(type_ele(i))))
|
|
|
|
select case(trim(adjustl(type_ele(i))))
|
|
|
|
case('fcc')
|
|
|
|
case('fcc')
|
|
|
|
do iatom = 1, basisnum(lat_ele(i))*size_ele(i)**3
|
|
|
|
do iatom = 1, basisnum(lat_ele(i))*size_ele(i)**3
|
|
|
|
|
|
|
|
interp_num = interp_num+1
|
|
|
|
call apply_periodic(r_interp(:,iatom))
|
|
|
|
call apply_periodic(r_interp(:,iatom))
|
|
|
|
write(11, '(2i16, 3f23.15)') atom_num+iatom, type_interp(iatom), r_interp(:,iatom)
|
|
|
|
write(11, '(2i16, 3f23.15)') atom_num+interp_num, type_interp(iatom), r_interp(:,iatom)
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
end select
|
|
|
|
end select
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|