JAL-1231 add chain ID
[jalview.git] / src / jalview / ext / jmol / PDBFileWithJmol.java
index 1059021..c5ab86f 100644 (file)
@@ -18,6 +18,7 @@
 package jalview.ext.jmol;
 
 import java.io.IOException;
+import java.util.Hashtable;
 import java.util.Map;
 
 import org.jmol.api.JmolStatusListener;
@@ -37,6 +38,7 @@ import jalview.datamodel.PDBEntry;
 import jalview.datamodel.Sequence;
 import jalview.datamodel.SequenceI;
 import jalview.io.AlignFile;
+import jalview.io.FileParse;
 
 /**
  * Import and process PDB files with Jmol
@@ -57,6 +59,12 @@ public class PDBFileWithJmol extends AlignFile implements
   {
     super(inFile, type);
   }
+  
+
+  public PDBFileWithJmol(FileParse fp) throws IOException
+  {
+    super(fp);
+  }
 
   public PDBFileWithJmol()
   {
@@ -164,6 +172,8 @@ public class PDBFileWithJmol extends AlignFile implements
                   pdbe.setFile(getDataName());
                   pdbe.setId(getDataName());
                   sq.addPDBId(pdbe);
+                  pdbe.setProperty(new Hashtable());
+                  pdbe.getProperty().put("CHAIN",""+_lastChainId);
                   seqs.add(sq);
                   if (!(biopoly.isDna() || biopoly.isRna()))
                   {