Current working changes

This commit is contained in:
Alex Selimov 2020-04-09 17:51:47 -04:00
parent 9a484c86f6
commit babf4e176d
2 changed files with 236 additions and 175 deletions

View file

@ -907,39 +907,46 @@ module io
!Read more useless data
read(11,*) textholder
read(11,*) textholder
!set max values and allocate variables
max_basisnum = maxval(basisnum)
max_ng_node = maxval(ng_node)
call grow_ele_arrays(in_eles, in_atoms)
!Now start reading the elements
do i = 1, in_eles
read(11,*) j, etype, k, lat_type
do inod = 1, 8
read(11, *) j, k, r_in(:,1,inod)
r_in(:,1,inod) = r_in(:,1,inod) + newdisplace
if(in_eles > 0) then
read(11,*) textholder
do i = 1, in_eles
read(11,*) j, etype, k, lat_type
do inod = 1, 8
read(11, *) j, k, r_in(:,1,inod)
r_in(:,1,inod) = r_in(:,1,inod) + newdisplace
end do
call add_element(in_lattype_map(lat_type), etype_map(etype), new_lattice_map(lat_type), sub_box_num + 1, r_in)
end do
end if
if(in_atoms > 0) then
if (in_eles > 0) then
!Read useless data
read(11,*) textholder
read(11,*) textholder
end if
do i = 1, in_atoms
read(11,*) j, k, atom_type, r_in_atom(:)
r_in_atom = r_in_atom + newdisplace
call add_atom(atom_type_map(atom_type), sub_box_num + 1, r_in_atom)
end do
call add_element(in_lattype_map(lat_type), etype_map(etype), new_lattice_map(lat_type), sub_box_num + 1, r_in)
end do
!Close file
close(11)
!Read useless data
read(11,*) textholder
read(11,*) textholder
lattice_types = maxval(new_lattice_map)
do i = 1, in_atoms
read(11,*) j, k, atom_type, r_in_atom(:)
r_in_atom = r_in_atom + newdisplace
call add_atom(atom_type_map(atom_type), sub_box_num + 1, r_in_atom)
end do
!Close file
close(11)
sub_box_num = sub_box_num + 1
lattice_types = maxval(new_lattice_map)
sub_box_num = sub_box_num + 1
call set_max_esize
call set_max_esize
end if
end subroutine read_pycac
end module io