From 63f2e226f8be5776a7146b6eddf8e55ac545db46 Mon Sep 17 00:00:00 2001 From: James Procter Date: Fri, 15 Dec 2023 13:56:57 +0000 Subject: [PATCH] JAL-4366 build a mapping to a PDBChain with an arbitrary SequenceMapping --- src/mc_view/PDBChain.java | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/mc_view/PDBChain.java b/src/mc_view/PDBChain.java index 2970ccf..7e220bb 100755 --- a/src/mc_view/PDBChain.java +++ b/src/mc_view/PDBChain.java @@ -187,6 +187,39 @@ public class PDBChain } /** + * like makeExactMapping but using a sequence mapping object + * @param sqmpping + * @param seq + */ + public void mapChainWith(Mapping sqmpping, SequenceI seq) + { + for (Atom atom : atoms) + { + atom.alignmentMapping = -1; + } + // and now map sqmapping to the atom set. + int[] range = sqmpping.locateRange(seq.getStart(),seq.getEnd()); + int r=0,from,to; + while (r= residues.size()) + { + continue; + } + Residue res = residues.elementAt(pdbpos); + for (Atom atom : res.atoms) + { + atom.alignmentMapping = sqmpping.getPosition(pdbpos); + } + } + } + } + + /** * Annotate the residues with their corresponding positions in s1 using the * alignment in as NOTE: This clears all atom.alignmentMapping values on the * structure. -- 1.7.10.2