JAL-1761 need to pass molecule type when generating superposition commands
[jalview.git] / src / jalview / structures / models / AAStructureBindingModel.java
index 3414e95..336c6f8 100644 (file)
@@ -91,6 +91,9 @@ public abstract class AAStructureBindingModel
 
     public String chain = "";
 
+    /**
+     * is the mapped sequence not protein ?
+     */
     public boolean isRna;
 
     /*
@@ -167,6 +170,9 @@ public abstract class AAStructureBindingModel
 
   protected boolean colourBySequence = true;
 
+  /**
+   * true if all sequences appear to be nucleotide
+   */
   private boolean nucleotide;
 
   private boolean finishedInit = false;
@@ -716,7 +722,7 @@ public abstract class AAStructureBindingModel
               structures[pdbfnum].chain = chain;
             }
             structures[pdbfnum].pdbId = mapping.getPdbId();
-            structures[pdbfnum].isRna = theSequence.getRNA() != null;
+            structures[pdbfnum].isRna = !theSequence.isProtein();
 
             /*
              * move on to next pdb file (ignore sequences for other chains
@@ -918,7 +924,8 @@ public abstract class AAStructureBindingModel
        */
       // todo better way to ensure synchronous than setting getReply true!!
       executeCommands(commandGenerator.showBackbone(), true, null);
-
+      
+      boolean isNucleotide = structures[refStructure].isRna;
       /*
        * superpose each (other) structure to the reference in turn
        */
@@ -928,7 +935,7 @@ public abstract class AAStructureBindingModel
         {
           AtomSpecModel atomSpec = getAtomSpec(structures[i], matched);
           List<StructureCommandI> commands = commandGenerator
-                  .superposeStructures(refAtoms, atomSpec);
+                  .superposeStructures(refAtoms, atomSpec,isNucleotide);
           List<String> replies = executeCommands(commands, true, null);
           for (String reply : replies)
           {