diff --git a/README.md b/README.md index 5bdd240..257393e 100644 --- a/README.md +++ b/README.md @@ -45,16 +45,6 @@ Default orientation is `[100] [010] [001]`. If this keyword is present then the *Example:* `orient [-112] [110] [-11-1]` -**Basis** - -``` -basis num atom_name x y z -``` - -Default basis has `atom_name = name` with position (0,0,0). If used then the `atom_name x y z` must be include `num` times. - -*Example:* `basis 2 Mg 0 0 0 Mg 0.5 0.288675 0.81647` - **Duplicate** ``` @@ -92,6 +82,13 @@ basis basisnum bname bx by bz ``` This function allows you to define a custom basis. `bname bx by bz` must be repeated `basisnum` times. + +**efill** +``` +efill +``` +This command will rerun the creation algorithm with multiple times starting with an esize of `esize` and decreasing it by half on every iteration in an effort to maximize the reduction of degrees of freedom in the system. + ### Mode Convert ``` diff --git a/src/mode_create.f90 b/src/mode_create.f90 index 546e345..f33efdf 100644 --- a/src/mode_create.f90 +++ b/src/mode_create.f90 @@ -151,11 +151,11 @@ module mode_create curr_esize=esize do ei = 1, esize_nums - if(i < esize_index(ei)) then + if(i <= esize_index(ei)) then call add_element(element_type, curr_esize, 1, 1, r_node_temp) exit end if - curr_esize=curr_esize/2 + 1 + curr_esize=esize/(2**ei) - 1 end do end do end if @@ -257,7 +257,6 @@ module mode_create end do case('efill') - arg_pos=arg_pos+1 efill = .true. case default !If it isn't an option then you have to exit @@ -340,7 +339,7 @@ module mode_create esize_nums=0 do while (curr_esize >= 7) esize_nums=esize_nums+1 - curr_esize = curr_esize/2 + 1 + curr_esize = esize/(2**esize_nums) -1 end do else esize_nums=1 @@ -497,7 +496,7 @@ module mode_create end do end do esize_index(ei) = lat_ele_num - curr_esize=curr_esize/2 + 1 + curr_esize=esize/(2**ei) - 1 end do !Now figure out how many lattice points could not be contained in elements allocate(r_atom_lat(3,count(lat_points)))