X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fext%2Fedu%2Fucsf%2Frbvi%2Fstrucviz2%2FChimUtils.java;fp=src%2Fext%2Fedu%2Fucsf%2Frbvi%2Fstrucviz2%2FChimUtils.java;h=1b0285cf5d9352cd350b76fe430d636cdb0c49ec;hb=3459a8a691cb22508d7067f240b7254e588e77d3;hp=6b5e36cb868f64d5f4da0f2c1d5b8d787ea46711;hpb=5b27f1062b2203c4c31702e205f4c78e1992063e;p=jalview.git diff --git a/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java b/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java index 6b5e36c..1b0285c 100644 --- a/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java +++ b/src/ext/edu/ucsf/rbvi/strucviz2/ChimUtils.java @@ -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 models = chimeraManager.getChimeraModels( - modelID, ModelType.PDB_MODEL); + List 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");