49 #include <numeric/conversions.hh>
50 #include <numeric/xyzVector.hh>
52 #include <utility/exit.hh>
59 #include <utility/vector1.hh>
75 residueType_( residue_type.
clone() ),
76 fixResidue_( ! residue_type.is_protein() )
163 utility_exit_with_message(
"ResiduePairJump can only take two residues\n");
180 value_vector.push_back( value );
181 cstInfoMap_.insert( std::make_pair( type, value_vector ) );
184 bool redundant =
false;
185 for (
core::Size i = 1; i <= value_vector.size(); ++i ) {
186 if ( value == value_vector[i] ) {
191 if ( ! redundant ) value_vector.push_back( value );
202 for (
core::Size i = 1; i <= values.size(); ++i ) {
210 using namespace core;
211 using namespace core::fragment;
218 jump_frag->add_residue(up_jump);
219 jump_frag->add_residue(down_jump);
221 ResiduePairJumpFrame->set_pos( 1, 1);
222 ResiduePairJumpFrame->set_pos( 2, 2);
223 ResiduePairJumpFrame->add_fragment( jump_frag );
230 ResiduePairJumpFrame->steal( *
miniPose_ );
233 return ResiduePairJumpFrame;
239 using namespace core;
252 for (
Size i = 1; i <= 2; ++i ) {
260 conformation::ResidueOP new_residue( conformation::ResidueFactory::create_residue( *( rsd->residueType() ) ) );
264 miniPose_->append_residue_by_jump( *new_residue, 1 );
349 if ( max_index == 0 )
return;
353 for (
core::Size i = 1; i <= max_index; ++i ) {
354 std::map< dofType, core::Size > map;
355 map.insert( std::make_pair( type, i ) );
362 for (
core::Size j = 1; j <= tmp_conformers.size(); ++j ) {
363 std::map< dofType, core::Size > map( tmp_conformers[j] );
364 if ( map.find(type) == map.end() ) {
365 map.insert( std::make_pair( type, 0 ) );
366 for (
core::Size i = 1; i <= max_index; ++i ) {
389 std::map< dofType, core::Size >
const & conformer_map
392 for ( std::map< dofType, core::Size >::const_iterator it = conformer_map.begin(), it_end = conformer_map.end();
393 it != it_end; it++ ) {
396 if ( ( type ==
rot1 ) || (type ==
rot2) ) {
399 for (
core::Size i = 1; i <= rotamer->nchi(); ++i ) {
400 miniPose_->set_chi( i, seqpos, rotamer->chi()[i] );
404 core::id::AtomID jump_atom_id( rsd->residueType()->atom_index(rsd->cstAtoms(1)), 2 );
414 using namespace core::scoring;
416 runtime_assert(
miniPose_->total_residue() == 2 );
421 task->initialize_from_command_line().restrict_to_repacking();
422 (*scorefxn)(*miniPose_);
430 rotset->set_resid(which);
432 if ( ! rsd->fixResidue() ) {
437 task_mask[which] =
true;
438 task->restrict_to_residues( task_mask );
441 rotset->build_rotamers( *
miniPose_, *scorefxn, *task, packer_neighbor_graph );
442 task_mask[which] =
false;
459 for (
Size i = 1; i <= 2; ++i ) {
460 for (
Size j = 1; j <= 3 ; ++j ) {
466 std::map< cstType, core::Size >
const & conformer(
cst_conformers_[i] );
468 for ( std::map< cstType, core::Size >::const_iterator it = conformer.begin(), it_end = conformer.end(); it != it_end; ++it ) {
470 Size index = it->second;
472 if ( type !=
disAB ) value = numeric::conversions::radians(value);
473 cst_values[
Size(type)] = value;
490 for (
core::Size i = 1; i <= max_index; ++i ) {
491 std::map< cstType, core::Size > map;
492 map.insert( std::make_pair( type, i ) );
499 for (
core::Size j = 1; j <= tmp_conformers.size(); ++j ) {
500 std::map< cstType, core::Size > map( tmp_conformers[j] );
501 if ( map.find(type) == map.end() ) {
502 map.insert( std::make_pair( type, 0 ) );
503 for (
core::Size i = 1; i <= max_index; ++i ) {