From b0b27e984d8486610b0c4bffe97f6b4cf3d0a768 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 30 Nov 2005 15:05:12 +0000 Subject: [PATCH] TER flag added --- src/MCview/PDBfile.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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) -- 1.7.10.2