X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fstructure%2FStructureSelectionManager.java;h=e9053ed0d65b3c615fc490d813892d5aa012b8e4;hb=4ff572f7cf17f5ca9c23f82bbe41005af8af55cc;hp=1541a6a83df8c599f0f270c44cc375bbe850b09f;hpb=8449c7161636af09d658905fe3affbc84fd10150;p=jalview.git diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 1541a6a..e9053ed 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -588,9 +588,7 @@ public class StructureSelectionManager .getMappingFromS1(false); maxChain.transferRESNUMFeatures(seq, null); - // allocate enough slots to store the mapping from positions in - // sequence[s] to the associated chain - int[][] mapping = new int[seq.findPosition(seq.getLength()) + 2][2]; + HashMap mapping = new HashMap(); int resNum = -10000; int index = 0; @@ -604,8 +602,8 @@ public class StructureSelectionManager { // TODO (JAL-1836) address root cause: negative residue no in PDB // file - mapping[tmp.alignmentMapping + 1][0] = tmp.resNumber; - mapping[tmp.alignmentMapping + 1][1] = tmp.atomIndex; + mapping.put(tmp.alignmentMapping + 1, new int[] { tmp.resNumber, + tmp.atomIndex }); } }