From 12dcf29748f8b5b904e2799c38163e2a8dac6dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kr=C3=B6pelin?= Date: Wed, 12 Mar 2025 20:34:58 +0100 Subject: [PATCH] Fix length condition --- ext/BioStructuresBioAlignmentsExt.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/BioStructuresBioAlignmentsExt.jl b/ext/BioStructuresBioAlignmentsExt.jl index 9ec97c4a..dd0c1c68 100644 --- a/ext/BioStructuresBioAlignmentsExt.jl +++ b/ext/BioStructuresBioAlignmentsExt.jl @@ -66,7 +66,9 @@ function BioStructures.Transformation(el1::StructuralElementOrList, for (i1, i2) in zip(inds1, inds2) sel_ats1 = collectatoms(res1[i1], alignatoms) sel_ats2 = collectatoms(res2[i2], alignatoms) - if length(atoms1) == length(atoms2) + # Ensure `atoms1` and `atoms2` have the same length, ignore residues + # where the number of atoms differ. + if length(sel_ats1) == length(sel_ats2) append!(atoms1, sel_ats1) append!(atoms2, sel_ats2) end