Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WatsonCrickRotamerCouplings.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
14 #include <protocols/dna/util.hh> // find_basepairs
15 
16 #include <core/conformation/ResidueMatcher.hh> // WatsonCrickResidueMatcher
18 // AUTO-REMOVED #include <basic/options/option.hh>
20 #include <core/pose/Pose.hh>
21 #include <core/pose/PDBInfo.hh>
22 
23 #include <basic/Tracer.hh>
24 
25 // option key includes
26 // AUTO-REMOVED #include <basic/options/keys/dna.OptionKeys.gen.hh>
27 
28 #include <utility/vector0.hh>
29 #include <utility/vector1.hh>
30 #include <basic/options/keys/OptionKeys.hh>
31 
32 #ifdef WIN32
33  #include <utility/tag/Tag.hh>
34 #endif
35 
36 
37 namespace protocols {
38 namespace dna {
39 
40 using namespace core;
41  using namespace chemical;
42  using namespace conformation;
43  using namespace basic::options;
44  using namespace pack;
45  using namespace rotamer_set;
46  using namespace task;
47  using namespace operation;
48 
49 using basic::t_info;
50 using basic::t_debug;
51 using basic::t_trace;
52 static basic::Tracer TR("protocols.dna.WatsonCrickRotamerCouplings",t_info);
53 
55 {
56  return new WatsonCrickRotamerCouplings;
57 }
58 
60 
62 {
63  return new WatsonCrickRotamerCouplings( *this );
64 }
65 
66 void
68 {}
69 
70 void
72  Pose const & pose,
73  PackerTask & ptask
74 ) const
75 {
76  // find DNA chains
77  DnaChains dna_chains;
78  find_basepairs( pose, dna_chains );
79  Size const nres( pose.total_residue() );
80  // setup residue couplings
81  RotamerCouplingsOP couplings( new RotamerCouplings );
82  couplings->resize( nres );
83  for ( DnaPositions::const_iterator it( dna_chains.begin() ); it != dna_chains.end(); ++it ) {
84  //mjo commenting out 'resid' because it is unused and causes a warning
85  //Size const resid( it->first );
86  DnaPosition const & dnapos( it->second );
87  if ( ! dnapos.paired() ) continue;
88  Size top( dnapos.top() );
89  Size bot( dnapos.bottom() );
90  TR << "base pair " << pose.pdb_info()->chain(top) << "." << pose.pdb_info()->number(top) << "."
91  << dna_full_name3( pose.residue_type(top).name3() ) << " - " << pose.pdb_info()->chain(bot)
92  << "." << pose.pdb_info()->number(bot) << "." << dna_full_name3( pose.residue_type(bot).name3() )
93  << std::endl;
94  (*couplings)[ top ].first = bot;
95  (*couplings)[ top ].second = new conformation::WatsonCrickResidueMatcher();
96  (*couplings)[ bot ].first = top;
97  (*couplings)[ bot ].second = new conformation::WatsonCrickResidueMatcher();
98  }
99  ptask.rotamer_couplings( couplings );
100 }
101 
102 } // namespace dna
103 } // namespace protocols
104