Visualization Library 2.0.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vl::Molecule Class Reference

The Molecule class is used to manage and render 3D molecular structures. More...

#include <Molecule.hpp>

+ Inheritance diagram for vl::Molecule:

Public Member Functions

 Molecule ()
 
 ~Molecule ()
 
 Molecule (const Molecule &other)
 
Moleculeoperator= (const Molecule &other)
 
void reset ()
 
void setMoleculeName (const String &name)
 
const String moleculeName () const
 
unsigned int id () const
 
void setId (unsigned int id)
 
KeyValuestags ()
 
const KeyValuestags () const
 
const std::vector< ref< Atom > > & atoms () const
 
std::vector< ref< Atom > > & atoms ()
 
int atomCount () const
 
const Atomatom (int index) const
 
Atomatom (int index)
 
void addAtom (Atom *atom)
 
void eraseAtom (Atom *atom)
 
void eraseAtom (int index)
 
void eraseAllAtoms ()
 
const std::vector< ref< Bond > > & bonds () const
 
std::vector< ref< Bond > > & bonds ()
 
int bondCount () const
 
const Bondbond (int index) const
 
Bondbond (int index)
 
const Bondbond (Atom *a1, Atom *a2) const
 
Bondbond (Atom *a1, Atom *a2)
 
void addBond (Bond *bond)
 
BondaddBond (Atom *a1, Atom *a2)
 
void eraseBond (Bond *bond)
 
void eraseBond (int bond)
 
void eraseBond (Atom *a1, Atom *a2)
 
void eraseBond (int a1, int a2)
 
void eraseAllBonds ()
 
void computeAtomAdjacency ()
 
void incidentBonds (std::vector< Bond *> &inc_bonds, Atom *atom)
 
const std::vector< ref< Atom > > & cycle (int i) const
 Returns the i-th cycle. More...
 
std::vector< ref< Atom > > & cycle (int i)
 Returns the i-th cycle. More...
 
const std::vector< std::vector< ref< Atom > > > & cycles () const
 Returns the list of cycles. More...
 
std::vector< std::vector< ref< Atom > > > & cycles ()
 Returns the list of cycles. More...
 
void prepareForRendering ()
 Generates the geometry representing the current molecule, atom and bond settings. More...
 
const ActorTreeactorTree () const
 The ActorTree node containing the Actor[s] representing the molecule. More...
 
ActorTreeactorTree ()
 The ActorTree node containing the Actor[s] representing the molecule. More...
 
void setCPKAtomColors ()
 Sets all the atoms' color to their CPK color. More...
 
void setAtomColors (const fvec4 &color)
 Sets all the atoms' color to the specified color. More...
 
void setCalculatedAtomRadii (float percentage=1.0f)
 Sets all the atoms' radii to their calculated atom radii. More...
 
void setEmpiricalAtomRadii (float percentage=1.0f)
 Sets all the atoms' radii to their empirical atom radii. More...
 
void setCovalentAtomRadii (float percentage=1.0f)
 Sets all the atoms' radii to their covalent atom radii. More...
 
void setVanDerWaalsAtomRadii (float percentage=1.0f)
 Sets all the atoms' radii to their van der Waals atom radii. More...
 
void setAtomRadii (float radius)
 Sets all the atoms' radii to the specified one. More...
 
void setBondRadii (float radius)
 Sets all the bonds' radii to the specified one. More...
 
void setAtomTypeVisible (EAtomType type, bool visible)
 
void setMoleculeStyle (EMoleculeStyle style)
 The rendering style of the molecule. More...
 
EMoleculeStyle moleculeStyle () const
 The rendering style of the molecule. More...
 
void setAtomDetail (int detail)
 Geometrical detail used to render the atoms, usually between 0 and 3 (default is 2) More...
 
int atomDetail () const
 Geometrical detail used to render the atoms, usually between 0 and 3 (default is 2) More...
 
void setBondDetail (int detail)
 Geometrical detail used to render the bonds, usually between 5 and 50 (default is 20) More...
 
int bondDetail () const
 Geometrical detail used to render the bonds, usually between 5 and 50 (default is 20) More...
 
float ringOffset () const
 
void setRingOffset (float offset)
 
void setAromaticBondsColor (const fvec4 &color)
 
void setAromaticRingColor (const fvec4 &color)
 
const fvec4aromaticRingColor () const
 
float lineWidth () const
 
bool smoothLines () const
 
void setLineWidth (float w)
 
void setSmoothLines (bool smooth)
 
TransformtransformTree ()
 The transform tree used by the generated bonds, atoms and labels. More...
 
const TransformtransformTree () const
 The transform tree used by the generated bonds, atoms and labels. More...
 
const TextatomLabelTemplate () const
 The text settings to be used to render the atom labels. More...
 
TextatomLabelTemplate ()
 The text settings to be used to render the atom labels. More...
 
void setShowAtomNames (bool show)
 Globally defines whether the atom names should be rendered or not. See also Atom::setShowAtomName(). More...
 
bool showAtomNames () const
 Globally defines whether the atom names should be rendered or not. See also Atom::setShowAtomName(). More...
 
const EffectatomLabelEffect () const
 The Effect used to render the atom labels. More...
 
EffectatomLabelEffect ()
 The Effect used to render the atom labels. More...
 
void setMoleculeToActorMapEnabled (bool enabled)
 If enabled the atomToActorMap() and bondToActorMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style). More...
 
bool isMoleculeToActorMapEnabled () const
 If enabled the atomToActorMap() and bondToActorMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style). More...
 
void setActorToMoleculeMapEnabled (bool enabled)
 If enabled the actorToAtomMap() and actorToBondMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style). More...
 
bool isActorToMoleculeMapEnabled () const
 If enabled the actorToAtomMap() and actorToBondMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style). More...
 
const std::map< ref< Atom >, ref< Actor > > & atomToActorMap () const
 Maps an Atom to it's corresponding Actor. More...
 
const std::map< ref< Actor >, ref< Atom > > & actorToAtomMap () const
 Maps an Actor to it's corresponding Atom. More...
 
const std::map< ref< Bond >, ref< Actor > > & bondToActorMap () const
 Maps a Bond to it's corresponding Actor. More...
 
const std::map< ref< Actor >, ref< Bond > > & actorToBondMap () const
 Maps an Actor to it's corresponding Bond. More...
 
std::map< ref< Atom >, ref< Actor > > & atomToActorMap ()
 Maps an Atom to it's corresponding Actor. More...
 
std::map< ref< Actor >, ref< Atom > > & actorToAtomMap ()
 Maps an Actor to it's corresponding Atom. More...
 
std::map< ref< Bond >, ref< Actor > > & bondToActorMap ()
 Maps a Bond to it's corresponding Actor. More...
 
std::map< ref< Actor >, ref< Bond > > & actorToBondMap ()
 Maps an Actor to it's corresponding Bond. More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Member Functions

void prepareAtomInsert (int bonus=100)
 
void prepareBondInsert (int bonus=100)
 
void wireframeStyle ()
 
void atomsStyle ()
 
void ballAndStickStyle ()
 
void sticksStyle ()
 
void generateRings ()
 
void generateAtomLabels ()
 
void generateAtomLabel (const Atom *atom, Transform *tr)
 
- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Protected Attributes

fvec4 mAromaticRingColor
 
ref< ActorTreemActorTree
 
ref< TransformmTransformTree
 
std::vector< ref< Atom > > mAtoms
 
std::vector< ref< Bond > > mBonds
 
std::vector< std::vector< ref< Atom > > > mCycles
 
std::map< ref< Atom >, ref< Actor > > mAtomToActorMap
 
std::map< ref< Actor >, ref< Atom > > mActorToAtomMap
 
std::map< ref< Bond >, ref< Actor > > mBondToActorMap
 
std::map< ref< Actor >, ref< Bond > > mActorToBondMap
 
String mMoleculeName
 
ref< KeyValuesmTags
 
ref< TextmAtomLabelTemplate
 
ref< EffectmAtomLabelEffect
 
unsigned int mId
 
EMoleculeStyle mMoleculeStyle
 
int mAtomDetail
 
int mBondDetail
 
float mRingOffset
 
float mLineWidth
 
bool mSmoothLines
 
bool mShowAtomNames
 
bool mMoleculeToActorMapEnabled
 
bool mActorToMoleculeMapEnabled
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Detailed Description

The Molecule class is used to manage and render 3D molecular structures.

See also

Definition at line 64 of file Molecule.hpp.

Constructor & Destructor Documentation

◆ Molecule() [1/2]

Molecule::Molecule ( )

Definition at line 38 of file Molecule.cpp.

References vl::EN_BLEND, mAtomLabelEffect, and reset().

◆ ~Molecule()

vl::Molecule::~Molecule ( )
inline

Definition at line 70 of file Molecule.hpp.

◆ Molecule() [2/2]

vl::Molecule::Molecule ( const Molecule other)
inline

Definition at line 71 of file Molecule.hpp.

Member Function Documentation

◆ actorToAtomMap() [1/2]

const std::map< ref<Actor>, ref<Atom> >& vl::Molecule::actorToAtomMap ( ) const
inline

Maps an Actor to it's corresponding Atom.

Definition at line 216 of file Molecule.hpp.

◆ actorToAtomMap() [2/2]

std::map< ref<Actor>, ref<Atom> >& vl::Molecule::actorToAtomMap ( )
inline

Maps an Actor to it's corresponding Atom.

Definition at line 225 of file Molecule.hpp.

◆ actorToBondMap() [1/2]

const std::map< ref<Actor>, ref<Bond> >& vl::Molecule::actorToBondMap ( ) const
inline

Maps an Actor to it's corresponding Bond.

Definition at line 220 of file Molecule.hpp.

◆ actorToBondMap() [2/2]

std::map< ref<Actor>, ref<Bond> >& vl::Molecule::actorToBondMap ( )
inline

Maps an Actor to it's corresponding Bond.

Definition at line 229 of file Molecule.hpp.

◆ actorTree() [1/2]

const ActorTree* vl::Molecule::actorTree ( ) const
inline

The ActorTree node containing the Actor[s] representing the molecule.

Definition at line 131 of file Molecule.hpp.

◆ actorTree() [2/2]

ActorTree* vl::Molecule::actorTree ( )
inline

The ActorTree node containing the Actor[s] representing the molecule.

Definition at line 133 of file Molecule.hpp.

◆ addAtom()

void Molecule::addAtom ( Atom atom)

Definition at line 119 of file Molecule.cpp.

References atoms(), and prepareAtomInsert().

◆ addBond() [1/2]

void Molecule::addBond ( Bond bond)

Definition at line 187 of file Molecule.cpp.

References bonds(), and prepareBondInsert().

◆ addBond() [2/2]

Bond * Molecule::addBond ( Atom a1,
Atom a2 
)

◆ aromaticRingColor()

const fvec4& vl::Molecule::aromaticRingColor ( ) const
inline

Definition at line 175 of file Molecule.hpp.

◆ atom() [1/2]

const Atom * Molecule::atom ( int  index) const

◆ atom() [2/2]

Atom * Molecule::atom ( int  index)

Definition at line 117 of file Molecule.cpp.

References mAtoms.

◆ atomCount()

int vl::Molecule::atomCount ( ) const
inline

Definition at line 88 of file Molecule.hpp.

Referenced by vl::RingExtractor::bootstrap(), and computeAtomAdjacency().

◆ atomDetail()

int vl::Molecule::atomDetail ( ) const
inline

Geometrical detail used to render the atoms, usually between 0 and 3 (default is 2)

Definition at line 163 of file Molecule.hpp.

◆ atomLabelEffect() [1/2]

const Effect* vl::Molecule::atomLabelEffect ( ) const
inline

The Effect used to render the atom labels.

Definition at line 199 of file Molecule.hpp.

◆ atomLabelEffect() [2/2]

Effect* vl::Molecule::atomLabelEffect ( )
inline

The Effect used to render the atom labels.

Definition at line 201 of file Molecule.hpp.

◆ atomLabelTemplate() [1/2]

const Text* vl::Molecule::atomLabelTemplate ( ) const
inline

The text settings to be used to render the atom labels.

Definition at line 189 of file Molecule.hpp.

◆ atomLabelTemplate() [2/2]

Text* vl::Molecule::atomLabelTemplate ( )
inline

The text settings to be used to render the atom labels.

Definition at line 191 of file Molecule.hpp.

◆ atoms() [1/2]

const std::vector< ref<Atom> >& vl::Molecule::atoms ( ) const
inline

◆ atoms() [2/2]

std::vector< ref<Atom> >& vl::Molecule::atoms ( )
inline

Definition at line 86 of file Molecule.hpp.

◆ atomsStyle()

void Molecule::atomsStyle ( )
protected

◆ atomToActorMap() [1/2]

const std::map< ref<Atom>, ref<Actor> >& vl::Molecule::atomToActorMap ( ) const
inline

Maps an Atom to it's corresponding Actor.

Definition at line 214 of file Molecule.hpp.

◆ atomToActorMap() [2/2]

std::map< ref<Atom>, ref<Actor> >& vl::Molecule::atomToActorMap ( )
inline

Maps an Atom to it's corresponding Actor.

Definition at line 223 of file Molecule.hpp.

◆ ballAndStickStyle()

void Molecule::ballAndStickStyle ( )
protected

◆ bond() [1/4]

const Bond * Molecule::bond ( int  index) const

◆ bond() [2/4]

Bond * Molecule::bond ( int  index)

Definition at line 169 of file Molecule.cpp.

References mBonds.

◆ bond() [3/4]

const Bond * Molecule::bond ( Atom a1,
Atom a2 
) const

Definition at line 171 of file Molecule.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), bond(), bonds(), and NULL.

◆ bond() [4/4]

Bond * Molecule::bond ( Atom a1,
Atom a2 
)

Definition at line 179 of file Molecule.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), bond(), bonds(), and NULL.

◆ bondCount()

int vl::Molecule::bondCount ( ) const
inline

Definition at line 99 of file Molecule.hpp.

Referenced by computeAtomAdjacency(), and incidentBonds().

◆ bondDetail()

int vl::Molecule::bondDetail ( ) const
inline

Geometrical detail used to render the bonds, usually between 5 and 50 (default is 20)

Definition at line 168 of file Molecule.hpp.

◆ bonds() [1/2]

const std::vector< ref<Bond> >& vl::Molecule::bonds ( ) const
inline

◆ bonds() [2/2]

std::vector< ref<Bond> >& vl::Molecule::bonds ( )
inline

Definition at line 97 of file Molecule.hpp.

◆ bondToActorMap() [1/2]

const std::map< ref<Bond>, ref<Actor> >& vl::Molecule::bondToActorMap ( ) const
inline

Maps a Bond to it's corresponding Actor.

Definition at line 218 of file Molecule.hpp.

◆ bondToActorMap() [2/2]

std::map< ref<Bond>, ref<Actor> >& vl::Molecule::bondToActorMap ( )
inline

Maps a Bond to it's corresponding Actor.

Definition at line 227 of file Molecule.hpp.

◆ computeAtomAdjacency()

void Molecule::computeAtomAdjacency ( )

◆ cycle() [1/2]

const std::vector< ref<Atom> >& vl::Molecule::cycle ( int  i) const
inline

◆ cycle() [2/2]

std::vector< ref<Atom> >& vl::Molecule::cycle ( int  i)
inline

Returns the i-th cycle.

Definition at line 118 of file Molecule.hpp.

◆ cycles() [1/2]

const std::vector< std::vector< ref<Atom> > >& vl::Molecule::cycles ( ) const
inline

◆ cycles() [2/2]

std::vector< std::vector< ref<Atom> > >& vl::Molecule::cycles ( )
inline

Returns the list of cycles.

Definition at line 123 of file Molecule.hpp.

◆ eraseAllAtoms()

void Molecule::eraseAllAtoms ( )

Definition at line 125 of file Molecule.cpp.

References mAtoms, mBonds, and mCycles.

◆ eraseAllBonds()

void Molecule::eraseAllBonds ( )

Definition at line 207 of file Molecule.cpp.

References bonds().

◆ eraseAtom() [1/2]

void Molecule::eraseAtom ( Atom atom)

Definition at line 141 of file Molecule.cpp.

References atom(), atoms(), eraseBond(), and incidentBonds().

◆ eraseAtom() [2/2]

void Molecule::eraseAtom ( int  index)

Definition at line 132 of file Molecule.cpp.

References atom(), atoms(), eraseBond(), and incidentBonds().

◆ eraseBond() [1/4]

void Molecule::eraseBond ( Bond bond)

Definition at line 193 of file Molecule.cpp.

References bond(), and bonds().

Referenced by eraseAtom(), and eraseBond().

◆ eraseBond() [2/4]

void Molecule::eraseBond ( int  bond)

Definition at line 205 of file Molecule.cpp.

References bonds().

◆ eraseBond() [3/4]

void Molecule::eraseBond ( Atom a1,
Atom a2 
)

Definition at line 209 of file Molecule.cpp.

References vl::Bond::atom1(), vl::Bond::atom2(), bond(), and bonds().

◆ eraseBond() [4/4]

void Molecule::eraseBond ( int  a1,
int  a2 
)

Definition at line 222 of file Molecule.cpp.

References atom(), and eraseBond().

◆ generateAtomLabel()

void Molecule::generateAtomLabel ( const Atom atom,
Transform tr 
)
protected

◆ generateAtomLabels()

void Molecule::generateAtomLabels ( )
protected

◆ generateRings()

void Molecule::generateRings ( )
protected

◆ id()

unsigned int vl::Molecule::id ( ) const
inline

Definition at line 79 of file Molecule.hpp.

◆ incidentBonds()

void Molecule::incidentBonds ( std::vector< Bond *> &  inc_bonds,
Atom atom 
)

Definition at line 235 of file Molecule.cpp.

References atom(), vl::Bond::atom1(), vl::Bond::atom2(), bond(), and bondCount().

Referenced by eraseAtom().

◆ isActorToMoleculeMapEnabled()

bool vl::Molecule::isActorToMoleculeMapEnabled ( ) const
inline

If enabled the actorToAtomMap() and actorToBondMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).

Definition at line 211 of file Molecule.hpp.

◆ isMoleculeToActorMapEnabled()

bool vl::Molecule::isMoleculeToActorMapEnabled ( ) const
inline

If enabled the atomToActorMap() and bondToActorMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).

Definition at line 206 of file Molecule.hpp.

◆ lineWidth()

float vl::Molecule::lineWidth ( ) const
inline

Definition at line 177 of file Molecule.hpp.

◆ moleculeName()

const String vl::Molecule::moleculeName ( ) const
inline

Definition at line 77 of file Molecule.hpp.

◆ moleculeStyle()

EMoleculeStyle vl::Molecule::moleculeStyle ( ) const
inline

The rendering style of the molecule.

Definition at line 158 of file Molecule.hpp.

◆ operator=()

Molecule & Molecule::operator= ( const Molecule other)

◆ prepareAtomInsert()

void vl::Molecule::prepareAtomInsert ( int  bonus = 100)
inlineprotected

Definition at line 232 of file Molecule.hpp.

Referenced by addAtom().

◆ prepareBondInsert()

void vl::Molecule::prepareBondInsert ( int  bonus = 100)
inlineprotected

Definition at line 237 of file Molecule.hpp.

Referenced by addBond().

◆ prepareForRendering()

void Molecule::prepareForRendering ( )

Generates the geometry representing the current molecule, atom and bond settings.

The actors, geometry, and transforms generated by this function can be found in actorTree() and transformTree().

Definition at line 185 of file Molecule_rendering.cpp.

References vl::MS_AtomsOnly, vl::MS_BallAndStick, vl::MS_Sticks, and vl::MS_Wireframe.

◆ reset()

void Molecule::reset ( )

◆ ringOffset()

float vl::Molecule::ringOffset ( ) const
inline

Definition at line 170 of file Molecule.hpp.

◆ setActorToMoleculeMapEnabled()

void vl::Molecule::setActorToMoleculeMapEnabled ( bool  enabled)
inline

If enabled the actorToAtomMap() and actorToBondMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).

Definition at line 209 of file Molecule.hpp.

◆ setAromaticBondsColor()

void Molecule::setAromaticBondsColor ( const fvec4 color)

Definition at line 298 of file Molecule.cpp.

References bonds(), and vl::BT_Aromatic.

◆ setAromaticRingColor()

void vl::Molecule::setAromaticRingColor ( const fvec4 color)
inline

Definition at line 174 of file Molecule.hpp.

◆ setAtomColors()

void Molecule::setAtomColors ( const fvec4 color)

Sets all the atoms' color to the specified color.

Definition at line 249 of file Molecule.cpp.

References atoms().

◆ setAtomDetail()

void vl::Molecule::setAtomDetail ( int  detail)
inline

Geometrical detail used to render the atoms, usually between 0 and 3 (default is 2)

Definition at line 161 of file Molecule.hpp.

◆ setAtomRadii()

void Molecule::setAtomRadii ( float  radius)

Sets all the atoms' radii to the specified one.

Definition at line 279 of file Molecule.cpp.

References atoms().

◆ setAtomTypeVisible()

void Molecule::setAtomTypeVisible ( EAtomType  type,
bool  visible 
)

Definition at line 291 of file Molecule.cpp.

References atom(), atoms(), vl::Atom::atomType(), and vl::Atom::setVisible().

◆ setBondDetail()

void vl::Molecule::setBondDetail ( int  detail)
inline

Geometrical detail used to render the bonds, usually between 5 and 50 (default is 20)

Definition at line 166 of file Molecule.hpp.

◆ setBondRadii()

void Molecule::setBondRadii ( float  radius)

Sets all the bonds' radii to the specified one.

Definition at line 285 of file Molecule.cpp.

References bonds().

◆ setCalculatedAtomRadii()

void Molecule::setCalculatedAtomRadii ( float  percentage = 1.0f)

Sets all the atoms' radii to their calculated atom radii.

Definition at line 255 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

◆ setCovalentAtomRadii()

void Molecule::setCovalentAtomRadii ( float  percentage = 1.0f)

Sets all the atoms' radii to their covalent atom radii.

Definition at line 267 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

◆ setCPKAtomColors()

void Molecule::setCPKAtomColors ( )

Sets all the atoms' color to their CPK color.

Definition at line 243 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

◆ setEmpiricalAtomRadii()

void Molecule::setEmpiricalAtomRadii ( float  percentage = 1.0f)

Sets all the atoms' radii to their empirical atom radii.

Definition at line 261 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

◆ setId()

void vl::Molecule::setId ( unsigned int  id)
inline

Definition at line 80 of file Molecule.hpp.

◆ setLineWidth()

void vl::Molecule::setLineWidth ( float  w)
inline

Definition at line 180 of file Molecule.hpp.

◆ setMoleculeName()

void vl::Molecule::setMoleculeName ( const String name)
inline

Definition at line 76 of file Molecule.hpp.

◆ setMoleculeStyle()

void vl::Molecule::setMoleculeStyle ( EMoleculeStyle  style)
inline

The rendering style of the molecule.

Definition at line 156 of file Molecule.hpp.

◆ setMoleculeToActorMapEnabled()

void vl::Molecule::setMoleculeToActorMapEnabled ( bool  enabled)
inline

If enabled the atomToActorMap() and bondToActorMap() maps will be compiled next time the molecule's geometry is regenerated (except for wireframe style).

Definition at line 204 of file Molecule.hpp.

◆ setRingOffset()

void vl::Molecule::setRingOffset ( float  offset)
inline

Definition at line 171 of file Molecule.hpp.

◆ setShowAtomNames()

void vl::Molecule::setShowAtomNames ( bool  show)
inline

Globally defines whether the atom names should be rendered or not. See also Atom::setShowAtomName().

Definition at line 194 of file Molecule.hpp.

◆ setSmoothLines()

void vl::Molecule::setSmoothLines ( bool  smooth)
inline

Definition at line 181 of file Molecule.hpp.

◆ setVanDerWaalsAtomRadii()

void Molecule::setVanDerWaalsAtomRadii ( float  percentage = 1.0f)

Sets all the atoms' radii to their van der Waals atom radii.

Definition at line 273 of file Molecule.cpp.

References vl::atomInfo(), atoms(), and vl::atomType().

◆ showAtomNames()

bool vl::Molecule::showAtomNames ( ) const
inline

Globally defines whether the atom names should be rendered or not. See also Atom::setShowAtomName().

Definition at line 196 of file Molecule.hpp.

◆ smoothLines()

bool vl::Molecule::smoothLines ( ) const
inline

Definition at line 178 of file Molecule.hpp.

◆ sticksStyle()

void Molecule::sticksStyle ( )
protected

◆ tags() [1/2]

KeyValues* vl::Molecule::tags ( )
inline

Definition at line 82 of file Molecule.hpp.

Referenced by vl::loadMOL2(), and reset().

◆ tags() [2/2]

const KeyValues* vl::Molecule::tags ( ) const
inline

Definition at line 83 of file Molecule.hpp.

◆ transformTree() [1/2]

Transform* vl::Molecule::transformTree ( )
inline

The transform tree used by the generated bonds, atoms and labels.

Definition at line 184 of file Molecule.hpp.

◆ transformTree() [2/2]

const Transform* vl::Molecule::transformTree ( ) const
inline

The transform tree used by the generated bonds, atoms and labels.

Definition at line 186 of file Molecule.hpp.

◆ wireframeStyle()

void Molecule::wireframeStyle ( )
protected

Member Data Documentation

◆ mActorToAtomMap

std::map< ref<Actor>, ref<Atom> > vl::Molecule::mActorToAtomMap
protected

Definition at line 258 of file Molecule.hpp.

Referenced by reset().

◆ mActorToBondMap

std::map< ref<Actor>, ref<Bond> > vl::Molecule::mActorToBondMap
protected

Definition at line 260 of file Molecule.hpp.

Referenced by reset().

◆ mActorToMoleculeMapEnabled

bool vl::Molecule::mActorToMoleculeMapEnabled
protected

Definition at line 274 of file Molecule.hpp.

Referenced by reset().

◆ mActorTree

ref<ActorTree> vl::Molecule::mActorTree
protected

Definition at line 252 of file Molecule.hpp.

Referenced by reset().

◆ mAromaticRingColor

fvec4 vl::Molecule::mAromaticRingColor
protected

Definition at line 251 of file Molecule.hpp.

Referenced by operator=(), and reset().

◆ mAtomDetail

int vl::Molecule::mAtomDetail
protected

Definition at line 267 of file Molecule.hpp.

Referenced by operator=(), and reset().

◆ mAtomLabelEffect

ref<Effect> vl::Molecule::mAtomLabelEffect
protected

Definition at line 264 of file Molecule.hpp.

Referenced by Molecule().

◆ mAtomLabelTemplate

ref<Text> vl::Molecule::mAtomLabelTemplate
protected

Definition at line 263 of file Molecule.hpp.

◆ mAtoms

std::vector< ref<Atom> > vl::Molecule::mAtoms
protected

Definition at line 254 of file Molecule.hpp.

Referenced by atom(), eraseAllAtoms(), and reset().

◆ mAtomToActorMap

std::map< ref<Atom>, ref<Actor> > vl::Molecule::mAtomToActorMap
protected

Definition at line 257 of file Molecule.hpp.

Referenced by reset().

◆ mBondDetail

int vl::Molecule::mBondDetail
protected

Definition at line 268 of file Molecule.hpp.

Referenced by operator=(), and reset().

◆ mBonds

std::vector< ref<Bond> > vl::Molecule::mBonds
protected

Definition at line 255 of file Molecule.hpp.

Referenced by bond(), eraseAllAtoms(), and reset().

◆ mBondToActorMap

std::map< ref<Bond>, ref<Actor> > vl::Molecule::mBondToActorMap
protected

Definition at line 259 of file Molecule.hpp.

Referenced by reset().

◆ mCycles

std::vector< std::vector< ref<Atom> > > vl::Molecule::mCycles
protected

Definition at line 256 of file Molecule.hpp.

Referenced by eraseAllAtoms(), operator=(), and reset().

◆ mId

unsigned int vl::Molecule::mId
protected

Definition at line 265 of file Molecule.hpp.

Referenced by reset().

◆ mLineWidth

float vl::Molecule::mLineWidth
protected

Definition at line 270 of file Molecule.hpp.

Referenced by operator=(), and reset().

◆ mMoleculeName

String vl::Molecule::mMoleculeName
protected

Definition at line 261 of file Molecule.hpp.

Referenced by operator=(), and reset().

◆ mMoleculeStyle

EMoleculeStyle vl::Molecule::mMoleculeStyle
protected

Definition at line 266 of file Molecule.hpp.

Referenced by operator=(), and reset().

◆ mMoleculeToActorMapEnabled

bool vl::Molecule::mMoleculeToActorMapEnabled
protected

Definition at line 273 of file Molecule.hpp.

Referenced by reset().

◆ mRingOffset

float vl::Molecule::mRingOffset
protected

Definition at line 269 of file Molecule.hpp.

Referenced by operator=(), and reset().

◆ mShowAtomNames

bool vl::Molecule::mShowAtomNames
protected

Definition at line 272 of file Molecule.hpp.

Referenced by reset().

◆ mSmoothLines

bool vl::Molecule::mSmoothLines
protected

Definition at line 271 of file Molecule.hpp.

Referenced by operator=(), and reset().

◆ mTags

ref<KeyValues> vl::Molecule::mTags
protected

Definition at line 262 of file Molecule.hpp.

Referenced by operator=().

◆ mTransformTree

ref<Transform> vl::Molecule::mTransformTree
protected

Definition at line 253 of file Molecule.hpp.


The documentation for this class was generated from the following files: