JAL-1761 backbone type parameter for configuring which atoms are used for superpositi...
[jalview.git] / src / jalview / structures / models / AAStructureBindingModel.java
index 336c6f8..9ecf630 100644 (file)
@@ -61,6 +61,7 @@ import jalview.structure.AtomSpec;
 import jalview.structure.AtomSpecModel;
 import jalview.structure.StructureCommandI;
 import jalview.structure.StructureCommandsI;
+import jalview.structure.StructureCommandsI.AtomSpecType;
 import jalview.structure.StructureListener;
 import jalview.structure.StructureMapping;
 import jalview.structure.StructureSelectionManager;
@@ -925,7 +926,7 @@ public abstract class AAStructureBindingModel
       // todo better way to ensure synchronous than setting getReply true!!
       executeCommands(commandGenerator.showBackbone(), true, null);
       
-      boolean isNucleotide = structures[refStructure].isRna;
+      AtomSpecType backbone = structures[refStructure].isRna ? AtomSpecType.PHOSPHATE : AtomSpecType.ALPHA;
       /*
        * superpose each (other) structure to the reference in turn
        */
@@ -935,7 +936,7 @@ public abstract class AAStructureBindingModel
         {
           AtomSpecModel atomSpec = getAtomSpec(structures[i], matched);
           List<StructureCommandI> commands = commandGenerator
-                  .superposeStructures(refAtoms, atomSpec,isNucleotide);
+                  .superposeStructures(refAtoms, atomSpec, backbone);
           List<String> replies = executeCommands(commands, true, null);
           for (String reply : replies)
           {