diff --git a/src/io.f90 b/src/io.f90 index 90efe0f..853a230 100644 --- a/src/io.f90 +++ b/src/io.f90 @@ -150,7 +150,7 @@ module io subroutine write_lmp(file) !This subroutine writes out a .lmp style dump 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 open(unit=11, file=trim(adjustl(file)), action='write', status='replace',position='rewind') @@ -192,13 +192,15 @@ module io end do !Write refined element atomic positions + interp_num = 0 do i = 1, ele_num 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)))) case('fcc') do iatom = 1, basisnum(lat_ele(i))*size_ele(i)**3 + interp_num = interp_num+1 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 select end do