|
|
@ -22,6 +22,7 @@ module opt_orient
|
|
|
|
integer :: i, ibasis, inod
|
|
|
|
integer :: i, ibasis, inod
|
|
|
|
logical :: isortho, isrighthanded
|
|
|
|
logical :: isortho, isrighthanded
|
|
|
|
real(kind=dp) :: inv_sub_box_ori(3,3,sub_box_num)
|
|
|
|
real(kind=dp) :: inv_sub_box_ori(3,3,sub_box_num)
|
|
|
|
|
|
|
|
character(len=3) :: old_box_bc
|
|
|
|
|
|
|
|
|
|
|
|
!First parse the orient command
|
|
|
|
!First parse the orient command
|
|
|
|
call parse_orient(arg_pos)
|
|
|
|
call parse_orient(arg_pos)
|
|
|
@ -31,7 +32,7 @@ module opt_orient
|
|
|
|
|
|
|
|
|
|
|
|
!Find all inverse orientation matrices for all sub_boxes
|
|
|
|
!Find all inverse orientation matrices for all sub_boxes
|
|
|
|
do i = 1, sub_box_num
|
|
|
|
do i = 1, sub_box_num
|
|
|
|
call matrix_inverse(sub_box_ori, 3, inv_sub_box_ori)
|
|
|
|
call matrix_inverse(sub_box_ori(:,:,i), 3, inv_sub_box_ori(:,:,i))
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
|
|
|
|
|
|
|
|
!Now transform all atoms
|
|
|
|
!Now transform all atoms
|
|
|
@ -62,8 +63,11 @@ module opt_orient
|
|
|
|
!Save original box boundaries
|
|
|
|
!Save original box boundaries
|
|
|
|
orig_box_bd = box_bd
|
|
|
|
orig_box_bd = box_bd
|
|
|
|
|
|
|
|
|
|
|
|
!Now find new box boundaries
|
|
|
|
!Now find new box boundaries, have to temporarily define the box as shrink wrapped for def new box to work
|
|
|
|
|
|
|
|
old_box_bc = box_Bc
|
|
|
|
|
|
|
|
box_bc = 'sss'
|
|
|
|
call def_new_box
|
|
|
|
call def_new_box
|
|
|
|
|
|
|
|
box_bc = old_box_bc
|
|
|
|
end subroutine orient
|
|
|
|
end subroutine orient
|
|
|
|
|
|
|
|
|
|
|
|
subroutine parse_orient(arg_pos)
|
|
|
|
subroutine parse_orient(arg_pos)
|
|
|
|