VTK  9.3.1
vtkMoleculeReaderBase.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
15 #ifndef vtkMoleculeReaderBase_h
16 #define vtkMoleculeReaderBase_h
17 
18 #include "vtkIOChemistryModule.h" // For export macro
19 #include "vtkPolyDataAlgorithm.h"
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkCellArray;
23 class vtkFloatArray;
24 class vtkDataArray;
25 class vtkIdTypeArray;
28 class vtkPoints;
29 class vtkStringArray;
30 class vtkMolecule;
31 class vtkPeriodicTable;
32 
33 class VTKIOCHEMISTRY_EXPORT vtkMoleculeReaderBase : public vtkPolyDataAlgorithm
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
39  vtkSetFilePathMacro(FileName);
40  vtkGetFilePathMacro(FileName);
41 
43 
46  vtkSetMacro(BScale, double);
47  vtkGetMacro(BScale, double);
49 
51 
54  vtkSetMacro(HBScale, double);
55  vtkGetMacro(HBScale, double);
57 
61  vtkGetMacro(NumberOfAtoms, vtkIdType);
62 
66  vtkGetMacro(NumberOfModels, unsigned int);
67 
68 protected:
70  ~vtkMoleculeReaderBase() override;
71 
72  char* FileName;
73  double BScale;
74  double HBScale;
76  unsigned int NumberOfModels;
77 
78  int FillOutputPortInformation(int, vtkInformation*) override;
80 
89  int ReadMolecule(FILE* fp, vtkPolyData* output);
90 
99  unsigned int MakeAtomType(const char* atomType);
100 
110  unsigned int MakeBonds(vtkPoints* points, vtkIdTypeArray* atomTypes, vtkCellArray* newBonds);
111 
126 
127  virtual void ReadSpecificMolecule(FILE* fp) = 0;
128 
129 private:
131  void operator=(const vtkMoleculeReaderBase&) = delete;
132 };
133 
134 VTK_ABI_NAMESPACE_END
135 #endif
Access to information about the elements.
dynamic, self-adjusting array of unsigned int
Store vtkAlgorithm input/output information.
class describing a molecule
Definition: vtkMolecule.h:83
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkSmartPointer< vtkFloatArray > Radii
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:30
a vtkAbstractArray subclass for strings
Read molecular data files.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
vtkSmartPointer< vtkIdTypeArray > Residue
vtkSmartPointer< vtkUnsignedIntArray > Model
vtkSmartPointer< vtkIdTypeArray > AtomType
Superclass for algorithms that produce only polydata as output.
vtkSmartPointer< vtkUnsignedCharArray > Chain
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkSmartPointer< vtkUnsignedCharArray > SecondaryStructures
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
vtkSmartPointer< vtkUnsignedCharArray > IsHetatm
vtkNew< vtkPeriodicTable > PeriodicTable
dynamic, self-adjusting array of unsigned char
vtkSmartPointer< vtkUnsignedCharArray > RGB
object to represent cell connectivity
Definition: vtkCellArray.h:175
vtkSmartPointer< vtkUnsignedCharArray > SecondaryStructuresEnd
vtkSmartPointer< vtkPoints > Points
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
vtkSmartPointer< vtkMolecule > Molecule
Store zero or more vtkInformation instances.
vtkSmartPointer< vtkStringArray > AtomTypeStrings
vtkSmartPointer< vtkUnsignedCharArray > SecondaryStructuresBegin
represent and manipulate 3D points
Definition: vtkPoints.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.