Ignore:
Timestamp:
Dec 19, 2009, 7:31:34 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
dd3a80, ff4611
Parents:
16807e
git-author:
Frederik Heber <heber@…> (12/19/09 19:29:02)
git-committer:
Frederik Heber <heber@…> (12/19/09 19:31:34)
Message:

Smaller fixes.

  • analysis_correlation.cpp: Info objects created at start of each function for debugging.
  • ParseCommandLineOptions(): case 'I' dissection added, some stuff was unexplained
  • molecule::CenterOrigin() - starting at start not next now, which left out first!

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    r16807e rf78203  
    14101410            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;
    14111411            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;
     1412            Log() << Verbose(0) << "\t-C <Z> <output> <bin output>\tPair Correlation analysis." << endl;
    14131413            Log() << Verbose(0) << "\t-d x1 x2 x3\tDuplicate cell along each axis by given factor." << endl;
    14141414            Log() << Verbose(0) << "\t-D <bond distance>\tDepth-First-Search Analysis of the molecule, giving cycles and tree/back edges." << endl;
     
    14161416            Log() << Verbose(0) << "\t-E <id> <Z>\tChange atom <id>'s element to <Z>, <id> begins at 0." << endl;
    14171417            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;
     1418            Log() << Verbose(0) << "\t-F\tFilling Box with water molecules." << endl;
    14181419            Log() << Verbose(0) << "\t-g <file>\tParses a bond length table from the given file." << endl;
    14191420            Log() << Verbose(0) << "\t-h/-H/-?\tGive this help screen." << endl;
     1421            Log() << Verbose(0) << "\t-I\t Dissect current system of molecules into a set of disconnected (subgraphs of) molecules." << endl;
    14201422            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;
    14211423            Log() << Verbose(0) << "\t-m <0/1>\tCalculate (0)/ Align in(1) PAS with greatest EV along z axis." << endl;
     
    15751577                else {
    15761578                  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 //                  }
    15891579                  configPresent = present;
    15901580                }
     
    16651655              //argptr+=1;
    16661656              break;
     1657            case 'I':
     1658              Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl;
     1659              // @TODO rather do the dissection afterwards
     1660              molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration);
     1661              mol = NULL;
     1662              if (molecules->ListOfMolecules.size() != 0) {
     1663                for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
     1664                  if ((*ListRunner)->ActiveFlag) {
     1665                    mol = *ListRunner;
     1666                    break;
     1667                  }
     1668              }
     1669              if (mol == NULL) {
     1670                mol = *(molecules->ListOfMolecules.begin());
     1671                mol->ActiveFlag = true;
     1672              }
     1673              break;
    16671674            case 'C':
    16681675              if (ExitFlag == 0) ExitFlag = 1;
     
    16721679                performCriticalExit();
    16731680              } else {
    1674                 SaveFlag = false;
    16751681                ofstream output(argv[argptr+1]);
    16761682                ofstream binoutput(argv[argptr+2]);
     
    16921698                counter = 0;
    16931699                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++) {
    1694                   Actives[counter] = (*BigFinder)->ActiveFlag;
     1700                  Actives[counter++] = (*BigFinder)->ActiveFlag;
    16951701                  (*BigFinder)->ActiveFlag = (*BigFinder == Boundary) ? false : true;
    16961702                }
     
    17051711                binoutput.close();
    17061712                for (MoleculeList::iterator BigFinder = molecules->ListOfMolecules.begin(); BigFinder != molecules->ListOfMolecules.end(); BigFinder++)
    1707                   (*BigFinder)->ActiveFlag = Actives[counter];
     1713                  (*BigFinder)->ActiveFlag = Actives[counter++];
    17081714                Free(&Actives);
    17091715                delete(LCList);
     
    17281734            case 'F':
    17291735              if (ExitFlag == 0) ExitFlag = 1;
    1730               if (argptr+5 >=argc) {
     1736              if (argptr+6 >=argc) {
    17311737                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;
     1738                eLog() << Verbose(0) << "Not enough or invalid arguments given for filling box with water: -F <dist_x> <dist_y> <dist_z> <epsilon> <randatom> <randmol> <DoRotate>" << endl;
    17331739                performCriticalExit();
    17341740              } else {
     
    17401746                atom *second = NULL, *third = NULL;
    17411747                first = new atom();
    1742                 first->type = periode->FindElement(1);
    1743                 first->x.Init(0.441, -0.143, 0.);
     1748                first->type = periode->FindElement(5);
     1749                first->x.Zero();
    17441750                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);
     1751//                first = new atom();
     1752//                first->type = periode->FindElement(1);
     1753//                first->x.Init(0.441, -0.143, 0.);
     1754//                filler->AddAtom(first);
     1755//                second = new atom();
     1756//                second->type = periode->FindElement(1);
     1757//                second->x.Init(-0.464, 1.137, 0.0);
     1758//                filler->AddAtom(second);
     1759//                third = new atom();
     1760//                third->type = periode->FindElement(8);
     1761//                third->x.Init(-0.464, 0.177, 0.);
     1762//                filler->AddAtom(third);
     1763//                filler->AddBond(first, third, 1);
     1764//                filler->AddBond(second, third, 1);
    17551765                // call routine
    17561766                double distance[NDIM];
    17571767                for (int i=0;i<NDIM;i++)
    17581768                  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]));
     1769                Filling = FillBoxWithMolecule(molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atof(argv[argptr+5]), atoi(argv[argptr+6]));
    17601770                if (Filling != NULL) {
     1771                  Filling->ActiveFlag = false;
    17611772                  molecules->insert(Filling);
    17621773                }
Note: See TracChangeset for help on using the changeset viewer.