Added delete option with delete overlap command

master
Alex Selimov 5 years ago
parent 92671ea0b2
commit a1a506e17d

@ -1,8 +1,8 @@
FC=ifort FC=ifort
FFLAGS=-mcmodel=large -g -O0 -stand f08 -fpe0 -traceback -check bounds,uninit -warn all -implicitnone -no-wrap-margin FFLAGS=-mcmodel=large -g -O0 -stand f08 -fpe0 -traceback -check bounds,uninit -warn all -implicitnone -no-wrap-margin -heap-arrays
#FFLAGS=-mcmodel=large -Ofast -no-wrap-margin #FFLAGS=-mcmodel=large -Ofast -no-wrap-margin -heap-arrays
MODES=mode_create.o mode_merge.o mode_convert.o MODES=mode_create.o mode_merge.o mode_convert.o
OPTIONS=opt_disl.o opt_group.o opt_orient.o opt_delete.o OPTIONS=opt_disl.o opt_group.o opt_orient.o opt_delete.o
OBJECTS=main.o elements.o io.o subroutines.o functions.o atoms.o call_mode.o box.o $(MODES) $(OPTIONS) call_option.o OBJECTS=main.o elements.o io.o subroutines.o functions.o atoms.o call_mode.o box.o $(MODES) $(OPTIONS) call_option.o
.SUFFIXES: .SUFFIXES:

@ -21,6 +21,8 @@ module opt_delete
call parse_delete(arg_pos) call parse_delete(arg_pos)
print *, atom_num
if (rc_off > 0.0_dp) call delete_overlap if (rc_off > 0.0_dp) call delete_overlap
end subroutine run_delete end subroutine run_delete
@ -41,7 +43,6 @@ module opt_delete
arg_pos=arg_pos + 1 arg_pos=arg_pos + 1
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 overlap command" if(arg_len==0) stop "Missing argument to delete overlap command"
print *, textholder
read(textholder, *) rc_off read(textholder, *) rc_off
case default case default
print *, "Command ", trim(adjustl(textholder)), " is not accepted for option delete" print *, "Command ", trim(adjustl(textholder)), " is not accepted for option delete"
@ -57,12 +58,17 @@ module opt_delete
integer :: i, c(3), ci, cj, ck, num_nei, nei, delete_num integer :: i, c(3), ci, cj, ck, num_nei, nei, delete_num
integer, dimension(atom_num) :: for_delete integer, dimension(atom_num) :: for_delete
integer, dimension(3,atom_num) :: which_cell
!These are the variables containing the cell list information !These are the variables containing the cell list information
integer, dimension(3) :: cell_num integer, dimension(3) :: cell_num
integer, allocatable :: num_in_cell(:,:,:) integer, allocatable :: num_in_cell(:,:,:), which_cell(:,:)
integer, allocatable :: cell_list(:,:,:,:) integer, allocatable :: cell_list(:,:,:,:)
allocate(which_cell(3,atom_num))
print *, atom_num
print *, for_delete(atom_num)
print *, which_cell(1,1)
!First pass the atom list and atom num to the algorithm which builds the cell list !First pass the atom list and atom num to the algorithm which builds the cell list
call build_cell_list(atom_num, r_atom, rc_off, cell_num, num_in_cell, cell_list, which_cell) call build_cell_list(atom_num, r_atom, rc_off, cell_num, num_in_cell, cell_list, which_cell)
@ -122,4 +128,4 @@ module opt_delete
!Now delete all the atoms !Now delete all the atoms
call delete_atoms(delete_num, for_delete(1:delete_num)) call delete_atoms(delete_num, for_delete(1:delete_num))
end subroutine delete_overlap end subroutine delete_overlap
end module opt_delete end module opt_delete

Loading…
Cancel
Save