--- trunk/OOPSE/utils/sysbuilder/nanoBuilder.cpp 2003/08/15 19:24:13 699 +++ trunk/OOPSE/utils/sysbuilder/nanoBuilder.cpp 2003/08/18 20:59:47 700 @@ -18,6 +18,8 @@ nanoBuilder::nanoBuilder(int &hasError){ int Errors; int foundCore,foundShell; int i; + + //Zero variables particleRadius = 0.0; @@ -214,6 +216,7 @@ int nanoBuilder::buildNanoParticle( void ){ DumpWriter* writer; SimInfo* simnfo; + SimState* theConfig; Lattice *myLattice; MoLocator *coreLocate; @@ -322,9 +325,15 @@ int nanoBuilder::buildNanoParticle( void ){ } - Atom::createArrays( nAtoms ); - atoms = new Atom*[nAtoms]; + // set up the SimInfo object + simnfo = new SimInfo(); + simnfo->n_atoms = nAtoms; + + theConfig = simnfo->getConfiguration(); + theConfig->createArrays( nAtoms ); + simnfo->atoms = new Atom*[nAtoms]; + atoms = simnfo->atoms; shesActualSizetoMe = 0; @@ -335,11 +344,11 @@ int nanoBuilder::buildNanoParticle( void ){ orientationMunger( A ); if( moleculeVector[i].isCore){ nCoreAtomCounter += nCoreModelAtoms; - coreLocate->placeMol(moleculeVector[i].pos,A,atoms,nShellAtomCounter); + coreLocate->placeMol(moleculeVector[i].pos,A,atoms,nShellAtomCounter, theConfig); } else { nShellAtomCounter += nShellModelAtoms; - shellLocate->placeMol(moleculeVector[i].pos,A,atoms,nCoreAtomCounter); + shellLocate->placeMol(moleculeVector[i].pos,A,atoms,nCoreAtomCounter, theConfig); } shesActualSizetoMe++; } @@ -356,16 +365,11 @@ int nanoBuilder::buildNanoParticle( void ){ simnfo->Hmat[1][1] = 1.0; simnfo->Hmat[2][2] = 1.0; - // set up the SimInfo object - simnfo = new SimInfo(); - simnfo->n_atoms = nAtoms; sprintf( simnfo->sampleName, "%s.dump", bsInfo.outPrefix ); sprintf( simnfo->finalName, "%s.init", bsInfo.outPrefix ); - simnfo->atoms = atoms; - // set up the writer and write out writer = new DumpWriter( simnfo );