X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAppJmol.java;h=f34045795285b3a1953fef129e4d9fac2190455b;hb=3a2a5c2d6ae1e0aeeced5d11d6f9ffd5fafaa147;hp=4a091b20f30b19e3ab34601f23250975daf88d36;hpb=31b00a6d85b8a1b4032f11f448911938004a5f6b;p=jalview.git diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index 4a091b2..f340457 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -33,6 +33,7 @@ import jalview.structure.*; import jalview.datamodel.PDBEntry; import jalview.io.*; import jalview.schemes.*; +import jalview.ws.ebi.EBIFetchClient; import org.jmol.api.*; import org.jmol.adapter.smarter.SmarterJmolAdapter; @@ -413,6 +414,7 @@ public synchronized void addSequence(SequenceI [] seq) public void seqColour_actionPerformed(ActionEvent actionEvent) { + lastCommand = null; colourBySequence = seqColour.isSelected(); colourBySequence(ap.alignFrame.alignPanel); } @@ -588,17 +590,13 @@ public synchronized void addSequence(SequenceI [] seq) resetLastRes.append(":" + chain); } - eval.append(";color gold;wireframe 100"); + eval.append(";wireframe 100;"+eval.toString()+".CA;"); - Color col = new Color(viewer.getAtomArgb(atomIndex)); + resetLastRes.append(";wireframe 0;"+resetLastRes.toString()+".CA;spacefill 0;"); - resetLastRes.append(";color[" - + col.getRed() + "," - + col.getGreen() + "," - + col.getBlue() + "];wireframe 0"); + eval.append("spacefill 200;select none"); viewer.evalStringQuiet(eval.toString()); - } public Color getColour(int atomIndex, int pdbResNum, String chain, String pdbfile) @@ -651,31 +649,33 @@ public synchronized void addSequence(SequenceI [] seq) StringBuffer command = new StringBuffer(); int lastPos = -1; - for (int s = 0; s < sequence.length; s++) + for (int sp,s = 0; s < sequence.length; s++) { for (int m = 0; m < mapping.length; m++) { - System.out.println(mapping[m].getSequence().getName()+" "+sequence[s].getName()+" " - +((mapping[m].getSequence() == sequence[s]) - +" "+(ap.av.alignment.findIndex(sequence[s])))); - - if (mapping[m].getSequence() == sequence[s] - && ap.av.alignment.findIndex(sequence[s])>-1) + if (mapping[m].getSequence() == sequence[s] + && (sp=ap.av.alignment.findIndex(sequence[s]))>-1) { - for (int r = 0; r < sequence[s].getLength(); r++) + SequenceI asp = ap.av.alignment.getSequenceAt(sp); + for (int r = 0; r < asp.getLength(); r++) { + // No mapping to gaps in sequence. + if (jalview.util.Comparison.isGap(asp.getCharAt(r))) + { + continue; + } int pos = mapping[m].getPDBResNum( - sequence[s].findPosition(r)); + asp.findPosition(r)); if (pos < 1 || pos==lastPos) continue; lastPos = pos; - Color col = sr.getResidueBoxColour(sequence[s], r); + Color col = sr.getResidueBoxColour(asp, r); if (showFeatures) - col = fr.findFeatureColour(col, sequence[s], r); + col = fr.findFeatureColour(col, asp, r); if (command.toString().endsWith(":" + mapping[m].getChain()+ ";color[" @@ -851,7 +851,8 @@ public synchronized void addSequence(SequenceI [] seq) if (chainId != null) picked+=(":"+chainId.substring(1, chainId.length())); - picked+=".C"; + picked+=".CA"; + if (!atomsPicked.contains(picked)) {