VTK  9.2.6
vtkXYZMolReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXYZMolReader.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 =========================================================================*/
29 #ifndef vtkXYZMolReader_h
30 #define vtkXYZMolReader_h
31 
32 #include "vtkIOChemistryModule.h" // For export macro
33 #include "vtkMoleculeReaderBase.h"
34 
35 class VTKIOCHEMISTRY_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
41  static vtkXYZMolReader* New();
42 
47  virtual int CanReadFile(VTK_FILEPATH const char* name);
48 
50 
54  vtkSetMacro(TimeStep, int);
55  vtkGetMacro(TimeStep, int);
57 
59 
62  vtkGetMacro(MaxTimeStep, int);
64 
65 protected:
67  ~vtkXYZMolReader() override;
68 
69  void ReadSpecificMolecule(FILE* fp) override;
70 
75  char* GetNextLine(FILE* fp, char* line, int maxlen);
76 
77  int GetLine1(const char* line, int* cnt);
78  int GetLine2(const char* line, char* name);
79  int GetAtom(const char* line, char* atom, float* x);
80 
81  void InsertAtom(const char* atom, float* pos);
82 
83  vtkSetMacro(MaxTimeStep, int);
84 
85  int TimeStep;
87 
88 private:
89  vtkXYZMolReader(const vtkXYZMolReader&) = delete;
90  void operator=(const vtkXYZMolReader&) = delete;
91 };
92 
93 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Read molecular data files.
virtual void ReadSpecificMolecule(FILE *fp)=0
static vtkPolyDataAlgorithm * New()
read Molecular Data files
a simple class to control print indentation
Definition: vtkIndent.h:39
#define VTK_FILEPATH