Ignore:
Timestamp:
Jun 12, 2008, 7:14:46 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
7fcea6
Parents:
9185c8
Message:

VolumeOfConvexEnvelope: Works!

VolumeOfConvexEnvelope has been analysed into various smaller functions and approach is working.
two new files: boundary.?pp
various new functions:
class Tesselation with AddPoint(), TesselateOnBoundary() and GuessStartingTriangle() does the actual tesselation
CreateClustersinWater() will create the repetition of the cluster with correct spacing (unfinished).
GetDiametersOfCluster() calculate the greatest diameter in projection per axis
GetBoundaryPoints() gets the boundary on the convex envelope by projection for a molecular cluster
GetCommonEndpoint() finds the endpoint two lines are sharing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    r9185c8 re292c10  
    5252#include "helpers.hpp"
    5353#include "molecules.hpp"
     54#include "boundary.hpp"
    5455
    5556/********************************************** Submenu routine **************************************/
     
    566567    case 'e':
    567568        cout << Verbose(0) << "Evaluating volume of the convex envelope.";
    568         mol->VolumeOfConvexEnvelope((ofstream *)&cout, configuration->GetIsAngstroem());
     569        VolumeOfConvexEnvelope((ofstream *)&cout, configuration, mol);
    569570        break;
    570571  }
     
    733734  string line;
    734735  atom *first;
     736  double tmp;
    735737  int ExitFlag = 0;
    736738  int j;
     
    762764            cout << "\t-m\tAlign in PAS with greatest EV along z axis." << endl;
    763765            cout << "\t-n\tFast parsing (i.e. no trajectories are looked for)." << endl;
     766            cout << "\t-o\tGet volume of the convex envelope (and store to tecplot file)." << endl;
    764767            cout << "\t-p <file>\tParse given xyz file and create raw config file from it." << endl;
    765768            cout << "\t-r\t\tConvert file from an old pcp syntax." << endl;
     
    967970            case 'm':
    968971              ExitFlag = 1;
    969               cout << Verbose(0) << "Evaluating prinicipal axis." << endl;
    970               mol->PrincipalAxisSystem((ofstream *)&cout, true);
     972              j = atoi(argv[argptr++]);
     973              if ((j<0) || (j>1)) {
     974                cerr << Verbose(1) << "ERROR: Argument of '-m' should be either 0 for no-rotate or 1 for rotate." << endl;
     975                j = 0;
     976              }
     977              if (j)
     978                cout << Verbose(0) << "Converting to prinicipal axis system." << endl;
     979              else
     980                cout << Verbose(0) << "Evaluating prinicipal axis." << endl;
     981              mol->PrincipalAxisSystem((ofstream *)&cout, (bool)j);
     982              break;
     983            case 'o':
     984              ExitFlag = 1;
     985              cout << Verbose(0) << "Evaluating volume of the convex envelope.";
     986//              tmp = atof(argv[argptr++]);
     987//              if (tmp < 1.0) {
     988//                cerr << Verbose(0) << "Density must be greater than 1.0g/cm^3 !" << endl;
     989//                tmp = 1.3;
     990//              }
     991              VolumeOfConvexEnvelope((ofstream *)&cout, &configuration, mol);
    971992              break;
    972993            default:   // no match? Step on
    973               argptr++;
     994              if (argv[argptr][0] != '-') // if it started with a '-' we've already made a step!
     995                argptr++;
    974996              break;
    975997          }
     
    12451267 
    12461268  // save element data base
    1247   if (periode->StorePeriodentafel()) //ElementsFileName
     1269  if (periode->StorePeriodentafel(ElementsFileName)) //ElementsFileName
    12481270    cout << Verbose(0) << "Saving of elements.db successful." << endl;
    12491271  else
Note: See TracChangeset for help on using the changeset viewer.