public void parse() throws IOException
{
// TODO set the filename sensibly
- id = (inFile == null) ? "PDBFILE" : inFile.getName();
+ id = (inFile == null || inFile.getName().length()==0) ? "PDBFILE" : inFile.getName();
try
{
chains = new Vector();
{
if (line.indexOf("HEADER") == 0)
{
- id = line.substring(62, 67).trim();
+ // make sure we don't get zero length ID strings
+ String tid = line.substring(62, 67).trim();
+ if (tid.length()>0)
+ {
+ id = tid;
+ }
continue;
}
// Were we to do anything with SEQRES - we start it here