X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fstructure%2FStructureSelectionManager.java;h=58bba481587a6da743b068b0d49afa238ef56f03;hb=3325395b33ef3b52b4a62327621c5bddf12ee4e0;hp=8a5f02ae3d6d1d83d2221dc21afb938802a69fff;hpb=5b697edd1b140d42f589a9c85e4133d073904198;p=jalview.git diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 8a5f02a..58bba48 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -189,9 +189,26 @@ public class StructureSelectionManager * the tried and tested MCview pdb mapping */ MCview.PDBfile pdb = null; + boolean parseSecStr=true; + for (SequenceI sq:sequence) + { + SequenceI ds = sq;while (ds.getDatasetSequence()!=null) { ds = ds.getDatasetSequence();}; + if (ds.getAnnotation()!=null) + { + for (AlignmentAnnotation ala:ds.getAnnotation()) + { + // false if any annotation present from this structure + if (MCview.PDBfile.isCalcIdForFile(ala.getCalcId(), pdbFile)) + { + parseSecStr = false; + } + } + } + } try { - pdb = new MCview.PDBfile(pdbFile, protocol); + pdb = new MCview.PDBfile(true, parseSecStr, pdbFile, protocol); + } catch (Exception ex) { ex.printStackTrace(); @@ -236,7 +253,7 @@ public class StructureSelectionManager boolean first = true; for (int i = 0; i < pdb.chains.size(); i++) { - PDBChain chain = ((PDBChain) pdb.chains.elementAt(i)); + PDBChain chain = (pdb.chains.elementAt(i)); if (targetChain.length() > 0 && !targetChain.equals(chain.id) && !infChain) { @@ -245,8 +262,8 @@ public class StructureSelectionManager // TODO: correctly determine sequence type for mixed na/peptide // structures AlignSeq as = new AlignSeq(sequence[s], - ((PDBChain) pdb.chains.elementAt(i)).sequence, - ((PDBChain) pdb.chains.elementAt(i)).isNa ? AlignSeq.DNA + pdb.chains.elementAt(i).sequence, + pdb.chains.elementAt(i).isNa ? AlignSeq.DNA : AlignSeq.PEP); as.calcScoreMatrix(); as.traceAlignment();