--- branches/mmeineke/mdtools/interface_implementation/SimSetup.cpp 2002/07/09 18:40:59 10 +++ trunk/mdtools/interface_implementation/SimSetup.cpp 2002/09/24 22:10:55 117 @@ -128,7 +128,7 @@ void SimSetup::createSim( void ){ // create the atom and short range interaction arrays the_atoms = new Atom*[tot_atoms]; - // the_molecules = new Molecule[tot_nmol]; + the_molecules = new Molecule[tot_nmol]; if( tot_SRI ){ @@ -142,6 +142,7 @@ void SimSetup::createSim( void ){ simnfo->sr_interactions = the_sris; simnfo->n_exclude = tot_SRI; simnfo->excludes = the_excludes; + // initialize the arrays @@ -342,12 +343,17 @@ void SimSetup::makeAtoms( void ){ double ux, uy, uz, uSqr, u; AtomStamp* current_atom; DirectionalAtom* dAtom; + int molIndex, molStart, molEnd, nMemb; + + molIndex = 0; index = 0; for( i=0; igetNAtoms(); for( k=0; kgetNAtoms(); k++ ){ current_atom = comp_stamps[i]->getAtom( k ); @@ -381,6 +387,13 @@ void SimSetup::makeAtoms( void ){ // increment the index and repeat; index++; } + + molEnd = index -1; + the_molecules[molIndex].setNMembers( nMemb ); + the_molecules[molIndex].setStartAtom( molStart ); + the_molecules[molIndex].setEndAtom( molEnd ); + molIndex++; + } } @@ -486,11 +499,6 @@ void SimSetup::makeMolecules( void ){ the_ff->initializeTorsions( the_torsions ); } -void SimSetup::makeMolecules( void ){ - - //empy for now -} - void SimSetup::initFromBass( void ){ int i, j, k;