--- trunk/OOPSE/libmdtools/SimSetup.cpp 2003/03/27 20:36:16 424 +++ trunk/OOPSE/libmdtools/SimSetup.cpp 2003/03/27 20:48:37 427 @@ -695,14 +695,21 @@ void SimSetup::makeMolecules( void ){ BondStamp* currentBond; BendStamp* currentBend; TorsionStamp* currentTorsion; + + bond_pair* theBonds; + bend_set* theBends; + torsion_set* theTorsions; + //init the forceField paramters the_ff->readParams(); - // init the molecules + // init the atoms + double ux, uy, uz, u, uSqr; + atomOffset = 0; excludeOffset = 0; for(i=0; in_mol; i++){ @@ -719,7 +726,7 @@ void SimSetup::makeMolecules( void ){ info.myExcludes = &the_excludes[excludeOffset]; info.myBonds = new Bond*[info.nBonds]; info.myBends = new Bend*[info.nBends]; - info.myTorsions = new Torsions*[info.nTorsions]; + info.myTorsions = new Torsion*[info.nTorsions]; theBonds = new bond_pair[info.nBonds]; theBends = new bend_set[info.nBends]; @@ -729,7 +736,7 @@ void SimSetup::makeMolecules( void ){ for(j=0; jgetAtom( j ); + currentAtom = comp_stamps[stampID]->getAtom( j ); if( currentAtom->haveOrientation() ){ dAtom = new DirectionalAtom(j + atomOffset); @@ -802,7 +809,7 @@ void SimSetup::makeMolecules( void ){ if( currentBend->haveExtras() ){ - extras = current_bend->getExtras(); + extras = currentBend->getExtras(); current_extra = extras; while( current_extra != NULL ){ @@ -919,6 +926,9 @@ void SimSetup::makeMolecules( void ){ the_molecules[i].initialize( info ); atomOffset += info.nAtoms; + delete[] theBonds; + delete[] theBends; + delete[] theTorsions; } // clean up the forcefield