29 #include <basic/basic.hh>
31 #include <numeric/NumericTraits.hh>
35 #include <numeric/random/random.hh>
36 #include <utility/tag/Tag.hh>
41 #include <basic/Tracer.hh>
44 #include <utility/vector0.hh>
45 #include <utility/vector1.hh>
46 #include <utility/options/IntegerVectorOption.hh>
53 static basic::Tracer
TR(
"protocols.simple_moves.BackboneMover");
56 namespace simple_moves {
58 static numeric::random::RandomGenerator
RG(90);
64 protocols::canonical_sampling::ThermodynamicMover(),
67 preserve_detailed_balance_(false)
71 movemap->set_bb(
true );
82 ) : protocols::canonical_sampling::ThermodynamicMover(),
83 movemap_( movemap_in ),
84 temperature_( temperature_in),
86 preserve_detailed_balance_(false)
144 bool preserve_detailed_balance
192 Warning() <<
"no movable positions in " <<
type() <<
"!" << std::endl;
200 for (
int k=1; k<=
num_; ++k ) {
210 std::pair< int, Real >
const & random_pos(
pos_list_[ static_cast< int >(
RG.uniform() *
pos_list_.size() + 1 ) ] );
244 return "BackboneMover";
257 Real const probability = std::exp(std::max(
Real(-40.0),boltz_factor) );
258 if (
RG.uniform() >= probability )
return(
false );
310 for (
int i=1, i_end = pose.
total_residue(); i<= i_end; ++i ) {
322 pos_list_.push_back( std::make_pair( i, mx ) );
326 }
else if (rsd.is_carbohydrate() &&
movemap_->get(TorsionID(i,
BB, 4)) &&
331 pos_list_.push_back(std::make_pair(i, mx));
350 Real static const pi(numeric::NumericTraits<Real>::pi());
391 if (current_rsd.is_protein()) {
409 mmap->set_chi(
true );
410 mmap->set_bb(
true );
464 for (
int i=2, i_end = pose.
total_residue(); i<= i_end; ++i ) {
466 if ( rsd.is_protein() && movemap_->get( TorsionID( i,
BB,
phi_torsion ) ) &&
469 if ( angle_max_.count( ss ) ) {
470 Real const mx( angle_max_.find( ss )->second );
472 pos_list_.push_back( std::make_pair( i, mx ) );
476 }
else if (rsd.is_carbohydrate() && movemap_->get(TorsionID(i - 1,
BB, 4)) &&
477 movemap_->get(TorsionID(i,
BB, 5))) {
479 Real const mx = angle_max_.find(
'L')->second;
481 pos_list_.push_back(std::make_pair(i, mx));
500 Real static const pi(numeric::NumericTraits<Real>::pi());
524 big_angle_ = angle_in*2.0;
525 small_angle_ = big_angle_/2.0;
537 Real shear_delta = small_angle_ -
RG.uniform() * big_angle_;
539 old_phi_ = pose.
phi(resnum_);
540 new_phi_ = basic::periodic_range( old_phi_ - shear_delta, 360.0 );
543 if (current_rsd.is_protein()) {
552 old_psi_ = pose.
psi(resnum_-1);
553 new_psi_ = basic::periodic_range( old_psi_ + shear_delta, 360.0 );
555 if (current_rsd.is_protein()) {
565 pose.
set_phi( resnum_, new_phi_ );
566 pose.
set_psi( resnum_-1, new_psi_ );
574 mmap->set_chi(
true );
575 mmap->set_bb(
true );
586 os <<
"Max angle for helices (H): " << mover.
get_angle_max(
'H') <<
587 "\nMax angle for strands (E): " << mover.
get_angle_max(
'E') <<
589 "\nTemperature factor (kT): " << mover.
temperature() <<
590 "\nNumber of moves: " << mover.
nmoves() << std::endl;
591 os <<
"MoveMap:" << std::endl;