List<Atom> significantAtoms = convertSignificantAtoms(ms);
for (Atom tmpatom : significantAtoms)
{
- 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
{
tmpchain = new PDBChain(getId(), tmpatom.chain);
getChains().add(tmpchain);
}
StructureImportSettings.setShowSeqFeatures(true);
}
-
- public PDBChain findChain(String id) throws Exception
+
+ /**
+ * Answers the first PDBChain found matching the given id, or null if none
+ * is found
+ *
+ * @param id
+ * @return
+ */
+ public PDBChain findChain(String id)
{
for (PDBChain chain : getChains())
{
return chain;
}
}
- throw new Exception("PDB chain not Found!");
+ return null;
}
public void makeResidueList()
}
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
{
tmpchain = new PDBChain(getId(), tmpatom.chain);
getChains().add(tmpchain);