JAL-3829 make sure structure data type reflects actual format identified
[jalview.git] / src / mc_view / PDBChain.java
index 2a813d0..e1c90f3 100755 (executable)
@@ -78,11 +78,27 @@ public class PDBChain
 
   public String pdbid = "";
 
-  public PDBChain(String thePdbid, String theId, boolean isAlphaFoldModel)
+  String tfacName = "Temperature Factor";
+
+
+  public PDBChain(String thePdbid, String theId, String tempFactorColumnName)
   {
     this.pdbid = thePdbid == null ? thePdbid : thePdbid.toLowerCase();
     this.id = theId;
-    this.alphaFoldModel = isAlphaFoldModel;
+    if (tempFactorColumnName!=null && tempFactorColumnName.length()>0)
+    {
+      tfacName = tempFactorColumnName;
+    }
+  }
+
+  /**
+   * import chain data assuming Temperature Factor is in the Temperature Factor column
+   * @param thePdbid
+   * @param theId
+   */
+  public PDBChain(String thePdbid, String theId)
+  {
+    this(thePdbid,theId, null);
   }
 
   /**
@@ -92,8 +108,6 @@ public class PDBChain
 
   public Mapping shadowMap;
 
-  private boolean alphaFoldModel;
-
   public void setNewlineString(String nl)
   {
     newline = nl;
@@ -493,11 +507,6 @@ public class PDBChain
         min = Math.min(min, annots[i].value);
         resAnnotation.setElementAt(null, i);
       }
-      String tfacName = "Temperature Factor";
-      if (isAlphaFoldModel())
-      {
-        tfacName = "Alphafold Reliability";
-      }
       AlignmentAnnotation tfactorann = new AlignmentAnnotation(
               tfacName, tfacName + " for " + pdbid + id,
               annots, min, max, AlignmentAnnotation.LINE_GRAPH);
@@ -509,10 +518,6 @@ public class PDBChain
     }
   }
 
-  private boolean isAlphaFoldModel()
-  {
-    return alphaFoldModel;
-  }
 
   /**
    * Colour start/end of bonds by charge