*/
MCview.PDBfile pdb = null;
boolean parseSecStr=true;
- for (SequenceI sq:sequence)
+ if (isPDBFileRegistered(pdbFile))
{
- SequenceI ds = sq;while (ds.getDatasetSequence()!=null) { ds = ds.getDatasetSequence();};
- if (ds.getAnnotation()!=null)
+ for (SequenceI sq : sequence)
{
- for (AlignmentAnnotation ala:ds.getAnnotation())
+ SequenceI ds = sq;
+ while (ds.getDatasetSequence() != null)
{
- // false if any annotation present from this structure
- if (MCview.PDBfile.isCalcIdForFile(ala.getCalcId(), pdbFile))
+ ds = ds.getDatasetSequence();
+ }
+ ;
+ if (ds.getAnnotation() != null)
+ {
+ for (AlignmentAnnotation ala : ds.getAnnotation())
{
- parseSecStr = false;
+
+ // false if any annotation present from this structure
+ // JBPNote this fails for jmol/chimera view because the *file* is
+ // passed, not the structure data ID -
+ if (MCview.PDBfile.isCalcIdForFile(ala.getCalcId(),
+ findIdForPDBFile(pdbFile)))
+ {
+ parseSecStr = false;
+ }
}
}
}
try
{
pdb = new MCview.PDBfile(true, parseSecStr, pdbFile, protocol);
-
+ if (pdb.id != null && pdb.id.trim().length() > 0
+ && FormatAdapter.FILE.equals(protocol))
+ {
+ registerPDBFile(pdb.id.trim(), pdbFile);
+ }
} catch (Exception ex)
{
ex.printStackTrace();