Skip to content

Commit 79e5faa

Browse files
Fix length condition (#63)
1 parent 7e0f427 commit 79e5faa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/BioStructuresBioAlignmentsExt.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ function BioStructures.Transformation(el1::StructuralElementOrList,
6666
for (i1, i2) in zip(inds1, inds2)
6767
sel_ats1 = collectatoms(res1[i1], alignatoms)
6868
sel_ats2 = collectatoms(res2[i2], alignatoms)
69-
if length(atoms1) == length(atoms2)
69+
# Ensure `atoms1` and `atoms2` have the same length, ignore residues
70+
# where the number of atoms differ.
71+
if length(sel_ats1) == length(sel_ats2)
7072
append!(atoms1, sel_ats1)
7173
append!(atoms2, sel_ats2)
7274
end

0 commit comments

Comments
 (0)