JAL-3829 make sure structure data type reflects actual format identified
[jalview.git] / src / mc_view / PDBfile.java
index 0435def..0eb14cd 100755 (executable)
@@ -143,17 +143,18 @@ 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);