@@ -47,17 +47,17 @@ first centred set onto the second centred set, and the indices of the aligned
4747residues in the first and second elements if relevant.
4848"""
4949struct Transformation
50- trans1:: Array {Float64}
51- trans2:: Array {Float64}
52- rot:: Array {Float64, 2 }
50+ trans1:: Vector {Float64}
51+ trans2:: Vector {Float64}
52+ rot:: Matrix {Float64}
5353 inds1:: Vector{Int}
5454 inds2:: Vector{Int}
5555end
5656
57- function Transformation (trans1:: AbstractArray {<:Real} ,
58- trans2:: AbstractArray {<:Real} ,
59- rot:: AbstractArray {<:Real, 2 } )
60- return Transformation (trans1, trans2, rot, [], [])
57+ function Transformation (trans1:: AbstractVector {<:Real} ,
58+ trans2:: AbstractVector {<:Real} ,
59+ rot:: AbstractMatrix {<:Real} )
60+ return Transformation (trans1, trans2, rot, Int [], Int [])
6161end
6262
6363Base. show (io:: IO , trans:: Transformation ) = print (" 3D transformation with " ,
@@ -135,8 +135,8 @@ function superimpose!(el1::StructuralElementOrList,
135135 return el1
136136end
137137
138- function Transformation (coords1:: AbstractArray {<:Real, 2 } ,
139- coords2:: AbstractArray {<:Real, 2 } ,
138+ function Transformation (coords1:: AbstractMatrix {<:Real} ,
139+ coords2:: AbstractMatrix {<:Real} ,
140140 inds1:: AbstractVector{<:Integer} = Int[],
141141 inds2:: AbstractVector{<:Integer} = Int[])
142142 if size (coords1) != size (coords2)
@@ -154,7 +154,7 @@ function Transformation(coords1::AbstractArray{<:Real, 2},
154154 d = sign (det (svd_res. V * Ut))
155155 @view (svd_res. V[:, end ]) .*= d
156156 rot = svd_res. V * Ut
157- return Transformation (trans1, trans2, rot, inds1, inds2)
157+ return Transformation (vec ( trans1), vec ( trans2) , rot, inds1, inds2)
158158end
159159
160160"""
0 commit comments