VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkMolecule Class Reference

class describing a molecule More...

#include <vtkMolecule.h>

Inheritance diagram for vtkMolecule:
Inheritance graph
[legend]
Collaboration diagram for vtkMolecule:
Collaboration graph
[legend]

Public Types

typedef vtkUndirectedGraph Superclass
- Public Types inherited from vtkUndirectedGraph
typedef vtkGraph Superclass
- Public Types inherited from vtkGraph
typedef vtkDataObject Superclass
- Public Types inherited from vtkDataObject
typedef vtkObject Superclass
enum  FieldAssociations {
  FIELD_ASSOCIATION_POINTS, FIELD_ASSOCIATION_CELLS, FIELD_ASSOCIATION_NONE, FIELD_ASSOCIATION_POINTS_THEN_CELLS,
  FIELD_ASSOCIATION_VERTICES, FIELD_ASSOCIATION_EDGES, FIELD_ASSOCIATION_ROWS, NUMBER_OF_ASSOCIATIONS
}
enum  AttributeTypes {
  POINT, CELL, FIELD, POINT_THEN_CELL,
  VERTEX, EDGE, ROW, NUMBER_OF_ATTRIBUTE_TYPES
}
enum  FieldOperations { FIELD_OPERATION_PRESERVED, FIELD_OPERATION_REINTERPOLATED, FIELD_OPERATION_MODIFIED, FIELD_OPERATION_REMOVED }
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void Initialize ()
vtkAtom AppendAtom (unsigned short atomicNumber, const vtkVector3f &pos)
vtkAtom GetAtom (vtkIdType atomId)
vtkIdType GetNumberOfAtoms ()
vtkIdType GetNumberOfBonds ()
unsigned short GetAtomAtomicNumber (vtkIdType atomId)
double GetBondLength (vtkIdType bondId)
virtual void ShallowCopy (vtkDataObject *obj)
virtual void DeepCopy (vtkDataObject *obj)
virtual void ShallowCopyStructure (vtkMolecule *m)
virtual void DeepCopyStructure (vtkMolecule *m)
virtual void ShallowCopyAttributes (vtkMolecule *m)
virtual void DeepCopyAttributes (vtkMolecule *m)
vtkAtom AppendAtom ()
vtkAtom AppendAtom (unsigned short atomicNumber, double x, double y, double z)
vtkBond AppendBond (vtkIdType atom1, vtkIdType atom2, unsigned short order=1)
vtkBond AppendBond (const vtkAtom &atom1, const vtkAtom &atom2, unsigned short order=1)
vtkBond GetBond (vtkIdType bondId)
void SetAtomAtomicNumber (vtkIdType atomId, unsigned short atomicNum)
void SetAtomPosition (vtkIdType atomId, const vtkVector3f &pos)
void SetAtomPosition (vtkIdType atomId, double x, double y, double z)
vtkVector3f GetAtomPosition (vtkIdType atomId)
void GetAtomPosition (vtkIdType atomId, float pos[3])
void SetBondOrder (vtkIdType bondId, unsigned short order)
unsigned short GetBondOrder (vtkIdType bondId)
vtkPoints * GetAtomicPositionArray ()
vtkUnsignedShortArray * GetAtomicNumberArray ()
virtual vtkAbstractElectronicData * GetElectronicData ()
virtual void SetElectronicData (vtkAbstractElectronicData *)
- Public Member Functions inherited from vtkUndirectedGraph
virtual int GetDataObjectType ()
virtual vtkIdType GetInDegree (vtkIdType v)
virtual bool IsStructureValid (vtkGraph *g)
virtual vtkInEdgeType GetInEdge (vtkIdType v, vtkIdType i)
virtual void GetInEdge (vtkIdType v, vtkIdType i, vtkGraphEdge *e)
virtual void GetInEdges (vtkIdType v, vtkInEdgeIterator *it)
- Public Member Functions inherited from vtkGraph
void ComputeBounds ()
unsigned long int GetMTime ()
virtual void GetOutEdges (vtkIdType v, vtkOutEdgeIterator *it)
virtual vtkIdType GetDegree (vtkIdType v)
virtual vtkIdType GetOutDegree (vtkIdType v)
virtual void GetOutEdge (vtkIdType v, vtkIdType index, vtkGraphEdge *e)
virtual void GetAdjacentVertices (vtkIdType v, vtkAdjacentVertexIterator *it)
virtual void GetEdges (vtkEdgeListIterator *it)
virtual vtkIdType GetNumberOfEdges ()
virtual void GetVertices (vtkVertexListIterator *it)
virtual vtkIdType GetNumberOfVertices ()
void SetDistributedGraphHelper (vtkDistributedGraphHelper *helper)
vtkIdType FindVertex (const vtkVariant &pedigreeID)
virtual void CopyStructure (vtkGraph *g)
virtual bool CheckedShallowCopy (vtkGraph *g)
virtual bool CheckedDeepCopy (vtkGraph *g)
virtual void Squeeze ()
void ReorderOutVertices (vtkIdType v, vtkIdTypeArray *vertices)
bool IsSameStructure (vtkGraph *other)
vtkIdType GetNumberOfEdgePoints (vtkIdType e)
double * GetEdgePoint (vtkIdType e, vtkIdType i)
void ClearEdgePoints (vtkIdType e)
vtkGraphInternals * GetGraphInternals (bool modifying)
void GetInducedEdges (vtkIdTypeArray *verts, vtkIdTypeArray *edges)
virtual vtkFieldData * GetAttributesAsFieldData (int type)
virtual vtkIdType GetNumberOfElements (int type)
void Dump ()
vtkIdType GetEdgeId (vtkIdType a, vtkIdType b)
bool ToDirectedGraph (vtkDirectedGraph *g)
bool ToUndirectedGraph (vtkUndirectedGraph *g)
virtual vtkDataSetAttributes * GetVertexData ()
virtual vtkDataSetAttributes * GetEdgeData ()
double * GetPoint (vtkIdType ptId)
void GetPoint (vtkIdType ptId, double x[3])
vtkPoints * GetPoints ()
virtual void SetPoints (vtkPoints *points)
double * GetBounds ()
void GetBounds (double bounds[6])
virtual vtkOutEdgeType GetOutEdge (vtkIdType v, vtkIdType index)
vtkDistributedGraphHelper * GetDistributedGraphHelper ()
vtkIdType GetSourceVertex (vtkIdType e)
vtkIdType GetTargetVertex (vtkIdType e)
void SetEdgePoints (vtkIdType e, vtkIdType npts, double *pts)
void GetEdgePoints (vtkIdType e, vtkIdType &npts, double *&pts)
void SetEdgePoint (vtkIdType e, vtkIdType i, double x[3])
void SetEdgePoint (vtkIdType e, vtkIdType i, double x, double y, double z)
void AddEdgePoint (vtkIdType e, double x[3])
void AddEdgePoint (vtkIdType e, double x, double y, double z)
void ShallowCopyEdgePoints (vtkGraph *g)
void DeepCopyEdgePoints (vtkGraph *g)
- Public Member Functions inherited from vtkDataObject
virtual vtkAlgorithmOutput * GetProducerPort ()
void ReleaseData ()
int ShouldIReleaseData ()
virtual void Register (vtkObjectBase *o)
virtual void UnRegister (vtkObjectBase *o)
virtual void Update ()
virtual void UpdateInformation ()
virtual void PropagateUpdateExtent ()
virtual void TriggerAsynchronousUpdate ()
virtual void UpdateData ()
virtual unsigned long GetEstimatedMemorySize ()
unsigned long GetUpdateTime ()
void SetUpdateExtentToWholeExtent ()
unsigned long GetPipelineMTime ()
virtual unsigned long GetActualMemorySize ()
void CopyInformation (vtkDataObject *data)
virtual void CopyInformationFromPipeline (vtkInformation *request)
void DataHasBeenGenerated ()
virtual void PrepareForNewData ()
virtual int GetExtentType ()
virtual void Crop ()
virtual vtkDataSetAttributes * GetAttributes (int type)
virtual int GetAttributeTypeForArray (vtkAbstractArray *arr)
virtual vtkSource * GetSource ()
void SetSource (vtkSource *s)
virtual vtkInformation * GetInformation ()
virtual void SetInformation (vtkInformation *)
virtual vtkInformation * GetPipelineInformation ()
virtual void SetPipelineInformation (vtkInformation *)
virtual int GetDataReleased ()
void SetReleaseDataFlag (int)
int GetReleaseDataFlag ()
virtual void ReleaseDataFlagOn ()
virtual void ReleaseDataFlagOff ()
virtual void SetFieldData (vtkFieldData *)
virtual vtkFieldData * GetFieldData ()
virtual void SetUpdateExtent (int piece, int numPieces, int ghostLevel)
void SetUpdateExtent (int piece, int numPieces)
virtual void SetUpdateExtent (int x0, int x1, int y0, int y1, int z0, int z1)
virtual void SetUpdateExtent (int extent[6])
virtual int * GetUpdateExtent ()
virtual void GetUpdateExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
virtual void GetUpdateExtent (int extent[6])
virtual void CopyTypeSpecificInformation (vtkDataObject *data)
void SetUpdatePiece (int piece)
void SetUpdateNumberOfPieces (int num)
virtual int GetUpdatePiece ()
virtual int GetUpdateNumberOfPieces ()
void SetUpdateGhostLevel (int level)
virtual int GetUpdateGhostLevel ()
virtual void SetRequestExactExtent (int flag)
virtual int GetRequestExactExtent ()
virtual void RequestExactExtentOn ()
virtual void RequestExactExtentOff ()
virtual void SetWholeExtent (int x0, int x1, int y0, int y1, int z0, int z1)
virtual void SetWholeExtent (int extent[6])
virtual int * GetWholeExtent ()
virtual void GetWholeExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
virtual void GetWholeExtent (int extent[6])
virtual void SetWholeBoundingBox (double x0, double x1, double y0, double y1, double z0, double z1)
virtual void SetWholeBoundingBox (double bb[6])
virtual double * GetWholeBoundingBox ()
virtual void GetWholeBoundingBox (double &x0, double &x1, double &y0, double &y1, double &z0, double &z1)
virtual void GetWholeBoundingBox (double extent[6])
virtual void SetMaximumNumberOfPieces (int)
virtual int GetMaximumNumberOfPieces ()
virtual void CopyInformationToPipeline (vtkInformation *request, vtkInformation *input, vtkInformation *output, int forceCopy)
void CopyInformationToPipeline (vtkInformation *request, vtkInformation *input)
void SetExtentTranslator (vtkExtentTranslator *translator)
vtkExtentTranslator * GetExtentTranslator ()
void GlobalReleaseDataFlagOn ()
void GlobalReleaseDataFlagOff ()
- Public Member Functions inherited from vtkObject
virtual void DebugOn ()
virtual void DebugOff ()
unsigned char GetDebug ()
void SetDebug (unsigned char debugFlag)
virtual void Modified ()
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
vtkCommand * GetCommand (unsigned long tag)
void RemoveObserver (vtkCommand *)
void RemoveObservers (unsigned long event, vtkCommand *)
void RemoveObservers (const char *event, vtkCommand *)
int HasObserver (unsigned long event, vtkCommand *)
int HasObserver (const char *event, vtkCommand *)
void RemoveObserver (unsigned long tag)
void RemoveObservers (unsigned long event)
void RemoveObservers (const char *event)
void RemoveAllObservers ()
int HasObserver (unsigned long event)
int HasObserver (const char *event)
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
int InvokeEvent (unsigned long event, void *callData)
int InvokeEvent (const char *event, void *callData)
int InvokeEvent (unsigned long event)
int InvokeEvent (const char *event)
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
virtual void Delete ()
virtual void FastDelete ()
void Print (ostream &os)
void SetReferenceCount (int)
void PrintRevisions (ostream &os)
virtual void PrintHeader (ostream &os, vtkIndent indent)
virtual void PrintTrailer (ostream &os, vtkIndent indent)
int GetReferenceCount ()

Static Public Member Functions

static vtkMolecule * New ()
static int IsTypeOf (const char *type)
static vtkMolecule * SafeDownCast (vtkObject *o)
static bool GetPlaneFromBond (const vtkBond &bond, const vtkVector3f &normal, vtkPlane *plane)
static bool GetPlaneFromBond (const vtkAtom &atom1, const vtkAtom &atom2, const vtkVector3f &normal, vtkPlane *plane)
- Static Public Member Functions inherited from vtkUndirectedGraph
static vtkUndirectedGraph * GetData (vtkInformation *info)
static vtkUndirectedGraph * GetData (vtkInformationVector *v, int i=0)
- Static Public Member Functions inherited from vtkDataObject
static const char * GetAssociationTypeAsString (int associationType)
static vtkInformationStringKey * DATA_TYPE_NAME ()
static
vtkInformationDataObjectKey * 
DATA_OBJECT ()
static vtkInformationIntegerKey * DATA_EXTENT_TYPE ()
static
vtkInformationIntegerPointerKey * 
DATA_EXTENT ()
static vtkInformationIntegerKey * DATA_PIECE_NUMBER ()
static vtkInformationIntegerKey * DATA_NUMBER_OF_PIECES ()
static vtkInformationIntegerKey * DATA_NUMBER_OF_GHOST_LEVELS ()
static vtkInformationDoubleKey * DATA_RESOLUTION ()
static
vtkInformationDoubleVectorKey * 
DATA_TIME_STEPS ()
static
vtkInformationInformationVectorKey * 
POINT_DATA_VECTOR ()
static
vtkInformationInformationVectorKey * 
CELL_DATA_VECTOR ()
static
vtkInformationInformationVectorKey * 
VERTEX_DATA_VECTOR ()
static
vtkInformationInformationVectorKey * 
EDGE_DATA_VECTOR ()
static vtkInformationIntegerKey * FIELD_ARRAY_TYPE ()
static vtkInformationIntegerKey * FIELD_ASSOCIATION ()
static vtkInformationIntegerKey * FIELD_ATTRIBUTE_TYPE ()
static vtkInformationIntegerKey * FIELD_ACTIVE_ATTRIBUTE ()
static vtkInformationIntegerKey * FIELD_NUMBER_OF_COMPONENTS ()
static vtkInformationIntegerKey * FIELD_NUMBER_OF_TUPLES ()
static vtkInformationIntegerKey * FIELD_OPERATION ()
static
vtkInformationDoubleVectorKey * 
FIELD_RANGE ()
static
vtkInformationDoubleVectorKey * 
PIECE_FIELD_RANGE ()
static vtkInformationStringKey * FIELD_ARRAY_NAME ()
static
vtkInformationIntegerVectorKey * 
PIECE_EXTENT ()
static vtkInformationStringKey * FIELD_NAME ()
static
vtkInformationDoubleVectorKey * 
ORIGIN ()
static
vtkInformationDoubleVectorKey * 
SPACING ()
static vtkInformationIntegerKey * DATA_GEOMETRY_UNMODIFIED ()
static
vtkInformationDataObjectKey * 
SIL ()
static vtkInformation * GetActiveFieldInformation (vtkInformation *info, int fieldAssociation, int attributeType)
static vtkInformation * GetNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name)
static void RemoveNamedFieldInformation (vtkInformation *info, int fieldAssociation, const char *name)
static vtkInformation * SetActiveAttribute (vtkInformation *info, int fieldAssociation, const char *attributeName, int attributeType)
static void SetActiveAttributeInfo (vtkInformation *info, int fieldAssociation, int attributeType, const char *name, int arrayType, int numComponents, int numTuples)
static void SetPointDataActiveScalarInfo (vtkInformation *info, int arrayType, int numComponents)
static void SetGlobalReleaseDataFlag (int val)
static int GetGlobalReleaseDataFlag ()
- Static Public Member Functions inherited from vtkObject
static void BreakOnError ()
static void SetGlobalWarningDisplay (int val)
static void GlobalWarningDisplayOn ()
static void GlobalWarningDisplayOff ()
static int GetGlobalWarningDisplay ()

Protected Member Functions

 vtkMolecule ()
 ~vtkMolecule ()
virtual void CopyStructureInternal (vtkMolecule *m, bool deep)
virtual void CopyAttributesInternal (vtkMolecule *m, bool deep)
- Protected Member Functions inherited from vtkUndirectedGraph
 vtkUndirectedGraph ()
 ~vtkUndirectedGraph ()
virtual void GetInEdges (vtkIdType v, const vtkInEdgeType *&edges, vtkIdType &nedges)
- Protected Member Functions inherited from vtkGraph
 vtkGraph ()
 ~vtkGraph ()
void AddVertexInternal (const vtkVariant &pedigree, vtkIdType *vertex)
void RemoveVertexInternal (vtkIdType v, bool directed)
void RemoveEdgeInternal (vtkIdType e, bool directed)
void RemoveVerticesInternal (vtkIdTypeArray *arr, bool directed)
virtual void CopyInternal (vtkGraph *g, bool deep)
void SetInternals (vtkGraphInternals *internals)
void SetEdgePoints (vtkGraphEdgePoints *edgePoints)
void ForceOwnership ()
void BuildEdgeList ()
void AddVertexInternal (vtkVariantArray *propertyArr=0, vtkIdType *vertex=0)
void AddEdgeInternal (vtkIdType u, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
void AddEdgeInternal (const vtkVariant &uPedigree, vtkIdType v, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
void AddEdgeInternal (vtkIdType u, const vtkVariant &vPedigree, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
void AddEdgeInternal (const vtkVariant &uPedigree, const vtkVariant &vPedigree, bool directed, vtkVariantArray *propertyArr, vtkEdgeType *edge)
void RemoveEdgesInternal (vtkIdTypeArray *arr, bool directed)
virtual void GetOutEdges (vtkIdType v, const vtkOutEdgeType *&edges, vtkIdType &nedges)
virtual vtkIdTypeArray * GetEdgeList ()
virtual void SetEdgeList (vtkIdTypeArray *list)
- Protected Member Functions inherited from vtkDataObject
 vtkDataObject ()
 ~vtkDataObject ()
vtkExecutive * GetExecutive ()
int GetPortNumber ()
virtual void ReportReferences (vtkGarbageCollector *)
vtkStreamingDemandDrivenPipeline * TrySDDP (const char *method)
- Protected Member Functions inherited from vtkObject
 vtkObject ()
virtual ~vtkObject ()
virtual void RegisterInternal (vtkObjectBase *, int check)
virtual void UnRegisterInternal (vtkObjectBase *, int check)
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
void InternalReleaseFocus ()
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
virtual ~vtkObjectBase ()
virtual void CollectRevisions (ostream &os)
 vtkObjectBase (const vtkObjectBase &)
void operator= (const vtkObjectBase &)

Protected Attributes

vtkAbstractElectronicData * ElectronicData

Friends

class vtkAtom
class vtkBond
bool BondListIsDirty
void SetBondListDirty ()
void UpdateBondList ()

Additional Inherited Members

- Protected Types inherited from vtkDataObject
typedef
vtkStreamingDemandDrivenPipeline 
SDDP
- Static Protected Attributes inherited from vtkGraph
static double DefaultPoint [3]
- Static Protected Attributes inherited from vtkDataObject
static const char AssociationNames [NUMBER_OF_ASSOCIATIONS][55]

Detailed Description

class describing a molecule

vtkMolecule and the convenience classes vtkAtom and vtkBond describe the geometry and connectivity of a molecule. The molecule can be constructed using the AppendAtom() and AppendBond() methods in one of two ways; either by fully specifying the atom/bond in a single call, or by incrementally setting the various attributes using the convience vtkAtom and vtkBond classes:

Single call:

vtkAtom h1 = mol->AppendAtom(1, 0.0, 0.0, -0.5);
vtkAtom h2 = mol->AppendAtom(1, 0.0, 0.0, 0.5);
vtkBond b = mol->AppendBond(h1, h2, 1);

Incremental:

vtkAtom h1 = mol->AppendAtom();
h1.SetPosition(0.0, 0.0, -0.5);
vtkAtom h2 = mol->AppendAtom();
vtkVector3d displacement (0.0, 0.0, 1.0);
h2.SetPosition(h1.GetPositionAsVector3d() + displacement);
vtkBond b = mol->AppendBond(h1, h2, 1);

Both of the above methods will produce the same molecule, two hydrogens connected with a 1.0 Angstrom single bond, aligned to the z-axis. The second example also demostrates the use of VTK's vtkVector class, which is fully supported by the Chemistry kit.

The vtkMolecule object is intended to be used with the vtkMoleculeMapper class for visualizing molecular structure using common rendering techniques.

Warning
While direct use of the underlying vtkUndirectedGraph structure is possible due to vtkMolecule's public inheritance, this should not be relied upon and may change in the future.
See Also
vtkAtom vtkBond vtkMoleculeMapper vtkPeriodicTable
Tests:
vtkMolecule (Tests)

Definition at line 87 of file vtkMolecule.h.

Member Typedef Documentation

Definition at line 91 of file vtkMolecule.h.

Constructor & Destructor Documentation

vtkMolecule::vtkMolecule ( )
protected
vtkMolecule::~vtkMolecule ( )
protected

Member Function Documentation

static vtkMolecule* vtkMolecule::New ( )
static

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkUndirectedGraph.

virtual const char* vtkMolecule::GetClassName ( )
virtual

Reimplemented from vtkUndirectedGraph.

static int vtkMolecule::IsTypeOf ( const char *  name)
static

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkUndirectedGraph.

virtual int vtkMolecule::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkUndirectedGraph.

static vtkMolecule* vtkMolecule::SafeDownCast ( vtkObject *  o)
static

Reimplemented from vtkUndirectedGraph.

void vtkMolecule::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkUndirectedGraph.

virtual void vtkMolecule::Initialize ( )
virtual

Initialize to an empty graph.

Reimplemented from vtkGraph.

vtkAtom vtkMolecule::AppendAtom ( )
inline

Add new atom with atomic number 0 (dummy atom) at origin. Return a vtkAtom that refers to the new atom.

Definition at line 99 of file vtkMolecule.h.

vtkAtom vtkMolecule::AppendAtom ( unsigned short  atomicNumber,
const vtkVector3f &  pos 
)

Add new atom with the specified atomic number and position. Return a vtkAtom that refers to the new atom.

vtkAtom vtkMolecule::AppendAtom ( unsigned short  atomicNumber,
double  x,
double  y,
double  z 
)
inline

Convenience methods to append a new atom with the specified atomic number and position.

Definition at line 112 of file vtkMolecule.h.

vtkAtom vtkMolecule::GetAtom ( vtkIdType  atomId)

Return a vtkAtom that refers to the atom with the specified id.

vtkIdType vtkMolecule::GetNumberOfAtoms ( )

Return the number of atoms in the molecule.

vtkBond vtkMolecule::AppendBond ( vtkIdType  atom1,
vtkIdType  atom2,
unsigned short  order = 1 
)

Add a bond between the specified atoms, optionally setting the bond order (default: 1). Return a vtkBond object referring to the new bond.

vtkBond vtkMolecule::AppendBond ( const vtkAtom &  atom1,
const vtkAtom &  atom2,
unsigned short  order = 1 
)
inline

Add a bond between the specified atoms, optionally setting the bond order (default: 1). Return a vtkBond object referring to the new bond.

Definition at line 130 of file vtkMolecule.h.

vtkBond vtkMolecule::GetBond ( vtkIdType  bondId)

Return a vtkAtom that refers to the bond with the specified id.

vtkIdType vtkMolecule::GetNumberOfBonds ( )

Return the number of bonds in the molecule.

unsigned short vtkMolecule::GetAtomAtomicNumber ( vtkIdType  atomId)

Return the atomic number of the atom with the specified id.

void vtkMolecule::SetAtomAtomicNumber ( vtkIdType  atomId,
unsigned short  atomicNum 
)

Set the atomic number of the atom with the specified id.

void vtkMolecule::SetAtomPosition ( vtkIdType  atomId,
const vtkVector3f &  pos 
)

Set the position of the atom with the specified id.

void vtkMolecule::SetAtomPosition ( vtkIdType  atomId,
double  x,
double  y,
double  z 
)

Set the position of the atom with the specified id.

vtkVector3f vtkMolecule::GetAtomPosition ( vtkIdType  atomId)

Get the position of the atom with the specified id.

void vtkMolecule::GetAtomPosition ( vtkIdType  atomId,
float  pos[3] 
)

Get the position of the atom with the specified id.

void vtkMolecule::SetBondOrder ( vtkIdType  bondId,
unsigned short  order 
)

Get/Set the bond order of the bond with the specified id

unsigned short vtkMolecule::GetBondOrder ( vtkIdType  bondId)

Get/Set the bond order of the bond with the specified id

double vtkMolecule::GetBondLength ( vtkIdType  bondId)

Get the bond length of the bond with the specified id

Note
If the associated vtkBond object is already available, vtkBond::GetBondLength is potentially much faster than this function, as a list of all bonds may need to be constructed to locate the appropriate bond.
See Also
UpdateBondList()
vtkPoints* vtkMolecule::GetAtomicPositionArray ( )

Access the raw arrays used in this vtkMolecule instance

vtkUnsignedShortArray* vtkMolecule::GetAtomicNumberArray ( )

Access the raw arrays used in this vtkMolecule instance

virtual vtkAbstractElectronicData* vtkMolecule::GetElectronicData ( )
virtual

Set/Get the AbstractElectronicData-subclassed object for this molecule.

virtual void vtkMolecule::SetElectronicData ( vtkAbstractElectronicData *  )
virtual

Set/Get the AbstractElectronicData-subclassed object for this molecule.

virtual void vtkMolecule::ShallowCopy ( vtkDataObject *  obj)
virtual

Shallow copies the data object into this molecule.

Reimplemented from vtkGraph.

virtual void vtkMolecule::DeepCopy ( vtkDataObject *  obj)
virtual

Deep copies the data object into this molecule.

Reimplemented from vtkGraph.

virtual void vtkMolecule::ShallowCopyStructure ( vtkMolecule *  m)
virtual

Shallow copies the atoms and bonds from m into this.

virtual void vtkMolecule::DeepCopyStructure ( vtkMolecule *  m)
virtual

Deep copies the atoms and bonds from m into this.

virtual void vtkMolecule::ShallowCopyAttributes ( vtkMolecule *  m)
virtual

Shallow copies attributes (i.e. everything besides atoms and bonds) from m into this.

virtual void vtkMolecule::DeepCopyAttributes ( vtkMolecule *  m)
virtual

Deep copies attributes (i.e. everything besides atoms and bonds) from m into this.

static bool vtkMolecule::GetPlaneFromBond ( const vtkBond &  bond,
const vtkVector3f &  normal,
vtkPlane *  plane 
)
static

Obtain the plane that passes through the indicated bond with the given normal. If the plane is set successfully, the function returns true. If the normal is not orthogonal to the bond, a new normal will be constructed in such a way that the plane will be orthogonal to the plane spanned by the bond vector and the input normal vector. This ensures that the plane passes through the bond, and the normal is more of a "hint" indicating the orientation of the plane. The new normal (n) is defined as the input normal vector (n_i) minus the projection of itself (proj[n_i]_v) onto the bond vector (v):

v ^ |  n = (n_i - proj[n_j]_v) proj[n_i]_v ^  |----x |   |  
     / |  |  / n_i |  | / |  |/ 

If n_i is parallel to v, a warning will be printed and no plane will be added. Obviously, n_i must not be parallel to v.

static bool vtkMolecule::GetPlaneFromBond ( const vtkAtom &  atom1,
const vtkAtom &  atom2,
const vtkVector3f &  normal,
vtkPlane *  plane 
)
static

Obtain the plane that passes through the indicated bond with the given normal. If the plane is set successfully, the function returns true. If the normal is not orthogonal to the bond, a new normal will be constructed in such a way that the plane will be orthogonal to the plane spanned by the bond vector and the input normal vector. This ensures that the plane passes through the bond, and the normal is more of a "hint" indicating the orientation of the plane. The new normal (n) is defined as the input normal vector (n_i) minus the projection of itself (proj[n_i]_v) onto the bond vector (v):

v ^ |  n = (n_i - proj[n_j]_v) proj[n_i]_v ^  |----x |   |  
     / |  |  / n_i |  | / |  |/ 

If n_i is parallel to v, a warning will be printed and no plane will be added. Obviously, n_i must not be parallel to v.

virtual void vtkMolecule::CopyStructureInternal ( vtkMolecule *  m,
bool  deep 
)
protectedvirtual

Copy bonds and atoms.

virtual void vtkMolecule::CopyAttributesInternal ( vtkMolecule *  m,
bool  deep 
)
protectedvirtual

Copy everything but bonds and atoms.

void vtkMolecule::SetBondListDirty ( )
inlineprotected

The graph superclass does not provide fast random access to the edge (bond) data. All random access is performed using a lookup table that must be rebuilt periodically. These allow for lazy building of the lookup table

Definition at line 251 of file vtkMolecule.h.

void vtkMolecule::UpdateBondList ( )
protected

The graph superclass does not provide fast random access to the edge (bond) data. All random access is performed using a lookup table that must be rebuilt periodically. These allow for lazy building of the lookup table

Friends And Related Function Documentation

friend class vtkAtom
friend

Definition at line 255 of file vtkMolecule.h.

friend class vtkBond
friend

Definition at line 256 of file vtkMolecule.h.

Member Data Documentation

bool vtkMolecule::BondListIsDirty
protected

The graph superclass does not provide fast random access to the edge (bond) data. All random access is performed using a lookup table that must be rebuilt periodically. These allow for lazy building of the lookup table

Definition at line 250 of file vtkMolecule.h.

vtkAbstractElectronicData* vtkMolecule::ElectronicData
protected

Definition at line 258 of file vtkMolecule.h.


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