Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MakePolyXMover.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 ./protocols/simple_moves/MakePolyXMover.cc
11 /// @brief convert pose to poly XXX: any amino acid, default poly Ala
12 /// @author Nobuyasu Koga ( nobuyasu@uw.edu )
13 
14 // Unit headers
17 
18 // Project Headers
19 #include <core/pose/Pose.hh>
21 #include <basic/Tracer.hh>
22 #include <protocols/moves/Mover.hh>
24 #include <utility/tag/Tag.hh>
25 #include <string>
26 
27 #include <utility/vector0.hh>
28 #include <utility/vector1.hh>
29 
30 
31 static basic::Tracer TR( "protocols.simple_moves.MakePolyXMover" );
32 
33 namespace protocols {
34 namespace simple_moves {
35 
38 {
40 }
41 
44  return new MakePolyXMover;
45 }
46 
49 {
50  return "MakePolyX";
51 }
52 
54  protocols::moves::Mover( MakePolyXMoverCreator::mover_name() ),
55  aa_( "AA" ),
56  keep_pro_( false ),
57  keep_gly_( true ),
58  keep_disulfide_cys_( false )
59 {}
60 
61 MakePolyXMover::MakePolyXMover( std::string aa, bool keep_pro, bool keep_gly, bool keep_disulfide_cys ):
62  protocols::moves::Mover( MakePolyXMoverCreator::mover_name() ),
63  aa_( aa ),
64  keep_pro_( keep_pro ),
65  keep_gly_( keep_gly ),
66  keep_disulfide_cys_( keep_disulfide_cys )
67 {}
68 
70 {}
71 
72 /// @brief clone this object
74  return new protocols::simple_moves::MakePolyXMover( *this );
75 }
76 
77 /// @brief create this type of object
80 }
81 
82 /// @details virtual main
84 {
85  // flip to poly-ala-gly-pro-disulf pose
86  utility::vector1< Size > protein_residues;
87  for ( Size i = 1, ie = pose.n_residue(); i <= ie; ++i ) {
88  if ( pose.residue( i ).is_protein() ) {
89  protein_residues.push_back( i );
90  }
91  }
93  TR << "Pose is converted to poly " << aa_ << std::endl;
95 }
96 
100 }
101 
102 /// @brief parse xml
103 void
105  TagPtr const tag,
107  Filters_map const &,
109  Pose const & )
110 {
111  aa_ = tag->getOption<std::string>( "aa", "ALA" );
112  keep_pro_ = tag->getOption<bool>( "keep_pro", 0 );
113  keep_gly_ = tag->getOption<bool>( "keep_gly", 1 );
114  keep_disulfide_cys_ = tag->getOption<bool>( "keep_disulufide_cys", 0 );
115 
116  TR << "MakePolyXMover was loaded" << std::endl;
117 
118  if( keep_pro_ || keep_gly_ || keep_disulfide_cys_ ) {
119  TR << "but keep AA types of ";
120  if( keep_pro_ ) TR << "Pro ";
121  if( keep_gly_ ) TR << "Gly ";
122  if( keep_disulfide_cys_ ) TR << "Disulfide Cys";
123  TR << std::endl;
124  }
125 
126 }
127 
128 } // namespace simple_moves
129 } // namespace protocols