Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MissingDensityToJumpMover.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/MissingDensityToJumpMover.cc
11 /// @brief Implementation of mover that inserts a jump where there is gap in the pdb. This gap corresponds to missing density.
12 /// @author TJ Brunette (tjbrunette@gmail.com), May 2011
13 
14 // Unit Headers
16 
17 // P
18 // tracer
19 #include <basic/Tracer.hh>
20 
21 #include <core/pose/Pose.hh>
22 #include <core/pose/util.hh>
23 #include <core/types.hh>
24 
25 #include <core/chemical/AA.hh>
27 // AUTO-REMOVED #include <core/chemical/ChemicalManager.hh>
28 // AUTO-REMOVED #include <core/chemical/ResidueTypeSet.hh>
30 // AUTO-REMOVED #include <core/chemical/AtomType.hh>
31 
33 // AUTO-REMOVED #include <core/conformation/ResidueFactory.hh>
34 
36 
37 #include <utility/vector1.hh>
38 
39 using basic::T;
40 using basic::Error;
41 using basic::Warning;
42 
43 // C++ Headers
44 
45 // ObjexxFCL Headers
46 
47 namespace protocols {
48 namespace simple_moves {
49 static basic::Tracer TR("protocols.mover.MissingDensityToJumpMover");
50 /// MissingDensityToJumpMover
51 
53 
54 
56 
57 void
59  using namespace core;
60  using namespace core::conformation;
61  using namespace core::chemical;
62  Size const nres( pose.total_residue() );
63  for ( Size i=1; i< nres; ++i ) {//don't have to go to last residue thus < rather than <=
64  if ( pose.residue_type(i).is_polymer() && !pose.residue_type(i).is_lower_terminus() && !pose.fold_tree().is_cutpoint(i) ) {
65  Residue const &current_rsd(pose.residue(i));
66  Residue const &next_rsd(pose.residue(i+1));
67  core::Real bondlength = ( current_rsd.atom( current_rsd.upper_connect_atom() ).xyz() - next_rsd.atom( next_rsd.lower_connect_atom() ).xyz() ).length();
68  if( bondlength > 2.5 ){
69  TR << "[ WARNING ] missing density found at residue " << i << std::endl;
70  core::kinematics::FoldTree update_tree(pose.fold_tree());
71  update_tree.new_jump(i,i+1,i);
72  pose.fold_tree(update_tree);
75  }
76  }
77  }
78 }
79 
81  return "MissingDensityToJumpMover";
82 }
83 
84 } // moves
85 } // protocols
86