Ignore:
Timestamp:
Nov 24, 2009, 3:34:49 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
1a3354
Parents:
7d1ad9
Message:

Fixes and naming of final Tecplot output file is now molecule name.

  • FIXES to builder.cpp:
    • case 'p' would not dissect the molecule into connected subgraphs
    • if done so, the BondGraph was not yet initialised
    • if done so, we need to check whether BondGraphFileName has been set
    • BondGraphFileName.empty() could not be used as a check, as was set to "" instead of "\n"
    • if (finally) done so, we have to remove the empty molecule that we parsed in
    • ... and then pick the newly added molecule for mol to point at
    • SaveConfig() did not set the merged molecule name correctly.
    • if empty config is given, the empty molecule now receives the ConfigFileName as name
  • FIXES to config.cpp
    • Load() did not set the name of the molecule
  • changes to tesselationhelper.cpp and tesselation.cpp
  • changes to PointCloud and molecule
    • new virtual function PointCloud::GetName() returns "unknown"
    • new function molecule::GetName() returns pointer to name of molecule
    • IsEmpty() and IsEnd() now return true by default
  • all .dat files in the "Tesselations" tests were changed accordingly (i.e. have now the name in the second line)
  • benzene was added as a new test for an absolutely flat molecule. So far, it fails horribly.
  • 13 of 17 tests run fine

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    r7d1ad9 rcc9225  
    12471247  ofstream output;
    12481248  molecule *mol = new molecule(periode);
     1249  mol->SetNameFromFilename(ConfigFileName);
    12491250
    12501251  if (!strcmp(configuration->configpath, configuration->GetDefaultPath())) {
     
    13851386  int argptr;
    13861387  molecule *mol = NULL;
    1387   string BondGraphFileName("");
     1388  string BondGraphFileName("\n");
    13881389  int verbosity = 0;
    13891390  strncpy(configuration.databasepath, LocalPath, MAXSTRINGSIZE-1);
     
    15391540       mol = new molecule(periode);
    15401541       mol->ActiveFlag = true;
     1542       if (ConfigFileName != NULL)
     1543         mol->SetNameFromFilename(ConfigFileName);
    15411544       molecules->insert(mol);
     1545     }
     1546     if (configuration.BG == NULL) {
     1547       configuration.BG = new BondGraph(configuration.GetIsAngstroem());
     1548       if ((BondGraphFileName.empty()) && (configuration.BG->LoadBondLengthTable(BondGraphFileName))) {
     1549         Log() << Verbose(0) << "Bond length table loaded successfully." << endl;
     1550       } else {
     1551         eLog() << Verbose(1) << "Bond length table loading failed." << endl;
     1552       }
    15421553     }
    15431554
     
    15631574                else {
    15641575                  Log() << Verbose(2) << "File found and parsed." << endl;
     1576                  mol->SetNameFromFilename(argv[argptr]);
     1577                  molecules->ListOfMolecules.remove(mol);
     1578                  molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration);
     1579                  if (molecules->ListOfMolecules.size() != 0) {
     1580                    for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)
     1581                      if ((*ListRunner)->ActiveFlag) {
     1582                        mol = *ListRunner;
     1583                        break;
     1584                      }
     1585                  }
    15651586                  configPresent = present;
    15661587                }
Note: See TracChangeset for help on using the changeset viewer.