Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    r1aa2a5 ref87ee  
    4949
    5050using namespace std;
    51 
    52 #include <cstring>
    5351
    5452#include "analysis_correlation.hpp"
     
    14121410            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;
    14131411            Log() << Verbose(0) << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl;
    1414             Log() << Verbose(0) << "\t-C <Z> <output> <bin output>\tPair Correlation analysis." << endl;
     1412            Log() << Verbose(0) << "\t-C\tPair Correlation analysis." << endl;
    14151413            Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl;
    14161414            Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl;
    14171415            Log() << Verbose(0) << "\t-e <file>\tSets the databases path to be parsed (default: ./)." << endl;
    14181416            Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl;
    1419             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;
    1420             Log() << Verbose(0) << "\t-F <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>\tFilling Box with water molecules." << endl;
     1417            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;
    14211418            Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl;
    14221419            Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl;
    1423             Log() << Verbose(0) << "\t-I\t Dissect current system of molecules into a set of disconnected (subgraphs of) molecules." << endl;
    14241420            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;
    14251421            Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl;
     
    15791575                else {
    15801576                  Log() << Verbose(2) << "File found and parsed." << endl;
     1577                  // @TODO rather do the dissection afterwards
     1578//                  mol->SetNameFromFilename(argv[argptr]);
     1579//                  molecules->ListOfMolecules.remove(mol);
     1580//                  molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration);
     1581//                  delete(mol);
     1582//                  if (molecules->ListOfMolecules.size() != 0) {
     1583//                    for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
     1584//                      if ((*ListRunner)->ActiveFlag) {
     1585//                        mol = *ListRunner;
     1586//                        break;
     1587//                      }
     1588//                  }
    15811589                  configPresent = present;
    15821590                }
     
    16571665              //argptr+=1;
    16581666              break;
    1659             case 'I':
    1660               Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl;
    1661               // @TODO rather do the dissection afterwards
    1662               molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration);
    1663               mol = NULL;
    1664               if (molecules->ListOfMolecules.size() != 0) {
    1665                 for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
    1666                   if ((*ListRunner)->ActiveFlag) {
    1667                     mol = *ListRunner;
    1668                     break;
    1669                   }
    1670               }
    1671               if (mol == NULL) {
    1672                 mol = *(molecules->ListOfMolecules.begin());
    1673                 mol->ActiveFlag = true;
    1674               }
    1675               break;
    16761667            case 'C':
    16771668              if (ExitFlag == 0) ExitFlag = 1;
     
    16811672                performCriticalExit();
    16821673              } else {
     1674                SaveFlag = false;
    16831675                ofstream output(argv[argptr+1]);
    16841676                ofstream binoutput(argv[argptr+2]);
     
    17001692                counter = 0;
    17011693                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
    1702                   Actives[counter++] = (*BigFinder)->ActiveFlag;
     1694                  Actives[counter] = (*BigFinder)->ActiveFlag;
    17031695                  (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
    17041696                }
     
    17131705                binoutput.close();
    17141706                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++)
    1715                   (*BigFinder)->ActiveFlag = Actives[counter++];
     1707                  (*BigFinder)->ActiveFlag = Actives[counter];
    17161708                Free(&Actives);
    17171709                delete(LCList);
     
    17361728            case 'F':
    17371729              if (ExitFlag == 0) ExitFlag = 1;
    1738               if (argptr+6 >=argc) {
     1730              if (argptr+5 >=argc) {
    17391731                ExitFlag = 255;
    1740                 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;
     1732                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;
    17411733                performCriticalExit();
    17421734              } else {
     
    17461738                molecule *filler = new molecule(periode);;
    17471739                molecule *Filling = NULL;
    1748 //                atom *second = NULL, *third = NULL;
     1740                atom *second = NULL, *third = NULL;
    17491741                first = new atom();
    1750                 first->type = periode->FindElement(5);
    1751                 first->x.Zero();
     1742                first->type = periode->FindElement(1);
     1743                first->x.Init(0.441, -0.143, 0.);
    17521744                filler->AddAtom(first);
    1753 //                first = new atom();
    1754 //                first->type = periode->FindElement(1);
    1755 //                first->x.Init(0.441, -0.143, 0.);
    1756 //                filler->AddAtom(first);
    1757 //                second = new atom();
    1758 //                second->type = periode->FindElement(1);
    1759 //                second->x.Init(-0.464, 1.137, 0.0);
    1760 //                filler->AddAtom(second);
    1761 //                third = new atom();
    1762 //                third->type = periode->FindElement(8);
    1763 //                third->x.Init(-0.464, 0.177, 0.);
    1764 //                filler->AddAtom(third);
    1765 //                filler->AddBond(first, third, 1);
    1766 //                filler->AddBond(second, third, 1);
     1745                second = new atom();
     1746                second->type = periode->FindElement(1);
     1747                second->x.Init(-0.464, 1.137, 0.0);
     1748                filler->AddAtom(second);
     1749                third = new atom();
     1750                third->type = periode->FindElement(8);
     1751                third->x.Init(-0.464, 0.177, 0.);
     1752                filler->AddAtom(third);
     1753                filler->AddBond(first, third, 1);
     1754                filler->AddBond(second, third, 1);
    17671755                // call routine
    17681756                double distance[NDIM];
    17691757                for (int i=0;i<NDIM;i++)
    17701758                  distance[i] = atof(argv[argptr+i]);
    1771                 Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atof(argv[argptr+5]), atoi(argv[argptr+6]));
     1759                Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atoi(argv[argptr+5]));
    17721760                if (Filling != NULL) {
    1773                   Filling->ActiveFlag = false;
    17741761                  molecules->insert(Filling);
    17751762                }
     
    21202107                if (volume != -1)
    21212108                  ExitFlag = 255;
    2122                   eLog() << Verbose(0) << "Not enough or invalid arguments given for suspension: -u <density>" << endl;
     2109                  eLog() << Verbose(0) << "Not enough arguments given for suspension: -u <density>" << endl;
    21232110                  performCriticalExit();
    21242111              } else {
Note: See TracChangeset for help on using the changeset viewer.