git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8c29d4d
)
JAL-3551 tidying, improved commands, fix Jmol model number derivation
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Mon, 16 Mar 2020 13:47:34 +0000
(13:47 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Mon, 16 Mar 2020 13:47:34 +0000
(13:47 +0000)
src/jalview/ext/jmol/JalviewJmolBinding.java
patch
|
blob
|
history
src/jalview/ext/rbvi/chimera/ChimeraCommands.java
patch
|
blob
|
history
src/jalview/ext/rbvi/chimera/ChimeraXCommands.java
patch
|
blob
|
history
src/jalview/gui/ChimeraXViewFrame.java
patch
|
blob
|
history
src/jalview/gui/PymolViewer.java
patch
|
blob
|
history
src/jalview/structure/StructureCommandsI.java
patch
|
blob
|
history
src/jalview/structures/models/AAStructureBindingModel.java
patch
|
blob
|
history
diff --git
a/src/jalview/ext/jmol/JalviewJmolBinding.java
b/src/jalview/ext/jmol/JalviewJmolBinding.java
index
844fb1b
..
4c19f6e
100644
(file)
--- a/
src/jalview/ext/jmol/JalviewJmolBinding.java
+++ b/
src/jalview/ext/jmol/JalviewJmolBinding.java
@@
-957,7
+957,7
@@
public abstract class JalviewJmolBinding extends AAStructureBindingModel
{
if (modelFileNames[i].equalsIgnoreCase(pdbFile))
{
{
if (modelFileNames[i].equalsIgnoreCase(pdbFile))
{
- return String.valueOf(i);
+ return String.valueOf(i + 1);
}
}
return "";
}
}
return "";
diff --git
a/src/jalview/ext/rbvi/chimera/ChimeraCommands.java
b/src/jalview/ext/rbvi/chimera/ChimeraCommands.java
index
7e04f39
..
c355abe
100644
(file)
--- a/
src/jalview/ext/rbvi/chimera/ChimeraCommands.java
+++ b/
src/jalview/ext/rbvi/chimera/ChimeraCommands.java
@@
-52,12
+52,13
@@
import java.util.Map;
*/
public class ChimeraCommands extends StructureCommandsBase
{
*/
public class ChimeraCommands extends StructureCommandsBase
{
- private static final StructureCommand SHOW_BACKBONE = new StructureCommand("~display all;chain @CA|P");
+ private static final StructureCommand SHOW_BACKBONE = new StructureCommand(
+ "~display all;~ribbon;chain @CA|P");
public static final String NAMESPACE_PREFIX = "jv_";
private static final StructureCommandI COLOUR_BY_CHARGE = new StructureCommand(
public static final String NAMESPACE_PREFIX = "jv_";
private static final StructureCommandI COLOUR_BY_CHARGE = new StructureCommand(
- "color white;color red ::ASP;color red ::GLU;color blue ::LYS;color blue ::ARG;color yellow ::CYS");
+ "color white;color red ::ASP,GLU;color blue ::LYS,ARG;color yellow ::CYS");
private static final StructureCommandI COLOUR_BY_CHAIN = new StructureCommand(
"rainbow chain");
private static final StructureCommandI COLOUR_BY_CHAIN = new StructureCommand(
"rainbow chain");
@@
-508,25
+509,27
@@
public class ChimeraCommands extends StructureCommandsBase
}
@Override
}
@Override
- public List<StructureCommandI> superposeStructures(AtomSpecModel spec,
- AtomSpecModel ref)
+ public List<StructureCommandI> superposeStructures(AtomSpecModel ref,
+ AtomSpecModel spec)
{
/*
* Form Chimera match command to match spec to ref
{
/*
* Form Chimera match command to match spec to ref
+ * (the first set of atoms are moved on to the second)
*
* match #1:1-30.B,81-100.B@CA #0:21-40.A,61-90.A@CA
*
*
* match #1:1-30.B,81-100.B@CA #0:21-40.A,61-90.A@CA
*
- * @see
- * https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/match.html
+ * @see https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/match.html
*/
StringBuilder cmd = new StringBuilder();
*/
StringBuilder cmd = new StringBuilder();
- String atomSpec = getAtomSpec(spec, true);
- String refSpec = getAtomSpec(ref, true);
- cmd.append("match ").append(atomSpec).append(" ").append(refSpec);
+ String atomSpecAlphaOnly = getAtomSpec(spec, true);
+ String refSpecAlphaOnly = getAtomSpec(ref, true);
+ cmd.append("match ").append(atomSpecAlphaOnly).append(" ").append(refSpecAlphaOnly);
/*
* show superposed residues as ribbon
*/
/*
* show superposed residues as ribbon
*/
+ String atomSpec = getAtomSpec(spec, false);
+ String refSpec = getAtomSpec(ref, false);
cmd.append("; ribbon ");
cmd.append(atomSpec).append("|").append(refSpec).append("; focus");
cmd.append("; ribbon ");
cmd.append(atomSpec).append("|").append(refSpec).append("; focus");
@@
-621,7
+624,8
@@
public class ChimeraCommands extends StructureCommandsBase
* restrict to alpha carbon, no alternative locations
* (needed to ensuring matching atom counts for superposition)
*/
* restrict to alpha carbon, no alternative locations
* (needed to ensuring matching atom counts for superposition)
*/
- sb.append("@CA|P").append(NO_ALTLOCS);
+ // TODO @P instead if RNA - add nucleotide flag to AtomSpecModel?
+ sb.append("@CA").append(NO_ALTLOCS);
}
}
}
}
diff --git
a/src/jalview/ext/rbvi/chimera/ChimeraXCommands.java
b/src/jalview/ext/rbvi/chimera/ChimeraXCommands.java
index
9636a6a
..
3341199
100644
(file)
--- a/
src/jalview/ext/rbvi/chimera/ChimeraXCommands.java
+++ b/
src/jalview/ext/rbvi/chimera/ChimeraXCommands.java
@@
-35,7
+35,7
@@
import java.util.List;
public class ChimeraXCommands extends ChimeraCommands
{
private static final StructureCommand SHOW_BACKBONE = new StructureCommand(
public class ChimeraXCommands extends ChimeraCommands
{
private static final StructureCommand SHOW_BACKBONE = new StructureCommand(
- "~display all;show @CA|P pbonds");
+ "~display all;~ribbon;show @CA|P atoms");
private static final StructureCommand FOCUS_VIEW = new StructureCommand(
"view");
private static final StructureCommand FOCUS_VIEW = new StructureCommand(
"view");
@@
-150,7
+150,8
@@
public class ChimeraXCommands extends ChimeraCommands
appendModel(sb, model, atomSpec);
if (alphaOnly)
{
appendModel(sb, model, atomSpec);
if (alphaOnly)
{
- sb.append("@CA|P");
+ // TODO @P if RNA - add nucleotide flag to AtomSpecModel?
+ sb.append("@CA");
}
// todo: is there ChimeraX syntax to exclude altlocs?
}
}
// todo: is there ChimeraX syntax to exclude altlocs?
}
@@
-195,16
+196,15
@@
public class ChimeraXCommands extends ChimeraCommands
}
@Override
}
@Override
- public List<StructureCommandI> superposeStructures(AtomSpecModel spec,
- AtomSpecModel ref)
+ public List<StructureCommandI> superposeStructures(AtomSpecModel ref,
+ AtomSpecModel spec)
{
/*
* Form ChimeraX match command to match spec to ref
*
* match #1/A:2-94 toAtoms #2/A:1-93
*
{
/*
* Form ChimeraX match command to match spec to ref
*
* match #1/A:2-94 toAtoms #2/A:1-93
*
- * @see
- * https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/match.html
+ * @see https://www.cgl.ucsf.edu/chimerax/docs/user/commands/align.html
*/
StringBuilder cmd = new StringBuilder();
String atomSpec = getAtomSpec(spec, true);
*/
StringBuilder cmd = new StringBuilder();
String atomSpec = getAtomSpec(spec, true);
diff --git
a/src/jalview/gui/ChimeraXViewFrame.java
b/src/jalview/gui/ChimeraXViewFrame.java
index
b33ccd6
..
56b2fe1
100644
(file)
--- a/
src/jalview/gui/ChimeraXViewFrame.java
+++ b/
src/jalview/gui/ChimeraXViewFrame.java
@@
-47,4
+47,12
@@
public class ChimeraXViewFrame extends ChimeraViewFrame
ap.getStructureSelectionManager(), pdbentrys, seqs, null);
}
ap.getStructureSelectionManager(), pdbentrys, seqs, null);
}
+ @Override
+ protected void initMenus()
+ {
+ super.initMenus();
+
+ viewerActionMenu.setText("ChimeraX");
+ }
+
}
}
diff --git
a/src/jalview/gui/PymolViewer.java
b/src/jalview/gui/PymolViewer.java
index
09451be
..
8f7f2c1
100644
(file)
--- a/
src/jalview/gui/PymolViewer.java
+++ b/
src/jalview/gui/PymolViewer.java
@@
-73,6
+73,8
@@
public class PymolViewer extends StructureViewerBase
binding.setColourBySequence(true);
setSize(myWidth, myHeight);
initMenus();
binding.setColourBySequence(true);
setSize(myWidth, myHeight);
initMenus();
+ viewerActionMenu.setText("PyMOL");
+ updateTitleAndMenus();
addingStructures = false;
worker = new Thread(this);
addingStructures = false;
worker = new Thread(this);
diff --git
a/src/jalview/structure/StructureCommandsI.java
b/src/jalview/structure/StructureCommandsI.java
index
0934488
..
8725b3d
100644
(file)
--- a/
src/jalview/structure/StructureCommandsI.java
+++ b/
src/jalview/structure/StructureCommandsI.java
@@
-97,9
+97,9
@@
public interface StructureCommandsI
/**
* Returns a command to superpose structures by closest positioning of
/**
* Returns a command to superpose structures by closest positioning of
- * residues in {@code atomSpec} to the corresponding residues in {@ refAtoms}.
- * If wanted, this may include commands to visually highlight the residues
- * that were used for the superposition.
+ * residues in {@code atomSpec} to the corresponding residues in
+ * {@code refAtoms}. If wanted, this may include commands to visually
+ * highlight the residues that were used for the superposition.
*
* @param refAtoms
* @param atomSpec
*
* @param refAtoms
* @param atomSpec
diff --git
a/src/jalview/structures/models/AAStructureBindingModel.java
b/src/jalview/structures/models/AAStructureBindingModel.java
index
8d8957c
..
db523f9
100644
(file)
--- a/
src/jalview/structures/models/AAStructureBindingModel.java
+++ b/
src/jalview/structures/models/AAStructureBindingModel.java
@@
-913,8
+913,7
@@
public abstract class AAStructureBindingModel
{
AtomSpecModel atomSpec = getAtomSpec(structures[i], matched);
List<StructureCommandI> commands = commandGenerator
{
AtomSpecModel atomSpec = getAtomSpec(structures[i], matched);
List<StructureCommandI> commands = commandGenerator
- .superposeStructures(refAtoms,
- atomSpec);
+ .superposeStructures(refAtoms, atomSpec);
List<String> replies = executeCommands(commands, true, null);
for (String reply : replies)
{
List<String> replies = executeCommands(commands, true, null);
for (String reply : replies)
{