# | Line 73 | Line 73 | void SimSetup::createSim( void ){ | |
---|---|---|
73 | ||
74 | MakeStamps *the_stamps; | |
75 | Globals* the_globals; | |
76 | < | int i; |
76 | > | int i, j; |
77 | ||
78 | // get the stamps and globals; | |
79 | the_stamps = stamps; | |
# | Line 213 | Line 213 | void SimSetup::createSim( void ){ | |
213 | tot_bends = 0; | |
214 | tot_torsions = 0; | |
215 | for( i=0; i<n_components; i++ ){ | |
216 | < | |
217 | < | tot_atoms += components_nmol[i] * comp_stamps[i]->getNAtoms(); |
218 | < | tot_bonds += components_nmol[i] * comp_stamps[i]->getNBonds(); |
219 | < | tot_bends += components_nmol[i] * comp_stamps[i]->getNBends(); |
216 | > | |
217 | > | tot_atoms += components_nmol[i] * comp_stamps[i]->getNAtoms(); |
218 | > | tot_bonds += components_nmol[i] * comp_stamps[i]->getNBonds(); |
219 | > | tot_bends += components_nmol[i] * comp_stamps[i]->getNBends(); |
220 | tot_torsions += components_nmol[i] * comp_stamps[i]->getNTorsions(); | |
221 | } | |
222 | ||
# | Line 234 | Line 234 | void SimSetup::createSim( void ){ | |
234 | ||
235 | // divide the molecules among processors here. | |
236 | ||
237 | < | new mpiSimulation( simnfo ); |
237 | > | mpiSimulation* mpiSim = new mpiSimulation( simnfo ); |
238 | ||
239 | < | simnfo->mpiSim->divideLabor( n_components, comp_stamps, components_nmol ); |
239 | > | mpiSim->divideLabor(); |
240 | > | |
241 | > | // set up the local variables |
242 | > | |
243 | > | int localMol; |
244 | > | int local_atoms, local_bonds, local_bends, local_torsions, local_SRI; |
245 | > | |
246 | > | localMol = 0; |
247 | > | local_atoms = 0; |
248 | > | local_bonds = 0; |
249 | > | local_bends = 0; |
250 | > | local_torsions = 0; |
251 | > | for( i=0; i<n_components; i++ ){ |
252 | > | |
253 | > | for( j=0; j<components_nmol[i]; j++ ){ |
254 | > | |
255 | > | if( mpiSim->getMyMolStart() <= j && |
256 | > | j <= mpiSim->getMyMolEnd() ){ |
257 | > | |
258 | > | local_atoms += comp_stamps[i]->getNAtoms(); |
259 | > | local_bonds += comp_stamps[i]->getNBonds(); |
260 | > | local_bends += comp_stamps[i]->getNBends(); |
261 | > | local_torsions += comp_stamps[i]->getNTorsions(); |
262 | > | localMol++; |
263 | > | } |
264 | > | } |
265 | > | } |
266 | > | |
267 | > | |
268 | > | |
269 | > | simnfo->n_atoms = mpiSim->getMyNlocal(); |
270 | > | |
271 | ||
272 | #endif // is_mpi | |
273 | ||
# | Line 562 | Line 593 | void SimSetup::makeAtoms( void ){ | |
593 | the_molecules[molIndex].setNMembers( nMemb ); | |
594 | the_molecules[molIndex].setStartAtom( molStart ); | |
595 | the_molecules[molIndex].setEndAtom( molEnd ); | |
596 | + | the_molecules[molIndex].setStampID( i ); |
597 | molIndex++; | |
598 | ||
599 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |