ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimSetup.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimSetup.cpp (file contents):
Revision 422 by mmeineke, Thu Mar 27 19:21:42 2003 UTC vs.
Revision 429 by mmeineke, Thu Mar 27 21:52:21 2003 UTC

# Line 88 | Line 88 | void SimSetup::createSim( void ){
88            
89  
90  
91 <  if( !strcmp( force_field, "TraPPE" ) ) the_ff = new TraPPEFF();
92 <  else if( !strcmp( force_field, "DipoleTest" ) ) the_ff = new DipoleTestFF();
93 <  else if( !strcmp( force_field, "TraPPE_Ex" ) ) the_ff = new TraPPE_ExFF();
91 >  if( !strcmp( force_field, "TraPPE_Ex" ) ) the_ff = new TraPPE_ExFF();
92    else if( !strcmp( force_field, "LJ" ) ) the_ff = new LJ_FF();
93    else{
94      sprintf( painCave.errMsg,
# Line 356 | Line 354 | void SimSetup::createSim( void ){
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  
# Line 654 | Line 653 | void SimSetup::createSim( void ){
653  
654   //   new AllLong( simnfo );
655  
657  if( !strcmp( force_field, "TraPPE" ) ) new Verlet( *simnfo, the_ff );
658  if( !strcmp( force_field, "DipoleTest" ) ) new Symplectic( simnfo, the_ff );
656    if( !strcmp( force_field, "TraPPE_Ex" ) ) new Symplectic( simnfo, the_ff );
657    if( !strcmp( force_field, "LJ" ) ) new Verlet( *simnfo, the_ff );
658  
# Line 699 | Line 696 | void SimSetup::makeMolecules( void ){
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++){
# Line 723 | Line 727 | void SimSetup::makeMolecules( void ){
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];
# Line 733 | Line 737 | void SimSetup::makeMolecules( void ){
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);
# Line 806 | Line 810 | void SimSetup::makeMolecules( void ){
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 ){
# Line 923 | Line 927 | void SimSetup::makeMolecules( void ){
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines