36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
42 |
|
|
43 |
|
|
56 |
|
#include "primitives/Molecule.hpp" |
57 |
|
#include "utils/simError.h" |
58 |
|
#include "utils/MemoryUtils.hpp" |
59 |
< |
#include "utils/StringTokenizer.hpp"the |
59 |
> |
#include "utils/StringTokenizer.hpp" |
60 |
|
#include "restraints/ObjectRestraint.hpp" |
61 |
|
#include "restraints/MolecularRestraint.hpp" |
62 |
|
|
280 |
|
|
281 |
|
int index = tokenizer.nextTokenAsInt(); |
282 |
|
|
283 |
< |
StuntDouble* integrableObject = info_->getIOIndexToIntegrableObject(index); |
283 |
> |
StuntDouble* sd = info_->getIOIndexToIntegrableObject(index); |
284 |
|
|
285 |
< |
if (integrableObject == NULL) { |
285 |
> |
if (sd == NULL) { |
286 |
|
return; |
287 |
|
} |
288 |
|
|
310 |
|
} |
311 |
|
|
312 |
|
case 'q' : { |
313 |
< |
if (integrableObject->isDirectional()) { |
313 |
> |
if (sd->isDirectional()) { |
314 |
|
|
315 |
|
q[0] = tokenizer.nextTokenAsDouble(); |
316 |
|
q[1] = tokenizer.nextTokenAsDouble(); |
332 |
|
} |
333 |
|
case 'j' : { |
334 |
|
Vector3d ji; |
335 |
< |
if (integrableObject->isDirectional()) { |
335 |
> |
if (sd->isDirectional()) { |
336 |
|
ji[0] = tokenizer.nextTokenAsDouble(); |
337 |
|
ji[1] = tokenizer.nextTokenAsDouble(); |
338 |
|
ji[2] = tokenizer.nextTokenAsDouble(); |
366 |
|
all_pos_[index] = pos; |
367 |
|
|
368 |
|
// is this io restrained? |
369 |
< |
GenericData* data = integrableObject->getPropertyByName("Restraint"); |
369 |
> |
GenericData* data = sd->getPropertyByName("Restraint"); |
370 |
|
ObjectRestraint* oRest; |
371 |
|
|
372 |
|
if (data != NULL) { |
377 |
|
// an ObjectRestraint: |
378 |
|
oRest = dynamic_cast<ObjectRestraint*>(restData->getData()); |
379 |
|
if (oRest != NULL) { |
380 |
< |
if (integrableObject->isDirectional()) { |
380 |
> |
if (sd->isDirectional()) { |
381 |
|
oRest->setReferenceStructure(pos, q.toRotationMatrix3()); |
382 |
|
} else { |
383 |
|
oRest->setReferenceStructure(pos); |