Added basic basis functionality to code

master
Alex Selimov 5 years ago
parent ffbe83f2f5
commit 32ab5a6058

@ -75,16 +75,6 @@ There is no default dimensions as duplicate is the default option. This command
Example: `dimensions 100 100 100`
**ZigZag**
```
zigzag boolx booly boolz
```
Default zigzag is `f f f`. This command specifies whether a boundary should be left jagged (i.e. in essence not filled in). If `boolx` is `t` than the x dimension is left jagged and if it is `f` then the x dimension is filled.
*Example:* `zigzag t f t` gives a box with jagged edges in the x and z and filled edges in the y.
**Origin**
```
@ -95,6 +85,13 @@ Default origin is `0 0 0`. This command just sets the origin for where the simul
*Example:* `origin 10 0 1`
**Basis**
```
basis basisnum bname bx by bz
```
This function allows you to define a custom basis. `bname bx by bz` must be repeated `basisnum` times.
### Mode Convert
```

@ -161,7 +161,7 @@ module io
!Calculate total atom number
write_num = atom_num
do i = 1,ele_num
if(type_ele(i) == 'fcc') write_num = write_num + size_ele(i)**3
if(type_ele(i) == 'fcc') write_num = write_num + basisnum(lat_ele(i))*size_ele(i)**3
end do
!Write total number of atoms + elements
write(11, '(i16, a)') write_num, ' atoms'

@ -166,6 +166,7 @@ module mode_create
integer :: ori_pos, i, j, arglen, stat
character(len=100) :: textholder
character(len=20) :: orient_string
character(len=2) :: btype
logical :: isortho, isrighthanded
@ -206,20 +207,6 @@ module mode_create
call parse_ori_vec(orient_string, orient(i,:))
arg_pos = arg_pos+1
! ori_pos=2
! do j = 1,3
! if (orient_string(ori_pos:ori_pos) == '-') then
! ori_pos = ori_pos + 1
! read(orient_string(ori_pos:ori_pos), *, iostat=stat) orient(i,j)
! if (stat>0) STOP "Error reading orient value"
! orient(i,j) = -orient(i,j)
! ori_pos = ori_pos + 1
! else
! read(orient_string(ori_pos:ori_pos), *, iostat=stat) orient(i,j)
! if(stat>0) STOP "Error reading orient value"
! ori_pos=ori_pos + 1
! end if
! end do
end do
!If the duplicate command is passed then we extract the information on the new bounds.
@ -245,6 +232,21 @@ module mode_create
read(textholder, *) origin(i)
arg_pos = arg_pos + 1
end do
case('basis')
call get_command_argument(arg_pos, textholder)
read(textholder, *) basisnum(1)
arg_pos = arg_pos + 1
max_basisnum=basisnum(1)
do i = 1, max_basisnum
call get_command_argument(arg_pos, btype)
arg_pos = arg_pos+1
call add_atom_type(btype, basis_type(i,1))
do j = 1, 3
call get_command_argument(arg_pos, textholder)
read(textholder, *) basis_pos(j,i)
arg_pos=arg_pos+1
end do
end do
case default
!If it isn't an option then you have to exit

Loading…
Cancel
Save