PDBChain tmpchain;\r
String line;\r
boolean modelFlag = false;\r
+ boolean terFlag = false;\r
+\r
for (int i = 0; i < lineArray.size(); i++)\r
{\r
\r
if(line.indexOf("MODEL")==0)\r
modelFlag = true;\r
\r
+ if(line.indexOf("TER")==0)\r
+ terFlag = true;\r
+\r
if(modelFlag && line.indexOf("ENDMDL")==0)\r
break;\r
\r
- if (line.indexOf("ATOM")==0 || line.indexOf("HETATM")==0 )\r
+ if (line.indexOf("ATOM")==0\r
+ || (line.indexOf("HETATM")==0 && !terFlag) )\r
{\r
+ terFlag = false;\r
+\r
try {\r
Atom tmpatom = new Atom(line);\r
\r
//Jalview is only interested in CA bonds????\r
- if(!tmpatom.name.equals("CA"))\r
- continue;\r
+ // if(!tmpatom.name.equals("CA"))\r
+ // continue;\r
\r
tmpchain = findChain(tmpatom.chain);\r
if ( tmpchain != null)\r