VTK  9.3.1
vtkAbstractElectronicData.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
13 #ifndef vtkAbstractElectronicData_h
14 #define vtkAbstractElectronicData_h
15 
16 #include "vtkCommonDataModelModule.h" // For export macro
17 #include "vtkDataObject.h"
18 
19 VTK_ABI_NAMESPACE_BEGIN
20 class vtkImageData;
21 
22 class VTKCOMMONDATAMODEL_EXPORT vtkAbstractElectronicData : public vtkDataObject
23 {
24 public:
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
32 
36  virtual vtkIdType GetNumberOfMOs() = 0;
37 
41  virtual vtkIdType GetNumberOfElectrons() = 0;
42 
46  virtual vtkImageData* GetMO(vtkIdType orbitalNumber) = 0;
47 
52  virtual vtkImageData* GetElectronDensity() = 0;
53 
57  vtkImageData* GetHOMO() { return this->GetMO(this->GetHOMOOrbitalNumber()); }
58 
62  vtkImageData* GetLUMO() { return this->GetMO(this->GetLUMOOrbitalNumber()); }
63 
64  // Description:
65  // Returns the orbital number of the Highest Occupied Molecular Orbital.
67  {
68  return static_cast<vtkIdType>((this->GetNumberOfElectrons() / 2) - 1);
69  }
70 
71  // Description:
72  // Returns the orbital number of the Lowest Unoccupied Molecular Orbital.
74  {
75  return static_cast<vtkIdType>(this->GetNumberOfElectrons() / 2);
76  }
77 
82  bool IsHOMO(vtkIdType orbitalNumber) { return (orbitalNumber == this->GetHOMOOrbitalNumber()); }
83 
88  bool IsLUMO(vtkIdType orbitalNumber) { return (orbitalNumber == this->GetLUMOOrbitalNumber()); }
89 
93  void DeepCopy(vtkDataObject* obj) override;
94 
96 
100  vtkGetMacro(Padding, double);
102 
103 protected:
105  ~vtkAbstractElectronicData() override;
106 
107  double Padding;
108 
109 private:
111  void operator=(const vtkAbstractElectronicData&) = delete;
112 };
113 
114 VTK_ABI_NAMESPACE_END
115 #endif
bool IsLUMO(vtkIdType orbitalNumber)
Returns true if the given orbital number is the Lowest Unoccupied Molecular Orbital, false otherwise.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageData * GetLUMO()
Returns vtkImageData for the Lowest Unoccupied Molecular Orbital.
int GetDataObjectType() override
Returns VTK_ABSTRACT_ELECTRONIC_DATA.
int vtkIdType
Definition: vtkType.h:315
Provides access to and storage of chemical electronic data.
#define VTK_ABSTRACT_ELECTRONIC_DATA
Definition: vtkType.h:107
vtkImageData * GetHOMO()
Returns vtkImageData for the Highest Occupied Molecular Orbital.
a simple class to control print indentation
Definition: vtkIndent.h:28
bool IsHOMO(vtkIdType orbitalNumber)
Returns true if the given orbital number is the Highest Occupied Molecular Orbital, false otherwise.
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
general representation of visualization data
Definition: vtkDataObject.h:54
virtual void DeepCopy(vtkDataObject *src)
The goal of the method is to copy the complete data from src into this object.