Ignore:
Timestamp:
Jan 27, 2010, 2:36:09 PM (16 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
dbd19f
Parents:
41182a (diff), 478683 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge commit 'heber/Analysis_PairCorrelation' into MenuRefactoring

Conflicts:

molecuilder/src/unittests/Makefile.am

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    r41182a rd34341  
    5151
    5252using namespace std;
     53
     54#include <cstring>
    5355
    5456#include "analysis_correlation.hpp"
     
    12961298            Log() << Verbose(0) << "\t-B xx xy xz yy yz zz\tBound atoms by domain with given symmetric matrix of (xx,xy,xz,yy,yz,zz)." << endl;
    12971299            Log() << Verbose(0) << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl;
    1298             Log() << Verbose(0) << "\t-C\tPair Correlation analysis." << endl;
     1300            Log() << Verbose(0) << "\t-C <Z> <output> <bin output>\tPair Correlation analysis." << endl;
    12991301            Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl;
    13001302            Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl;
    13011303            Log() << Verbose(0) << "\t-e <file>\tSets the databases path to be parsed (default: ./)." << endl;
    13021304            Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl;
    1303             Log() << Verbose(0) << "\t-f/F <dist> <order>\tFragments the molecule in BOSSANOVA manner (with/out rings compressed) and stores config files in same dir as config (return code 0 - fragmented, 2 - no fragmentation necessary)." << endl;
     1305            Log() << Verbose(0) << "\t-f <dist> <order>\tFragments the molecule in BOSSANOVA manner (with/out rings compressed) and stores config files in same dir as config (return code 0 - fragmented, 2 - no fragmentation necessary)." << endl;
     1306            Log() << Verbose(0) << "\t-F <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl;
    13041307            Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl;
    13051308            Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl;
     1309            Log() << Verbose(0) << "\t-I\t Dissect current system of molecules into a set of disconnected (subgraphs of) molecules." << endl;
    13061310            Log() << Verbose(0) << "\t-L <step0> <step1> <prefix>\tStore a linear interpolation between two configurations <step0> and <step1> into single config files with prefix <prefix> and as Trajectories into the current config file." << endl;
    13071311            Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl;
     
    14331437     if (configuration.BG == NULL) {
    14341438       configuration.BG = new BondGraph(configuration.GetIsAngstroem());
    1435        if ((BondGraphFileName.empty()) && (configuration.BG->LoadBondLengthTable(BondGraphFileName))) {
     1439       if ((!BondGraphFileName.empty()) && (configuration.BG->LoadBondLengthTable(BondGraphFileName))) {
    14361440         Log() << Verbose(0) << "Bond length table loaded successfully." << endl;
    14371441       } else {
     
    14611465                else {
    14621466                  Log() << Verbose(2) << "File found and parsed." << endl;
    1463                   // @TODO rather do the dissection afterwards
    1464 //                  mol->SetNameFromFilename(argv[argptr]);
    1465 //                  molecules->ListOfMolecules.remove(mol);
    1466 //                  molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration);
    1467 //                  delete(mol);
    1468 //                  if (molecules->ListOfMolecules.size() != 0) {
    1469 //                    for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
    1470 //                      if ((*ListRunner)->ActiveFlag) {
    1471 //                        mol = *ListRunner;
    1472 //                        break;
    1473 //                      }
    1474 //                  }
    14751467                  configPresent = present;
    14761468                }
     
    15511543              //argptr+=1;
    15521544              break;
     1545            case 'I':
     1546              Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl;
     1547              // @TODO rather do the dissection afterwards
     1548              molecules->DissectMoleculeIntoConnectedSubgraphs(periode, &configuration);
     1549              mol = NULL;
     1550              if (molecules->ListOfMolecules.size() != 0) {
     1551                for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
     1552                  if ((*ListRunner)->ActiveFlag) {
     1553                    mol = *ListRunner;
     1554                    break;
     1555                  }
     1556              }
     1557              if (mol == NULL) {
     1558                mol = *(molecules->ListOfMolecules.begin());
     1559                mol->ActiveFlag = true;
     1560              }
     1561              break;
    15531562            case 'C':
    15541563              if (ExitFlag == 0) ExitFlag = 1;
     
    15581567                performCriticalExit();
    15591568              } else {
    1560                 SaveFlag = false;
    15611569                ofstream output(argv[argptr+1]);
    15621570                ofstream binoutput(argv[argptr+2]);
     
    15781586                counter = 0;
    15791587                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
    1580                   Actives[counter] = (*BigFinder)->ActiveFlag;
     1588                  Actives[counter++] = (*BigFinder)->ActiveFlag;
    15811589                  (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
    15821590                }
     
    15861594                int ranges[NDIM] = {1,1,1};
    15871595                CorrelationToSurfaceMap *surfacemap = PeriodicCorrelationToSurface( molecules, elemental, TesselStruct, LCList, ranges );
     1596                //OutputCorrelationToSurface(&output, surfacemap);
    15881597                BinPairMap *binmap = BinData( surfacemap, 0.5, 0., 0. );
    15891598                OutputCorrelation ( &binoutput, binmap );
     
    15911600                binoutput.close();
    15921601                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++)
    1593                   (*BigFinder)->ActiveFlag = Actives[counter];
     1602                  (*BigFinder)->ActiveFlag = Actives[counter++];
    15941603                Free(&Actives);
    15951604                delete(LCList);
     
    16141623            case 'F':
    16151624              if (ExitFlag == 0) ExitFlag = 1;
    1616               if (argptr+5 >=argc) {
     1625              if (argptr+6 >=argc) {
    16171626                ExitFlag = 255;
    1618                 eLog() << Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <dist_x> <dist_y> <dist_z> <randatom> <randmol> <DoRotate>" << endl;
     1627                eLog() << Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <dist_x> <dist_y> <dist_z> <boundary> <randatom> <randmol> <DoRotate>" << endl;
    16191628                performCriticalExit();
    16201629              } else {
     
    16221631                Log() << Verbose(1) << "Filling Box with water molecules." << endl;
    16231632                // construct water molecule
    1624                 molecule *filler = new molecule(periode);;
     1633                molecule *filler = new molecule(periode);
    16251634                molecule *Filling = NULL;
    16261635                atom *second = NULL, *third = NULL;
     1636//                first = new atom();
     1637//                first->type = periode->FindElement(5);
     1638//                first->x.Zero();
     1639//                filler->AddAtom(first);
    16271640                first = new atom();
    16281641                first->type = periode->FindElement(1);
     
    16431656                for (int i=0;i<NDIM;i++)
    16441657                  distance[i] = atof(argv[argptr+i]);
    1645                 Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atoi(argv[argptr+5]));
     1658                Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atof(argv[argptr+5]), atoi(argv[argptr+6]));
    16461659                if (Filling != NULL) {
     1660                  Filling->ActiveFlag = false;
    16471661                  molecules->insert(Filling);
    16481662                }
Note: See TracChangeset for help on using the changeset viewer.