Revert "needed for linkedapplets_ng.html (JAL-859,JAL-469)"
[jalview.git] / src / MCview / PDBChain.java
index 47f6817..5176b15 100755 (executable)
@@ -67,6 +67,21 @@ public class PDBChain
     this.id = id;
   }
 
+  /**
+   * character used to write newlines
+   */
+  protected String newline = System.getProperty("line.separator");
+
+  public void setNewlineString(String nl)
+  {
+    newline = nl;
+  }
+
+  public String getNewlineString()
+  {
+    return newline;
+  }
+
   public String print()
   {
     String tmp = "";
@@ -75,12 +90,19 @@ public class PDBChain
     {
       tmp = tmp + ((Bond) bonds.elementAt(i)).at1.resName + " "
               + ((Bond) bonds.elementAt(i)).at1.resNumber + " " + offset
-              + "\n";
+              + newline;
     }
 
     return tmp;
   }
 
+  /**
+   * Annotate the residues with their corresponding positions in s1 using the
+   * alignment in as
+   * 
+   * @param as
+   * @param s1
+   */
   public void makeExactMapping(AlignSeq as, SequenceI s1)
   {
     int pdbpos = as.getSeq2Start() - 2;
@@ -275,7 +297,8 @@ public class PDBChain
       if ((symbol = ResidueProperties.getAA3Hash().get(tmpat.resName)) == null)
       {
         String nucname = tmpat.resName.trim();
-        if (ResidueProperties.nucleotideIndex[nucname.charAt(0)] == -1)
+        if (tmpat.name.equalsIgnoreCase("CA")
+                || ResidueProperties.nucleotideIndex[nucname.charAt(0)] == -1)
         {
           seq.append("X");
           // System.err.println("PDBReader:Null aa3Hash for " +