VTK  9.1.0
vtkMoleculeReaderBase.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMoleculeReaderBase.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=========================================================================*/
27#ifndef vtkMoleculeReaderBase_h
28#define vtkMoleculeReaderBase_h
29
30#include "vtkIOChemistryModule.h" // For export macro
32
33class vtkCellArray;
34class vtkFloatArray;
35class vtkDataArray;
36class vtkIdTypeArray;
39class vtkPoints;
40class vtkStringArray;
41class vtkMolecule;
43
44class VTKIOCHEMISTRY_EXPORT vtkMoleculeReaderBase : public vtkPolyDataAlgorithm
45{
46public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
52
54
57 vtkSetMacro(BScale, double);
58 vtkGetMacro(BScale, double);
60
62
65 vtkSetMacro(HBScale, double);
66 vtkGetMacro(HBScale, double);
68
72 vtkGetMacro(NumberOfAtoms, vtkIdType);
73
77 vtkGetMacro(NumberOfModels, unsigned int);
78
79protected:
82
83 char* FileName;
84 double BScale;
85 double HBScale;
87 unsigned int NumberOfModels;
88
91
100 int ReadMolecule(FILE* fp, vtkPolyData* output);
101
110 unsigned int MakeAtomType(const char* atomType);
111
121 unsigned int MakeBonds(vtkPoints* points, vtkIdTypeArray* atomTypes, vtkCellArray* newBonds);
122
137
138 virtual void ReadSpecificMolecule(FILE* fp) = 0;
139
140private:
142 void operator=(const vtkMoleculeReaderBase&) = delete;
143};
144
145#endif
object to represent cell connectivity
Definition: vtkCellArray.h:290
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
dynamic, self-adjusting array of float
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Read molecular data files.
unsigned int MakeBonds(vtkPoints *points, vtkIdTypeArray *atomTypes, vtkCellArray *newBonds)
Creates molecular bonds (VTK cells) given atomic coordinates (VTK points) and atom types.
vtkSmartPointer< vtkStringArray > AtomTypeStrings
vtkSmartPointer< vtkUnsignedCharArray > SecondaryStructures
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkIdTypeArray > Residue
vtkSetFilePathMacro(FileName)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkGetFilePathMacro(FileName)
unsigned int MakeAtomType(const char *atomType)
Given a string for the type (name) of an atom, returns a unique number for that atom.
vtkSmartPointer< vtkUnsignedCharArray > RGB
virtual void ReadSpecificMolecule(FILE *fp)=0
vtkSmartPointer< vtkUnsignedCharArray > SecondaryStructuresEnd
vtkSmartPointer< vtkPoints > Points
int ReadMolecule(FILE *fp, vtkPolyData *output)
Reads a molecule from the passed file pointer and creates a vtkPolyData.
vtkNew< vtkPeriodicTable > PeriodicTable
vtkSmartPointer< vtkUnsignedCharArray > SecondaryStructuresBegin
vtkSmartPointer< vtkIdTypeArray > AtomType
vtkSmartPointer< vtkUnsignedIntArray > Model
vtkSmartPointer< vtkUnsignedCharArray > IsHetatm
vtkSmartPointer< vtkUnsignedCharArray > Chain
vtkSmartPointer< vtkMolecule > Molecule
~vtkMoleculeReaderBase() override
vtkSmartPointer< vtkFloatArray > Radii
class describing a molecule
Definition: vtkMolecule.h:111
Allocate and hold a VTK object.
Definition: vtkNew.h:165
Access to information about the elements.
represent and manipulate 3D points
Definition: vtkPoints.h:143
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
Hold a reference to a vtkObjectBase instance.
a vtkAbstractArray subclass for strings
dynamic, self-adjusting array of unsigned char
dynamic, self-adjusting array of unsigned int
int vtkIdType
Definition: vtkType.h:332