QMCPACK
SkParserASCII.h
Go to the documentation of this file.
1 #ifndef SK_PARSER_ASCII_H
2 #define SK_PARSER_ASCII_H
3 
5 #include "Configuration.h"
6 #include <vector>
7 
8 namespace qmcplusplus
9 {
10 /** Class to handle parsing from ASCII file
11  *
12  * This assumes you have process your own S(k) file
13  * and has file format of
14  * # k_x k_y k_z S(k) err
15  * k0x k0y k0z S(k0) err
16  * k1x k1y k1z S(k1) err
17  * k2x k2y k2z S(k2) err
18  * ...
19  */
21 {
22 public:
24  {
25  KX,
26  KY,
27  KZ,
28  SK,
30  };
31 
32  void parse(const std::string& fname) override;
33 
34 private:
35  std::vector<std::vector<RealType>> read_sk_file(const std::string& fname);
36  std::vector<PosType> get_grid_from_data(std::vector<std::vector<RealType>>& data);
37  std::vector<RealType> get_sk_from_data(std::vector<std::vector<RealType>>& data);
38  std::vector<RealType> get_skerr_from_data(std::vector<std::vector<RealType>>& data);
39 };
40 
41 } // namespace qmcplusplus
42 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
void parse(const std::string &fname) override
std::vector< RealType > get_sk_from_data(std::vector< std::vector< RealType >> &data)
Class to handle parsing from ASCII file.
Definition: SkParserASCII.h:20
std::vector< RealType > get_skerr_from_data(std::vector< std::vector< RealType >> &data)
std::vector< PosType > get_grid_from_data(std::vector< std::vector< RealType >> &data)
std::vector< std::vector< RealType > > read_sk_file(const std::string &fname)
Base class for Sk parser.
Definition: SkParserBase.h:19