Go to the documentation of this file.
75 #include "vtkCommonDataModelModule.h"
128 return this->AppendAtom(atomicNumber,
vtkVector3f(x, y, z));
148 unsigned short order = 1);
150 unsigned short order = 1)
152 return this->AppendBond(atom1.
Id, atom2.
Id,
order);
175 unsigned short atomicNum);
363 void AllocateAtomGhostArray();
373 void AllocateBondGhostArray();
389 return this->
Initialize(atomPositions,
nullptr, atomData);
433 vtkSetStringMacro(AtomicNumberArrayName);
434 vtkGetStringMacro(AtomicNumberArrayName);
441 vtkSetStringMacro(BondOrdersArrayName);
442 vtkGetStringMacro(BondOrdersArrayName);
represent and manipulate 3D points
vtkPoints * GetAtomicPositionArray()
Access the raw arrays used in this vtkMolecule instance.
perform various plane computations
vtkAtom AppendAtom(unsigned short atomicNumber, double x, double y, double z)
Convenience methods to append a new atom with the specified atomic number and position.
vtkIdTypeArray * GetBondList()
vtkAtom AppendAtom(unsigned short atomicNumber, const vtkVector3f &pos)
Add new atom with the specified atomic number and position.
virtual vtkDataSetAttributes * GetEdgeData()
dynamic, self-adjusting array of unsigned short
void Initialize() override
Initialize to an empty graph.
represent and manipulate attribute data in a dataset
dynamic, self-adjusting array of unsigned char
unsigned short GetAtomAtomicNumber(vtkIdType atomId)
Return the atomic number of the atom with the specified id.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool HasLattice()
Return true if a unit cell lattice is defined.
static vtkMolecule * GetData(vtkInformationVector *v, int i=0)
void GetAtomPosition(vtkIdType atomId, float pos[3])
char * BondOrdersArrayName
vtkIdType GetNumberOfBonds()
Return the number of bonds in the molecule.
abstract superclass for arrays of numeric data
bool CheckedShallowCopy(vtkGraph *g) override
Performs the same operation as ShallowCopy(), but instead of reporting an error for an incompatible g...
convenience proxy for vtkMolecule
represent and manipulate 3x3 transformation matrices
void SetLattice(const vtkVector3d &a, const vtkVector3d &b, const vtkVector3d &c)
vtkIdType GetBondId(vtkIdType a, vtkIdType b)
Return the edge id from the underlying graph.
virtual vtkDataSetAttributes * GetVertexData()
Get the vertex or edge data.
bool BondListIsDirty
The graph superclass does not provide fast random access to the edge (bond) data.
vtkUnsignedCharArray * AtomGhostArray
convenience proxy for vtkMolecule
vtkUnsignedShortArray * GetBondOrdersArray()
virtual void ShallowCopyStructure(vtkMolecule *m)
Shallow copies the atoms and bonds from m into this.
vtkBond AppendBond(const vtkAtom &atom1, const vtkAtom &atom2, unsigned short order=1)
virtual void SetElectronicData(vtkAbstractElectronicData *)
vtkDataSetAttributes * GetBondData()
Return the EdgeData of the underlying graph.
virtual void DeepCopyAttributes(vtkMolecule *m)
Deep copies attributes (i.e.
vtkDataSetAttributes * GetAtomData()
Return the VertexData of the underlying graph.
void SetLattice(vtkMatrix3x3 *matrix)
The unit cell vectors.
virtual void ShallowCopyAttributes(vtkMolecule *m)
Shallow copies attributes (i.e.
Provides access to and storage of chemical electronic data.
void DeepCopy(vtkDataObject *obj) override
Deep copies the data object into this molecule.
void ShallowCopy(vtkDataObject *obj) override
Shallow copies the data object into this molecule.
vtkMatrix3x3 * GetLattice()
Get the unit cell lattice vectors.
virtual void CopyStructureInternal(vtkMolecule *m, bool deep)
Copy bonds and atoms.
bool CheckedDeepCopy(vtkGraph *g) override
Performs the same operation as DeepCopy(), but instead of reporting an error for an incompatible grap...
static bool GetPlaneFromBond(const vtkBond &bond, const vtkVector3f &normal, vtkPlane *plane)
Obtain the plane that passes through the indicated bond with the given normal.
vtkIdType GetEdgeId(vtkIdType a, vtkIdType b)
Returns the Id of the edge between vertex a and vertex b.
a simple class to control print indentation
virtual void CopyAttributesInternal(vtkMolecule *m, bool deep)
Copy everything but bonds and atoms.
int Initialize(vtkMolecule *molecule)
Use input molecule points, atomic number and atomic data to initialize the new molecule.
void GetLattice(vtkVector3d &a, vtkVector3d &b, vtkVector3d &c)
Get the unit cell lattice vectors, and optionally, the origin.
void SetAtomAtomicNumber(vtkIdType atomId, unsigned short atomicNum)
Set the atomic number of the atom with the specified id.
void SetAtomPosition(vtkIdType atomId, double x, double y, double z)
vtkVector3d LatticeOrigin
static bool GetPlaneFromBond(const vtkAtom &atom1, const vtkAtom &atom2, const vtkVector3f &normal, vtkPlane *plane)
class describing a molecule
void GetLattice(vtkVector3d &a, vtkVector3d &b, vtkVector3d &c, vtkVector3d &origin)
vtkUnsignedCharArray * BondGhostArray
int GetDataObjectType() override
Return what type of dataset this is.
unsigned short GetBondOrder(vtkIdType bondId)
virtual void DeepCopyStructure(vtkMolecule *m)
Deep copies the atoms and bonds from m into this.
char * AtomicNumberArrayName
vtkBond GetBond(vtkIdType bondId)
Return a vtkAtom that refers to the bond with the specified id.
void Initialize() override
Initialize to an empty graph.
vtkUnsignedShortArray * GetAtomicNumberArray()
vtkSmartPointer< vtkMatrix3x3 > Lattice
dynamic, self-adjusting array of vtkIdType
vtkVector3f GetAtomPosition(vtkIdType atomId)
Get the position of the atom with the specified id.
void SetBondOrder(vtkIdType bondId, unsigned short order)
Get/Set the bond order of the bond with the specified id.
vtkAtom AppendAtom()
Add new atom with atomic number 0 (dummy atom) at origin.
void SetAtomPosition(vtkIdType atomId, const vtkVector3f &pos)
Set the position of the atom with the specified id.
Base class for graph data types.
general representation of visualization data
vtkAbstractElectronicData * ElectronicData
vtkAtom GetAtom(vtkIdType atomId)
Return a vtkAtom that refers to the atom with the specified id.
double GetBondLength(vtkIdType bondId)
Get the bond length of the bond with the specified id.
static vtkMolecule * New()
vtkIdType GetNumberOfAtoms()
Return the number of atoms in the molecule.
void ClearLattice()
Remove any unit cell lattice information from the molecule.
static vtkMolecule * GetData(vtkInformation *info)
Retrieve a molecule from an information vector.
vtkBond AppendBond(vtkIdType atom1, vtkIdType atom2, unsigned short order=1)
Add a bond between the specified atoms, optionally setting the bond order (default: 1).