From: James Procter Date: Thu, 2 Nov 2023 00:46:14 +0000 (+0000) Subject: JAL-4311 detect and discover tftype metadata on PDBEntry if no tftype was specified X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fpatch%2FJAL-4311_import_pLDDT_scores_from_nonAlphaFold_sources;p=jalview.git JAL-4311 detect and discover tftype metadata on PDBEntry if no tftype was specified --- diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 2f1ddc0..b8cda73 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -426,6 +426,47 @@ public class StructureSelectionManager { long progressSessionId = System.currentTimeMillis() * 3; + boolean inspectPdbEntry=false; + PDBEntry barepdbe=null; + if (tft==null || paeFilename==null) + { + for (SequenceI s:sequenceArray) + { + while (s.getDatasetSequence()!=null) + { + s = s.getDatasetSequence(); + } + if (s.getAllPDBEntries()!=null) + { + for (PDBEntry p:s.getAllPDBEntries()) + { + if (p.getFile()!=null && p.getFile().equals(pdbFile)) + { + if (barepdbe==null) + { + barepdbe=new PDBEntry(p); + } else { + // todo - may need to copy and null the chaincode so we can do a faithful update + barepdbe.updateFrom(p); + } + } + } + } + } + if (barepdbe!=null) + { + if (barepdbe.hasTempFacType()) + { + try { + tft = TFType.valueOf(barepdbe.getTempFacType().toUpperCase(Locale.ROOT)); + } catch (IllegalArgumentException ia) + { + Console.warn("Ignoring unknown temperature factor type '"+barepdbe.getTempFacType()+"'"); + } + } + } + + } /** * do we extract and transfer annotation from 3D data ? */