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 =========================================================================*/
39 #ifndef vtkBlueObeliskData_h
40 #define vtkBlueObeliskData_h
41 
42 #include "vtkDomainsChemistryModule.h" // For export macro
43 #include "vtkObject.h"
44 #include "vtkNew.h" // For vtkNew
45 
46 class vtkAbstractArray;
47 class vtkFloatArray;
48 class vtkStringArray;
49 class vtkSimpleMutexLock;
51 
52 // Hidden STL reference: std::vector<vtkAbstractArray*>
53 class MyStdVectorOfVtkAbstractArrays;
54 
55 class VTKDOMAINSCHEMISTRY_EXPORT vtkBlueObeliskData : public vtkObject
56 {
57  public:
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60  static vtkBlueObeliskData *New();
61 
68  void Initialize();
69 
73  bool IsInitialized() { return this->Initialized;}
74 
76 
80  vtkGetObjectMacro(WriteMutex, vtkSimpleMutexLock);
82 
84 
88  vtkGetMacro(NumberOfElements, unsigned short);
90 
92 
95  vtkGetNewMacro(Symbols, vtkStringArray);
96  vtkGetNewMacro(LowerSymbols, vtkStringArray);
97  vtkGetNewMacro(Names, vtkStringArray);
98  vtkGetNewMacro(LowerNames, vtkStringArray);
99  vtkGetNewMacro(PeriodicTableBlocks, vtkStringArray);
100  vtkGetNewMacro(ElectronicConfigurations, vtkStringArray);
101  vtkGetNewMacro(Families, vtkStringArray);
103 
104  vtkGetNewMacro(Masses, vtkFloatArray);
105  vtkGetNewMacro(ExactMasses, vtkFloatArray);
106  vtkGetNewMacro(IonizationEnergies, vtkFloatArray);
107  vtkGetNewMacro(ElectronAffinities, vtkFloatArray);
108  vtkGetNewMacro(PaulingElectronegativities, vtkFloatArray);
109  vtkGetNewMacro(CovalentRadii, vtkFloatArray);
110  vtkGetNewMacro(VDWRadii, vtkFloatArray);
111  vtkGetNewMacro(DefaultColors, vtkFloatArray);
112  vtkGetNewMacro(BoilingPoints, vtkFloatArray);
113  vtkGetNewMacro(MeltingPoints, vtkFloatArray);
114 
115  vtkGetNewMacro(Periods, vtkUnsignedShortArray);
116  vtkGetNewMacro(Groups, vtkUnsignedShortArray);
117 
122  static bool GenerateHeaderFromXML(std::istream &xml, std::ostream &header);
123 
124  protected:
126 
128  ~vtkBlueObeliskData() override;
129 
132 
137  virtual vtkTypeBool Allocate(vtkIdType sz, vtkIdType ext=1000);
138 
142  virtual void Reset();
143 
147  virtual void Squeeze();
148 
149  unsigned short NumberOfElements;
150 
151  // Lists all arrays
152  MyStdVectorOfVtkAbstractArrays *Arrays;
153 
154  // Atomic Symbols
157 
158  // Element Names
161 
162  // Misc Strings
165  vtkNew<vtkStringArray> Families; // Non-Metal, Noblegas, Metalloids, etc
166 
167  // Misc Data
175  vtkNew<vtkFloatArray> DefaultColors; // rgb 3-tuples, [0.0,1.0]
178  vtkNew<vtkUnsignedShortArray> Periods; // Row of periodic table
179  vtkNew<vtkUnsignedShortArray> Groups; // Column of periodic table
180 
181  void PrintSelfIfExists(const char *, vtkObject *, ostream&, vtkIndent);
182 
183  private:
184  vtkBlueObeliskData(const vtkBlueObeliskData&) = delete;
185  void operator=(const vtkBlueObeliskData&) = delete;
186 };
187 
188 #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:59
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:41
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
int vtkTypeBool
Definition: vtkABI.h:69
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:39
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.