JAL-629 stash some TFType and PAEFile info into a PDBEntry
[jalview.git] / src / mc_view / PDBfile.java
index 0435def..2a89e61 100755 (executable)
  */
 package mc_view;
 
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+
+import jalview.bin.Console;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.DBRefSource;
 import jalview.datamodel.SequenceI;
@@ -28,12 +35,6 @@ import jalview.io.FileParse;
 import jalview.io.StructureFile;
 import jalview.util.MessageManager;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-
 public class PDBfile extends StructureFile
 {
   private static String CALC_ID_PREFIX = "JalviewPDB";
@@ -51,7 +52,9 @@ public class PDBfile extends StructureFile
           DataSourceType sourceType) throws IOException
   {
     super(false, dataObject, sourceType);
+    Console.debug("***** PDBfile constructor");
     addSettings(addAlignmentAnnotations, predictSecStr, externalSecStr);
+    Console.debug("***** About to doParse() 1");
     doParse();
   }
 
@@ -60,6 +63,7 @@ public class PDBfile extends StructureFile
   {
     super(false, source);
     addSettings(addAlignmentAnnotations, predictSecStr, externalSecStr);
+    Console.debug("***** About to doParse() 2");
     doParse();
   }
 
@@ -143,17 +147,19 @@ public class PDBfile extends StructureFile
           }
 
           Atom tmpatom = new Atom(line);
-          try
+          if (tmpatom.resNumIns.trim().equals(lastID))
+          {
+            // phosphorylated protein - seen both CA and P..
+            continue;
+          }
+          tmpchain = findChain(tmpatom.chain);
+          if (tmpchain != null)
           {
-            tmpchain = findChain(tmpatom.chain);
-            if (tmpatom.resNumIns.trim().equals(lastID))
-            {
-              // phosphorylated protein - seen both CA and P..
-              continue;
-            }
             tmpchain.atoms.addElement(tmpatom);
-          } catch (Exception e)
+          }
+          else
           {
+            // PDBfile never handles alphafold models
             tmpchain = new PDBChain(getId(), tmpatom.chain);
             getChains().add(tmpchain);
             tmpchain.atoms.addElement(tmpatom);