ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/flucq/FluctuatingChargePropagator.cpp
(Generate patch)

Comparing trunk/src/flucq/FluctuatingChargePropagator.cpp (file contents):
Revision 1921 by gezelter, Thu Aug 1 18:23:07 2013 UTC vs.
Revision 1984 by gezelter, Tue Apr 15 21:15:35 2014 UTC

# Line 83 | Line 83 | namespace OpenMD {
83        return;
84      }
85  
86 <    SimInfo::MoleculeIterator i;
87 <    Molecule::FluctuatingChargeIterator  j;
88 <    Molecule* mol;
89 <    Atom* atom;
86 >    // SimInfo::MoleculeIterator i;
87 >    // Molecule::FluctuatingChargeIterator  j;
88 >    // Molecule* mol;
89 >    // Atom* atom;
90 >    //  
91 >    // For single-minima flucq, this ensures a net neutral system, but
92 >    // for multiple minima, this is no longer the right thing to do:
93 >    //
94 >    // for (mol = info_->beginMolecule(i); mol != NULL;
95 >    //      mol = info_->nextMolecule(i)) {
96 >    //   for (atom = mol->beginFluctuatingCharge(j); atom != NULL;
97 >    //        atom = mol->nextFluctuatingCharge(j)) {
98 >    //     atom->setFlucQPos(0.0);
99 >    //     atom->setFlucQVel(0.0);
100 >    //   }
101 >    // }
102      
91    for (mol = info_->beginMolecule(i); mol != NULL;
92         mol = info_->nextMolecule(i)) {
93      for (atom = mol->beginFluctuatingCharge(j); atom != NULL;
94           atom = mol->nextFluctuatingCharge(j)) {
95        atom->setFlucQPos(0.0);
96        atom->setFlucQVel(0.0);
97      }
98    }
99    
103      FluctuatingChargeObjectiveFunction flucQobjf(info_, forceMan_,
104                                                   fqConstraints_);
105  
# Line 111 | Line 114 | namespace OpenMD {
114      DumpStatusFunction dsf(info_);  // we want a dump file written
115                                      // every iteration
116      minim->minimize(problem, endCriteria);
117 +    cerr << "back from minim\n";
118      initialized_ = true;
119    }
120  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines