#include <DrawMolecule.h>
Inheritance diagram for DrawMolecule:
Public Methods | |
DrawMolecule (VMDApp *, Displayable *) | |
constructor ... pass in a VMDApp * and a parent displayable. More... | |
virtual | ~DrawMolecule () |
wkf_threadpool_t * | cpu_threadpool (void) |
wkf_threadpool_t * | cuda_devpool (void) |
Query CUDA device pool pointer. More... | |
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... | |
VMDApp * | app |
Needed by DrawMolItem, so that reps get can access to GPU global memory management routines, shared QuickSurf objects, and other such routines. More... | |
ResizeArray< DrawMolItem * > | repList |
all representations in this molecule. More... |
Definition at line 62 of file DrawMolecule.h.
|
constructor ... pass in a VMDApp * and a parent displayable.
Definition at line 48 of file DrawMolecule.C. References active, PickList::add_pickable, BaseMolecule::need_find_bonds, and VMDApp::pickList. |
|
Definition at line 67 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 142 of file DrawMolecule.C. References PickList::add_pickable, app, ResizeArray< DrawMolItem * >::append, Displayable::change_material, VMDApp::pickList, and repList. Referenced by MoleculeList::add_rep. |
|
append the given frame.
Definition at line 282 of file DrawMolecule.C. References app, ResizeArray< Timestep * >::append, change_ts, VMDApp::commandQueue, BaseMolecule::need_find_bonds, NULL, 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, VMDApp::molecule_from_selection_list, and CoorPluginData::next. |
|
return whether the Nth atom is displayed. This is true if ANY representation is displaying the given atom.
Definition at line 117 of file DrawMolecule.C. References components, Displayable::displayed, n, BaseMolecule::nAtoms, and repList. Referenced by GeometryMol::transformed_atom_coord. |
|
Tell reps that the periodic image parameters have been changed.
Definition at line 201 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 167 of file DrawMolecule.C. References DrawMolItem::change_color, DrawMolItem::change_rep, DrawMolItem::change_sel, component, and n. 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 213 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 py_set_frame. |
|
|
return the component that matches the given Pickable, or NULL if no match.
Definition at line 99 of file DrawMolecule.C. References components, NULL, and repList. |
|
total number of components.
Definition at line 143 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 395 of file DrawMolecule.C. References MoleculeGraphics::cov, data, ResizeArray< VolumetricData * >::num, MoleculeGraphics::num_elements, VolumetricData::origin, BaseMolecule::volumeList, VolumetricData::xaxis, VolumetricData::yaxis, z, and VolumetricData::zaxis. Referenced by MoleculeList::center_from_top_molecule_reps, and AtomColor::find. |
|
Definition at line 106 of file DrawMolecule.C. References app, and VMDApp::thrpool. Referenced by Orbital::calculate_mo. |
|
Query CUDA device pool pointer.
Definition at line 111 of file DrawMolecule.C. References app, VMDApp::cuda, CUDAAccel::get_cuda_devpool, and NULL. Referenced by Orbital::calculate_mo. |
|
|
delete the Nth representation ... return success.
Definition at line 129 of file DrawMolecule.C. References app, component, n, NULL, VMDApp::pickList, ResizeArray< DrawMolItem * >::remove, PickList::remove_pickable, and repList. Referenced by MoleculeList::del_rep. |
|
delete the nth frame.
Definition at line 336 of file DrawMolecule.C. References app, change_ts, VMDApp::commandQueue, n, 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 323 of file DrawMolecule.C. References append_frame, BaseMolecule::nAtoms, NULL, and Timestep::zero_values. Referenced by VMDApp::molecule_dupframe, and vmd_volmap_ils. |
|
force a recalc of all representations For MOL_REGEN, this also invalidates the value of cov and scale_factor,.
Definition at line 183 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, density_binmask, density_clamp, density_crop, density_downsample, density_mdff_potential, density_move, density_moveto, density_range, density_sadd, density_sigma, density_smooth, density_smult, density_supersample, density_trim, fit, fpbc_join, fpbc_recenter, fpbc_unwrap, fpbc_wrap, VMDApp::molecule_load, VMDApp::molecule_reanalyze, PickModeAddBond::pick_molecule_end, PickModeMove::pick_molecule_move, py_move, py_moveby, MolFilePlugin::read_optional_structure, setbonds, and text_cmd_mol. |
|
index of current frame.
Definition at line 199 of file DrawMolecule.h. Referenced by GeometryMol::atom_formatted_name, GeometryMol::calculate_all, cmd_rawtimestep, AtomColor::find, Animation::frame, measure_energy, measure_geom, measure_pbc2onc, measure_pbc_neighbors, VMDApp::molecule_frame, molinfo_get, py_write, and colvarproxy_vmd::setup. |
|
retrieve the index of the component with the given name. Returns -1 on failure.
Definition at line 237 of file DrawMolecule.C. References ResizeArray< DrawMolItem * >::num, and repList. 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 249 of file DrawMolecule.C. References component, and DrawMolItem::name. Referenced by VMDApp::molrep_get_name. |
|
|
get the last frame.
Definition at line 220 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 229 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 469 of file DrawMolecule.C. Referenced by VMDApp::molecule_reanalyze, and MolFilePlugin::read_optional_structure. |
|
Definition at line 257 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 437 of file DrawMolecule.C. References app, current, NULL, VMDApp::show_stride_message, ss_from_dssp, and ss_from_stride. Referenced by AtomColor::find, and recalc_ss. |
|
Definition at line 273 of file DrawMolecule.C. References BaseMolecule::id, and ResizeArray< DrawMoleculeMonitor * >::num. Referenced by change_pbc, DrawMolItem::change_sel, change_ts, prepare, DrawMolItem::set_instances, DrawMolItem::set_pbc, and DrawMolItem::set_pbc_images. |
|
number of frames in the files associatd with the molecule.
Definition at line 196 of file DrawMolecule.h. References ResizeArray::num. Referenced by GeometryMol::calculate_all, IMDMgr::check_event, check_timesteps, cmd_gettimestep, cmd_rawtimestep, CoorPluginData::CoorPluginData, AtomColor::find, fpbc_join, fpbc_recenter, fpbc_unwrap, fpbc_wrap, Animation::goto_frame, mdff_cc, measure_avpos, measure_cluster, measure_energy, measure_geom, measure_gofr, measure_pbc2onc, measure_pbc_neighbors, measure_rdf, measure_rmsdmat_qcp, measure_rmsdmat_qcp_ooc, measure_rmsf, measure_rmsf_perresidue, VMDApp::molecule_deleteframes, VMDApp::molecule_dupframe, VMDApp::molecule_numframes, VMDApp::molecule_orblocalize, VMDApp::molecule_savetrajectory, molinfo_get, MolFilePlugin::next, CoorPluginData::next, Animation::num, py_mol_write, py_set_frame, py_write, setframe, and MolBrowser::update. |
|
change current frame without firing callbacks.
Definition at line 262 of file DrawMolecule.C. References n, ResizeArray< Timestep * >::num, and num. Referenced by append_frame, GeometryMol::calculate_all, Animation::goto_frame, measure_energy, measure_geom, molinfo_set, and py_set_frame. |
|
specific preparations, called by draw_prepare, supplied by derived class.
Reimplemented from Displayable. Reimplemented in Molecule. Definition at line 256 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 423 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 473 of file DrawMolecule.C. References DrawMolItem::change_ss, component, components, and need_secondary_structure. Referenced by VMDApp::molecule_ssrecalc. |
|
register monitors.
Definition at line 482 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 371 of file DrawMolecule.C. References data, dnorm, ResizeArray< VolumetricData * >::num, MoleculeGraphics::num_elements, scale_factor, MoleculeGraphics::scale_factor, BaseMolecule::volumeList, VolumetricData::xaxis, VolumetricData::yaxis, z, 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 154 of file DrawMolecule.C. References component, Displayable::off, and Displayable::on. Referenced by VMDApp::molrep_show. |
|
unregister monitors.
Definition at line 485 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 64 of file DrawMolecule.h. Referenced by MoleculeList::activate, MoleculeList::active, DrawMolecule, Animation::goto_frame, MoleculeList::inactivate, molinfo_get, PickModeCenter::pick_molecule_end, and py_is_active. |
|
Needed by DrawMolItem, so that reps get can access to GPU global memory management routines, shared QuickSurf objects, and other such routines.
Definition at line 66 of file DrawMolecule.h. Referenced by MoleculeList::add_rep, add_rep, append_frame, QuickSurf::calc_surf, Orbital::calculate_mo, change_ts, Molecule::close_coor_file, cpu_threadpool, cuda_devpool, del_rep, delete_frame, find_next_cluster, force_recalc, Molecule::get_new_frames, highlighted_rep, measure_hbonds, need_secondary_structure, ~DrawMolecule, and Molecule::~Molecule. |
|
all representations in this molecule.
Definition at line 87 of file DrawMolecule.h. Referenced by add_rep, atom_displayed, component, component_from_pickable, del_rep, and get_component_by_name. |