34 #include <numeric/conversions.hh>
35 #include <numeric/random/random.hh>
36 #include <numeric/trig.functions.hh>
37 #include <numeric/xyz.functions.hh>
44 #include <utility/vector1.hh>
49 namespace kinematics {
51 static numeric::random::RandomGenerator
jump_RG(62454);
124 int const index( dir == 1 ? 1 : 2 );
125 rb_center[index] = stub.
M.transposed() * ( center - stub.
v );
131 const Real tol(1.0e-3);
133 for (
int i=1; i<=2; ++i ) {
134 for (
int j=1; j<= 6; ++j ) {
138 return ( sum > tol );
150 using numeric::y_rotation_matrix_degrees;
151 using numeric::z_rotation_matrix_degrees;
152 using numeric::conversions::degrees;
153 using numeric::sin_cos_range;
156 const Real phi( degrees( std::acos(sin_cos_range(1.0-2.0*
jump_RG.uniform()))));
157 const Real dist( dist_in );
161 y_rotation_matrix_degrees(phi) *
162 z_rotation_matrix_degrees(theta) ).col_z() );
171 for (
int i = 1; i <= 3; ++i ) {
177 return this_rb_delta;
251 Vector new_center = m.transposed() * ( center - stub.
v);
254 Matrix new_matrix = m.transposed() * ( matrix * m );
276 using numeric::conversions::radians;
279 Matrix mat = numeric::rotation_matrix( axis,
Real( radians( alpha ) ) );
297 Vector new_trans(
Real(dist) * axis.normalized() );
316 Jump ret_val( *
this );
383 assert( atoms.size() == 6 && csts.size() == 6 );
385 Stub stubA(atoms[1], atoms[2], atoms[3]);
386 Stub stubB(atoms[4], atoms[5], atoms[6]);
387 assert( stubA.is_orthogonal(1e-3) && stubB.
is_orthogonal(1e-3) );
389 Vector b1 = stubA.spherical( csts[4], csts[2], csts[1] );
390 Stub stub_b1( b1, atoms[1], atoms[2]);
393 Stub stub_b2( b2, b1, atoms[1]);
395 Vector b3 = stub_b2.
spherical( csts[6], angle_of(atoms[4], atoms[5], atoms[6]), atoms[5].
distance( atoms[6] ) );
397 Stub new_stubB(b1,b2,b3);
433 for (
int i = 1; i <= 2; ++i ) {
435 os <<
"rb_delta " << tag;
436 for (
int j = 1; j <= 6; ++j ) {
441 os <<
"rb_center " << tag;
442 for (
int j = 1; j <= 3; ++j ) {
462 Jump a( a_in ),
b( b_in );
464 a.fold_in_rb_deltas();
481 Jump a( a_in ),
b( b_in );
483 a.fold_in_rb_deltas();
494 rotation_axis(
A *
B.transposed(), theta );
496 dist = v.distance(w);