Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RandomConformers.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 
10 /// @file protocol/ligand_docking/RandomConformers.cc
11 /// @brief implementation of resfile reader and its command classes
12 /// @author Gordon Lemmon (glemmon@gmail.com), adapted from the ResfileReader code
13 /// by Steven Lewis (smlewi@unc.edu) and Andrew Leaver-Fay
14 
15 // Project Headers
16 #include <core/pose/Pose.hh>
18 
19 // Unit Headers
22 
24 // AUTO-REMOVED #include <protocols/ligand_docking/UnconstrainedTorsionsMover.hh>
25 
26 #include <core/pose/util.hh>
27 
28 // Utility Headers
29 #include <utility/exit.hh>
30 #include <basic/Tracer.hh>
31 #include <core/types.hh>
32 #include <utility/tag/Tag.hh>
33 
34 #include <utility/vector0.hh>
35 #include <utility/excn/Exceptions.hh>
36 #include <utility/vector1.hh>
37 
38 
39 using basic::T;
40 using basic::Error;
41 using basic::Warning;
42 
43 namespace protocols {
44 namespace ligand_docking {
45 
46 ///////////////////////////////////////////////////////////////////////
47 ///@brief
48 
49 static basic::Tracer random_conformer_tracer("protocols.ligand_docking.ligand_options.RandomConformers", basic::t_debug);
50 
53 {
55 }
56 
59  return new RandomConformers;
60 }
61 
64 {
65  return "RandomConformers";
66 }
67 
69  //utility::pointer::ReferenceCount(),
70  Mover("RandomConformers")
71 {}
72 
74  //utility::pointer::ReferenceCount(),
75  protocols::moves::Mover( that ),
76  chain_(that.chain_)
77 {}
78 
80 
82  return new RandomConformers( *this );
83 }
84 
86  return new RandomConformers;
87 }
88 
90  return "RandomConformers";
91 }
92 
93 //void RandomConformers::set_chain(std::string chain)
94 //{
95 // chain_ = chain;
96 //}
97 
98 ///@brief parse XML (specifically in the context of the parser/scripting scheme)
99 void
101  utility::tag::TagPtr const tag,
102  protocols::moves::DataMap & /*datamap*/,
103  protocols::filters::Filters_map const & /*filters*/,
104  protocols::moves::Movers_map const & /*movers*/,
105  core::pose::Pose const & /*pose*/
106 )
107 {
108  if ( tag->getName() != "RandomConformers" ){
109  throw utility::excn::EXCN_RosettaScriptsOption("This should be impossible");
110  }
111  if ( ! tag->hasOption("chain") ) throw utility::excn::EXCN_RosettaScriptsOption("'RandomConformers' mover requires chain tag");
112 
113  chain_ = tag->getOption<std::string>("chain");
114 }
115 
118  core::Size i = pose.conformation().chain_begin(chain_id);
119  core::Size end = pose.conformation().chain_end(chain_id);
120 
121  for (; i != end; ++i) {
122  apply_residue(i, pose);
123  }
124 }
125 
127  using namespace protocols::moves;
129  RandomConformerMoverOP rcm = new RandomConformerMover(residue_id);
130  rcm->apply(pose);
131 /// TODO accomplish the below code within the scripter
132 // UnconstrainedTorsionsMoverOP utm =
133 // new UnconstrainedTorsionsMover(rcm, ligand_torsion_restraints_);
134 // utm->apply(pose);
135 }
136 
137 } //namespace ligand_docking
138 } //namespace protocols