Merge branch 'features/JAL-4071_visibleFeaturesCounter' into features/JAL-3417_sdppre...
[jalview.git] / src / ext / edu / ucsf / rbvi / strucviz2 / ChimUtils.java
index 6b5e36c..1b0285c 100644 (file)
@@ -36,6 +36,7 @@ import java.awt.Color;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import org.slf4j.Logger;
@@ -75,8 +76,8 @@ public abstract class ChimUtils
     {
       if (decimal > 0)
       {
-        subModelNumber = Integer.parseInt(inputLine.substring(decimal
-                + hash + 2, space));
+        subModelNumber = Integer
+                .parseInt(inputLine.substring(decimal + hash + 2, space));
         space = decimal + hash + 1;
       }
       modelNumber = Integer.parseInt(inputLine.substring(hash + 1, space));
@@ -119,8 +120,8 @@ public abstract class ChimUtils
     {
       if (decimal > 0)
       {
-        subModelNumber = Integer.parseInt(inputLine.substring(decimal
-                + hash + 2, space));
+        subModelNumber = Integer
+                .parseInt(inputLine.substring(decimal + hash + 2, space));
         space = decimal + hash + 1;
       }
       modelNumber = Integer.parseInt(inputLine.substring(hash + 1, space));
@@ -327,11 +328,11 @@ public abstract class ChimUtils
     String resType = "";
     if (split.length == 2)
     {
-      resType = split[0].trim().toUpperCase();
+      resType = split[0].trim().toUpperCase(Locale.ROOT);
     }
     else if (split.length == 3)
     {
-      resType = split[1].trim().toUpperCase();
+      resType = split[1].trim().toUpperCase(Locale.ROOT);
     }
     if (resType.equalsIgnoreCase("HOH") || resType.equalsIgnoreCase("WAT"))
     {
@@ -621,8 +622,8 @@ public abstract class ChimUtils
         {
           try
           {
-            chimeraModel = chimeraManager.getChimeraModel(
-                    Integer.valueOf(model), 0);
+            chimeraModel = chimeraManager
+                    .getChimeraModel(Integer.valueOf(model), 0);
           } catch (NumberFormatException ex)
           {
             // ignore
@@ -698,8 +699,8 @@ public abstract class ChimUtils
       if (modelIDNoResChain[0] != null)
       {
         String modelID = modelIDNoResChain[0];
-        List<ChimeraModel> models = chimeraManager.getChimeraModels(
-                modelID, ModelType.PDB_MODEL);
+        List<ChimeraModel> models = chimeraManager.getChimeraModels(modelID,
+                ModelType.PDB_MODEL);
         if (models.size() == 1)
         { // usual case with only one model
           chimeraModel = models.get(0);
@@ -728,8 +729,8 @@ public abstract class ChimUtils
           // TODO: [Optional] What is this doing?
           try
           {
-            chimeraModel = chimeraManager.getChimeraModel(
-                    Integer.valueOf(modelID), 0);
+            chimeraModel = chimeraManager
+                    .getChimeraModel(Integer.valueOf(modelID), 0);
           } catch (NumberFormatException ex)
           {
             // ignore
@@ -768,8 +769,8 @@ public abstract class ChimUtils
         }
         else if (chimeraModel.getChainCount() == 1)
         {
-          chimeraResidue = chimeraModel.getResidue(chimeraModel
-                  .getChainNames().iterator().next(), residue);
+          chimeraResidue = chimeraModel.getResidue(
+                  chimeraModel.getChainNames().iterator().next(), residue);
         }
         // System.out.println("ChimeraResidue = " + chimeraResidue);
       }
@@ -945,7 +946,8 @@ public abstract class ChimUtils
     aaNames.put("LYS", "K Lys Lysine N[C@](CCCCN)([H])C(O)=O");
     aaNames.put("DLY", "K Dly D-Lysine NCCCC[C@@H](N)C(O)=O");
     aaNames.put("MET", "M Met Methionine N[C@](CCSC)([H])C(O)=O");
-    aaNames.put("PHE", "F Phe Phenylalanine N[C@](CC1=CC=CC=C1)([H])C(O)=O");
+    aaNames.put("PHE",
+            "F Phe Phenylalanine N[C@](CC1=CC=CC=C1)([H])C(O)=O");
     aaNames.put("PRO", "P Pro Proline OC([C@@]1([H])NCCC1)=O");
     aaNames.put("SER", "S Ser Serine OC[C@](C(O)=O)([H])N");
     aaNames.put("THR", "T Thr Threonine O[C@H](C)[C@](C(O)=O)([H])N");