ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/ForceManager.cpp
(Generate patch)

Comparing branches/development/src/brains/ForceManager.cpp (file contents):
Revision 1597 by gezelter, Tue Jul 26 15:49:24 2011 UTC vs.
Revision 1601 by gezelter, Thu Aug 4 20:04:35 2011 UTC

# Line 368 | Line 368 | namespace OpenMD {
368        for(atom = mol->beginAtom(ai); atom != NULL;
369            atom = mol->nextAtom(ai)) {
370          atom->zeroForcesAndTorques();
371        cerr << "apos = " << atom->getPos() << "\n";
371        }
372        
373        //change the positions of atoms which belong to the rigidbodies
# Line 382 | Line 381 | namespace OpenMD {
381              cg = mol->nextCutoffGroup(ci)) {
382            //calculate the center of mass of cutoff group
383            cg->updateCOM();
385          cerr << "cgpos = " << cg->getPos() << "\n";
384          }
385        }      
386      }
# Line 528 | Line 526 | namespace OpenMD {
526             mol = info_->nextMolecule(mi)) {
527          for(cg = mol->beginCutoffGroup(ci); cg != NULL;
528              cg = mol->nextCutoffGroup(ci)) {
531          cerr << "branch1\n";
532          cerr << "globind = " << cg->getGlobalIndex() << "\n";
529            cg->updateCOM();
530          }
531        }      
532      } else {
533        // center of mass of the group is the same as position of the atom  
534        // if cutoff group does not exist
539      cerr << "branch2\n";
535        cgConfig->position = config->position;
536      }
537  
# Line 638 | Line 633 | namespace OpenMD {
633                  if (atomListRow.size() == 1 && atomListColumn.size() == 1) {
634                    idat.d = &d_grp;
635                    idat.r2 = &rgrpsq;
641                  cerr << "dgrp = " << d_grp << "\n";
636                  } else {
637                    d = fDecomp_->getInteratomicVector(atom1, atom2);
638                    curSnapshot->wrapVector( d );
639                    r2 = d.lengthSquare();
646                  cerr << "datm = " << d<< "\n";
640                    idat.d = &d;
641                    idat.r2 = &r2;
642                  }
643 <                
651 <                cerr << "idat.d = " << *(idat.d) << "\n";
643 >              
644                  r = sqrt( *(idat.r2) );
645                  idat.rij = &r;
646                
# Line 658 | Line 650 | namespace OpenMD {
650                    interactionMan_->doPair(idat);
651                    fDecomp_->unpackInteractionData(idat, atom1, atom2);
652  
661                  cerr << "d = " << *(idat.d) << "\tv=" << vpair << "\tf=" << f1 << "\n";
653                    vij += vpair;
654                    fij += f1;
655                    tau -= outProduct( *(idat.d), f1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines