1 /* -*- c++ -*- ----------------------------------------------------------
2    LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
3    https://www.lammps.org/, Sandia National Laboratories
4    Steve Plimpton, sjplimp@sandia.gov
5 
6    Copyright (2003) Sandia Corporation.  Under the terms of Contract
7    DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
8    certain rights in this software.  This software is distributed under
9    the GNU General Public License.
10 
11    See the README file in the top-level LAMMPS directory.
12 
13    Contributed by Timothy Sirk
14 ------------------------------------------------------------------------- */
15 
16 #ifndef LMP_READER_H
17 #define LMP_READER_H
18 
19 #include "pointers.h"
20 
21 namespace LAMMPS_NS {
22 
23 class Reader : protected Pointers {
24  public:
25   Reader(class LAMMPS *);
~Reader()26   virtual ~Reader() {}
27 
28   virtual void settings(int, char **);
29 
30   virtual int read_time(bigint &) = 0;
31   virtual void skip() = 0;
32   virtual bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &,
33                              int &, int &, int &) = 0;
34   virtual void read_atoms(int, int, double **) = 0;
35 
36   virtual void open_file(const char *);
37   virtual void close_file();
38 
39  protected:
40   FILE *fp;          // pointer to opened file or pipe
41   int compressed;    // flag for dump file compression
42 };
43 
44 }    // namespace LAMMPS_NS
45 
46 #endif
47 
48 /* ERROR/WARNING messages:
49 
50 E: Cannot open gzipped file
51 
52 LAMMPS was compiled without support for reading and writing gzipped
53 files through a pipeline to the gzip program with -DLAMMPS_GZIP.
54 
55 E: Cannot open file %s
56 
57 The specified file cannot be opened.  Check that the path and name are
58 correct. If the file is a compressed file, also check that the gzip
59 executable can be found and run.
60 
61 */
62