#include <DrawMolecule.h>
Inheritance diagram for DrawMolecule:

Public Methods | |
| DrawMolecule (VMDApp *, Displayable *) | |
| constructor ... pass in a VMDApp * and a parent displayable. More... | |
| virtual | ~DrawMolecule () |
| int | atom_displayed (int) |
| return whether the Nth atom is displayed. This is true if ANY representation is displaying the given atom. More... | |
| int | components (void) |
| total number of components. More... | |
| DrawMolItem * | component (int) |
| return Nth component ... change to proper return type. More... | |
| DrawMolItem * | component_from_pickable (const Pickable *) |
| return the component that matches the given Pickable, or NULL if no match. More... | |
| int | get_component_by_name (const char *) |
| retrieve the index of the component with the given name. Returns -1 on failure. More... | |
| const char * | get_component_name (int) |
| Get the name of the given component. Names are initially "repN", where N starts at 0 and increases each time a rep is created. Return NULL if the index is invalid. More... | |
| int | del_rep (int) |
| delete the Nth representation ... return success. More... | |
| void | add_rep (AtomColor *, AtomRep *, AtomSel *, const Material *) |
| Add a new representation (component). This always succeeds, since all parameters must have already been verified as valid. The rep takes over ownership of the parameter objects (except Material). More... | |
| int | change_rep (int, AtomColor *, AtomRep *, const char *sel) |
| change the Nth representation ... return success. if any object is NULL, that characteristic is not changed. More... | |
| int | show_rep (int repid, int onoff) |
| turn the Nth representation on or off. Return success. More... | |
| void | force_recalc (int) |
| force a recalc of all representations For MOL_REGEN, this also invalidates the value of cov and scale_factor,. More... | |
| void | change_pbc () |
| Tell reps that the periodic image parameters have been changed. More... | |
| void | change_ts () |
| Tell reps that the currently displayed timestep has changed. More... | |
| int | highlighted_rep () const |
| Return the highlighted rep for this molecule. Returns -1 if there is no such rep. More... | |
| int | numframes () const |
| number of frames in the files associatd with the molecule. More... | |
| int | frame () const |
| index of current frame. More... | |
| void | override_current_frame (int frame) |
| change current frame without firing callbacks. More... | |
| Timestep * | current () |
| get the current frame. More... | |
| Timestep * | get_frame (int n) |
| get the specifed frame. More... | |
| Timestep * | get_last_frame () |
| get the last frame. More... | |
| void | delete_frame (int n) |
| delete the nth frame. More... | |
| void | append_frame (Timestep *) |
| append the given frame. More... | |
| void | duplicate_frame (const Timestep *) |
| duplicate the given frame passing NULL adds a 'null' frame (i.e. all zeros). More... | |
| float | scale_factor () |
| scaling factor required to make the molecule fit within (-1 ... 1). More... | |
| int | cov (float &, float &, float &) |
| center of volume of this molecule. Return success. Fails if there aren't any coordinates, graphics, or volumetric data sets to compute the cov from. More... | |
| int | recalc_bonds (void) |
| recalculate bonds via distance bond search based on current timestep. More... | |
| int | need_secondary_structure (int) |
| request ss calculation. Return success. More... | |
| void | invalidate_ss () |
| invalidate current secondary structure when structure is changed. More... | |
| int | recalc_ss () |
| recalculate the secondary structure using current coordinates Return success. More... | |
| MoleculeGraphics * | moleculeGraphics () const |
| virtual void | prepare () |
| specific preparations, called by draw_prepare, supplied by derived class. More... | |
| void | register_monitor (DrawMoleculeMonitor *) |
| register monitors. More... | |
| void | unregister_monitor (DrawMoleculeMonitor *) |
| unregister monitors. More... | |
| void | notify () |
Public Attributes | |
| int | active |
| is this molecule active? Used by MoleculeList. More... | |
Protected Attributes | |
| VMDApp * | app |
Definition at line 50 of file DrawMolecule.h.
|
||||||||||||
|
constructor ... pass in a VMDApp * and a parent displayable.
Definition at line 47 of file DrawMolecule.C. References active, PickList::add_pickable, BaseMolecule::need_find_bonds, and VMDApp::pickList. |
|
|
Definition at line 66 of file DrawMolecule.C. References app, component, components, ResizeArray< Timestep * >::num, VMDApp::pickList, ResizeArray< Timestep * >::remove, and PickList::remove_pickable. |
|
||||||||||||||||||||
|
Add a new representation (component). This always succeeds, since all parameters must have already been verified as valid. The rep takes over ownership of the parameter objects (except Material).
Definition at line 131 of file DrawMolecule.C. References PickList::add_pickable, app, ResizeArray< DrawMolItem * >::append, Displayable::change_material, and VMDApp::pickList. Referenced by MoleculeList::add_rep. |
|
|
append the given frame.
Definition at line 271 of file DrawMolecule.C. References app, ResizeArray< Timestep * >::append, change_ts, VMDApp::commandQueue, BaseMolecule::need_find_bonds, ResizeArray< Timestep * >::num, override_current_frame, CommandQueue::runcommand, VMDApp::scene_resetview_newmoldata, and vmd_bond_search. Referenced by IMDMgr::check_event, cmd_rawtimestep, duplicate_frame, and CoorPluginData::next. |
|
|
return whether the Nth atom is displayed. This is true if ANY representation is displaying the given atom.
Definition at line 106 of file DrawMolecule.C. References components, Displayable::displayed, and BaseMolecule::nAtoms. Referenced by GeometryMol::transformed_atom_coord. |
|
|
Tell reps that the periodic image parameters have been changed.
Definition at line 190 of file DrawMolecule.C. References DrawMolItem::change_pbc, component, components, and notify. |
|
||||||||||||||||||||
|
change the Nth representation ... return success. if any object is NULL, that characteristic is not changed.
Definition at line 156 of file DrawMolecule.C. References DrawMolItem::change_color, DrawMolItem::change_rep, DrawMolItem::change_sel, and component. Referenced by MoleculeList::change_rep, MoleculeList::change_repcolor, MoleculeList::change_repmethod, and MoleculeList::change_repsel. |
|
|
Tell reps that the currently displayed timestep has changed.
Definition at line 202 of file DrawMolecule.C. References app, DrawMolItem::change_ts, VMDApp::commandQueue, component, components, BaseMolecule::id, notify, DrawForce::prepare, MoleculeGraphics::prepare, and CommandQueue::runcommand. Referenced by append_frame, delete_frame, Animation::goto_frame, molinfo_set, and set_frame. |
|
|
|
return the component that matches the given Pickable, or NULL if no match.
Definition at line 98 of file DrawMolecule.C. References components, and NULL. |
|
|
total number of components.
Definition at line 115 of file DrawMolecule.h. References ResizeArray::num. Referenced by atom_displayed, change_pbc, change_ts, MoleculeList::check_pickable, component, component_from_pickable, force_recalc, VMDApp::molecule_load, molinfo_get, VMDApp::num_molreps, recalc_ss, DrawMolItem::representation_index, PickModeMoveRep::rotate, PickModeMoveRep::translate, GraphicsFltkMenu::update_repbrowser, GraphicsFltkMenu::update_repindex, and ~DrawMolecule. |
|
||||||||||||||||
|
center of volume of this molecule. Return success. Fails if there aren't any coordinates, graphics, or volumetric data sets to compute the cov from.
Definition at line 378 of file DrawMolecule.C. References MoleculeGraphics::cov, data, ResizeArray< VolumetricData * >::num, MoleculeGraphics::num_elements, VolumetricData::origin, BaseMolecule::volumeList, VolumetricData::xaxis, VolumetricData::yaxis, and VolumetricData::zaxis. Referenced by MoleculeList::center_from_top_molecule_reps, and AtomColor::find. |
|
|
|
delete the Nth representation ... return success.
Definition at line 118 of file DrawMolecule.C. References app, component, NULL, VMDApp::pickList, ResizeArray< DrawMolItem * >::remove, and PickList::remove_pickable. Referenced by MoleculeList::del_rep. |
|
|
delete the nth frame.
Definition at line 319 of file DrawMolecule.C. References app, change_ts, VMDApp::commandQueue, ResizeArray< Timestep * >::num, ResizeArray< Timestep * >::remove, and CommandQueue::runcommand. Referenced by VMDApp::molecule_deleteframes. |
|
|
duplicate the given frame passing NULL adds a 'null' frame (i.e. all zeros).
Definition at line 306 of file DrawMolecule.C. References append_frame, BaseMolecule::nAtoms, NULL, and Timestep::zero_values. Referenced by VMDApp::molecule_dupframe. |
|
|
force a recalc of all representations For MOL_REGEN, this also invalidates the value of cov and scale_factor,.
Definition at line 172 of file DrawMolecule.C. References app, VMDApp::commandQueue, component, components, DrawMolItem::force_recalc, DrawMolItem::MOL_REGEN, Displayable::need_matrix_recalc, CommandQueue::runcommand, and DrawMolItem::SEL_REGEN. Referenced by access_tcl_atomsel, atomsel_set, atomselect_move, atomselect_moveby, IMDMgr::check_event, cmd_rawtimestep, VMDApp::molecule_load, VMDApp::molecule_reanalyze, PickModeAddBond::pick_molecule_end, PickModeMove::pick_molecule_move, py_align, py_move, py_moveby, MolFilePlugin::read_optional_structure, set, and setbonds. |
|
|
index of current frame.
Definition at line 171 of file DrawMolecule.h. Referenced by GeometryMol::calculate_all, cmd_rawtimestep, AtomColor::find, Animation::frame, measure_energy, measure_geom, measure_pbc2onc, measure_pbc_neighbors, VMDApp::molecule_frame, molinfo_get, and py_write. |
|
|
retrieve the index of the component with the given name. Returns -1 on failure.
Definition at line 226 of file DrawMolecule.C. References ResizeArray< DrawMolItem * >::num. Referenced by VMDApp::molrep_get_by_name. |
|
|
Get the name of the given component. Names are initially "repN", where N starts at 0 and increases each time a rep is created. Return NULL if the index is invalid.
Definition at line 238 of file DrawMolecule.C. References component, and DrawMolItem::name. Referenced by VMDApp::molrep_get_name. |
|
|
get the specifed frame.
Definition at line 184 of file DrawMolecule.h. References NULL, and ResizeArray::num. Referenced by cmd_gettimestep, cmd_rawtimestep, compute_pbcminmax, get_last_frame, measure_avpos, measure_gofr, measure_pbc2onc, measure_pbc_neighbors, measure_rmsf, minmax, VMDApp::molecule_dupframe, molinfo_get, molinfo_set, CoorPluginData::next, parse_timestep, py_rmsd, selframe, and AtomSel::timestep. |
|
|
get the last frame.
Definition at line 192 of file DrawMolecule.h. References get_frame, and ResizeArray::num. Referenced by IMDMgr::check_event, parse_timestep, selframe, and AtomSel::timestep. |
|
|
Return the highlighted rep for this molecule. Returns -1 if there is no such rep.
Definition at line 218 of file DrawMolecule.C. References app, VMDApp::highlighted_molid, VMDApp::highlighted_rep, and BaseMolecule::id. Referenced by PickModeMoveRep::rotate, and PickModeMoveRep::translate. |
|
|
invalidate current secondary structure when structure is changed.
Definition at line 438 of file DrawMolecule.C. Referenced by MolFilePlugin::read_optional_structure. |
|
|
Definition at line 229 of file DrawMolecule.h. Referenced by MoleculeList::check_pickable, mol_from_id, MolFilePlugin::read_rawgraphics, and tcl_graphics. |
|
|
request ss calculation. Return success.
Definition at line 420 of file DrawMolecule.C. References app, current, VMDApp::show_stride_message, and ss_from_stride. Referenced by AtomColor::find, and recalc_ss. |
|
|
Definition at line 262 of file DrawMolecule.C. References BaseMolecule::id, and ResizeArray< DrawMoleculeMonitor * >::num. Referenced by change_pbc, DrawMolItem::change_sel, change_ts, prepare, DrawMolItem::set_pbc, and DrawMolItem::set_pbc_images. |
|
|
number of frames in the files associatd with the molecule.
Definition at line 168 of file DrawMolecule.h. References ResizeArray::num. Referenced by GeometryMol::calculate_all, IMDMgr::check_event, cmd_gettimestep, cmd_rawtimestep, CoorPluginData::CoorPluginData, AtomColor::find, Animation::goto_frame, measure_avpos, measure_energy, measure_geom, measure_gofr, measure_pbc2onc, measure_pbc_neighbors, measure_rmsf, VMDApp::molecule_deleteframes, VMDApp::molecule_dupframe, VMDApp::molecule_numframes, VMDApp::molecule_savetrajectory, molinfo_get, CoorPluginData::next, Animation::num, py_write, setframe, and MolBrowser::update. |
|
|
change current frame without firing callbacks.
Definition at line 251 of file DrawMolecule.C. References ResizeArray< Timestep * >::num, and num. Referenced by append_frame, GeometryMol::calculate_all, Animation::goto_frame, measure_energy, measure_geom, molinfo_set, and set_frame. |
|
|
specific preparations, called by draw_prepare, supplied by derived class.
Reimplemented from Displayable. Reimplemented in Molecule. Definition at line 245 of file DrawMolecule.C. References Displayable::needUpdate, and notify. Referenced by Molecule::prepare. |
|
|
recalculate bonds via distance bond search based on current timestep.
Definition at line 406 of file DrawMolecule.C. References BaseMolecule::clear_bonds, BaseMolecule::count_bonds, current, and vmd_bond_search. Referenced by VMDApp::molecule_bondsrecalc. |
|
|
recalculate the secondary structure using current coordinates Return success.
Definition at line 442 of file DrawMolecule.C. References DrawMolItem::change_ss, component, components, and need_secondary_structure. Referenced by VMDApp::molecule_reanalyze, and VMDApp::molecule_ssrecalc. |
|
|
register monitors.
Definition at line 451 of file DrawMolecule.C. References ResizeArray< DrawMoleculeMonitor * >::append. Referenced by GeometryMol::GeometryMol. |
|
|
scaling factor required to make the molecule fit within (-1 ... 1).
Definition at line 354 of file DrawMolecule.C. References data, dnorm, ResizeArray< VolumetricData * >::num, MoleculeGraphics::num_elements, scale_factor, MoleculeGraphics::scale_factor, BaseMolecule::volumeList, VolumetricData::xaxis, VolumetricData::yaxis, and VolumetricData::zaxis. Referenced by MoleculeList::center_from_top_molecule_reps, and scale_factor. |
|
||||||||||||
|
turn the Nth representation on or off. Return success.
Definition at line 143 of file DrawMolecule.C. References component, Displayable::off, and Displayable::on. Referenced by VMDApp::molrep_show. |
|
|
unregister monitors.
Definition at line 454 of file DrawMolecule.C. References ResizeArray< DrawMoleculeMonitor * >::find, and ResizeArray< DrawMoleculeMonitor * >::remove. Referenced by GeometryMol::~GeometryMol. |
|
|
is this molecule active? Used by MoleculeList.
Definition at line 52 of file DrawMolecule.h. Referenced by MoleculeList::activate, MoleculeList::active, DrawMolecule, Animation::goto_frame, MoleculeList::inactivate, is_active, molinfo_get, and PickModeCenter::pick_molecule_end. |
|
|
Definition at line 55 of file DrawMolecule.h. Referenced by add_rep, append_frame, change_ts, del_rep, delete_frame, force_recalc, Molecule::get_new_frames, highlighted_rep, need_secondary_structure, Molecule::next_frame, ~DrawMolecule, and Molecule::~Molecule. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002