X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FPDBfile.java;h=9acc2e7b5438ab8b8db3df2bd46367b5057e64df;hb=0580d6486ec69ff7a9bc8b406cb3703afaca767c;hp=ed694f260c4f5a8c7af8ea3980d00659fe3399e2;hpb=e77a693cf000b4ff8a863411acf8c90c6390a061;p=jalview.git diff --git a/src/MCview/PDBfile.java b/src/MCview/PDBfile.java index ed694f2..9acc2e7 100755 --- a/src/MCview/PDBfile.java +++ b/src/MCview/PDBfile.java @@ -21,9 +21,11 @@ package MCview; import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.DBRefSource; import jalview.datamodel.SequenceI; import jalview.io.FileParse; import jalview.io.StructureFile; +import jalview.structure.StructureImportSettings; import jalview.util.MessageManager; import java.io.IOException; @@ -40,30 +42,25 @@ public class PDBfile extends StructureFile boolean predictSecondaryStructure, boolean externalSecStr) { super(); - this.visibleChainAnnotation = addAlignmentAnnotations; - this.predictSecondaryStructure = predictSecondaryStructure; - this.externalSecondaryStructure = externalSecStr; + addSettings(addAlignmentAnnotations, predictSecondaryStructure, + externalSecStr); } - public PDBfile(boolean addAlignmentAnnotations, - boolean predictSecondaryStructure, boolean externalSecStr, - String file, String protocol) throws IOException + public PDBfile(boolean addAlignmentAnnotations, boolean predictSecStr, + boolean externalSecStr, String dataObject, String protocol) + throws IOException { - super(false, file, protocol); - this.visibleChainAnnotation = addAlignmentAnnotations; - this.predictSecondaryStructure = predictSecondaryStructure; - this.externalSecondaryStructure = externalSecStr; + super(false, dataObject, protocol); + addSettings(addAlignmentAnnotations, predictSecStr, externalSecStr); doParse(); } - public PDBfile(boolean addAlignmentAnnotations, - boolean predictSecondaryStructure, boolean externalSecStr, + public PDBfile(boolean addAlignmentAnnotations, boolean predictSecStr, + boolean externalSecStr, FileParse source) throws IOException { super(false, source); - this.visibleChainAnnotation = addAlignmentAnnotations; - this.predictSecondaryStructure = predictSecondaryStructure; - this.externalSecondaryStructure = externalSecStr; + addSettings(addAlignmentAnnotations, predictSecStr, externalSecStr); doParse(); } @@ -76,6 +73,7 @@ public class PDBfile extends StructureFile @Override public void parse() throws IOException { + setDbRefType(DBRefSource.PDB); // TODO set the filename sensibly - try using data source name. setId(safeName(getDataName())); @@ -134,7 +132,8 @@ public class PDBfile extends StructureFile break; } if (line.indexOf("ATOM") == 0 - || (line.indexOf("HETATM") == 0 && !terFlag)) + || (StructureImportSettings.isProcessHETATMs() + && line.indexOf("HETATM") == 0 && !terFlag)) { terFlag = false;