25 #include <utility/excn/Exceptions.hh>
28 #include <basic/Tracer.hh>
29 #include <basic/options/option.hh>
30 #include <basic/options/keys/carbohydrates.OptionKeys.gen.hh>
33 #include <numeric/random/random.hh>
41 static basic::Tracer
TR(
"protocols.simple_moves.carbohydrates.RingConformationMover");
46 static numeric::random::RandomGenerator
RG(17);
50 namespace simple_moves {
51 namespace carbohydrates {
61 using namespace kinematics;
64 MoveMapOP default_movemap =
new MoveMap();
65 default_movemap->set_bb(
true);
67 init(default_movemap);
90 if (
this == &object_to_copy) {
118 output <<
"Current MoveMap:" << endl << *
movemap_ << endl;
154 using namespace basic::options;
155 using namespace utility;
156 using namespace conformation;
159 if (option[OptionKeys::carbohydrates::lock_rings]) {
160 Warning() <<
"Rings have been locked; no ring conformation moves are being applied to this pose." << endl;
166 TR <<
"Getting movable residues...." << endl;
171 Warning() <<
"There are no movable carbohydrate residues available in the given pose." << endl;
175 TR <<
"Applying " <<
get_name() <<
" to pose...." << endl;
181 TR <<
"Selected residue " << res_num <<
": " << res.name() << endl;
183 Size ring_size = res.carbohydrate_info()->ring_size();
191 Warning() <<
"Ring flips for 5-membered rings not yet coded!" << endl;
199 TR <<
"Selected the " << conformer.first <<
" conformation to apply." << endl;
201 TR <<
"Making move...." << endl;
203 pair<TorsionType, Size> nu_id;
204 for (
Size k = 1; k <= ring_size - 2; ++k) {
205 nu_id = res.carbohydrate_info()->nu_id(k);
206 input_pose.
set_torsion(TorsionID(res_num, nu_id.first, nu_id.second), conformer.second[k]);
209 TR <<
"Move complete." << endl;
233 using namespace utility;
236 type(
"RingConformationMover");
255 for (
Size i = 1; i <= 6; ++i) {
313 using namespace conformation;
317 for (
Size res_num = 1, last_res_num = pose.
total_residue(); res_num <= last_res_num; ++res_num) {
333 object_to_output.
show(output);