|
|
@ -8,6 +8,7 @@ module opt_delete
|
|
|
|
implicit none
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
real(kind=dp) :: rc_off
|
|
|
|
real(kind=dp) :: rc_off
|
|
|
|
|
|
|
|
logical :: first
|
|
|
|
|
|
|
|
|
|
|
|
public
|
|
|
|
public
|
|
|
|
contains
|
|
|
|
contains
|
|
|
@ -34,6 +35,7 @@ module opt_delete
|
|
|
|
character(len=100) :: textholder
|
|
|
|
character(len=100) :: textholder
|
|
|
|
arg_pos = arg_pos + 1
|
|
|
|
arg_pos = arg_pos + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
first = .true.
|
|
|
|
call get_command_argument(arg_pos, textholder, arg_len)
|
|
|
|
call get_command_argument(arg_pos, textholder, arg_len)
|
|
|
|
if(arg_len==0) stop "Missing argument to delete command"
|
|
|
|
if(arg_len==0) stop "Missing argument to delete command"
|
|
|
|
|
|
|
|
|
|
|
@ -49,6 +51,24 @@ module opt_delete
|
|
|
|
end select
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
|
|
arg_pos = arg_pos + 1
|
|
|
|
arg_pos = arg_pos + 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do while(.true.)
|
|
|
|
|
|
|
|
if(arg_pos > command_argument_count()) exit
|
|
|
|
|
|
|
|
!Pull out the next argument which should either be a keyword or an option
|
|
|
|
|
|
|
|
arg_pos=arg_pos+1
|
|
|
|
|
|
|
|
call get_command_argument(arg_pos, textholder)
|
|
|
|
|
|
|
|
textholder=adjustl(textholder)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select case(trim(textholder))
|
|
|
|
|
|
|
|
case('first')
|
|
|
|
|
|
|
|
first=.true.
|
|
|
|
|
|
|
|
case('last')
|
|
|
|
|
|
|
|
first=.false.
|
|
|
|
|
|
|
|
case default
|
|
|
|
|
|
|
|
!if it isn't an available option to opt_group then we just exit
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
end do
|
|
|
|
end subroutine parse_delete
|
|
|
|
end subroutine parse_delete
|
|
|
|
|
|
|
|
|
|
|
|
subroutine delete_overlap
|
|
|
|
subroutine delete_overlap
|
|
|
@ -99,7 +119,11 @@ module opt_delete
|
|
|
|
if (norm2(r_atom(:,nei)-r_atom(:,i)) < rc_off) then
|
|
|
|
if (norm2(r_atom(:,nei)-r_atom(:,i)) < rc_off) then
|
|
|
|
|
|
|
|
|
|
|
|
delete_num = delete_num + 1
|
|
|
|
delete_num = delete_num + 1
|
|
|
|
|
|
|
|
if(first) then
|
|
|
|
|
|
|
|
for_delete(delete_num) = min(i,nei)
|
|
|
|
|
|
|
|
else
|
|
|
|
for_delete(delete_num) = max(i,nei)
|
|
|
|
for_delete(delete_num) = max(i,nei)
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
!Now zero out the larger index
|
|
|
|
!Now zero out the larger index
|
|
|
|
if(i < nei) then
|
|
|
|
if(i < nei) then
|
|
|
|