VTK  9.3.20240424
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
24VTK_ABI_NAMESPACE_BEGIN
26class vtkColor3f;
27class vtkLookupTable;
28class vtkStdString;
29
30class VTKDOMAINSCHEMISTRY_EXPORT vtkPeriodicTable : public vtkObject
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
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
86
92
97 void GetDefaultRGBTuple(unsigned short atomicNum, float rgb[3]);
98
103 vtkColor3f GetDefaultRGBTuple(unsigned short atomicNum);
104
105protected:
108
110
111private:
112 vtkPeriodicTable(const vtkPeriodicTable&) = delete;
113 void operator=(const vtkPeriodicTable&) = delete;
114};
115
116VTK_ABI_NAMESPACE_END
117#endif
Contains chemical data from the Blue Obelisk Data Repository.
a simple class to control print indentation
Definition vtkIndent.h:108
map scalar values into colors via a lookup table
Allocate and hold a VTK object.
Definition vtkNew.h:160
abstract base class for most VTK objects
Definition vtkObject.h:162
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.
const char * GetSymbol(unsigned short atomicNum)
Given an atomic number, returns the symbol associated with the element.
float GetVDWRadius(unsigned short atomicNum)
Given an atomic number, returns the van der Waals radius of the atom.
~vtkPeriodicTable() override
const char * GetElementName(unsigned short atomicNum)
Given an atomic number, returns the name of the element.
float GetCovalentRadius(unsigned short atomicNum)
Given an atomic number, return the covalent radius of the atom.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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.
static vtkPeriodicTable * New()
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.