Ignore:
Timestamp:
Feb 25, 2010, 4:43:02 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
3db67e
Parents:
2e6496
Message:

Made the world solely responsible for creating and erasing molecules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/builder.cpp

    r2e6496 r8d9d38  
    14321432     }
    14331433     if (mol == NULL) {
    1434        mol = new molecule(periode);
     1434       mol = World::get()->createMolecule();
    14351435       mol->ActiveFlag = true;
    14361436       if (ConfigFileName != NULL)
     
    16341634                Log() << Verbose(1) << "Filling Box with water molecules." << endl;
    16351635                // construct water molecule
    1636                 molecule *filler = new molecule(periode);
     1636                molecule *filler = World::get()->createMolecule();
    16371637                molecule *Filling = NULL;
    16381638                atom *second = NULL, *third = NULL;
     
    16641664                  molecules->insert(Filling);
    16651665                }
    1666                 delete(filler);
     1666                World::get()->destroyMolecule(filler);
    16671667                argptr+=6;
    16681668              }
     
    22032203    if(World::get()->numMolecules() == 0){
    22042204        mol = World::get()->createMolecule();
     2205        World::get()->getMolecules()->insert(mol);
     2206        cout << "Molecule created" << endl;
    22052207        if(mol->cell_size[0] == 0.){
    22062208            Log() << Verbose(0) << "enter lower tridiagonal form of basis matrix" << endl << endl;
Note: See TracChangeset for help on using the changeset viewer.