354 |
|
// set the arrays into the SimInfo object |
355 |
|
|
356 |
|
simnfo->atoms = the_atoms; |
357 |
+ |
simnfo->molecules = the_molecules; |
358 |
|
simnfo->nGlobalExcludes = 0; |
359 |
|
simnfo->excludes = the_excludes; |
360 |
|
|
696 |
|
BondStamp* currentBond; |
697 |
|
BendStamp* currentBend; |
698 |
|
TorsionStamp* currentTorsion; |
699 |
+ |
|
700 |
+ |
bond_pair* theBonds; |
701 |
+ |
bend_set* theBends; |
702 |
+ |
torsion_set* theTorsions; |
703 |
+ |
|
704 |
|
|
705 |
|
//init the forceField paramters |
706 |
|
|
707 |
|
the_ff->readParams(); |
708 |
|
|
709 |
|
|
710 |
< |
// init the molecules |
710 |
> |
// init the atoms |
711 |
|
|
712 |
+ |
double ux, uy, uz, u, uSqr; |
713 |
+ |
|
714 |
|
atomOffset = 0; |
715 |
|
excludeOffset = 0; |
716 |
|
for(i=0; i<simnfo->n_mol; i++){ |
727 |
|
info.myExcludes = &the_excludes[excludeOffset]; |
728 |
|
info.myBonds = new Bond*[info.nBonds]; |
729 |
|
info.myBends = new Bend*[info.nBends]; |
730 |
< |
info.myTorsions = new Torsions*[info.nTorsions]; |
730 |
> |
info.myTorsions = new Torsion*[info.nTorsions]; |
731 |
|
|
732 |
|
theBonds = new bond_pair[info.nBonds]; |
733 |
|
theBends = new bend_set[info.nBends]; |
737 |
|
|
738 |
|
for(j=0; j<info.nAtoms; j++){ |
739 |
|
|
740 |
< |
currentAtom = theComponents[stampID]->getAtom( j ); |
740 |
> |
currentAtom = comp_stamps[stampID]->getAtom( j ); |
741 |
|
if( currentAtom->haveOrientation() ){ |
742 |
|
|
743 |
|
dAtom = new DirectionalAtom(j + atomOffset); |
810 |
|
|
811 |
|
if( currentBend->haveExtras() ){ |
812 |
|
|
813 |
< |
extras = current_bend->getExtras(); |
813 |
> |
extras = currentBend->getExtras(); |
814 |
|
current_extra = extras; |
815 |
|
|
816 |
|
while( current_extra != NULL ){ |
927 |
|
|
928 |
|
the_molecules[i].initialize( info ); |
929 |
|
atomOffset += info.nAtoms; |
930 |
+ |
delete[] theBonds; |
931 |
+ |
delete[] theBends; |
932 |
+ |
delete[] theTorsions; |
933 |
|
} |
934 |
|
|
935 |
|
// clean up the forcefield |