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 1591 by gezelter, Tue Jul 12 15:25:07 2011 UTC vs.
Revision 1597 by gezelter, Tue Jul 26 15:49:24 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";
372        }
373        
374        //change the positions of atoms which belong to the rigidbodies
# Line 381 | Line 382 | namespace OpenMD {
382              cg = mol->nextCutoffGroup(ci)) {
383            //calculate the center of mass of cutoff group
384            cg->updateCOM();
385 +          cerr << "cgpos = " << cg->getPos() << "\n";
386          }
387        }      
388      }
# Line 526 | Line 528 | namespace OpenMD {
528             mol = info_->nextMolecule(mi)) {
529          for(cg = mol->beginCutoffGroup(ci); cg != NULL;
530              cg = mol->nextCutoffGroup(ci)) {
531 +          cerr << "branch1\n";
532 +          cerr << "globind = " << cg->getGlobalIndex() << "\n";
533            cg->updateCOM();
534          }
535        }      
536      } else {
537        // center of mass of the group is the same as position of the atom  
538        // if cutoff group does not exist
539 +      cerr << "branch2\n";
540        cgConfig->position = config->position;
541      }
542  
# Line 618 | Line 623 | namespace OpenMD {
623              for (vector<int>::iterator jb = atomListColumn.begin();
624                   jb != atomListColumn.end(); ++jb) {              
625                atom2 = (*jb);
626 <            
626 >
627                if (!fDecomp_->skipAtomPair(atom1, atom2)) {
628                  vpair = 0.0;
629                  workPot = 0.0;
# Line 633 | Line 638 | namespace OpenMD {
638                  if (atomListRow.size() == 1 && atomListColumn.size() == 1) {
639                    idat.d = &d_grp;
640                    idat.r2 = &rgrpsq;
641 +                  cerr << "dgrp = " << d_grp << "\n";
642                  } else {
643                    d = fDecomp_->getInteratomicVector(atom1, atom2);
644                    curSnapshot->wrapVector( d );
645                    r2 = d.lengthSquare();
646 +                  cerr << "datm = " << d<< "\n";
647                    idat.d = &d;
648                    idat.r2 = &r2;
649                  }
650                  
651 +                cerr << "idat.d = " << *(idat.d) << "\n";
652                  r = sqrt( *(idat.r2) );
653                  idat.rij = &r;
654                
# Line 649 | Line 657 | namespace OpenMD {
657                  } else {
658                    interactionMan_->doPair(idat);
659                    fDecomp_->unpackInteractionData(idat, atom1, atom2);
660 +
661 +                  cerr << "d = " << *(idat.d) << "\tv=" << vpair << "\tf=" << f1 << "\n";
662                    vij += vpair;
663                    fij += f1;
664                    tau -= outProduct( *(idat.d), f1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines