#include <GeometryMol.h>
Inheritance diagram for GeometryMol:
Public Methods | |
int | items (void) |
number of items in this object. More... | |
int | com_index (int i) |
direct access to the component ids. More... | |
int | obj_index (int i) |
direct access to the object ids. More... | |
float | value (void) |
most recent value. More... | |
int | has_value (void) |
do we have a useful value to print? More... | |
virtual float | calculate (void) |
recalculate the value of this geometry, and return it. More... | |
virtual void | set_pick (void) |
if so, call this command to set the variable(s). More... | |
GeometryMol (int, int *, int *, const int *cells, MoleculeList *mlist, CommandQueue *, Displayable *) | |
constructor: # items, molecule list to use, command queue for events. More... | |
virtual | ~GeometryMol (void) |
const char * | name (void) |
return the name of this geometry marker; by default, just blank. More... | |
const char * | unique_name (void) |
return 'unique' name of the marker, which should be different than other names for different markers of this same type. More... | |
int | ok (void) |
check whether the geometry value can still be calculated. More... | |
int | calculate_all (ResizeArray< float > &) |
calculate a list of items, if this object can do so. Return success. More... | |
void | update () |
redraw the label due to molecule rotations or changes in coordinates. More... | |
void | set_color (int c) |
set the color used to draw the label. More... | |
void | set_text_size (float size) |
set the size used for text labels. More... | |
void | set_text_thickness (float thick) |
set the line thickness used for text labels. More... | |
const float * | text_offset () const |
void | set_text_offset (const float offset[2]) |
const char * | text_format () const |
text format: the string to be printed for atom labels, with the following substitutions: R = resname r = resname in "camel case" (i.e. only first letter capitalized) d = resid a = atom name q = atom charge i = zero-based atom index. More... | |
void | set_text_format (const char *aFormat) |
Protected Methods | |
void | geom_set_name (void) |
set the name of this item. More... | |
void | sort_items (void) |
sort the elements in the list, so that the lowest atom index is first (but preserve the relative order, i.e. a-b-c or c-b-a). More... | |
Molecule * | check_mol (int m, int a) |
check whether the given molecule m & atom index a is OK if OK, return Molecule pointer; otherwise, return NULL. More... | |
Molecule * | transformed_atom_coord (int ind, float *) |
for the given pick point, find the TRANSFORMED coords for the given atom. return Molecule pointer if successful, NULL otherwise. More... | |
Molecule * | normal_atom_coord (int ind, float *) |
for the given Molecule, find the UNTRANSFORMED coords for the given atom. return Molecule pointer if successful, NULL otherwise. Also applies current periodic image for this coordinate. More... | |
void | display_line (float *, float *, VMDDisplayList *) |
draws a line between the two given points. More... | |
void | display_string (const char *, VMDDisplayList *) |
print given text at current valuePos position. More... | |
void | atom_full_name (char *buf, Molecule *mol, int ind) |
void | atom_short_name (char *buf, Molecule *mol, int ind) |
void | atom_formatted_name (JString &str, Molecule *mol, int ind) |
void | set_pick_selection (int, int, int *) |
methods for setting Tcl variables. More... | |
void | set_pick_selection () |
void | set_pick_value (double) |
virtual void | create_cmd_list ()=0 |
Protected Attributes | |
MoleculeList * | molList |
CommandQueue * | cmdqueue |
int | numItems |
number of components used to calculate geometry value. More... | |
int * | objIndex |
indices of objects containing the components. More... | |
int * | comIndex |
indices of the components. More... | |
int * | cellIndex |
unit cell IDs for the components. More... | |
float | geomValue |
most recent value. More... | |
int | hasValue |
do we have a useful value to print? More... | |
float | valuePos [3] |
location where to print value in the scene. More... | |
char * | gmName |
name of the molecule geometry monitor. More... | |
char * | uniquegmName |
unique name of the geometry monitor. More... | |
ResizeArray< GeometryMonitor * > | monitors |
int | my_color |
Definition at line 41 of file GeometryMol.h.
|
constructor: # items, molecule list to use, command queue for events.
Definition at line 52 of file GeometryMol.C. References ResizeArray< GeometryMonitor * >::append, cellIndex, cmdqueue, comIndex, geom_set_name, geomValue, gmName, hasValue, MoleculeList::mol_from_id, molList, monitors, my_color, n, NULL, numItems, objIndex, DrawMolecule::register_monitor, sort_items, and uniquegmName. |
|
Definition at line 108 of file GeometryMol.C. References cellIndex, comIndex, gmName, MoleculeList::mol_from_id, GeometryMonitor::molid, molList, monitors, ResizeArray< GeometryMonitor * >::num, objIndex, uniquegmName, and DrawMolecule::unregister_monitor. |
|
|
Definition at line 128 of file GeometryMol.C. References BaseMolecule::id. Referenced by geom_set_name. |
|
Definition at line 132 of file GeometryMol.C. References BaseMolecule::atom, BaseMolecule::atomNames, NameList< int >::name, MolAtom::nameindex, MolAtom::resid, MolAtom::resnameindex, and BaseMolecule::resNames. Referenced by geom_set_name. |
|
recalculate the value of this geometry, and return it.
Reimplemented in GeometryAngle. Definition at line 63 of file GeometryMol.h. Referenced by GeometryList::add_geometry, calculate_all, geom2dict, GeometryMonitor::notify, and text_cmd_label. |
|
calculate a list of items, if this object can do so. Return success.
Definition at line 426 of file GeometryMol.C. References ResizeArray::append, calculate, DrawMolecule::frame, has_value, items, MoleculeList::mol_from_id, molList, n, DrawMolecule::numframes, objIndex, and DrawMolecule::override_current_frame. Referenced by getvalues, and text_cmd_label. |
|
check whether the given molecule m & atom index a is OK if OK, return Molecule pointer; otherwise, return NULL.
Definition at line 322 of file GeometryMol.C. References MoleculeList::mol_from_id, molList, BaseMolecule::nAtoms, and NULL. Referenced by geom_set_name, normal_atom_coord, and ok. |
|
direct access to the component ids.
Definition at line 47 of file GeometryMol.h. References comIndex. |
|
Implemented in GeometryAngle. Referenced by update. |
|
draws a line between the two given points.
Definition at line 382 of file GeometryMol.C. References DispCmdLine::putdata. Referenced by GeometrySpring::create_cmd_list, GeometryDihedral::create_cmd_list, GeometryBond::create_cmd_list, and GeometryAngle::create_cmd_list. |
|
print given text at current valuePos position.
Definition at line 389 of file GeometryMol.C. References DispCmdText::putdata, and valuePos. Referenced by GeometrySpring::create_cmd_list, GeometryDihedral::create_cmd_list, GeometryBond::create_cmd_list, GeometryAtom::create_cmd_list, and GeometryAngle::create_cmd_list. |
|
set the name of this item.
Definition at line 250 of file GeometryMol.C. References atom_full_name, atom_short_name, cellIndex, check_mol, comIndex, gmName, items, objIndex, stringdup, and uniquegmName. Referenced by GeometryMol. |
|
do we have a useful value to print?
Definition at line 60 of file GeometryMol.h. References hasValue. Referenced by GeometryList::add_geometry, calculate_all, getvalues, and text_cmd_label. |
|
number of items in this object.
Definition at line 44 of file GeometryMol.h. References numItems. Referenced by calculate_all, dict2geom, geom2dict, geom_set_name, sort_items, and text_cmd_label. |
|
return the name of this geometry marker; by default, just blank.
Definition at line 398 of file GeometryMol.C. References gmName. Referenced by GeometryList::add_geometry, and unique_name. |
|
for the given Molecule, find the UNTRANSFORMED coords for the given atom. return Molecule pointer if successful, NULL otherwise. Also applies current periodic image for this coordinate.
Definition at line 356 of file GeometryMol.C. References cellIndex, check_mol, comIndex, DrawMolecule::current, Timestep::get_transform_from_cell, mat, Matrix4::multpoint3d, NULL, objIndex, and Timestep::pos. Referenced by GeometrySpring::calculate, GeometryDihedral::calculate, GeometryBond::calculate, GeometryAngle::calculate, and transformed_atom_coord. |
|
direct access to the object ids.
Definition at line 52 of file GeometryMol.h. References objIndex. |
|
check whether the geometry value can still be calculated.
Definition at line 411 of file GeometryMol.C. References check_mol, comIndex, numItems, and objIndex. Referenced by GeometryList::add_geometry, geom2dict, GeometryList::prepare, and text_cmd_label. |
|
set the color used to draw the label.
Definition at line 145 of file GeometryMol.h. References my_color, and update. Referenced by GeometryList::add_geometry. |
|
if so, call this command to set the variable(s).
Reimplemented in GeometryAngle. Definition at line 66 of file GeometryMol.h. Referenced by GeometryList::add_geometry. |
|
Definition at line 480 of file GeometryMol.C. References cmdqueue, and CommandQueue::runcommand. Referenced by GeometrySpring::set_pick, GeometryDihedral::set_pick, GeometryBond::set_pick, GeometryAtom::set_pick, and GeometryAngle::set_pick. |
|
methods for setting Tcl variables.
Definition at line 476 of file GeometryMol.C. References atoms, cmdqueue, num, and CommandQueue::runcommand. |
|
Definition at line 484 of file GeometryMol.C. References cmdqueue, and CommandQueue::runcommand. Referenced by GeometrySpring::set_pick, GeometryDihedral::set_pick, GeometryBond::set_pick, and GeometryAngle::set_pick. |
|
Definition at line 171 of file GeometryMol.h. References update. Referenced by GeometryList::setTextFormat. |
|
Definition at line 155 of file GeometryMol.h. References update. Referenced by GeometryList::setTextOffset. |
|
set the size used for text labels.
Definition at line 148 of file GeometryMol.h. Referenced by GeometryList::add_geometry, and GeometryList::setTextSize. |
|
set the line thickness used for text labels.
Definition at line 151 of file GeometryMol.h. References update. Referenced by GeometryList::add_geometry, and GeometryList::setTextThickness. |
|
sort the elements in the list, so that the lowest atom index is first (but preserve the relative order, i.e. a-b-c or c-b-a).
Definition at line 297 of file GeometryMol.C. References cellIndex, comIndex, items, and objIndex. Referenced by GeometryMol. |
|
text format: the string to be printed for atom labels, with the following substitutions: R = resname r = resname in "camel case" (i.e. only first letter capitalized) d = resid a = atom name q = atom charge i = zero-based atom index.
Definition at line 170 of file GeometryMol.h. Referenced by GeometryList::getTextFormat. |
|
Definition at line 153 of file GeometryMol.h. Referenced by GeometryList::getTextOffset. |
|
for the given pick point, find the TRANSFORMED coords for the given atom. return Molecule pointer if successful, NULL otherwise.
Definition at line 335 of file GeometryMol.C. References DrawMolecule::atom_displayed, comIndex, normal_atom_coord, NULL, and Displayable::tm. Referenced by GeometrySpring::create_cmd_list, GeometryDihedral::create_cmd_list, GeometryBond::create_cmd_list, GeometryAtom::create_cmd_list, and GeometryAngle::create_cmd_list. |
|
return 'unique' name of the marker, which should be different than other names for different markers of this same type.
Definition at line 405 of file GeometryMol.C. References name, and uniquegmName. Referenced by GeometryList::add_geometry. |
|
redraw the label due to molecule rotations or changes in coordinates.
Definition at line 142 of file GeometryMol.h. References create_cmd_list. Referenced by GeometryMonitor::notify, set_color, set_text_format, set_text_offset, set_text_size, and set_text_thickness. |
|
most recent value.
Definition at line 57 of file GeometryMol.h. References geomValue. |
|
unit cell IDs for the components.
Definition at line 75 of file GeometryMol.h. Referenced by geom_set_name, GeometryMol, normal_atom_coord, sort_items, and ~GeometryMol. |
|
Definition at line 70 of file GeometryMol.h. Referenced by GeometryMol, set_pick_selection, and set_pick_value. |
|
indices of the components.
Definition at line 74 of file GeometryMol.h. Referenced by com_index, GeometryAtom::create_cmd_list, geom_set_name, GeometryMol, normal_atom_coord, ok, GeometrySpring::prepare, GeometrySpring::set_pick, GeometryDihedral::set_pick, GeometryBond::set_pick, GeometryAtom::set_pick, GeometryAngle::set_pick, sort_items, transformed_atom_coord, and ~GeometryMol. |
|
most recent value.
Definition at line 76 of file GeometryMol.h. Referenced by GeometrySpring::calculate, GeometryDihedral::calculate, GeometryBond::calculate, GeometryAngle::calculate, GeometrySpring::create_cmd_list, GeometryDihedral::create_cmd_list, GeometryBond::create_cmd_list, GeometryAngle::create_cmd_list, GeometryMol, GeometrySpring::set_pick, GeometryDihedral::set_pick, GeometryBond::set_pick, GeometryAngle::set_pick, and value. |
|
name of the molecule geometry monitor.
Definition at line 79 of file GeometryMol.h. Referenced by geom_set_name, GeometryMol, name, and ~GeometryMol. |
|
do we have a useful value to print?
Definition at line 77 of file GeometryMol.h. Referenced by GeometryAtom::GeometryAtom, GeometryMol, and has_value. |
|
Definition at line 69 of file GeometryMol.h. Referenced by calculate_all, check_mol, GeometryMol, GeometrySpring::prepare, and ~GeometryMol. |
|
Definition at line 178 of file GeometryMol.h. Referenced by GeometryMol, and ~GeometryMol. |
|
Definition at line 179 of file GeometryMol.h. Referenced by GeometryDihedral::create_cmd_list, GeometryBond::create_cmd_list, GeometryAtom::create_cmd_list, GeometryAngle::create_cmd_list, GeometryMol, and set_color. |
|
number of components used to calculate geometry value.
Definition at line 72 of file GeometryMol.h. Referenced by GeometryMol, items, and ok. |
|
indices of objects containing the components.
Definition at line 73 of file GeometryMol.h. Referenced by calculate_all, geom_set_name, GeometryMol, normal_atom_coord, obj_index, ok, GeometrySpring::prepare, GeometrySpring::set_pick, GeometryDihedral::set_pick, GeometryBond::set_pick, GeometryAtom::set_pick, GeometryAngle::set_pick, sort_items, and ~GeometryMol. |
|
unique name of the geometry monitor.
Definition at line 80 of file GeometryMol.h. Referenced by geom_set_name, GeometryMol, unique_name, and ~GeometryMol. |
|
location where to print value in the scene.
Definition at line 78 of file GeometryMol.h. Referenced by GeometrySpring::create_cmd_list, GeometryDihedral::create_cmd_list, GeometryBond::create_cmd_list, GeometryAtom::create_cmd_list, GeometryAngle::create_cmd_list, and display_string. |