Author: scooter
Date: 2010-12-29 17:33:13 -0800 (Wed, 29 Dec 2010)
New Revision: 23279
Modified:
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/actions/Chimera.java
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/model/ChimeraModel.java
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/ModelNavigatorDialog.java
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/StructureVizMenuListener.java
Log:
Added find hbond and other fixes. Checkin before fixing sub-models
Modified:
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/actions/Chimera.java
===================================================================
---
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/actions/Chimera.java
2010-12-29 23:45:05 UTC (rev 23278)
+++
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/actions/Chimera.java
2010-12-30 01:33:13 UTC (rev 23279)
@@ -264,8 +264,10 @@
*/
public void clearSelectionList() {
for (ChimeraStructuralObject cso: selectionList) {
- cso.setSelected(false);
+ if (cso != null)
+ cso.setSelected(false);
}
+ selectionList.clear();
}
/**
@@ -390,6 +392,7 @@
public void close(Structure structure) {
float model = structure.modelNumber();
chimeraSend("listen stop models; listen stop select; close
#"+model);
+ System.out.println("listen stop models; listen stop select;
close #"+model);
ChimeraModel chimeraModel = (ChimeraModel)modelHash.get(new
Float(model));
if (chimeraModel != null) {
@@ -572,6 +575,7 @@
for (ChimeraResidue
res: selectedChain.getResidues()) {
String
residueIndex = res.getIndex();
ChimeraResidue
residue = dataChain.getResidue(residueIndex);
+ if (residue ==
null) continue;
selectionList.add(residue);
residue.setSelected(true);
} // resIter.hasNext
Modified:
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/model/ChimeraModel.java
===================================================================
---
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/model/ChimeraModel.java
2010-12-29 23:45:05 UTC (rev 23278)
+++
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/model/ChimeraModel.java
2010-12-30 01:33:13 UTC (rev 23279)
@@ -54,7 +54,8 @@
public class ChimeraModel implements ChimeraStructuralObject {
private String name; // The name of this
model
- private float identifier; // The model number
+ private int modelNumber; // The model number
+ private int subModelNumber; // The sub-model number
private TreeMap<String,ChimeraChain> chains; // The list of
chains
private TreeMap<String,ChimeraResidue> residues; // The list of
residues
private HashMap<String,ChimeraResidue> residueMap; // A map of
residue names and residues
@@ -72,8 +73,10 @@
*/
public ChimeraModel (String name, Structure structure, Color color) {
this.name = name;
- if (structure != null)
- this.identifier = structure.modelNumber();
+ if (structure != null) {
+ this.modelNumber = structure.modelNumber();
+ this.subModelNumber = structure.subModelNumber();
+ }
this.chains = new TreeMap();
this.residues = new TreeMap();
this.residueMap = new HashMap();
Modified:
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/ModelNavigatorDialog.java
===================================================================
---
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/ModelNavigatorDialog.java
2010-12-29 23:45:05 UTC (rev 23278)
+++
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/ModelNavigatorDialog.java
2010-12-30 01:33:13 UTC (rev 23279)
@@ -88,6 +88,7 @@
private static final int ALIGNBYMODEL = 14;
private static final int ALIGNBYCHAIN = 15;
private static final int FINDCLASH = 16;
+ private static final int FINDHBOND = 17;
private boolean ignoreSelection = false;
private int residueDisplay = ChimeraResidue.THREE_LETTER;
private boolean isCollapsing = false;
@@ -156,6 +157,8 @@
// Get the path we are expanding
DefaultMutableTreeNode node =
(DefaultMutableTreeNode)ePath.getLastPathComponent();
+ if (!(node.getUserObject() instanceof ChimeraStructuralObject))
+ return;
ChimeraStructuralObject nodeInfo =
(ChimeraStructuralObject)node.getUserObject();
// Check and see if our object is selected
@@ -382,7 +385,7 @@
// Chimera menu
JMenu chimeraMenu = new JMenu("Chimera");
- alignMenu = new JMenu("Align Structures");
+ alignMenu = new JMenu("Align structures");
{
// Should this be "model vs. model", "chain vs. chain",
and "chain vs. model"?
addMenuItem(alignMenu, "by model", ALIGNBYMODEL, null);
@@ -401,12 +404,16 @@
alignMenu.setEnabled(false);
chimeraMenu.add(alignMenu);
- JMenu clashMenu = new JMenu("Clash Detection");
- addMenuItem(clashMenu, "Find Clashes", FINDCLASH, "findclash
sel continuous true");
- // addMenuItem(clashMenu, "Find Clashes", FINDCLASH, "findclash
sel");
- addMenuItem(clashMenu, "Clear Clash", COMMAND, "~findclash");
+ JMenu clashMenu = new JMenu("Clash detection");
+ addMenuItem(clashMenu, "Find clashes", FINDCLASH, "findclash
sel continuous true");
+ addMenuItem(clashMenu, "Clear clashes", COMMAND, "~findclash");
chimeraMenu.add(clashMenu);
+ JMenu hBondMenu = new JMenu("Hydrogen bond detection");
+ addMenuItem(hBondMenu, "Find hydrogen bonds", FINDHBOND,
"findhbond sel any");
+ addMenuItem(hBondMenu, "Clear hydrogen bonds", COMMAND,
"~findhbond");
+ chimeraMenu.add(hBondMenu);
+
JMenu presetMenu = new JMenu("Presets");
if (buildPresetMenu(presetMenu))
chimeraMenu.add(presetMenu);
@@ -432,11 +439,11 @@
// Select menu
JMenu selectMenu = new JMenu("Select");
addMenuItem(selectMenu, "Protein", COMMAND, "select protein");
- addMenuItem(selectMenu, "Nucleic Acid", COMMAND, "select
nucleic acid");
+ addMenuItem(selectMenu, "Nucleic acid", COMMAND, "select
nucleic acid");
addMenuItem(selectMenu, "Ligand", COMMAND, "select ligand");
addMenuItem(selectMenu, "Ions", COMMAND, "select ions");
addMenuItem(selectMenu, "Solvent", COMMAND, "select solvent");
- JMenu secondaryMenu = new JMenu("Secondary Structure");
+ JMenu secondaryMenu = new JMenu("Secondary structure");
addMenuItem(secondaryMenu, "Helix", COMMAND, "select helix");
addMenuItem(secondaryMenu, "Strand", COMMAND, "select strand");
addMenuItem(secondaryMenu, "Turn", COMMAND, "select turn");
@@ -567,9 +574,16 @@
if (selectedObjects.size() > 0) {
chimeraObject.select(command);
} else {
- JOptionPane.showMessageDialog(dialog,
"You must select something to find classes",
+ JOptionPane.showMessageDialog(dialog,
"You must select something to find clashes",
"Nothing
Selected", JOptionPane.ERROR_MESSAGE);
}
+ } else if (type == FINDHBOND) {
+ if (selectedObjects.size() > 0) {
+ chimeraObject.select(command);
+ } else {
+ JOptionPane.showMessageDialog(dialog,
"You must select something to find hydrogen bonds",
+ "Nothing
Selected", JOptionPane.ERROR_MESSAGE);
+ }
} else {
residueDisplay = type;
treeModel.setResidueDisplay(type);
Modified:
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/StructureVizMenuListener.java
===================================================================
---
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/StructureVizMenuListener.java
2010-12-29 23:45:05 UTC (rev 23278)
+++
csplugins/trunk/ucsf/scooter/structureViz/src/structureViz/ui/StructureVizMenuListener.java
2010-12-30 01:33:13 UTC (rev 23279)
@@ -124,7 +124,6 @@
{
if (overNode != null) {
String residueList =
CyChimera.getResidueList((CyNode)overNode.getNode());
- logger.debug("Found residueList: "+residueList);
if (residueList != null) {
// Get the structures for this node
List<Structure>structures =
CyChimera.getSelectedStructures(overNode, true);
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.