476 |
|
return false; |
477 |
|
} |
478 |
|
|
479 |
+ |
// Function Name: isAtomInRigidBody |
480 |
+ |
//return false if atom does not belong to a rigid body, otherwise return true |
481 |
+ |
bool MoleculeStamp::isAtomInRigidBody(int atomIndex){ |
482 |
+ |
int whichRigidBody; |
483 |
+ |
int consAtomIndex; |
484 |
|
|
485 |
< |
// Function Name isAtomInRigidBody |
485 |
> |
return isAtomInRigidBody(atomIndex, whichRigidBody, consAtomIndex); |
486 |
> |
|
487 |
> |
} |
488 |
> |
|
489 |
> |
// Function Name: isAtomInRigidBody |
490 |
|
//return false if atom does not belong to a rigid body otherwise return true and set whichRigidBody |
491 |
|
//and consAtomIndex |
492 |
|
//atomIndex : the index of atom in component |
497 |
|
int numRb; |
498 |
|
int numAtom; |
499 |
|
|
500 |
+ |
whichRigidBody = -1; |
501 |
+ |
consAtomIndex = -1; |
502 |
+ |
|
503 |
|
numRb = this->getNRigidBodies(); |
504 |
|
|
505 |
|
for(int i = 0 ; i < numRb; i++){ |