X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fstructure%2FStructureSelectionManager.java;h=e1045c0167ff62debe0d831a877d1fb14bdab555;hb=0510d129c6caa52cf1e481b326961491489263ac;hp=054ed2fde6420e173f4d0e4ae77e7c8fd11ac014;hpb=74393b51f368cb9f58589472d432a433d9c4386d;p=jalview.git diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 054ed2f..e1045c0 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -1161,6 +1161,28 @@ public class StructureSelectionManager } /** + * Answers a (possibly empty) list of structure to sequence mappings matching + * the given pdb and chain ids + * + * @param pdbId + * @param chain + * @return + */ + public List getMappingForChain(String pdbId, + String chain) + { + List result = new ArrayList<>(); + for (StructureMapping sm : mappings) + { + if (sm.pdbid.equals(pdbId) && sm.pdbchain.equals(chain)) + { + result.add(sm); + } + } + return result; + } + + /** * Returns a readable description of all mappings for the given pdbfile to any * of the given sequences *