Functions | |
template<typename AtomIterator> | |
void | translate (AtomIterator begin, AtomIterator end, BTK::MATH::BTKVector const &T) |
Translate atoms along vector T. | |
template<typename AtomIterator> | |
void | center (AtomIterator begin, AtomIterator end) |
Center a structure. | |
template<typename AtomIterator1, typename AtomIterator2> | |
void | align_centers (AtomIterator1 fixed_begin, AtomIterator1 fixed_end, AtomIterator2 mobile_begin, AtomIterator2 mobile_end) |
Align the geometric centers of two molecules. | |
template<typename AtomIterator> | |
void | rotate (AtomIterator begin, AtomIterator end, double phi, double theta, double psi, BTK::MATH::BTKVector const &fixed_point) |
Rotate atoms about a fixed point. | |
template<typename AtomIterator> | |
void | rotate (AtomIterator begin, AtomIterator end, double phi, double theta, double psi) |
Rotate atoms about their geometric center. | |
template<typename AtomIterator> | |
void | rotate (AtomIterator begin, AtomIterator end, BTK::MATH::BTKVector const &axis, double theta, BTK::MATH::BTKVector const &fixed_point) |
Rotate atoms around an axis or vector, with respect to a point. | |
template<typename AtomIterator> | |
void | rotate (AtomIterator begin, AtomIterator end, BTK::MATH::BTKVector const &axis, double theta) |
Rotate atoms around an axis or vector, with respect to their geometric center. | |
template<typename AtomIterator> | |
void | rotate (AtomIterator begin, AtomIterator end, BTK::MATH::BTKMatrix const &R) |
Rotate atoms using a rotation matrix. | |
template<typename AtomIterator> | |
void | transform (AtomIterator begin, AtomIterator end, BTK::MATH::BTKMatrix const &R, BTK::MATH::BTKVector const &T) |
Combined translate/rotate. |
These are iterator-based methods for translating, rotating, superimposing and otherwise transforming atomic structures as rigid bodies in 3-dimensions. They will work with any iterator that is a model of the AtomIterator concept.
void BTK::ALGORITHMS::align_centers | ( | AtomIterator1 | fixed_begin, | |
AtomIterator1 | fixed_end, | |||
AtomIterator2 | mobile_begin, | |||
AtomIterator2 | mobile_end | |||
) |
Align the geometric centers of two molecules.
The atoms in the range [mobile_begin,mobile_end) are translated such that their geometric center is aligned with the geometric center of the atoms in the range [fixed_begin,fixed_end).
void BTK::ALGORITHMS::center | ( | AtomIterator | begin, | |
AtomIterator | end | |||
) |
Center a structure.
Translate the atoms in the range [first,last), such that their geometric center is at the system origin.
void BTK::ALGORITHMS::rotate | ( | AtomIterator | begin, | |
AtomIterator | end, | |||
BTK::MATH::BTKMatrix const & | R | |||
) |
Rotate atoms using a rotation matrix.
Applies rotation matrix rot to every atom in the range [begin,end).
void BTK::ALGORITHMS::rotate | ( | AtomIterator | begin, | |
AtomIterator | end, | |||
BTK::MATH::BTKVector const & | axis, | |||
double | theta | |||
) |
Rotate atoms around an axis or vector, with respect to their geometric center.
Rotate atoms in the range [first,last) about a specified axis. The geometric center of these atoms will be subtracted from the position of every atom in the structure prior to rotation, and added to the position of every atom in the structure following rotation.
void BTK::ALGORITHMS::rotate | ( | AtomIterator | begin, | |
AtomIterator | end, | |||
BTK::MATH::BTKVector const & | axis, | |||
double | theta, | |||
BTK::MATH::BTKVector const & | fixed_point | |||
) |
Rotate atoms around an axis or vector, with respect to a point.
fixed_point | This point will be subtracted from the position of every atom in the structure prior to rotation, and added to the position of every atom in the structure following rotation. |
void BTK::ALGORITHMS::rotate | ( | AtomIterator | begin, | |
AtomIterator | end, | |||
double | phi, | |||
double | theta, | |||
double | psi | |||
) |
Rotate atoms about their geometric center.
This method will rotate the atoms in the range [first,last) using the specified Euler angles about their geometric center.
For Euler angle conventions, see here.
void BTK::ALGORITHMS::rotate | ( | AtomIterator | begin, | |
AtomIterator | end, | |||
double | phi, | |||
double | theta, | |||
double | psi, | |||
BTK::MATH::BTKVector const & | fixed_point | |||
) |
Rotate atoms about a fixed point.
This method will rotate the atoms in the range [first,last) using the specified Euler angles about the specified point.
For Euler angle conventions, see here.
void BTK::ALGORITHMS::transform | ( | AtomIterator | begin, | |
AtomIterator | end, | |||
BTK::MATH::BTKMatrix const & | R, | |||
BTK::MATH::BTKVector const & | T | |||
) |
Combined translate/rotate.
Changes every atom position in the range [begin,end) to such that
void BTK::ALGORITHMS::translate | ( | AtomIterator | begin, | |
AtomIterator | end, | |||
BTK::MATH::BTKVector const & | T | |||
) |
Translate atoms along vector T.