VTK
dox/Domains/Chemistry/vtkBlueObeliskData.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkBlueObeliskData.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00035 #ifndef __vtkBlueObeliskData_h
00036 #define __vtkBlueObeliskData_h
00037 
00038 #include "vtkDomainsChemistryModule.h" // For export macro
00039 #include "vtkObject.h"
00040 #include "vtkNew.h" // For vtkNew
00041 
00042 class vtkAbstractArray;
00043 class vtkFloatArray;
00044 class vtkStringArray;
00045 class vtkSimpleMutexLock;
00046 class vtkUnsignedShortArray;
00047 
00048 // Hidden STL reference: vtkstd::vector<vtkAbstractArray*>
00049 class MyStdVectorOfVtkAbstractArrays;
00050 
00051 class VTKDOMAINSCHEMISTRY_EXPORT vtkBlueObeliskData : public vtkObject
00052 {
00053  public:
00054   vtkTypeMacro(vtkBlueObeliskData,vtkObject);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056   static vtkBlueObeliskData *New();
00057 
00062   void Initialize();
00063 
00065   bool IsInitialized() { return this->Initialized;}
00066 
00068 
00070   vtkGetObjectMacro(WriteMutex, vtkSimpleMutexLock);
00072 
00074 
00076   vtkGetMacro(NumberOfElements, unsigned short);
00078 
00080 
00081   vtkGetNewMacro(Symbols, vtkStringArray);
00082   vtkGetNewMacro(LowerSymbols, vtkStringArray);
00083   vtkGetNewMacro(Names, vtkStringArray);
00084   vtkGetNewMacro(LowerNames, vtkStringArray);
00085   vtkGetNewMacro(PeriodicTableBlocks, vtkStringArray);
00086   vtkGetNewMacro(ElectronicConfigurations, vtkStringArray);
00087   vtkGetNewMacro(Families, vtkStringArray);
00089 
00090   vtkGetNewMacro(Masses, vtkFloatArray);
00091   vtkGetNewMacro(ExactMasses, vtkFloatArray);
00092   vtkGetNewMacro(IonizationEnergies, vtkFloatArray);
00093   vtkGetNewMacro(ElectronAffinities, vtkFloatArray);
00094   vtkGetNewMacro(PaulingElectronegativities, vtkFloatArray);
00095   vtkGetNewMacro(CovalentRadii, vtkFloatArray);
00096   vtkGetNewMacro(VDWRadii, vtkFloatArray);
00097   vtkGetNewMacro(DefaultColors, vtkFloatArray);
00098   vtkGetNewMacro(BoilingPoints, vtkFloatArray);
00099   vtkGetNewMacro(MeltingPoints, vtkFloatArray);
00100 
00101   vtkGetNewMacro(Periods, vtkUnsignedShortArray);
00102   vtkGetNewMacro(Groups, vtkUnsignedShortArray);
00103 
00104  protected:
00105   friend class vtkBlueObeliskDataParser;
00106 
00107   vtkBlueObeliskData();
00108   ~vtkBlueObeliskData();
00109 
00110   vtkSimpleMutexLock *WriteMutex;
00111   bool Initialized;
00112 
00115   virtual int Allocate(vtkIdType sz, vtkIdType ext=1000);
00116 
00118   virtual void Reset();
00119 
00121   virtual void Squeeze();
00122 
00123   unsigned short NumberOfElements;
00124 
00125   // Lists all arrays
00126   MyStdVectorOfVtkAbstractArrays *Arrays;
00127 
00128   // Atomic Symbols
00129   vtkNew<vtkStringArray> Symbols;
00130   vtkNew<vtkStringArray> LowerSymbols;
00131 
00132   // Element Names
00133   vtkNew<vtkStringArray> Names;
00134   vtkNew<vtkStringArray> LowerNames;
00135 
00136   // Misc Strings
00137   vtkNew<vtkStringArray> PeriodicTableBlocks;
00138   vtkNew<vtkStringArray> ElectronicConfigurations;
00139   vtkNew<vtkStringArray> Families; // Non-Metal, Noblegas, Metalloids, etc
00140 
00141   // Misc Data
00142   vtkNew<vtkFloatArray> Masses; // amu
00143   vtkNew<vtkFloatArray> ExactMasses; // amu
00144   vtkNew<vtkFloatArray> IonizationEnergies; // eV
00145   vtkNew<vtkFloatArray> ElectronAffinities; // eV
00146   vtkNew<vtkFloatArray> PaulingElectronegativities; // eV
00147   vtkNew<vtkFloatArray> CovalentRadii; // Angstrom
00148   vtkNew<vtkFloatArray> VDWRadii; // Angstom
00149   vtkNew<vtkFloatArray> DefaultColors; // rgb 3-tuples, [0.0,1.0]
00150   vtkNew<vtkFloatArray> BoilingPoints; // K
00151   vtkNew<vtkFloatArray> MeltingPoints; // K
00152   vtkNew<vtkUnsignedShortArray> Periods; // Row of periodic table
00153   vtkNew<vtkUnsignedShortArray> Groups; // Column of periodic table
00154 
00155   void PrintSelfIfExists(const char *, vtkObject *, ostream&, vtkIndent);
00156 
00157  private:
00158   vtkBlueObeliskData(const vtkBlueObeliskData&); // Not implemented.
00159   void operator=(const vtkBlueObeliskData&); // Not implemented.
00160 };
00161 
00162 #endif