X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Frbvi%2Fchimera%2FJalviewChimeraBinding.java;h=98f2e1a7a7c406ed418b8665e234643a97823ba1;hb=85937698cb3a6d1fb8be1cfa7a1677e632da7be9;hp=543cad40d7d76de4dbc7bbd3c8077bd7791994c7;hpb=2150df780eddbdf72013d29ee8eabb0f235c7bb4;p=jalview.git diff --git a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java index 543cad4..98f2e1a 100644 --- a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java +++ b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java @@ -53,6 +53,8 @@ import jalview.util.MessageManager; public abstract class JalviewChimeraBinding extends AAStructureBindingModel { + // Chimera clause to exclude alternate locations in atom selection + private static final String NO_ALTLOCS = "&~@.B-Z&~@.2-9"; private static final boolean debug = false; @@ -625,9 +627,12 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel // TODO: handle sub-models command.append(selcom[pdbfnum]); command.append("@" + atomSpec[pdbfnum]); + // JAL-1757 exclude alternative CA locations + command.append(NO_ALTLOCS); command.append(" #" + refStructure /* +".1" */); command.append(selcom[refStructure]); command.append("@" + atomSpec[refStructure]); + command.append(NO_ALTLOCS); } if (selectioncom.length() > 0) { @@ -1018,23 +1023,16 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel return; } - int index; - Color col; // Chimera expects RBG values in the range 0-1 final double normalise = 255D; viewerCommandHistory(false); - // TODO: Switch between nucleotide or aa selection expressions StringBuilder command = new StringBuilder(128); - command.append("color white;"); - for (String res : ResidueProperties.aa3Hash.keySet()) - { - index = ResidueProperties.aa3Hash.get(res).intValue(); - if (index > 20) - { - continue; - } - col = cs.findColour(ResidueProperties.aa[index].charAt(0)); + List residueSet = ResidueProperties.getResidues(isNucleotide(), + false); + for (String res : residueSet) + { + Color col = cs.findColour(res.charAt(0)); command.append("color " + col.getRed() / normalise + "," + col.getGreen() / normalise + "," + col.getBlue() / normalise + " ::" + res + ";");