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

AtomColor Class Reference

Parse and maintain the data for how a molecule should be colored. More...

#include <AtomColor.h>

List of all members.


Public Types

enum ColorMethod {
NAME, TYPE, ELEMENT, RESNAME,
RESTYPE, RESID, CHAIN, SEGNAME,
CONFORMATION, MOLECULE, STRUCTURE, COLORID,
BETA, OCCUP, MASS, CHARGE,
POS, POSX, POSY, POSZ,
USER, USER2, USER3, USER4,
FRAGMENT, INDEX, BACKBONE, THROB,
PHYSICALTIME, TIMESTEP, VELOCITY, VOLUME,
TOTAL
}
different methods for coloring atoms XXX the order of these enums matters, as the AtomColor class uses the ordering to eliminate some complexity in testing. More...


Public Methods

AtomColor (MoleculeList *, const Scene *)
AtomColor (AtomColor &)
~AtomColor (void)
AtomColor & operator= (const AtomColor &)
equal operator, to change the current settings. More...

int current_color_use (int)
return whether the color category index is the setting for the current coloring method. More...

int find (DrawMolecule *)
find the color index for the atoms of the given molecule. Return success. More...

int change (const char *newcmd)
provide new settings; does a 'find' at the end if a mol has been previously provided. More...

int method (void)
return representation method. More...

int color_index (void)
return color index (may not be applicable). More...

int volume_index (void)
return volume index (may not be applicable). More...

void get_colorscale_minmax (float *min, float *max) const
get current minRange and maxRange for color scale. More...

int set_colorscale_minmax (float min, float max)
Set minRange and maxRange. Return success. More...

void rescale_colorscale_minmax ()
Rescale the minRange and maxRange on the next update. More...

int uses_colorscale () const
returns true if the current coloring method uses the color scale. More...


Public Attributes

char cmdStr [MAX_ATOMCOLOR_CMD+1]
initial string with rep command. More...

int * color
color determined for each atom. More...

int nAtoms
number of atoms these colors are for. More...

int do_update
flag for whether to re-find atom colors every time the frame changes. More...


Detailed Description

Parse and maintain the data for how a molecule should be colored.

Definition at line 34 of file AtomColor.h.


Member Enumeration Documentation

enum AtomColor::ColorMethod

different methods for coloring atoms XXX the order of these enums matters, as the AtomColor class uses the ordering to eliminate some complexity in testing.

Enumeration values:
NAME
TYPE
ELEMENT
RESNAME
RESTYPE
RESID
CHAIN
SEGNAME
CONFORMATION
MOLECULE
STRUCTURE
COLORID
BETA
OCCUP
MASS
CHARGE
POS
POSX
POSY
POSZ
USER
USER2
USER3
USER4
FRAGMENT
INDEX
BACKBONE
THROB
PHYSICALTIME
TIMESTEP
VELOCITY
VOLUME
TOTAL

Definition at line 39 of file AtomColor.h.

Referenced by find.


Constructor & Destructor Documentation

AtomColor::AtomColor ( MoleculeList * ,
const Scene *
)

Definition at line 68 of file AtomColor.C.

References AtomColorName, cmdStr, color, DEFAULT_ATOMCOLOR, do_update, nAtoms, and NULL.

AtomColor::AtomColor ( AtomColor & )

Definition at line 87 of file AtomColor.C.

References cmdStr, colIndex, color, colorMethod, do_update, mol, molList, nAtoms, NULL, scene, and volIndex.

AtomColor::~AtomColor ( void )

Definition at line 111 of file AtomColor.C.

References color.


Member Function Documentation

int AtomColor::change ( const char * newcmd ) [inline]

provide new settings; does a 'find' at the end if a mol has been previously provided.

Definition at line 86 of file AtomColor.h.

References find.

Referenced by MoleculeList::change_repcolor, MoleculeList::set_color, and MoleculeList::set_default_color.

int AtomColor::color_index ( void ) [inline]

return color index (may not be applicable).

Definition at line 101 of file AtomColor.h.

Referenced by GraphicsFltkMenu::update_rep.

int AtomColor::current_color_use ( int )

int AtomColor::find ( DrawMolecule * )

find the color index for the atoms of the given molecule. Return success.

Definition at line 292 of file AtomColor.C.

References BaseMolecule::altlocNames, BaseMolecule::atom, MolAtom::atomicnumber, BaseMolecule::atomNames, ATOMNUCLEICBACK, ATOMPROTEINBACK, MolAtom::atomType, BaseMolecule::atomTypes, BACKBONE, BaseMolecule::beta, BETA, MolAtom::bonds, MolAtom::bondTo, Scene::category_item_value, CHAIN, BaseMolecule::chainNames, BaseMolecule::charge, CHARGE, color, MoleculeList::colorCatIndex, COLORID, ColorMethod, CONFORMATION, DrawMolecule::cov, DrawMolecule::current, data, VolumetricData::datarange, ELEMENT, Residue::fragment, FRAGMENT, DrawMolecule::frame, get_pte_label, BaseMolecule::id, INDEX, MAPCLRS, MAPCOLOR, BaseMolecule::mass, MASS, minmax_1fv_aligned, MLCAT_CHAINS, MLCAT_CONFORMATIONS, MLCAT_ELEMENTS, MLCAT_MOLECULES, MLCAT_NAMES, MLCAT_RESNAMES, MLCAT_RESTYPES, MLCAT_SEGNAMES, MLCAT_SPECIAL, MLCAT_SSTRUCT, MLCAT_TYPES, BaseMolecule::modify_volume_data, MOLECULE, NAME, BaseMolecule::nAtoms, nAtoms, Scene::nearest_index, DrawMolecule::need_secondary_structure, BaseMolecule::nFragments, norm, NULL, BaseMolecule::num_volume_data, DrawMolecule::numframes, OCCUP, BaseMolecule::occupancy, Timestep::physical_time, PHYSICALTIME, Timestep::pos, POS, POSX, POSY, POSZ, RESID, BaseMolecule::residue, RESNAME, MolAtom::resnameindex, BaseMolecule::resNames, RESTYPE, MoleculeList::resTypes, SEGNAME, BaseMolecule::segNames, SS_BETA, SS_BRIDGE, SS_COIL, SS_HELIX_3_10, SS_HELIX_ALPHA, SS_HELIX_PI, SS_TURN, Residue::sstruct, STRUCTURE, THROB, time_of_day, TIMESTEP, TYPE, NameList::typecode, MolAtom::uniq_resid, Timestep::user, USER, Timestep::user2, USER2, Timestep::user3, USER3, Timestep::user4, USER4, vec_sub, Timestep::vel, VELOCITY, VISCLRS, and VOLUME.

Referenced by MoleculeList::add_rep, change, DrawMolItem::do_color_scale_changed, VMDApp::molrep_get_scaleminmax, and operator=.

void AtomColor::get_colorscale_minmax ( float * min,
float * max
) const [inline]

get current minRange and maxRange for color scale.

Definition at line 107 of file AtomColor.h.

Referenced by VMDApp::molrep_get_scaleminmax, and GraphicsFltkMenu::update_rep.

int AtomColor::method ( void ) [inline]

return representation method.

Definition at line 98 of file AtomColor.h.

Referenced by DrawMolItem::prepare, and GraphicsFltkMenu::update_rep.

AtomColor & AtomColor::operator= ( const AtomColor & )

equal operator, to change the current settings.

Definition at line 255 of file AtomColor.C.

References cmdStr, colIndex, colorMethod, find, and volIndex.

void AtomColor::rescale_colorscale_minmax ( ) [inline]

Rescale the minRange and maxRange on the next update.

Definition at line 122 of file AtomColor.h.

Referenced by VMDApp::molrep_get_scaleminmax, and VMDApp::molrep_reset_scaleminmax.

int AtomColor::set_colorscale_minmax ( float min,
float max
) [inline]

Set minRange and maxRange. Return success.

Definition at line 113 of file AtomColor.h.

Referenced by VMDApp::molrep_set_scaleminmax.

int AtomColor::uses_colorscale ( ) const

returns true if the current coloring method uses the color scale.

Definition at line 706 of file AtomColor.C.

References BETA, INDEX, and VOLUME.

Referenced by DrawMolItem::do_color_scale_changed.

int AtomColor::volume_index ( void ) [inline]

return volume index (may not be applicable).

Definition at line 104 of file AtomColor.h.

Referenced by GraphicsFltkMenu::update_rep.


Member Data Documentation

char AtomColor::cmdStr[MAX_ATOMCOLOR_CMD + 1]

initial string with rep command.

Definition at line 47 of file AtomColor.h.

Referenced by add_rep_to_browser, AtomColor, MoleculeList::color, molinfo_get, VMDApp::molrep_get_color, and operator=.

int* AtomColor::color

color determined for each atom.

Definition at line 48 of file AtomColor.h.

Referenced by AtomColor, DrawMolItem::do_color_rgb_changed, find, and ~AtomColor.

int AtomColor::do_update

flag for whether to re-find atom colors every time the frame changes.

Definition at line 130 of file AtomColor.h.

Referenced by AtomColor, VMDApp::molrep_get_colorupdate, VMDApp::molrep_set_colorupdate, and GraphicsFltkMenu::update_rep.

int AtomColor::nAtoms

number of atoms these colors are for.

Definition at line 49 of file AtomColor.h.

Referenced by AtomColor, and find.


The documentation for this class was generated from the following files:
Generated on Mon Nov 17 02:48:00 2025 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002

AltStyle によって変換されたページ (->オリジナル) /