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

Comparing trunk/src/restraints/RestraintForceManager.cpp (file contents):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1398 by gezelter, Tue Dec 8 22:17:02 2009 UTC

# Line 149 | Line 149 | namespace OpenMD {
149   #endif
150          }
151          
152 +
153 + #ifdef IS_MPI
154 +        // only handle this molecular restraint if this processor owns the
155 +        // molecule
156 +        int myrank = MPI::COMM_WORLD.Get_rank();
157 +        if (info_->getMolToProc(molIndex) == myrank) {
158 + #endif
159 +
160          MolecularRestraint* rest = new MolecularRestraint();
161  
162          std::string restPre("mol_");
# Line 184 | Line 192 | namespace OpenMD {
192          restraints_.push_back(rest);
193          mol->addProperty(new RestraintData("Restraint", rest));
194          restrainedMols_.push_back(mol);
195 <        
195 > #ifdef IS_MPI
196 >        }
197 > #endif        
198        } else if (myType.compare("OBJECT") == 0) {
199          
200          std::string objectSelection;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines