VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
35 #ifndef __vtkBlueObeliskData_h
36 #define __vtkBlueObeliskData_h
37 
38 #include "vtkDomainsChemistryModule.h" // For export macro
39 #include "vtkObject.h"
40 #include "vtkNew.h" // For vtkNew
41 
42 class vtkAbstractArray;
43 class vtkFloatArray;
44 class vtkStringArray;
45 class vtkSimpleMutexLock;
46 class vtkUnsignedShortArray;
47 
48 // Hidden STL reference: vtkstd::vector<vtkAbstractArray*>
49 class MyStdVectorOfVtkAbstractArrays;
50 
51 class VTKDOMAINSCHEMISTRY_EXPORT vtkBlueObeliskData : public vtkObject
52 {
53  public:
54  vtkTypeMacro(vtkBlueObeliskData,vtkObject);
55  void PrintSelf(ostream& os, vtkIndent indent);
56  static vtkBlueObeliskData *New();
57 
62  void Initialize();
63 
65  bool IsInitialized() { return this->Initialized;}
66 
68 
70  vtkGetObjectMacro(WriteMutex, vtkSimpleMutexLock);
72 
74 
76  vtkGetMacro(NumberOfElements, unsigned short);
78 
80 
81  vtkGetNewMacro(Symbols, vtkStringArray);
82  vtkGetNewMacro(LowerSymbols, vtkStringArray);
83  vtkGetNewMacro(Names, vtkStringArray);
84  vtkGetNewMacro(LowerNames, vtkStringArray);
85  vtkGetNewMacro(PeriodicTableBlocks, vtkStringArray);
86  vtkGetNewMacro(ElectronicConfigurations, vtkStringArray);
87  vtkGetNewMacro(Families, vtkStringArray);
89 
90  vtkGetNewMacro(Masses, vtkFloatArray);
91  vtkGetNewMacro(ExactMasses, vtkFloatArray);
92  vtkGetNewMacro(IonizationEnergies, vtkFloatArray);
93  vtkGetNewMacro(ElectronAffinities, vtkFloatArray);
94  vtkGetNewMacro(PaulingElectronegativities, vtkFloatArray);
95  vtkGetNewMacro(CovalentRadii, vtkFloatArray);
96  vtkGetNewMacro(VDWRadii, vtkFloatArray);
97  vtkGetNewMacro(DefaultColors, vtkFloatArray);
98  vtkGetNewMacro(BoilingPoints, vtkFloatArray);
99  vtkGetNewMacro(MeltingPoints, vtkFloatArray);
100 
101  vtkGetNewMacro(Periods, vtkUnsignedShortArray);
102  vtkGetNewMacro(Groups, vtkUnsignedShortArray);
103 
104  protected:
106 
109 
110  vtkSimpleMutexLock *WriteMutex;
112 
115  virtual int Allocate(vtkIdType sz, vtkIdType ext=1000);
116 
118  virtual void Reset();
119 
121  virtual void Squeeze();
122 
123  unsigned short NumberOfElements;
124 
125  // Lists all arrays
126  MyStdVectorOfVtkAbstractArrays *Arrays;
127 
128  // Atomic Symbols
129  vtkNew<vtkStringArray> Symbols;
130  vtkNew<vtkStringArray> LowerSymbols;
131 
132  // Element Names
133  vtkNew<vtkStringArray> Names;
134  vtkNew<vtkStringArray> LowerNames;
135 
136  // Misc Strings
137  vtkNew<vtkStringArray> PeriodicTableBlocks;
138  vtkNew<vtkStringArray> ElectronicConfigurations;
139  vtkNew<vtkStringArray> Families; // Non-Metal, Noblegas, Metalloids, etc
140 
141  // Misc Data
142  vtkNew<vtkFloatArray> Masses; // amu
143  vtkNew<vtkFloatArray> ExactMasses; // amu
144  vtkNew<vtkFloatArray> IonizationEnergies; // eV
145  vtkNew<vtkFloatArray> ElectronAffinities; // eV
146  vtkNew<vtkFloatArray> PaulingElectronegativities; // eV
147  vtkNew<vtkFloatArray> CovalentRadii; // Angstrom
148  vtkNew<vtkFloatArray> VDWRadii; // Angstom
149  vtkNew<vtkFloatArray> DefaultColors; // rgb 3-tuples, [0.0,1.0]
150  vtkNew<vtkFloatArray> BoilingPoints; // K
151  vtkNew<vtkFloatArray> MeltingPoints; // K
152  vtkNew<vtkUnsignedShortArray> Periods; // Row of periodic table
153  vtkNew<vtkUnsignedShortArray> Groups; // Column of periodic table
154 
155  void PrintSelfIfExists(const char *, vtkObject *, ostream&, vtkIndent);
156 
157  private:
158  vtkBlueObeliskData(const vtkBlueObeliskData&); // Not implemented.
159  void operator=(const vtkBlueObeliskData&); // Not implemented.
160 };
161 
162 #endif
vtkNew< vtkFloatArray > CovalentRadii
vtkNew< vtkStringArray > Names
vtkNew< vtkFloatArray > ElectronAffinities
vtkNew< vtkStringArray > ElectronicConfigurations
vtkNew< vtkFloatArray > Masses
vtkNew< vtkFloatArray > MeltingPoints
vtkNew< vtkUnsignedShortArray > Groups
vtkNew< vtkStringArray > PeriodicTableBlocks
vtkNew< vtkFloatArray > IonizationEnergies
vtkNew< vtkStringArray > Symbols
vtkNew< vtkFloatArray > DefaultColors
vtkNew< vtkStringArray > Families
vtkNew< vtkFloatArray > VDWRadii
vtkNew< vtkFloatArray > BoilingPoints
unsigned short NumberOfElements
vtkNew< vtkStringArray > LowerNames
vtkNew< vtkFloatArray > PaulingElectronegativities
vtkNew< vtkStringArray > LowerSymbols
Fill a vtkBlueObeliskData container with data from the BODR XML dataset.
MyStdVectorOfVtkAbstractArrays * Arrays
vtkNew< vtkUnsignedShortArray > Periods
vtkNew< vtkFloatArray > ExactMasses
vtkSimpleMutexLock * WriteMutex
Contains chemical data from the Blue Obelisk Data Repository.