1 | /** \file points_model.h child class of SANSmodel*/ |
---|
2 | |
---|
3 | #ifndef POINTSMODEL_H |
---|
4 | #define POINTSMODEL_H |
---|
5 | |
---|
6 | #include <vector> |
---|
7 | #include "tnt/tnt.h" |
---|
8 | #include <string> |
---|
9 | #include "Point3D.h" |
---|
10 | #include "iq.h" |
---|
11 | #include "sans_model.h" |
---|
12 | |
---|
13 | using namespace std; |
---|
14 | |
---|
15 | class PointsModel : public SANSModel{ |
---|
16 | public: |
---|
17 | PointsModel(); |
---|
18 | virtual ~PointsModel(); |
---|
19 | |
---|
20 | void CalculateIQ(IQ *iq); |
---|
21 | double CalculateIQ(double q); |
---|
22 | double CalculateIQError(double q); |
---|
23 | |
---|
24 | // Old lengthy 2D simulation (unchecked) |
---|
25 | void CalculateIQ_2D(IQ *iq,double phi); |
---|
26 | double CalculateIQ_2D(double qx, double qy); |
---|
27 | |
---|
28 | // Fast 2D simulation |
---|
29 | double CalculateIQ_2D(const vector<Point3D>&, double qx, double qy); |
---|
30 | double CalculateIQ_2D_Error(const vector<Point3D>&, double qx, double qy); |
---|
31 | |
---|
32 | //given a set of points, calculate distance correlation |
---|
33 | //function, and return the max dist |
---|
34 | double DistDistribution(const vector<Point3D>&); |
---|
35 | void DistDistributionXY(const vector<Point3D>&); |
---|
36 | |
---|
37 | Array2D<double> GetPr(); |
---|
38 | void OutputPR(const std::string &); |
---|
39 | void OutputPR_XY(const std::string &); |
---|
40 | |
---|
41 | virtual int GetPoints(Point3DVector &) = 0; |
---|
42 | void OutputPDB(const vector<Point3D>&,const char*); |
---|
43 | |
---|
44 | //will be used in calculating P(r), the maximum distance |
---|
45 | virtual double GetDimBound() = 0; |
---|
46 | //will be used to determin the maximum distance for |
---|
47 | //several pointsmodel instances |
---|
48 | virtual vector<double> GetCenter(); |
---|
49 | |
---|
50 | protected: |
---|
51 | double CalculateRstep(int num_points, double rmax); |
---|
52 | double rmax_, rstep_,cormax_,cormax_xy_; |
---|
53 | int r_grids_num_; |
---|
54 | vector<double> center_; |
---|
55 | |
---|
56 | private: |
---|
57 | Array2D<double> pr_,pr_xy_; |
---|
58 | vector<double> product_sld_; |
---|
59 | }; |
---|
60 | |
---|
61 | #endif |
---|