From 2ea388b82ad3c49ab5cb0c7c7e5699e68369fb4c Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Fri, 23 Oct 2020 11:37:28 -0400 Subject: [PATCH] Current working changes with some updates to comments for accuracy --- src/elements.f90 | 5 ++--- src/mode_metric.f90 | 18 ++++++++++-------- src/opt_disl.f90 | 1 - src/opt_group.f90 | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/elements.f90 b/src/elements.f90 index 1254a43..226eb60 100644 --- a/src/elements.f90 +++ b/src/elements.f90 @@ -501,6 +501,7 @@ module elements !We go from largest index to smallest index just to make sure that we don't miss !accidentally overwrite values which need to be deleted do i = num, 1, -1 + node_num = node_num - ng_node(lat_ele(sorted_index(i))) if(sorted_index(i) == ele_num) then r_node(:,:,:,sorted_index(i)) = 0.0_dp type_ele(sorted_index(i)) ='' @@ -509,7 +510,6 @@ module elements sbox_ele(sorted_index(i)) = 0 tag_ele(sorted_index(i)) = 0 else - node_num = node_num - ng_node(lat_ele(sorted_index(i))) r_node(:,:,:,sorted_index(i)) = r_node(:,:,:,ele_num) type_ele(sorted_index(i)) = type_ele(ele_num) size_ele(sorted_index(i)) = size_ele(ele_num) @@ -538,8 +538,7 @@ module elements max_bd(:) = -huge(1.0_dp) min_bd(:) = huge(1.0_dp) - - do i = 1, atom_num +do i = 1, atom_num do j = 1, 3 if (r_atom(j,i) > max_bd(j)) max_bd(j) = r_atom(j,i) + tol if (r_atom(j,i) < min_bd(j)) min_bd(j) = r_atom(j,i) - tol diff --git a/src/mode_metric.f90 b/src/mode_metric.f90 index 279e710..10838c6 100644 --- a/src/mode_metric.f90 +++ b/src/mode_metric.f90 @@ -10,11 +10,11 @@ module mode_metric integer :: nfiles character(len=100) :: metric_type - real(kind=dp), allocatable :: met(:,:) + real(kind=dp) :: rc_off !Save reference positions integer :: np, npreal, nmet - real(kind=dp), allocatable :: r_zero(:,:), r_curr(:,:) + real(kind=dp), allocatable :: r_zero(:,:), r_curr(:,:), met(:,:) public contains @@ -37,7 +37,6 @@ module mode_metric !Now read the first file call read_in(1, (/ 0.0_dp, 0.0_dp, 0.0_dp /), temp_box_bd) np = atom_num + max_basisnum*max_ng_node*ele_num - print *,np allocate(r_zero(3,atom_num+max_basisnum*max_ng_node*ele_num), & r_curr(3,atom_num+max_basisnum*max_ng_node*ele_num)) r_zero(:,:) = -huge(1.0_dp) @@ -101,18 +100,23 @@ module mode_metric stop 3 end select + !Now read the cutoff radius + call get_command_argument(3,textholder,arglen) + if (arglen == 0) stop "Incomplete mode metric command, check documentation" + read(textholder, *) rc_off + !Now read the number of files to read and allocate the variables - call get_command_argument(3, textholder, arglen) + call get_command_argument(4, textholder, arglen) if (arglen == 0) stop "Incomplete mode metric command, check documentation" read(textholder, *) nfiles !Now read the files to be read do i = 1, nfiles - call get_command_argument(3+i, textholder, arglen) + call get_command_argument(4+i, textholder, arglen) call get_in_file(textholder) end do - arg_pos = 4+nfiles + arg_pos = 5+nfiles return end subroutine parse_command @@ -184,8 +188,6 @@ module mode_metric integer :: i, inod, ibasis npoints=0 - print *, atom_num + max_ng_node*max_basisnum*ele_num - print *, rout(:,1) if(atom_num > 0) then do i = 1, atom_num diff --git a/src/opt_disl.f90 b/src/opt_disl.f90 index 19f8ed8..dc0e72c 100644 --- a/src/opt_disl.f90 +++ b/src/opt_disl.f90 @@ -561,7 +561,6 @@ module opt_disl !Now reset the list for the scanning algorithm delete_num = 0 - !Now scan over all atoms again and find the closest vloop_size number of atoms to the initial atom !that reside on the same plane. If loop_radius is > 0 then we build a circular vacancy cluster if(loop_radius > 0) then do i = 1, atom_num diff --git a/src/opt_group.f90 b/src/opt_group.f90 index 855e04e..33cf685 100644 --- a/src/opt_group.f90 +++ b/src/opt_group.f90 @@ -87,7 +87,7 @@ module opt_group continue case default print *, "Select_type ", trim(adjustl(type)), " is not an accept group selection criteria. ", & - "Please select from atoms, nodes, or both." + "Please select from atoms, elements, or both." end select arg_pos = arg_pos + 1