VTK  9.2.5
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
34
35class VTKIOCHEMISTRY_EXPORT vtkXYZMolReader : public vtkMoleculeReaderBase
36{
37public:
39 void PrintSelf(ostream& os, vtkIndent indent) override;
40
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
65protected:
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
87
88private:
89 vtkXYZMolReader(const vtkXYZMolReader&) = delete;
90 void operator=(const vtkXYZMolReader&) = delete;
91};
92
93#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
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