From: amwaterhouse Date: Wed, 30 Nov 2005 15:05:12 +0000 (+0000) Subject: TER flag added X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b0b27e984d8486610b0c4bffe97f6b4cf3d0a768;p=jalview.git TER flag added --- diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index c4fe563..47aa5ac 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -74,6 +74,8 @@ public class PDBfile extends jalview.io.FileParse { PDBChain tmpchain; String line; boolean modelFlag = false; + boolean terFlag = false; + for (int i = 0; i < lineArray.size(); i++) { @@ -88,17 +90,23 @@ public class PDBfile extends jalview.io.FileParse { if(line.indexOf("MODEL")==0) modelFlag = true; + if(line.indexOf("TER")==0) + terFlag = true; + if(modelFlag && line.indexOf("ENDMDL")==0) break; - if (line.indexOf("ATOM")==0 || line.indexOf("HETATM")==0 ) + if (line.indexOf("ATOM")==0 + || (line.indexOf("HETATM")==0 && !terFlag) ) { + terFlag = false; + try { Atom tmpatom = new Atom(line); //Jalview is only interested in CA bonds???? - if(!tmpatom.name.equals("CA")) - continue; + // if(!tmpatom.name.equals("CA")) + // continue; tmpchain = findChain(tmpatom.chain); if ( tmpchain != null)