VTK  9.3.20240425
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
20
21VTK_ABI_NAMESPACE_BEGIN
22class vtkCellArray;
23class vtkFloatArray;
24class vtkDataArray;
25class vtkIdTypeArray;
28class vtkPoints;
29class vtkStringArray;
30class vtkMolecule;
32
33class VTKIOCHEMISTRY_EXPORT vtkMoleculeReaderBase : public vtkPolyDataAlgorithm
34{
35public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
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
68protected:
71
72 char* FileName;
73 double BScale;
74 double HBScale;
76 unsigned int NumberOfModels;
77
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
129private:
131 void operator=(const vtkMoleculeReaderBase&) = delete;
132};
133
134VTK_ABI_NAMESPACE_END
135#endif
object to represent cell connectivity
abstract superclass for arrays of numeric data
dynamic, self-adjusting array of float
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
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:84
Allocate and hold a VTK object.
Definition vtkNew.h:160
Access to information about the elements.
represent and manipulate 3D points
Definition vtkPoints.h:139
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
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:315