diff --git a/src/elements.f90 b/src/elements.f90 index 7ca48c8..4b3d5e0 100644 --- a/src/elements.f90 +++ b/src/elements.f90 @@ -370,7 +370,11 @@ module elements subroutine set_max_esize !This subroutine sets the maximum esize - max_esize=maxval(size_ele) + if(allocated(size_ele)) then + max_esize=maxval(size_ele) + else + max_esize = 2 + end if end subroutine subroutine interpolate_atoms(type, esize, lat_type, r_in, type_interp, r_interp) diff --git a/src/io.f90 b/src/io.f90 index 7bbf3c2..2787b73 100644 --- a/src/io.f90 +++ b/src/io.f90 @@ -133,14 +133,14 @@ module io do i = 1, ele_num do inod = 1, ng_node(lat_ele(i)) do ibasis = 1, basisnum(lat_ele(i)) - write(11, '(2i16, 3f23.15)') basis_type(ibasis,lat_ele(i)), 0, r_node(:,ibasis,inod,i) + write(11, '(2i16, 3f23.15)') basis_type(ibasis,lat_ele(i)), 1, r_node(:,ibasis,inod,i) end do end do end do !Write atom positions do i = 1, atom_num - write(11, '(2i16, 3f23.15)') type_atom(i), 1, r_atom(:,i) + write(11, '(2i16, 3f23.15)') type_atom(i), 0, r_atom(:,i) end do !Finish writing