public class PDBfile extends StructureFile
{
- private static String CALC_ID_PREFIX = "JalviewPDB";
+ private final static String CALC_ID_PREFIX = "JalviewPDB";
public PDBfile(boolean addAlignmentAnnotations,
boolean predictSecondaryStructure, boolean externalSecStr)
setId(safeName(getDataName()));
setChains(new Vector<PDBChain>());
- List<SequenceI> rna = new ArrayList<SequenceI>();
- List<SequenceI> prot = new ArrayList<SequenceI>();
+ List<SequenceI> rna = new ArrayList<>();
+ List<SequenceI> prot = new ArrayList<>();
PDBChain tmpchain;
String line = null;
boolean modelFlag = false;
boolean terFlag = false;
String lastID = "";
- int indexx = 0;
+ // int indexx = 0;
String atomnam = null;
try
{
}
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);