source: sasview/src/sas/sascalc/simulation/pointsmodelpy/tests/testpdb.cc @ 62243ae

Last change on this file since 62243ae was d85c194, checked in by Piotr Rozyczko <piotr.rozyczko@…>, 9 years ago

Remaining modules refactored

  • Property mode set to 100644
File size: 959 bytes
Line 
1#include "pdb_model.h"
2#include "Point3D.h"
3#include <vector>
4#include <string>
5#include "iq.h"
6
7typedef vector<Point3D> PointsVector;
8
9int main(){
10
11  //Test PDB with adding one normal pdb file
12  PointsVector vp;
13  IQ iq(100,0.001,0.3);
14
15  string name("test.pdb");
16
17  //initialize a PDBModel with a pdb file name
18  PDBModel mpdb;
19  mpdb.AddPDB(name);
20  //parse coordinates in pdb file into a vector
21  //of points
22  mpdb.GetPoints(vp);
23  //output the vector of points into a pseudo pdb
24  //file, for testing only
25  mpdb.OutputPDB(vp,"testpdb.pdb");
26  mpdb.DistDistribution(vp);
27  mpdb.OutputPR("test.pr");
28  mpdb.CalculateIQ(&iq);
29  iq.OutputIQ("test.iq");
30  cout << "check test.pr and test.iq files" <<endl;
31
32
33  //second test: add second pdb file
34  vector<Point3D> vp2;
35  string second("test2.pdb");
36  mpdb.AddPDB(second);
37  mpdb.GetPoints(vp2);
38  mpdb.OutputPDB(vp2,"testpdb2.pdb");
39  cout <<"check whether testpdb2.pdb has 12 points" <<endl;
40
41  return 0;
42}
Note: See TracBrowser for help on using the repository browser.