Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

AtomSel Class Reference

This interacts with the AtomParser. More...

#include <AtomSel.h>

List of all members.

Public Types

enum  { TS_LAST = -2, TS_NOW = -1 }
enum  { NO_PARSE = -1, NO_EVAL = -2, PARSE_SUCCESS = 0 }
 return codes for the change() method. NO_PARSE if the string is not correct NO_EVAL if there was some problem finding the atoms in the selection otherwise PARSE_SUCCESS. NO_EVAL will still allow the atom selection to be used, although warning messages will be printed; whether this is the best semantics is questionable but since I don't know how to produce this kind of error we may as well let it slide. More...


Public Methods

int molid () const
 molid of "my" molecule. More...

 AtomSel (SymbolTable *, int mymolid)
 ~AtomSel ()
int change (const char *newcmd, DrawMolecule *)
 provide new settings; does a 'find' at the end if a mol has been previously provided and returns the results for the given molecule, find atoms for the molecule. Stores the indices in 'on' for quick retrieval later. If newcmd is NULL, use existing atom selection text return one of the above enum's. More...

float * coordinates (MoleculeList *)
 get the current coordinates (or NULL if it doesn't exist/ no molecule) FIXME: This is just a wrapper around timestep() and should be eliminated. More...

Timesteptimestep (MoleculeList *)
 get the current timestep (or NULL if it doesn't exist/ no molecule). More...


Static Public Methods

int get_frame_value (const char *s, int *val)
 given a string ("first", "last", "now", or a value) return the timestep value in *val returns -1 if there was a problem on error, if val > 0, the value of s wasn't understood if val < 0, the value was negative. More...


Public Attributes

char * cmdStr
 string with the selection command. More...

inton
 per-atom 'selected' flags; 1=on, 0=off. More...

int num_atoms
 number of atoms in mol. More...

int selected
 number of selected atoms the molecule. More...

int which_frame
int do_update


Detailed Description

This interacts with the AtomParser.

Definition at line 44 of file AtomSel.h.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
TS_LAST 
TS_NOW 

Definition at line 61 of file AtomSel.h.

anonymous enum
 

return codes for the change() method. NO_PARSE if the string is not correct NO_EVAL if there was some problem finding the atoms in the selection otherwise PARSE_SUCCESS. NO_EVAL will still allow the atom selection to be used, although warning messages will be printed; whether this is the best semantics is questionable but since I don't know how to produce this kind of error we may as well let it slide.

Enumeration values:
NO_PARSE 
NO_EVAL 
PARSE_SUCCESS 

Definition at line 75 of file AtomSel.h.


Constructor & Destructor Documentation

AtomSel::AtomSel SymbolTable  ,
int    mymolid
 

Definition at line 2150 of file AtomSel.C.

References cmdStr, do_update, NO_PARSE, NULL, num_atoms, on, selected, TS_NOW, and which_frame.

AtomSel::~AtomSel  
 

Definition at line 2165 of file AtomSel.C.

References cmdStr, NO_PARSE, NULL, num_atoms, on, and selected.


Member Function Documentation

int AtomSel::change const char *    newcmd,
DrawMolecule  
 

provide new settings; does a 'find' at the end if a mol has been previously provided and returns the results for the given molecule, find atoms for the molecule. Stores the indices in 'on' for quick retrieval later. If newcmd is NULL, use existing atom selection text return one of the above enum's.

Definition at line 2175 of file AtomSel.C.

References cmdStr, ParseTree::evaluate, BaseMolecule::nAtoms, NO_EVAL, NO_PARSE, NULL, num_atoms, on, SymbolTable::parse, PARSE_SUCCESS, selected, stringdup, ParseTree::use_context, and which_frame.

Referenced by access_tcl_atomsel, MoleculeList::add_rep, atomsel_new, atomselect, VolMapCreate::calculate_minmax, DrawMolItem::change_sel, VolMapCreateCoulombPotential::compute_frame, VolMapCreateFastEnergy::compute_frame, VolMapCreateSlowEnergy::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, create, SaveTrajectoryFltkMenu::do_save, make_tcl_atomsel, measure_gofr, and py_update.

float * AtomSel::coordinates MoleculeList  
 

get the current coordinates (or NULL if it doesn't exist/ no molecule) FIXME: This is just a wrapper around timestep() and should be eliminated.

Definition at line 2206 of file AtomSel.C.

References NULL, Timestep::pos, and timestep.

Referenced by assign_atoms, atomselect_move, atomselect_moveby, VolMapCreate::calculate_minmax, center, center_of_mass, VolMapCreateCoulombPotential::compute_frame, VolMapCreateFastEnergy::compute_frame, VolMapCreateSlowEnergy::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreateFastEnergy::compute_init, contacts, measure_dipole, measure_inertia, measure_rgyr, minmax, py_align, py_fit, py_move, py_moveby, py_rmsd, sasa, vmd_measure_center, vmd_measure_contacts, vmd_measure_fit, vmd_measure_hbonds, vmd_measure_minmax, vmd_measure_rmsd, vmd_measure_sasa, and vmd_measure_surface.

int AtomSel::get_frame_value const char *    s,
int   val
[static]
 

given a string ("first", "last", "now", or a value) return the timestep value in *val returns -1 if there was a problem on error, if val > 0, the value of s wasn't understood if val < 0, the value was negative.

Definition at line 2238 of file AtomSel.C.

References TS_LAST, and TS_NOW.

Referenced by access_tcl_atomsel, make_tcl_atomsel, and molecule_tcl.

int AtomSel::molid   const [inline]
 

molid of "my" molecule.

Definition at line 57 of file AtomSel.h.

Referenced by access_tcl_atomsel, assign_atoms, atomsel_repr, atomsel_set, atomselect_move, atomselect_moveby, VolMapCreate::calculate_max_radius, VolMapCreate::calculate_minmax, center_of_mass, VolMapCreate::compute_all, VolMapCreateCoulombPotential::compute_frame, VolMapCreateFastEnergy::compute_frame, VolMapCreateSlowEnergy::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreateFastEnergy::compute_init, contacts, get_molecule, getmolid, measure_avpos, measure_dipole, measure_gofr, measure_inertia, measure_rmsf, py_align, readorwrite, sasa, tcl_get_weights, text_cmd_animate, timestep, vmd_measure_contacts, vmd_measure_hbonds, vmd_measure_inertia, vmd_measure_minmax, vmd_measure_pbc_neighbors, vmd_measure_sasa, vmd_measure_symmetry, vmd_measure_trans_overlap, and vmd_volmap_new_fromtype.

Timestep * AtomSel::timestep MoleculeList  
 

get the current timestep (or NULL if it doesn't exist/ no molecule).

Definition at line 2213 of file AtomSel.C.

References DrawMolecule::current, DrawMolecule::get_frame, DrawMolecule::get_last_frame, MoleculeList::mol_from_id, molid, NULL, TS_LAST, TS_NOW, and which_frame.

Referenced by coordinates, measure_gofr, and measure_surface.


Member Data Documentation

char* AtomSel::cmdStr
 

string with the selection command.

Definition at line 55 of file AtomSel.h.

Referenced by access_tcl_atomsel, add_rep_to_browser, AtomSel, atomsel_repr, atomsel_str, change, VolMapCreateCoulombPotential::compute_init, VolMapCreateFastEnergy::compute_init, VolMapCreateSlowEnergy::compute_init, VolMapCreateDistance::compute_init, VolMapCreateOccupancy::compute_init, VolMapCreateInterp::compute_init, VolMapCreateDensity::compute_init, VolMapCreateMask::compute_init, molinfo_get, VMDApp::molrep_get_selection, GraphicsFltkMenu::update_rep, VolMapCreateFastEnergy::write_map, and ~AtomSel.

int AtomSel::do_update
 

Definition at line 63 of file AtomSel.h.

Referenced by AtomSel, VMDApp::molrep_get_selupdate, VMDApp::molrep_set_selupdate, and GraphicsFltkMenu::update_rep.

int AtomSel::num_atoms
 

number of atoms in mol.

Definition at line 58 of file AtomSel.h.

Referenced by access_tcl_atomsel, assign_atoms, Tool::assign_rep, AtomSel, atomsel_get, atomsel_set, atomselect_moveby, atomselection_subscript, VolMapCreate::calculate_max_radius, VolMapCreate::calculate_minmax, center_of_mass, change, VolMapCreateCoulombPotential::compute_frame, VolMapCreateFastEnergy::compute_frame, VolMapCreateSlowEnergy::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreate::compute_init, contacts, create, getbonds, Symmetry::guess, iter_next, measure_avpos, measure_center, measure_dipole, measure_fit, measure_gofr, measure_inertia, measure_move, measure_pbc_neighbors, measure_rgyr, measure_rmsd, measure_rmsf, measure_sasa, measure_sumweights, measure_surface, measure_trans_overlap, minmax, py_align, py_moveby, PickModeMoveRep::rotate, sel_from_py, setbonds, Tool::target, tcl_get_weights, PickModeMoveRep::translate, Tool::tug, vmd_measure_contacts, vmd_measure_hbonds, vmd_measure_minmax, and ~AtomSel.

int* AtomSel::on
 

per-atom 'selected' flags; 1=on, 0=off.

Definition at line 56 of file AtomSel.h.

Referenced by access_tcl_atomsel, assign_atoms, Tool::assign_rep, DrawMolItem::atom_displayed, AtomSel, atomsel_get, atomsel_set, atomselect, atomselect_moveby, atomselection_subscript, VolMapCreate::calculate_max_radius, VolMapCreate::calculate_minmax, center_of_mass, change, VolMapCreateCoulombPotential::compute_frame, VolMapCreateFastEnergy::compute_frame, VolMapCreateSlowEnergy::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, contacts, create, SaveTrajectoryFltkMenu::do_save, getbonds, iter_next, measure_avpos, measure_center, measure_dipole, measure_fit, measure_gofr, measure_inertia, measure_move, measure_pbc_neighbors, measure_rgyr, measure_rmsd, measure_rmsf, measure_sasa, measure_sumweights, measure_surface, minmax, py_align, py_moveby, py_write, readorwrite, PickModeMoveRep::rotate, sel_from_py, setbonds, Tool::target, tcl_get_weights, text_cmd_animate, PickModeMoveRep::translate, Tool::tug, vmd_measure_contacts, vmd_measure_hbonds, vmd_measure_minmax, and ~AtomSel.

int AtomSel::selected
 

number of selected atoms the molecule.

Definition at line 59 of file AtomSel.h.

Referenced by access_tcl_atomsel, assign_atoms, AtomSel, atomsel_get, atomsel_set, change, VolMapCreateCoulombPotential::compute_frame, VolMapCreateFastEnergy::compute_frame, create, getbonds, Symmetry::guess, iter_len, measure_avpos, measure_dipole, measure_fit, measure_gofr, measure_move, measure_pbc_neighbors, measure_rmsd, measure_rmsf, measure_sasa, measure_sumweights, measure_trans_overlap, VMDApp::molrep_numselected, parse_two_selections_return_weight, parse_weight, py_rmsd, sel_from_py, setbonds, Symmetry::Symmetry, tcl_get_weights, vmd_measure_avpos, vmd_measure_center, vmd_measure_fit, vmd_measure_pbc_neighbors, vmd_measure_rgyr, vmd_measure_rmsd, vmd_measure_rmsf, vmd_measure_sumweights, vmd_measure_symmetry, vmd_volmap_new_fromtype, and ~AtomSel.

int AtomSel::which_frame
 

Definition at line 62 of file AtomSel.h.

Referenced by access_tcl_atomsel, AtomSel, atomsel_get, atomsel_new, atomsel_repr, atomsel_set, atomselect, VolMapCreate::calculate_minmax, change, VolMapCreateCoulombPotential::compute_frame, VolMapCreateFastEnergy::compute_frame, VolMapCreateSlowEnergy::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, create, getframe, measure_gofr, py_write, sel_from_py, setframe, tcl_get_weights, and timestep.


The documentation for this class was generated from the following files:
Generated on Sun Jul 6 01:28:14 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002