diff --git a/src/opt_orient.f90 b/src/opt_orient.f90 index c1bef1e..812754f 100644 --- a/src/opt_orient.f90 +++ b/src/opt_orient.f90 @@ -22,6 +22,7 @@ module opt_orient integer :: i, ibasis, inod logical :: isortho, isrighthanded real(kind=dp) :: inv_sub_box_ori(3,3,sub_box_num) + character(len=3) :: old_box_bc !First parse the orient command call parse_orient(arg_pos) @@ -31,7 +32,7 @@ module opt_orient !Find all inverse orientation matrices for all sub_boxes 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 !Now transform all atoms @@ -62,8 +63,11 @@ module opt_orient !Save original box boundaries 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 + box_bc = old_box_bc end subroutine orient subroutine parse_orient(arg_pos)