Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AddAssemblyConstraints.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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file protocols/domain_assembly/AddAssemblyConstraints.cc
12 /// @author James Thompson
13 
15 
16 #include <protocols/moves/Mover.hh>
17 #include <core/pose/Pose.hh>
18 
19 // AUTO-REMOVED #include <protocols/loops/LoopMoverFactory.hh>
20 // AUTO-REMOVED #include <protocols/loops/LoopMover.hh>
21 // AUTO-REMOVED #include <protocols/loops/Loop.hh>
22 // AUTO-REMOVED #include <protocols/loops/Loops.hh>
23 
24 // AUTO-REMOVED #include <protocols/loops/loops_main.hh>
25 // AUTO-REMOVED #include <core/fragment/FragSet.hh>
26 // AUTO-REMOVED #include <core/fragment/FragSet.fwd.hh>
27 // AUTO-REMOVED #include <core/kinematics/FoldTree.hh>
29 // AUTO-REMOVED #include <core/conformation/Conformation.hh>
30 #include <core/pose/PDBInfo.hh>
31 // AUTO-REMOVED #include <core/pose/util.hh>
32 // AUTO-REMOVED #include <core/io/pdb/pose_io.hh>
33 // AUTO-REMOVED #include <core/scoring/constraints/util.hh>
34 // AUTO-REMOVED #include <core/scoring/ScoreFunctionFactory.hh>
35 
36 
37 // AUTO-REMOVED #include <core/chemical/ChemicalManager.fwd.hh>
38 
44 
45 
46 // AUTO-REMOVED #include <protocols/simple_moves/ScoreMover.hh>
47 // AUTO-REMOVED #include <protocols/moves/CompositionMover.hh>
48 // AUTO-REMOVED #include <protocols/simple_moves/ConstraintSetMover.hh>
49 
50 //#include <devel/init.hh>
51 
52 // C++ headers
53 #include <iostream>
54 #include <string>
55 
56 // AUTO-REMOVED #include <basic/Tracer.hh>
57 #include <core/types.hh>
58 #include <utility/vector1.hh>
59 
60 #include <core/kinematics/Jump.hh>
61 
62 
63 namespace protocols {
64 namespace domain_assembly {
65 
67 
68  using core::Real;
69  using std::string;
70  using core::id::AtomID;
71  string const atom_name("CA");
72  using namespace core::scoring::constraints;
73  Real const dist_cutoff(3), range(1.5), slope(3.0),
74  score(-40);
75  //score( -1 * pose.total_residue() * 0.25 );
76 
77  ConstraintSetOP cst_set( new ConstraintSet );
78  char const first_chain( pose.pdb_info()->chain(1) );
79  for ( Size ii = 1; ii <= pose.total_residue(); ++ii ) {
80  char const chain_ii( pose.pdb_info()->chain(ii) );
81  if ( first_chain != chain_ii ) {
82  AtomID atom1( pose.residue_type(ii-1).atom_index(atom_name), ii-1 ),
83  atom2( pose.residue_type(ii).atom_index(atom_name), ii );
84  FuncOP func( new LinearPenaltyFunction( dist_cutoff, score, range, slope ) );
85 
86  ConstraintOP cst = new AtomPairConstraint(atom1,atom2,func);
87  cst_set->add_constraint(cst);
88  break;
89  }
90  }
91  pose.constraint_set(cst_set);
92 } // apply
93 
94 }//namespace domain_assembly
95 }//namespace protocols
96