| 89 |
|
int nRestraintStamps = simParam->getNRestraintStamps(); |
| 90 |
|
std::vector<RestraintStamp*> stamp = simParam->getRestraintStamps(); |
| 91 |
|
|
| 92 |
+ |
std::vector<int> stuntDoubleIndex; |
| 93 |
+ |
|
| 94 |
|
for (int i = 0; i < nRestraintStamps; i++){ |
| 95 |
|
|
| 96 |
|
std::string myType = toUpperCopy(stamp[i]->getType()); |
| 136 |
|
|
| 137 |
|
int myrank = MPI::COMM_WORLD.Get_rank(); |
| 138 |
|
if (info_->getMolToProc(molIndex) == myrank) { |
| 139 |
+ |
|
| 140 |
|
// If we were supposed to have it but got a null, then freak out. |
| 141 |
|
#endif |
| 142 |
|
|
| 158 |
|
// molecule |
| 159 |
|
int myrank = MPI::COMM_WORLD.Get_rank(); |
| 160 |
|
if (info_->getMolToProc(molIndex) == myrank) { |
| 161 |
+ |
|
| 162 |
|
#endif |
| 163 |
|
|
| 164 |
|
MolecularRestraint* rest = new MolecularRestraint(); |
| 234 |
|
|
| 235 |
|
for (sd = seleMan.beginSelected(selei); sd != NULL; |
| 236 |
|
sd = seleMan.nextSelected(selei)) { |
| 237 |
< |
|
| 237 |
> |
stuntDoubleIndex.push_back(sd->getGlobalIntegrableObjectIndex()); |
| 238 |
> |
|
| 239 |
|
ObjectRestraint* rest = new ObjectRestraint(); |
| 240 |
|
|
| 241 |
|
if (stamp[i]->haveDisplacementSpringConstant()) { |
| 275 |
|
// are times when it won't use restraints at all, so only open the |
| 276 |
|
// restraint file if we are actually using restraints: |
| 277 |
|
|
| 278 |
< |
if (simParam->getUseRestraints()) { |
| 278 |
> |
if (simParam->getUseRestraints()) { |
| 279 |
|
std::string refFile = simParam->getRestraint_file(); |
| 280 |
< |
RestReader* rr = new RestReader(info, refFile); |
| 276 |
< |
|
| 280 |
> |
RestReader* rr = new RestReader(info, refFile, stuntDoubleIndex); |
| 281 |
|
rr->readReferenceStructure(); |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
restOutput_ = getPrefix(info_->getFinalConfigFileName()) + ".rest"; |
| 285 |
|
restOut = new RestWriter(info_, restOutput_.c_str(), restraints_); |
| 282 |
– |
|
| 286 |
|
if(!restOut){ |
| 287 |
|
sprintf(painCave.errMsg, "Restraint error: Failed to create RestWriter\n"); |
| 288 |
|
painCave.isFatal = 1; |
| 387 |
|
std::vector<Vector3d> forces; |
| 388 |
|
|
| 389 |
|
for(sd = (*rm)->beginIntegrableObject(ioi); sd != NULL; |
| 390 |
< |
sd = (*rm)->nextIntegrableObject(ioi)) { |
| 390 |
> |
sd = (*rm)->nextIntegrableObject(ioi)) { |
| 391 |
|
struc.push_back(sd->getPos()); |
| 392 |
|
} |
| 393 |
|
|