@@ -63,6 +63,7 @@ function BioStructures.Transformation(el1::StructuralElementOrList,
63
63
end
64
64
@info " Superimposing based on a sequence alignment between $(length (inds1)) residues"
65
65
atoms1, atoms2 = AbstractAtom[], AbstractAtom[]
66
+ inds1_used, inds2_used = Int[], Int[]
66
67
for (i1, i2) in zip (inds1, inds2)
67
68
sel_ats1 = collectatoms (res1[i1], alignatoms)
68
69
sel_ats2 = collectatoms (res2[i2], alignatoms)
@@ -71,13 +72,15 @@ function BioStructures.Transformation(el1::StructuralElementOrList,
71
72
if length (sel_ats1) == length (sel_ats2)
72
73
append! (atoms1, sel_ats1)
73
74
append! (atoms2, sel_ats2)
75
+ push! (inds1_used, i1)
76
+ push! (inds2_used, i2)
74
77
end
75
78
end
76
79
if length (atoms1) == 0
77
80
throw (ArgumentError (" No atoms found to superimpose" ))
78
81
end
79
82
@info " Superimposing based on $(length (atoms1)) atoms"
80
- return Transformation (coordarray (atoms1), coordarray (atoms2), inds1, inds2 )
83
+ return Transformation (coordarray (atoms1), coordarray (atoms2), inds1_used, inds2_used )
81
84
end
82
85
83
86
end # BioStructuresBioAlignmentsExt
0 commit comments