Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    ref87ee r1aa2a5  
    4949
    5050using namespace std;
     51
     52#include <cstring>
    5153
    5254#include "analysis_correlation.hpp"
     
    14101412            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;
    14111413            Log() << Verbose(0) << "\t-c x1 x2 x3\tCenter atoms in domain with a minimum distance to boundary of (x1,x2,x3)." << endl;
    1412             Log() << Verbose(0) << "\t-C\tPair Correlation analysis." << endl;
     1414            Log() << Verbose(0) << "\t-C <Z> <output> <bin output>\tPair Correlation analysis." << endl;
    14131415            Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl;
    14141416            Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl;
    14151417            Log() << Verbose(0) << "\t-e <file>\tSets the databases path to be parsed (default: ./)." << endl;
    14161418            Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << 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;
     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;
    14181421            Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl;
    14191422            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;
    14201424            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;
    14211425            Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl;
     
    15751579                else {
    15761580                  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 //                  }
    15891581                  configPresent = present;
    15901582                }
     
    16651657              //argptr+=1;
    16661658              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;
    16671676            case 'C':
    16681677              if (ExitFlag == 0) ExitFlag = 1;
     
    16721681                performCriticalExit();
    16731682              } else {
    1674                 SaveFlag = false;
    16751683                ofstream output(argv[argptr+1]);
    16761684                ofstream binoutput(argv[argptr+2]);
     
    16921700                counter = 0;
    16931701                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
    1694                   Actives[counter] = (*BigFinder)->ActiveFlag;
     1702                  Actives[counter++] = (*BigFinder)->ActiveFlag;
    16951703                  (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
    16961704                }
     
    17051713                binoutput.close();
    17061714                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++)
    1707                   (*BigFinder)->ActiveFlag = Actives[counter];
     1715                  (*BigFinder)->ActiveFlag = Actives[counter++];
    17081716                Free(&Actives);
    17091717                delete(LCList);
     
    17281736            case 'F':
    17291737              if (ExitFlag == 0) ExitFlag = 1;
    1730               if (argptr+5 >=argc) {
     1738              if (argptr+6 >=argc) {
    17311739                ExitFlag = 255;
    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;
     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;
    17331741                performCriticalExit();
    17341742              } else {
     
    17381746                molecule *filler = new molecule(periode);;
    17391747                molecule *Filling = NULL;
    1740                 atom *second = NULL, *third = NULL;
     1748//                atom *second = NULL, *third = NULL;
    17411749                first = new atom();
    1742                 first->type = periode->FindElement(1);
    1743                 first->x.Init(0.441, -0.143, 0.);
     1750                first->type = periode->FindElement(5);
     1751                first->x.Zero();
    17441752                filler->AddAtom(first);
    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);
     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);
    17551767                // call routine
    17561768                double distance[NDIM];
    17571769                for (int i=0;i<NDIM;i++)
    17581770                  distance[i] = atof(argv[argptr+i]);
    1759                 Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atoi(argv[argptr+5]));
     1771                Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atof(argv[argptr+5]), atoi(argv[argptr+6]));
    17601772                if (Filling != NULL) {
     1773                  Filling->ActiveFlag = false;
    17611774                  molecules->insert(Filling);
    17621775                }
     
    21072120                if (volume != -1)
    21082121                  ExitFlag = 255;
    2109                   eLog() << Verbose(0) << "Not enough arguments given for suspension: -u <density>" << endl;
     2122                  eLog() << Verbose(0) << "Not enough or invalid arguments given for suspension: -u <density>" << endl;
    21102123                  performCriticalExit();
    21112124              } else {
Note: See TracChangeset for help on using the changeset viewer.