Changeset 8b7e0a for molecuilder
- Timestamp:
- Aug 21, 2009, 12:17:52 PM (16 years ago)
- Children:
- b73929
- Parents:
- 5f4960
- Location:
- molecuilder/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.cpp
r5f4960 r8b7e0a 578 578 }; 579 579 580 /** For testing removes one boundary point after another to check for leaks. 581 * \param *out output stream for debugging 582 * \param *TesselStruct Tesselation containing envelope with boundary points 583 * \param *mol molecule 584 * \param *filename name of file 585 * \return true - all removed, false - something went wrong 586 */ 587 bool RemoveAllBoundaryPoints(ofstream *out, class Tesselation *TesselStruct, molecule *mol, char *filename) 588 { 589 int i=0; 590 char number[MAXSTRINGSIZE]; 591 592 if ((TesselStruct == NULL) || (TesselStruct->PointsOnBoundary.empty())) { 593 *out << Verbose(2) << "ERROR: TesselStruct is empty." << endl; 594 return false; 595 } 596 597 PointMap::iterator PointRunner; 598 while (!TesselStruct->PointsOnBoundary.empty()) { 599 *out << Verbose(2) << "Remaining points are: "; 600 for (PointMap::iterator PointSprinter = TesselStruct->PointsOnBoundary.begin(); PointSprinter != TesselStruct->PointsOnBoundary.end(); PointSprinter++) 601 *out << *(PointSprinter->second) << "\t"; 602 *out << endl; 603 604 PointRunner = TesselStruct->PointsOnBoundary.begin(); 605 // remove point 606 TesselStruct->RemovePointFromTesselatedSurface(out, PointRunner->second); 607 608 // store envelope 609 sprintf(number, "-%04d", i++); 610 StoreTrianglesinFile(out, mol, filename, number); 611 } 612 613 return true; 614 }; 615 580 616 /** Creates a convex envelope from a given non-convex one. 581 617 * -# First step, remove concave spots, i.e. singular "dents" -
molecuilder/src/boundary.hpp
r5f4960 r8b7e0a 44 44 void CalculateConcavityPerBoundaryPoint(ofstream *out, class Tesselation *TesselStruct); 45 45 void StoreTrianglesinFile(ofstream *out, molecule *mol, const char *filename, const char *extraSuffix); 46 bool RemoveAllBoundaryPoints(ofstream *out, class Tesselation *TesselStruct, molecule *mol, char *filename); 46 47 47 48 -
molecuilder/src/builder.cpp
r5f4960 r8b7e0a 1873 1873 //FindConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr]); 1874 1874 FindNonConvexBorder((ofstream *)&cout, mol, &LCList, argv[argptr], 10.); 1875 1876 double volumedifference = ConvexizeNonconvexEnvelope((ofstream *)&cout, mol->TesselStruct, mol, argv[argptr]);1877 double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, mol->TesselStruct, &configuration);1878 cout << Verbose(0) << "The tesselated volume area is " << clustervolume << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl;1879 cout << Verbose(0) << "The non-convex tesselated volume area is " << clustervolume-volumedifference << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl;1875 RemoveAllBoundaryPoints((ofstream *)&cout, mol->TesselStruct, mol, argv[argptr]); 1876 // double volumedifference = ConvexizeNonconvexEnvelope((ofstream *)&cout, mol->TesselStruct, mol, argv[argptr]); 1877 // double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, mol->TesselStruct, &configuration); 1878 // cout << Verbose(0) << "The tesselated volume area is " << clustervolume << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl; 1879 // cout << Verbose(0) << "The non-convex tesselated volume area is " << clustervolume-volumedifference << " " << (configuration.GetIsAngstroem() ? "angstrom" : "atomiclength") << "^3." << endl; 1880 1880 argptr+=1; 1881 1881 }
Note:
See TracChangeset
for help on using the changeset viewer.