ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since a94c4e1 was
f2d6445,
checked in by Mathieu Doucet <doucetm@…>, 17 years ago
|
moving realSpaceModeling to trunk
|
-
Property mode set to
100644
|
File size:
959 bytes
|
Rev | Line | |
---|
[f2d6445] | 1 | #include "pdb_model.h" |
---|
| 2 | #include "Point3D.h" |
---|
| 3 | #include <vector> |
---|
| 4 | #include <string> |
---|
| 5 | #include "iq.h" |
---|
| 6 | |
---|
| 7 | typedef vector<Point3D> PointsVector; |
---|
| 8 | |
---|
| 9 | int 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.