This is a python friendly wrapper of a vtkMolecule that defines a few useful properties.
| 1464 | EdgeData = property(GetEdgeData, None, None, "This property returns the edge data of the graph.") |
| 1465 | |
| 1466 | class Molecule(DataObject): |
| 1467 | """This is a python friendly wrapper of a vtkMolecule that defines |
| 1468 | a few useful properties.""" |
| 1469 | def GetAtomData(self): |
| 1470 | "Returns the atom data as a DataSetAttributes instance." |
| 1471 | return self.GetVertexData() |
| 1472 | |
| 1473 | def GetBondData(self): |
| 1474 | "Returns the bond data as a DataSetAttributes instance." |
| 1475 | return self.GetEdgeData() |
| 1476 | |
| 1477 | AtomData = property(GetAtomData, None, None, "This property returns the atom data of the molecule.") |
| 1478 | BondData = property(GetBondData, None, None, "This property returns the bond data of the molecule.") |
| 1479 | |
| 1480 | def WrapDataObject(ds): |
| 1481 | """Returns a Numpy friendly wrapper of a vtkDataObject.""" |