Ignore:
Timestamp:
Jan 26, 2010, 12:52:31 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
8d0b25, d34341
Parents:
551a58
Message:

GetDistanceToSurface() separated, filling now with water instead of boron, DissectMoleculeIntoConnectedSubgraphs() now working on list of molecules instead of single one.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    r551a58 r478683  
    15511551     if (configuration.BG == NULL) {
    15521552       configuration.BG = new BondGraph(configuration.GetIsAngstroem());
    1553        if ((BondGraphFileName.empty()) && (configuration.BG->LoadBondLengthTable(BondGraphFileName))) {
     1553       if ((!BondGraphFileName.empty()) && (configuration.BG->LoadBondLengthTable(BondGraphFileName))) {
    15541554         Log() << Verbose(0) << "Bond length table loaded successfully." << endl;
    15551555       } else {
     
    16601660              Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl;
    16611661              // @TODO rather do the dissection afterwards
    1662               molecules->DissectMoleculeIntoConnectedSubgraphs(mol,&configuration);
     1662              molecules->DissectMoleculeIntoConnectedSubgraphs(periode, &configuration);
    16631663              mol = NULL;
    16641664              if (molecules->ListOfMolecules.size() != 0) {
     
    17081708                int ranges[NDIM] = {1,1,1};
    17091709                CorrelationToSurfaceMap *surfacemap = PeriodicCorrelationToSurface( molecules, elemental, TesselStruct, LCList, ranges );
     1710                //OutputCorrelationToSurface(&output, surfacemap);
    17101711                BinPairMap *binmap = BinData( surfacemap, 0.5, 0., 0. );
    17111712                OutputCorrelation ( &binoutput, binmap );
     
    17441745                Log() << Verbose(1) << "Filling Box with water molecules." << endl;
    17451746                // construct water molecule
    1746                 molecule *filler = new molecule(periode);;
     1747                molecule *filler = new molecule(periode);
    17471748                molecule *Filling = NULL;
    1748 //                atom *second = NULL, *third = NULL;
     1749                atom *second = NULL, *third = NULL;
     1750//                first = new atom();
     1751//                first->type = periode->FindElement(5);
     1752//                first->x.Zero();
     1753//                filler->AddAtom(first);
    17491754                first = new atom();
    1750                 first->type = periode->FindElement(5);
    1751                 first->x.Zero();
     1755                first->type = periode->FindElement(1);
     1756                first->x.Init(0.441, -0.143, 0.);
    17521757                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);
     1758                second = new atom();
     1759                second->type = periode->FindElement(1);
     1760                second->x.Init(-0.464, 1.137, 0.0);
     1761                filler->AddAtom(second);
     1762                third = new atom();
     1763                third->type = periode->FindElement(8);
     1764                third->x.Init(-0.464, 0.177, 0.);
     1765                filler->AddAtom(third);
     1766                filler->AddBond(first, third, 1);
     1767                filler->AddBond(second, third, 1);
    17671768                // call routine
    17681769                double distance[NDIM];
Note: See TracChangeset for help on using the changeset viewer.