Changes to restart file format
This commit is contained in:
parent
8298c21503
commit
db8428113d
35
src/io.f90
35
src/io.f90
@ -241,7 +241,6 @@ module io
|
|||||||
|
|
||||||
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')
|
||||||
|
|
||||||
print *, max_basisnum, max_esize
|
|
||||||
!Write header information
|
!Write header information
|
||||||
write(11,1) timestep
|
write(11,1) timestep
|
||||||
|
|
||||||
@ -639,10 +638,10 @@ module io
|
|||||||
infilenum=infilenum+1
|
infilenum=infilenum+1
|
||||||
infiles(infilenum) = temp_infile
|
infiles(infilenum) = temp_infile
|
||||||
case('out')
|
case('out')
|
||||||
if(atom_types == 0) then
|
! if(atom_types == 0) then
|
||||||
print *, "Please run -set_types command prior to running code requiring reading in pycac_*.out files"
|
! print *, "Please run -set_types command prior to running code requiring reading in pycac_*.out files"
|
||||||
stop 3
|
! stop 3
|
||||||
end if
|
! end if
|
||||||
select case(trim(adjustl(mode)))
|
select case(trim(adjustl(mode)))
|
||||||
case('--calc', '--convert','--metric')
|
case('--calc', '--convert','--metric')
|
||||||
infilenum = infilenum+1
|
infilenum = infilenum+1
|
||||||
@ -968,12 +967,13 @@ module io
|
|||||||
real(kind=dp), dimension(6), intent(out) :: temp_box_bd
|
real(kind=dp), dimension(6), intent(out) :: temp_box_bd
|
||||||
|
|
||||||
!Internal Variables
|
!Internal Variables
|
||||||
integer :: i, in_eles, in_atoms, inbtypes(10), lat_type, ia, ie, inod, &
|
integer :: i, j, in_eles, in_atoms, inbtypes(10), lat_type, ia, ie, inod, &
|
||||||
id, type_node, ilat, esize, tag, type, bnum, n, ibasis, ip
|
id, type_node, ilat, esize, tag, type, bnum, n, ibasis, ip, atom_type_map(100)
|
||||||
real(kind=dp) :: newdisplace(3), ra(3), in_lapa, ea, fa(3), va(6), &
|
real(kind=dp) :: newdisplace(3), ra(3), in_lapa, ea, fa(3), va(6), &
|
||||||
ee(10,8), fe(3,10,8), ve(6,10,8), re(3,10,8)
|
ee(10,8), fe(3,10,8), ve(6,10,8), re(3,10,8), atomic_masses(10)
|
||||||
character(len=100) :: textholder, fcc
|
character(len=100) :: textholder, fcc
|
||||||
character(len=1000) :: line
|
character(len=1000) :: line
|
||||||
|
character(len=2) :: atomic_element
|
||||||
|
|
||||||
|
|
||||||
open(unit=11, file=trim(adjustl(file)), action='read',position='rewind')
|
open(unit=11, file=trim(adjustl(file)), action='read',position='rewind')
|
||||||
@ -1016,6 +1016,19 @@ module io
|
|||||||
call grow_sub_box(1)
|
call grow_sub_box(1)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
!Now read in masses for atoms
|
||||||
|
read(11, '(a)') line
|
||||||
|
j = tok_count(line)
|
||||||
|
read(line, *) textholder, (atomic_masses(i), i=1, j-1)
|
||||||
|
|
||||||
|
!Read define atom_types by mass
|
||||||
|
do i = 1, j
|
||||||
|
call atommassspecies(atomic_masses(i), atomic_element)
|
||||||
|
call add_atom_type(atomic_element, atom_type_map(i))
|
||||||
|
end do
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
!Because orientations and other needed sub_box information isn't really
|
!Because orientations and other needed sub_box information isn't really
|
||||||
!present within the .cac file we just default a lot of it.
|
!present within the .cac file we just default a lot of it.
|
||||||
sub_box_ori(:,:,sub_box_num+1) = identity_mat(3)
|
sub_box_ori(:,:,sub_box_num+1) = identity_mat(3)
|
||||||
@ -1028,7 +1041,7 @@ module io
|
|||||||
do ia = 1, in_atoms
|
do ia = 1, in_atoms
|
||||||
read(11,'(a)') line(:)
|
read(11,'(a)') line(:)
|
||||||
read(line,*) tag, type, ra(:), ea, fa(:), va(:)
|
read(line,*) tag, type, ra(:), ea, fa(:), va(:)
|
||||||
call add_atom(tag, type, sub_box_num, ra)
|
call add_atom(tag, atom_type_map(type), sub_box_num, ra)
|
||||||
call add_atom_data(atom_num, ea, fa, va)
|
call add_atom_data(atom_num, ea, fa, va)
|
||||||
end do
|
end do
|
||||||
|
|
||||||
@ -1046,6 +1059,9 @@ module io
|
|||||||
do inod =1, n*bnum
|
do inod =1, n*bnum
|
||||||
read(11,*) ip, ibasis, inbtypes(ibasis), re(:,ibasis,ip), ee(ibasis,ip), fe(:,ibasis,ip), ve(:,ibasis,ip)
|
read(11,*) ip, ibasis, inbtypes(ibasis), re(:,ibasis,ip), ee(ibasis,ip), fe(:,ibasis,ip), ve(:,ibasis,ip)
|
||||||
end do
|
end do
|
||||||
|
do i = 1, bnum
|
||||||
|
inbtypes(ibasis) = atom_type_map(inbtypes(ibasis))
|
||||||
|
end do
|
||||||
call lattice_map(bnum, inbtypes, n, 1.0_dp, lat_type)
|
call lattice_map(bnum, inbtypes, n, 1.0_dp, lat_type)
|
||||||
call add_element(tag, fcc, esize+1, lat_type, sub_box_num, re)
|
call add_element(tag, fcc, esize+1, lat_type, sub_box_num, re)
|
||||||
call add_element_data(ele_num, ee, fe, ve)
|
call add_element_data(ele_num, ee, fe, ve)
|
||||||
@ -1276,7 +1292,6 @@ module io
|
|||||||
print *, "Missing lattice parameter for set_input_lat"
|
print *, "Missing lattice parameter for set_input_lat"
|
||||||
end if
|
end if
|
||||||
read(textholder,*) in_lapa
|
read(textholder,*) in_lapa
|
||||||
print *, in_lapa
|
|
||||||
|
|
||||||
arg_pos = arg_pos + 1
|
arg_pos = arg_pos + 1
|
||||||
call get_command_argument(arg_pos, textholder, arglen)
|
call get_command_argument(arg_pos, textholder, arglen)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user