import jalview.datamodel.PDBEntry;
import jalview.datamodel.SequenceI;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Vector;
import MCview.PDBChain;
jalview.io.AppletFormatAdapter.FILE, "PDB");
if (pdbfile != null)
{
+ List<SequenceI> toremove=new ArrayList<SequenceI>();
for (SequenceI pdbcs : pdbfile.getSequences())
{
String chid = null;
}
else
{
- // remove this sequence from the alignment - since it's not from the
- // right chain
- pdbfile.deleteSequence(pdbcs);
+ // mark this sequence to be removed from the alignment
+ // - since it's not from the right chain
+ toremove.add(pdbcs);
}
}
+ // now remove marked sequences
+ for (SequenceI pdbcs:toremove) {
+ pdbfile.deleteSequence(pdbcs);
+ }
}
+
if (pdbfile == null || pdbfile.getHeight() < 1)
{
throw new Exception("No PDB Records for " + id + " chain "
+ ((chain == null) ? "' '" : chain));
}
+
} catch (Exception ex) // Problem parsing PDB file
{
stopQuery();