Rosetta 3.4
Public Types | Public Member Functions | Static Public Attributes | Friends
core::kinematics::Jump Class Reference

an object which makes rigid-body transformation with translational and rotational perturbation More...

#include <Jump.hh>

Collaboration diagram for core::kinematics::Jump:
Collaboration graph
[legend]

List of all members.

Public Types

typedef numeric::xyzVector< RealVector
typedef numeric::xyzMatrix< RealMatrix

Public Member Functions

 Jump ()
 construction
 Jump (const RT &src_rt)
 constructor with only RT
 Jump (Stub const &stub1, Stub const &stub2)
 get RT from two stubs and ZERO rb_delta
 Jump (const Jump &src)
 copy constructor
Jumpoperator= (Jump const &src)
 copy operator
void from_stubs (Stub const &stub1, Stub const &stub2)
 get a jump from two stubs
void from_bond_cst (utility::vector1< Vector > &atoms, utility::vector1< Real > const &csts)
 get a jump from a bond cst definition
void make_jump (Stub const &stub1, Stub &stub2) const
 make a jump from stub1 to stub2
bool ortho_check () const
 check RT's orthogonality
bool nonzero_deltas () const
 check whether there is rb_delta not being transformed.
void reset ()
 reset RT, rb_delta and rb_center
void random_trans (const float dist_in)
 translate along a randomly chosen vector by dist_in
void gaussian_move (int const dir, float const trans_mag, float const rot_mag)
 Given the desired magnitude of the translation and rotation components, applies Gaussian perturbation to this jump.
void gaussian_move_single_rb (int const dir, float const mag, int rb)
void rotation_by_matrix (Stub const &stub, Vector const &center, Matrix const &matrix)
 make a rotation "matrix" about the center "center"
void rotation_by_axis (Stub const &stub, Vector const &axis, Vector const &center, float const alpha)
 make a rotation of alpha degrees around axix and center
void translation_along_axis (Stub const &stub, Vector const &axis, float const dist)
 make a translation along axis by dist
void identity_transform ()
 reset to identity matrix, 0 translation
void reverse ()
 change the direction of a jump, e.g, upstream stub becomes downstream stub now.
Jump reversed () const
 Return a new jump that is the inverse transformation.
Matrix const & get_rotation () const
 get rotation matrix
Vector const & get_translation () const
 get translation vector
void set_rotation (Matrix const &R_in)
 set rotation matrix
void set_translation (Vector const &t)
 set translation vector
void fold_in_rb_deltas ()
 transform small changes in translation and rotation into jump
RT rt () const
 return the RT modeled by this jump --> makes new Jump, calls fold_in_rb_delte and returns RT
const utility::vector1< Real > & get_rb_delta (int const dir) const
 get rb_delta by direction
Real get_rb_delta (int const rb_no, int const dir) const
 get rb_delta by direction and rb_number
void set_rb_delta (int const rb_no, int const dir, Real const value)
 set rb_delta by direction and rb_number
Vector const & get_rb_center (int const dir) const
 get rb_center by direction
void set_rb_center (const int dir, Stub const &stub, Vector const &center)
 set rb_center by direction

Static Public Attributes

static const int TRANS_X = 1
static const int TRANS_Y = 2
static const int TRANS_Z = 3
static const int ROT_X = 4
static const int ROT_Y = 5
static const int ROT_Z = 6

Friends

std::ostream & operator<< (std::ostream &os, const Jump &jump)
 stream output operator
std::istream & operator>> (std::istream &is, Jump &jump)
 stream input operator
Real distance (Jump const &a_in, Jump const &b_in)
 RT root squared deviation.

Detailed Description

an object which makes rigid-body transformation with translational and rotational perturbation

See AtomTree overview and concepts for details.


Member Typedef Documentation


Constructor & Destructor Documentation

core::kinematics::Jump::Jump ( ) [inline]

construction

core::kinematics::Jump::Jump ( const RT src_rt) [inline]

constructor with only RT

core::kinematics::Jump::Jump ( Stub const &  stub1,
Stub const &  stub2 
) [inline]

get RT from two stubs and ZERO rb_delta

core::kinematics::Jump::Jump ( const Jump src) [inline]

copy constructor


Member Function Documentation

void core::kinematics::Jump::fold_in_rb_deltas ( )
void core::kinematics::Jump::from_bond_cst ( utility::vector1< Vector > &  atoms,
utility::vector1< Real > const &  csts 
)

get a jump from a bond cst definition

this function translate a virtual bond type constraints into jump transformation. in atoms vector, A1, A2, A3, B1, B2, B3, and A1-B1 forms the virtual bond, like A3-A2-A1---B1-B2-B3 in csts vector, disAB, angleA and B, didedral A, AB and B. B1, B2 and B3 are moved given cst definition.

References distance, core::kinematics::RT::from_stubs(), core::kinematics::Stub::is_orthogonal(), core::kinematics::Stub::spherical(), and core::kinematics::ZERO.

Referenced by protocols::jumping::ResiduePairJump::build_cst_conformer_jumps().

void core::kinematics::Jump::from_stubs ( Stub const &  stub1,
Stub const &  stub2 
)

get a jump from two stubs

Note:
: we dont reset rb_center!!!!!!!!!

References core::kinematics::RT::from_stubs(), and core::kinematics::ZERO.

Referenced by core::kinematics::tree::JumpAtom::update_internal_coords().

void core::kinematics::Jump::gaussian_move ( int const  dir,
float const  trans_mag,
float const  rot_mag 
)

Given the desired magnitude of the translation and rotation components, applies Gaussian perturbation to this jump.

clear existing rb_delta first if any and then apply the gaussian move

References fold_in_rb_deltas(), core::kinematics::jump_RG(), and set_rb_delta().

Referenced by protocols::rigid::RigidBodyPerturbNoCenterMover::apply(), protocols::rigid::RigidBodyPerturbMover::apply(), and protocols::enzdes::PredesignPerturbMover::apply().

void core::kinematics::Jump::gaussian_move_single_rb ( int const  dir,
float const  mag,
int  rb 
)

do a gaussian move along a certain rb direction

References fold_in_rb_deltas(), core::kinematics::jump_RG(), and set_rb_delta().

Referenced by protocols::rigid::RigidBodyDofPerturbMover::apply().

Jump::Vector const & core::kinematics::Jump::get_rb_center ( int const  dir) const [inline]

get rb_center by direction

Referenced by core::kinematics::tree::JumpAtom::get_dof_axis_and_end_pos().

const utility::vector1< Real > & core::kinematics::Jump::get_rb_delta ( int const  dir) const [inline]
Real core::kinematics::Jump::get_rb_delta ( int const  rb_no,
int const  dir 
) const [inline]

get rb_delta by direction and rb_number

Jump::Matrix const & core::kinematics::Jump::get_rotation ( ) const [inline]
Jump::Vector const & core::kinematics::Jump::get_translation ( ) const [inline]
void core::kinematics::Jump::identity_transform ( )

reset to identity matrix, 0 translation

References core::kinematics::RT::identity_transform(), and core::kinematics::ZERO.

void core::kinematics::Jump::make_jump ( Stub const &  stub1,
Stub stub2 
) const

make a jump from stub1 to stub2

fold all the rb_delta first and then make the jump. make jump with stubs instead of FArrays

References core::kinematics::RT::fold_in_rb_deltas(), core::kinematics::RT::make_jump(), and core::kinematics::RT::reverse().

Referenced by core::kinematics::tree::JumpAtom::update_xyz_coords().

bool core::kinematics::Jump::nonzero_deltas ( ) const

check whether there is rb_delta not being transformed.

Referenced by core::kinematics::operator<<(), and rt().

Jump& core::kinematics::Jump::operator= ( Jump const &  src) [inline]

copy operator

bool core::kinematics::Jump::ortho_check ( ) const
void core::kinematics::Jump::random_trans ( const float  dist_in)

translate along a randomly chosen vector by dist_in

choose a random unit vector as the direction of translation, by selecting its spherical coordinates phi(0-180) and theta(0-360) then move dist_in along that direction

References fold_in_rb_deltas(), core::kinematics::jump_RG(), protocols::swa::phi(), and core::kinematics::RT::set_translation().

void core::kinematics::Jump::reset ( )

reset RT, rb_delta and rb_center

References core::kinematics::RT::reset(), and core::kinematics::ZERO.

void core::kinematics::Jump::reverse ( )
Jump core::kinematics::Jump::reversed ( ) const

Return a new jump that is the inverse transformation.

References fold_in_rb_deltas(), and reverse().

Referenced by protocols::motifs::Motif::Motif().

void core::kinematics::Jump::rotation_by_axis ( Stub const &  stub,
Vector const &  axis,
Vector const &  center,
float const  alpha 
)

make a rotation of alpha degrees around axix and center

stub should be the Stub of the upstream jump. this does a rotation by alpha degrees around the specified the axis and center, both of which are written in xyz frame

Parameters:
alphadegrees

References fold_in_rb_deltas(), and rotation_by_matrix().

Referenced by protocols::rigid::RigidBodySpinMover::apply(), protocols::rigid::WholeBodyRotationMover::apply(), and protocols::protein_interface_design::movers::SpinMover::apply().

void core::kinematics::Jump::rotation_by_matrix ( Stub const &  stub,
Vector const &  center,
Matrix const &  matrix 
)

make a rotation "matrix" about the center "center"

stub should be the Stub of the upstream jump. This routine has the effect (I think) of rotating the downstream stub by the rotation "matrix" about the center "center", both of which are written in xyz lab frame.

References fold_in_rb_deltas(), core::kinematics::RT::get_rotation(), core::kinematics::RT::get_translation(), core::kinematics::Stub::M, core::kinematics::RT::set_rotation(), core::kinematics::RT::set_translation(), and core::kinematics::Stub::v.

Referenced by protocols::rigid::RigidBodyRandomizeMover::apply(), and rotation_by_axis().

RT core::kinematics::Jump::rt ( ) const
void core::kinematics::Jump::set_rb_center ( const int  dir,
Stub const &  stub,
Vector const &  center 
)

set rb_center by direction

stub defines the local reference frame for the corresponding direction of the jump (forward == folding direction, backward = reverse) by which to transform center
center is an xyz position in the absolute (protein) reference frame
the column vectors of stub are unit vectors defined in the absolute reference frame( the frame in which center is defined)
so left-multiplying by stub.M.transposed() puts an absolute ref frame vector (like center) into the local jump reference frame
dir is the direction through the jump, 1 == forward == folding order, -1 == backward == reverse folding order
if dir == 1, the stub should be the stub for the downstream jump atom, (eg returned by "folder.downstream_jump_stub( jump_number )" or "downstream_jump_atom.get_stub()" ) and the center is the center of rotation for the downstream segment (ie the segment which is built later during folding). The center determines how the forward rb_deltas are interpreted, and is the center for rigid-body rotation during minimization.
if dir == -1, the stub should be the stub for the upstream jump atom, (eg returned by folder.upstream_jump_stub( jump_number ) ) and the center is the center of rotation for the upstream segment. The center determines how the reverse rb_deltas are interpreted, eg in perturbation moves when we modify the reverse rb-deltas directly, eg in the call "Jump::gaussian_move(-1,tmag,rmag)"

References fold_in_rb_deltas(), core::kinematics::Stub::M, and core::kinematics::Stub::v.

Referenced by protocols::rigid::RigidBodySpinMover::apply(), protocols::rigid::RigidBodyRandomizeMover::apply(), protocols::rigid::RigidBodyPerturbMover::apply(), and protocols::enzdes::PredesignPerturbMover::apply().

void core::kinematics::Jump::set_rb_delta ( int const  rb_no,
int const  dir,
Real const  value 
)
void core::kinematics::Jump::set_rotation ( Matrix const &  R_in)
void core::kinematics::Jump::set_translation ( Vector const &  t)
void core::kinematics::Jump::translation_along_axis ( Stub const &  stub,
Vector const &  axis,
float const  dist 
)

make a translation along axis by dist

stub should be the Stub of the upstream jump. this does a translation along the axis by dist. the axis is written in xyz frame

References fold_in_rb_deltas(), core::kinematics::RT::get_translation(), core::kinematics::Stub::M, and core::kinematics::RT::set_translation().

Referenced by protocols::rigid::RigidBodyTransMover::apply(), protocols::rigid::WholeBodyTranslationMover::apply(), and core::scoring::DockingScoreFunction::operator()().


Friends And Related Function Documentation

Real distance ( Jump const &  a_in,
Jump const &  b_in 
) [friend]

RT root squared deviation.

Referenced by from_bond_cst().

std::ostream& operator<< ( std::ostream &  os,
const Jump jump 
) [friend]

stream output operator

std::istream& operator>> ( std::istream &  is,
Jump jump 
) [friend]

stream input operator


Member Data Documentation

const int core::kinematics::Jump::ROT_X = 4 [static]
const int core::kinematics::Jump::ROT_Y = 5 [static]
const int core::kinematics::Jump::ROT_Z = 6 [static]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines