VTK
vtkBlueObeliskData.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBlueObeliskData.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
36 #ifndef vtkBlueObeliskData_h
37 #define vtkBlueObeliskData_h
38 
39 #include "vtkDomainsChemistryModule.h" // For export macro
40 #include "vtkObject.h"
41 #include "vtkNew.h" // For vtkNew
42 
43 class vtkAbstractArray;
44 class vtkFloatArray;
45 class vtkStringArray;
46 class vtkSimpleMutexLock;
48 
49 // Hidden STL reference: std::vector<vtkAbstractArray*>
50 class MyStdVectorOfVtkAbstractArrays;
51 
52 class VTKDOMAINSCHEMISTRY_EXPORT vtkBlueObeliskData : public vtkObject
53 {
54  public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57  static vtkBlueObeliskData *New();
58 
65  void Initialize();
66 
70  bool IsInitialized() { return this->Initialized;}
71 
73 
77  vtkGetObjectMacro(WriteMutex, vtkSimpleMutexLock);
79 
81 
85  vtkGetMacro(NumberOfElements, unsigned short);
87 
89 
92  vtkGetNewMacro(Symbols, vtkStringArray);
93  vtkGetNewMacro(LowerSymbols, vtkStringArray);
94  vtkGetNewMacro(Names, vtkStringArray);
95  vtkGetNewMacro(LowerNames, vtkStringArray);
96  vtkGetNewMacro(PeriodicTableBlocks, vtkStringArray);
98  vtkGetNewMacro(Families, vtkStringArray);
100 
101  vtkGetNewMacro(Masses, vtkFloatArray);
102  vtkGetNewMacro(ExactMasses, vtkFloatArray);
103  vtkGetNewMacro(IonizationEnergies, vtkFloatArray);
104  vtkGetNewMacro(ElectronAffinities, vtkFloatArray);
105  vtkGetNewMacro(PaulingElectronegativities, vtkFloatArray);
106  vtkGetNewMacro(CovalentRadii, vtkFloatArray);
107  vtkGetNewMacro(VDWRadii, vtkFloatArray);
108  vtkGetNewMacro(DefaultColors, vtkFloatArray);
109  vtkGetNewMacro(BoilingPoints, vtkFloatArray);
110  vtkGetNewMacro(MeltingPoints, vtkFloatArray);
111 
112  vtkGetNewMacro(Periods, vtkUnsignedShortArray);
113  vtkGetNewMacro(Groups, vtkUnsignedShortArray);
114 
119  static bool GenerateHeaderFromXML(std::istream &xml, std::ostream &header);
120 
121  protected:
123 
125  ~vtkBlueObeliskData() override;
126 
129 
134  virtual int Allocate(vtkIdType sz, vtkIdType ext=1000);
135 
139  virtual void Reset();
140 
144  virtual void Squeeze();
145 
146  unsigned short NumberOfElements;
147 
148  // Lists all arrays
149  MyStdVectorOfVtkAbstractArrays *Arrays;
150 
151  // Atomic Symbols
154 
155  // Element Names
158 
159  // Misc Strings
162  vtkNew<vtkStringArray> Families; // Non-Metal, Noblegas, Metalloids, etc
163 
164  // Misc Data
172  vtkNew<vtkFloatArray> DefaultColors; // rgb 3-tuples, [0.0,1.0]
175  vtkNew<vtkUnsignedShortArray> Periods; // Row of periodic table
176  vtkNew<vtkUnsignedShortArray> Groups; // Column of periodic table
177 
178  void PrintSelfIfExists(const char *, vtkObject *, ostream&, vtkIndent);
179 
180  private:
181  vtkBlueObeliskData(const vtkBlueObeliskData&) = delete;
182  void operator=(const vtkBlueObeliskData&) = delete;
183 };
184 
185 #endif
bool IsInitialized()
Check if this object has been initialized yet.
vtkNew< vtkFloatArray > CovalentRadii
static const float Masses[119][1]
static const char * ElectronicConfigurations[119]
abstract base class for most VTK objects
Definition: vtkObject.h:53
vtkNew< vtkStringArray > Names
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew< vtkFloatArray > ElectronAffinities
static const float PaulingElectronegativities[119][1]
static const float BoilingPoints[119][1]
static const unsigned short Periods[119][1]
Abstract superclass for all arrays.
vtkNew< vtkStringArray > ElectronicConfigurations
vtkNew< vtkFloatArray > Masses
static const float DefaultColors[119][3]
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:35
vtkNew< vtkFloatArray > MeltingPoints
vtkNew< vtkUnsignedShortArray > Groups
a vtkAbstractArray subclass for strings
vtkNew< vtkStringArray > PeriodicTableBlocks
static const float ExactMasses[119][1]
int vtkIdType
Definition: vtkType.h:347
static const char * Symbols[119]
vtkNew< vtkFloatArray > IonizationEnergies
static const char * Families[119]
static const unsigned short Groups[119][1]
static const char * LowerSymbols[119]
vtkNew< vtkStringArray > Symbols
static const float IonizationEnergies[119][1]
vtkNew< vtkFloatArray > DefaultColors
static const char * Names[119]
vtkNew< vtkStringArray > Families
a simple class to control print indentation
Definition: vtkIndent.h:33
static const float ElectronAffinities[119][1]
vtkNew< vtkFloatArray > VDWRadii
vtkNew< vtkFloatArray > BoilingPoints
unsigned short NumberOfElements
static const float MeltingPoints[119][1]
vtkNew< vtkStringArray > LowerNames
vtkNew< vtkFloatArray > PaulingElectronegativities
static const float VDWRadii[119][1]
vtkNew< vtkStringArray > LowerSymbols
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Fill a vtkBlueObeliskData container with data from the BODR XML dataset.
MyStdVectorOfVtkAbstractArrays * Arrays
vtkNew< vtkUnsignedShortArray > Periods
static const char * LowerNames[119]
vtkNew< vtkFloatArray > ExactMasses
dynamic, self-adjusting array of unsigned short
static const char * PeriodicTableBlocks[119]
vtkSimpleMutexLock * WriteMutex
static const float CovalentRadii[119][1]
Contains chemical data from the Blue Obelisk Data Repository.