VTK  9.3.0
vtkPeriodicTable.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkPeriodicTable_h
18 #define vtkPeriodicTable_h
19 
20 #include "vtkDomainsChemistryModule.h" // For export macro
21 #include "vtkNew.h" // Needed for the static data member
22 #include "vtkObject.h"
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkBlueObeliskData;
26 class vtkColor3f;
27 class vtkLookupTable;
28 class vtkStdString;
29 
30 class VTKDOMAINSCHEMISTRY_EXPORT vtkPeriodicTable : public vtkObject
31 {
32 public:
33  vtkTypeMacro(vtkPeriodicTable, vtkObject);
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35  static vtkPeriodicTable* New();
36 
38 
44 
48  unsigned short GetNumberOfElements();
49 
54  const char* GetSymbol(unsigned short atomicNum);
55 
59  const char* GetElementName(unsigned short atomicNum);
60 
62 
66  unsigned short GetAtomicNumber(const vtkStdString& str);
67  unsigned short GetAtomicNumber(const char* str);
69 
73  float GetCovalentRadius(unsigned short atomicNum);
74 
79  float GetVDWRadius(unsigned short atomicNum);
80 
85  float GetMaxVDWRadius();
86 
92 
97  void GetDefaultRGBTuple(unsigned short atomicNum, float rgb[3]);
98 
103  vtkColor3f GetDefaultRGBTuple(unsigned short atomicNum);
104 
105 protected:
107  ~vtkPeriodicTable() override;
108 
110 
111 private:
112  vtkPeriodicTable(const vtkPeriodicTable&) = delete;
113  void operator=(const vtkPeriodicTable&) = delete;
114 };
115 
116 VTK_ABI_NAMESPACE_END
117 #endif
Contains chemical data from the Blue Obelisk Data Repository.
a simple class to control print indentation
Definition: vtkIndent.h:38
map scalar values into colors via a lookup table
abstract base class for most VTK objects
Definition: vtkObject.h:61
Access to information about the elements.
unsigned short GetAtomicNumber(const vtkStdString &str)
Given a case-insensitive string that contains the symbol or name of an element, return the correspond...
float GetMaxVDWRadius()
Given an atomic number, returns the van der Waals radius of the atom.
float GetVDWRadius(unsigned short atomicNum)
Given an atomic number, returns the van der Waals radius of the atom.
~vtkPeriodicTable() override
static vtkPeriodicTable * New()
float GetCovalentRadius(unsigned short atomicNum)
Given an atomic number, return the covalent radius of the atom.
const char * GetSymbol(unsigned short atomicNum)
Given an atomic number, returns the symbol associated with the element.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetElementName(unsigned short atomicNum)
Given an atomic number, returns the name of the element.
static vtkNew< vtkBlueObeliskData > BlueObeliskData
unsigned short GetNumberOfElements()
Returns the number of elements in the periodic table.
void GetDefaultRGBTuple(unsigned short atomicNum, float rgb[3])
Given an atomic number, return the familiar RGB tuple provided by the Blue Obelisk Data Repository.
vtkGetNewMacro(BlueObeliskData, vtkBlueObeliskData)
Access the static vtkBlueObeliskData object for raw access to BODR data.
void GetDefaultLUT(vtkLookupTable *)
Fill the given vtkLookupTable to map atomic numbers to the familiar RGB tuples provided by the Blue O...
unsigned short GetAtomicNumber(const char *str)
Given a case-insensitive string that contains the symbol or name of an element, return the correspond...
vtkColor3f GetDefaultRGBTuple(unsigned short atomicNum)
Given an atomic number, return the familiar RGB tuple provided by the Blue Obelisk Data Repository.
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38