Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HelicalPeptideLengthMover.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/HelicalPeptideLengthMover.cc
11 /// @brief Appends or prepends a single residue to a helical peptide that's attached to the rest of the pose by a jump
12 /// @authors Jacob Corn
13 
14 // Unit Headers
16 
17 // Package headers
18 #include <protocols/moves/Mover.hh>
19 #include <core/id/AtomID.hh>
20 
22 
23 //#include <basic/options/option.hh>
24 //#include <basic/options/keys/OptionKeys.hh>
25 //#include <basic/options/after_opts.hh>
26 //#include <basic/options/util.hh>
27 
28 #include <core/pose/Pose.hh>
29 
34 
35 #include <numeric/constants.hh>
36 #include <basic/Tracer.hh>
37 #include <core/types.hh>
38 using basic::T;
39 using basic::Error;
40 using basic::Warning;
41 static basic::Tracer TR( "protocols.simple_moves.HelicalPeptideLengthMover" );
42 
43 // C++ Headers
44 #include <sstream>
45 #include <fstream>
46 
47 // ObjexxFCL Headers
48 
49 namespace protocols {
50 namespace simple_moves {
51 
53  protocols::moves::Mover(),
54  seqpos_(seqpos),
55  resname_(resname),
56  addition_type_( addition_type )
57 {
58  protocols::moves::Mover::type( "HelicalPeptideLengthMover" );
59 }
60 
61 /// @brief Places and minimizes a PeptideStaple (i+4 or i+7, depending on staple_gap) at seqpos in pose
63 {
64  if( pose.num_jump() < 1 ) {
65  TR << "Pose does not contain a jump! Aborting!" << std::endl;
66  return;
67  }
68  else if( pose.num_jump() > 1 ) {
69  TR << "Pose contains more than one jump! Aborting!" << std::endl;
70  return;
71  }
72 
73 /*
74  if( pose.conformation().chain_begin(seqpos) > seqpos_ ) {
75  TR << seqpos_ << " is before the beginning of chain 2! Aborting!" << std::endl;
76  return;
77  }
78  else if( pose.conformation().chain_end(1) < seqpos _ ) {
79  TR << seqpos_ << " is after the end of chain2! Aborting!" << std::endl;
80  return;
81  }
82 */
84  add_residue_( pose, seqpos_, residue, addition_type_ );
85 }
86 
88 {
90 
92  core::chemical::ResidueType const default_restype( residue_set->name_map( resname ) );
93  core::chemical::ResidueType const & min_restype1 = residue_set->get_residue_type_with_variant_removed( default_restype, core::chemical::UPPER_TERMINUS );
94  core::chemical::ResidueType const & min_restype2 = residue_set->get_residue_type_with_variant_removed( min_restype1, core::chemical::LOWER_TERMINUS ) ;
95 
97 
98  return residue;
99 }
100 
101 
103 {
104  utility::vector1< core::Real > helical_torsions;
105  helical_torsions.push_back( -57.8 ); // phi
106  helical_torsions.push_back( -47 ); // psi
107  helical_torsions.push_back( 180 ); // omega
108  if( append_prepend == append ) {
109  pose.conformation().safely_append_polymer_residue_after_seqpos( *residue, seqpos-1, true /*build_idea_geometry*/ );
110  pose.set_phi( seqpos, -57.8 );
111  pose.set_psi( seqpos, -47.0 );
112  pose.set_omega( seqpos, 180 );
113  }
114  else if ( append_prepend == prepend ) {
115  pose.conformation().safely_prepend_polymer_residue_before_seqpos( *residue, seqpos, true /*build_ideal_geometry*/ );
116  pose.set_phi( seqpos, -57.8 );
117  pose.set_psi( seqpos, -47.0 );
118  pose.set_omega( seqpos, 180 );
119 
120  }
121  else if ( append_prepend == insert ) {
122  TR << "Residue insertion is not supported!" << std::endl;
123  return;
124  }
125  else {
126  TR << "Unrecognized residue insertion type! Aborting residue addition!" << std::endl;
127  return;
128  }
129 }
130 
131 
132 } // moves
133 } // protocols