VTK  9.1.0
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=========================================================================*/
26#ifndef vtkXYZMolReader_h
27#define vtkXYZMolReader_h
28
29#include "vtkIOChemistryModule.h" // For export macro
31
32class VTKIOCHEMISTRY_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase
33{
34public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
44 virtual int CanReadFile(VTK_FILEPATH const char* name);
45
47
51 vtkSetMacro(TimeStep, int);
52 vtkGetMacro(TimeStep, int);
54
56
59 vtkGetMacro(MaxTimeStep, int);
61
62protected:
64 ~vtkXYZMolReader() override;
65
66 void ReadSpecificMolecule(FILE* fp) override;
67
72 char* GetNextLine(FILE* fp, char* line, int maxlen);
73
74 int GetLine1(const char* line, int* cnt);
75 int GetLine2(const char* line, char* name);
76 int GetAtom(const char* line, char* atom, float* x);
77
78 void InsertAtom(const char* atom, float* pos);
79
80 vtkSetMacro(MaxTimeStep, int);
81
84
85private:
86 vtkXYZMolReader(const vtkXYZMolReader&) = delete;
87 void operator=(const vtkXYZMolReader&) = delete;
88};
89
90#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
Read molecular data files.
read Molecular Data files
char * GetNextLine(FILE *fp, char *line, int maxlen)
Get next line that is not a comment.
static vtkXYZMolReader * New()
virtual int CanReadFile(VTK_FILEPATH const char *name)
Test whether the file with the given name can be read by this reader.
int GetAtom(const char *line, char *atom, float *x)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void InsertAtom(const char *atom, float *pos)
~vtkXYZMolReader() override
int GetLine1(const char *line, int *cnt)
int GetLine2(const char *line, char *name)
void ReadSpecificMolecule(FILE *fp) override
#define VTK_FILEPATH