JAL-3438 spotless for 2.11.2.0
[jalview.git] / test / jalview / structures / models / AAStructureBindingModelTest.java
index 5187167..1a2cb84 100644 (file)
@@ -127,7 +127,7 @@ public class AAStructureBindingModelTest
 
   // TODO: JAL-2227 - import mmCIF PISA assembly & identify master/copy chains
 
-  @Test(groups= {"Functional"})
+  @Test(groups = { "Functional" })
   public void testImportPDBPreservesChainMappings() throws IOException
   {
     AlignmentI importedAl = new jalview.io.FormatAdapter().readFile(
@@ -136,38 +136,38 @@ public class AAStructureBindingModelTest
     // ideally, we would match on the actual data for the 'File' handle for
     // pasted files,
     // see JAL-623 - pasting is still not correctly handled...
-    PDBEntry importedPDB = new PDBEntry("3A6S", "", Type.PDB,
-            "Paste");
+    PDBEntry importedPDB = new PDBEntry("3A6S", "", Type.PDB, "Paste");
     AAStructureBindingModel binder = new AAStructureBindingModel(
             new StructureSelectionManager(), new PDBEntry[]
             { importedPDB },
             new SequenceI[][]
             { importedAl.getSequencesArray() }, null)
     {
-      
+
       @Override
       public void updateColours(Object source)
       {
       }
-      
+
       @Override
       public void releaseReferences(Object svl)
       {
       }
-      
+
       @Override
       public String[] getStructureFiles()
       {
         return null;
       }
-      
+
       @Override
       public void highlightAtoms(List<AtomSpec> atoms)
       {
       }
-      
+
       @Override
-      public SequenceRenderer getSequenceRenderer(AlignmentViewPanel alignment)
+      public SequenceRenderer getSequenceRenderer(
+              AlignmentViewPanel alignment)
       {
         return null;
       }
@@ -198,6 +198,7 @@ public class AAStructureBindingModelTest
     assertEquals(chains[0][0], "A");
     assertEquals(chains[0][1], "B");
   }
+
   AAStructureBindingModel testee;
 
   AlignmentI al = null;
@@ -244,11 +245,11 @@ public class AAStructureBindingModelTest
    * @param pdbFiles
    * @param seqs
    * @param ssm
-   * @param alignPanel 
+   * @param alignPanel
    */
   protected AAStructureBindingModel newBindingModel(PDBEntry[] pdbFiles,
-          SequenceI[][] seqs,
-          StructureSelectionManager ssm, AlignmentViewPanel avp)
+          SequenceI[][] seqs, StructureSelectionManager ssm,
+          AlignmentViewPanel avp)
   {
     AAStructureBindingModel model = new AAStructureBindingModel(ssm,
             pdbFiles, seqs, null)
@@ -280,12 +281,10 @@ public class AAStructureBindingModelTest
       }
 
       @Override
-      public SequenceRenderer getSequenceRenderer(
-              AlignmentViewPanel avp)
+      public SequenceRenderer getSequenceRenderer(AlignmentViewPanel avp)
       {
         return avp == null ? null
-                : new jalview.gui.SequenceRenderer(
-                        avp.getAlignViewport());
+                : new jalview.gui.SequenceRenderer(avp.getAlignViewport());
       }
 
       @Override
@@ -332,10 +331,12 @@ public class AAStructureBindingModelTest
     /*
      * create a data bean to hold data per structure file
      */
-    AAStructureBindingModel.SuperposeData[] structs = new AAStructureBindingModel.SuperposeData[testee.getStructureFiles().length];
+    AAStructureBindingModel.SuperposeData[] structs = new AAStructureBindingModel.SuperposeData[testee
+            .getStructureFiles().length];
     for (int i = 0; i < structs.length; i++)
     {
-      structs[i] = new AAStructureBindingModel.SuperposeData(al.getWidth(), "0");
+      structs[i] = new AAStructureBindingModel.SuperposeData(al.getWidth(),
+              "0");
     }
     /*
      * initialise BitSet of 'superposable columns' to true (would be false for
@@ -347,8 +348,8 @@ public class AAStructureBindingModelTest
       matched.set(i);
     }
 
-    int refStructure = testee
-            .findSuperposableResidues(al, matched, structs);
+    int refStructure = testee.findSuperposableResidues(al, matched,
+            structs);
 
     assertEquals(refStructure, 0);
 
@@ -380,10 +381,12 @@ public class AAStructureBindingModelTest
   @Test(groups = { "Functional" })
   public void testFindSuperposableResidues_hiddenColumn()
   {
-    AAStructureBindingModel.SuperposeData[] structs = new AAStructureBindingModel.SuperposeData[al.getHeight()];
+    AAStructureBindingModel.SuperposeData[] structs = new AAStructureBindingModel.SuperposeData[al
+            .getHeight()];
     for (int i = 0; i < structs.length; i++)
     {
-      structs[i] = new AAStructureBindingModel.SuperposeData(al.getWidth(), "0");
+      structs[i] = new AAStructureBindingModel.SuperposeData(al.getWidth(),
+              "0");
     }
     /*
      * initialise BitSet of 'superposable columns' to true (would be false for
@@ -398,8 +401,8 @@ public class AAStructureBindingModelTest
     // treat column 5 of the alignment as hidden
     matched.clear(4);
 
-    int refStructure = testee
-            .findSuperposableResidues(al, matched, structs);
+    int refStructure = testee.findSuperposableResidues(al, matched,
+            structs);
 
     assertEquals(refStructure, 0);
 
@@ -437,7 +440,7 @@ public class AAStructureBindingModelTest
     pdbFiles[0] = new PDBEntry("PDB1", "A", Type.PDB, "seq1.pdb");
     pdbFiles[1] = new PDBEntry("PDB2", "B", Type.PDB, "seq2.pdb");
     StructureSelectionManager ssm = new StructureSelectionManager();
-  
+
     /*
      * map residues 1-10 to residues 21-30 (atoms 105-150) in structures
      */
@@ -463,7 +466,7 @@ public class AAStructureBindingModelTest
     Map<Object, AtomSpecModel> colours = binding.buildColoursMap(ssm, seqs,
             af.alignPanel);
     ChimeraCommands helper = new ChimeraCommands();
-    
+
     /*
      * M colour is #82827d (see strand.html help page)
      * sequence residue 1 mapped to structure residue 21
@@ -471,7 +474,8 @@ public class AAStructureBindingModelTest
     Color mColor = new Color(0x82827d);
     AtomSpecModel atomSpec = colours.get(mColor);
     assertNotNull(atomSpec);
-    assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), "#0:21.A|#1:21.B");
+    assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY),
+            "#0:21.A|#1:21.B");
 
     /*
      * H colour is #60609f, seq1.2 mapped to structure 0 residue 22
@@ -479,7 +483,8 @@ public class AAStructureBindingModelTest
     Color hColor = new Color(0x60609f);
     atomSpec = colours.get(hColor);
     assertNotNull(atomSpec);
-    assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), "#0:22.A");
+    assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY),
+            "#0:22.A");
 
     /*
      * V colour is #ffff00, seq2.2 mapped to structure 1 residue 22
@@ -487,7 +492,8 @@ public class AAStructureBindingModelTest
     Color vColor = new Color(0xffff00);
     atomSpec = colours.get(vColor);
     assertNotNull(atomSpec);
-    assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), "#1:22.B");
+    assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY),
+            "#1:22.B");
 
     /*
      * hidden columns are Gray (128, 128, 128)
@@ -496,7 +502,8 @@ public class AAStructureBindingModelTest
     Color gray = new Color(128, 128, 128);
     atomSpec = colours.get(gray);
     assertNotNull(atomSpec);
-    assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY), "#0:23-25.A|#1:23-25.B");
+    assertEquals(helper.getAtomSpec(atomSpec, AtomSpecType.RESIDUE_ONLY),
+            "#0:23-25.A|#1:23-25.B");
 
     /*
      * S and G are both coloured #4949b6, structure residues 26-30