{
if (modelFileNames[i].equalsIgnoreCase(pdbFile))
{
- return String.valueOf(i);
+ return String.valueOf(i + 1);
}
}
return "";
*/
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(
- "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");
}
@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
+ * (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
*
- * @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();
- 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
*/
+ String atomSpec = getAtomSpec(spec, false);
+ String refSpec = getAtomSpec(ref, false);
cmd.append("; ribbon ");
cmd.append(atomSpec).append("|").append(refSpec).append("; focus");
* 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);
}
}
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");
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?
}
}
@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
*
- * @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);
ap.getStructureSelectionManager(), pdbentrys, seqs, null);
}
+ @Override
+ protected void initMenus()
+ {
+ super.initMenus();
+
+ viewerActionMenu.setText("ChimeraX");
+ }
+
}
binding.setColourBySequence(true);
setSize(myWidth, myHeight);
initMenus();
+ viewerActionMenu.setText("PyMOL");
+ updateTitleAndMenus();
addingStructures = false;
worker = new Thread(this);
/**
* 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
{
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)
{