Add velocity reading to pycac_out files and fix to interp_atoms

development
Alex Selimov 3 years ago
parent f0fd76f12d
commit 1114a46c60

@ -432,8 +432,8 @@ module elements
character(len=*), intent(in) :: type !The type of element that it is
integer, intent(in) :: esize !The number of atoms per side
integer, intent(in) :: lat_type !The integer lattice type of the element
real(kind=dp), dimension(3,max_basisnum, max_ng_node), intent(in) :: r_in !Nodal positions
integer, dimension(max_basisnum*max_esize**3), intent(out) :: type_interp !Interpolated atomic positions
real(kind=dp), dimension(:,:,:), intent(in) :: r_in !Nodal positions
integer, dimension(:), intent(out) :: type_interp !Interpolated atomic positions
real(kind=dp), dimension(3, max_basisnum*max_esize**3), intent(out) :: r_interp !Interpolated atomic positions
real(kind = dp), optional, intent(in) :: eng(max_basisnum, max_ng_node), f(3, max_basisnum, max_ng_node), &
v(6, max_basisnum, max_ng_node)
@ -462,6 +462,7 @@ module elements
lat_type_temp = lat_type
end select
select case(trim(adjustl(type)))
case('fcc','bcc')
!Now loop over all the possible sites

@ -1088,10 +1088,12 @@ module io
if(in_atoms > 0 ) then
!Read atom header
read(11,'(a)') line
read(line, *) (textholder, i=1, 18)
if(textholder=="velx") then
call alloc_vel_arrays(in_eles, in_atoms)
read_vel = .true.
if(tok_count(line) > 18) then
read(line, *) (textholder, i=1, 18)
if(textholder=="velx") then
call alloc_vel_arrays(in_eles, in_atoms)
read_vel = .true.
end if
end if
do ia = 1, in_atoms
read(11,'(a)') line(:)
@ -1141,6 +1143,9 @@ module io
end do
end if
call set_max_esize
!Now set the nodes and basisnum
max_ng_node = maxval(ng_node(1:lattice_types))
max_basisnum = maxval(basisnum(1:lattice_types))
return
end subroutine read_pycac_out

Loading…
Cancel
Save