Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TetherLigand.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 core/pack/task/ResfileReader.cc
11 /// @brief implementation of resfile reader and its command classes
12 /// @author Gordon Lemmon (glemmon@gmail.com), adapted from the ResfileReader code
13 /// by Steven Lewis (smlewi@unc.edu) and Andrew Leaver-Fay
14 
15 // Project Headers
16 #include <core/pose/Pose.hh>
17 
18 // // Unit Headers
20 #include <core/pose/util.hh>
21 
23 
26 
27 // Utility Headers
28 #include <utility/exit.hh>
29 #include <basic/Tracer.hh>
30 #include <core/types.hh>
31 // AUTO-REMOVED #include <utility/tag/Tag.hh>
32 
33 //Auto Headers
36 #include <utility/vector0.hh>
37 #include <utility/vector1.hh>
38 
39 
40 using basic::T;
41 using basic::Error;
42 using basic::Warning;
43 
44 namespace protocols {
45 namespace ligand_docking {
46 
47 static basic::Tracer tether_ligand_tracer("protocols.ligand_docking.ligand_options.Tether_ligand", basic::t_debug);
48 
50 
51 TetherLigand::TetherLigand(const char & chain, const core::Real & angstroms):
52  protocols::moves::Mover(),
53  chain_(chain),
54  angstroms_(angstroms)
55 {}
56 
58  protocols::moves::Mover( that ),
59  chain_(that.chain_),
60  angstroms_(that.angstroms_), //size of one stdev for ligand restraint
61  ligand_tether_(that.ligand_tether_)
62 
63 {}
64 
66 
68  return "TetherLigand";
69 }
70 
71 void
74  core::Size const residue_id = pose.conformation().chain_begin(chain_id);
75  ///TODO find the centroid positioned residue rather than just taking the first (above)
77 }
78 
80  ///TODO make this a const_iterator
82 }
83 
86  return ligand_tether_;
87 }
88 
91  core::Size const lig_id,
92  core::Real const stddev_Angstroms,
93  core::pose::Pose & pose
94 ){
95  tether_ligand_tracer.Debug<< "stddev: " << stddev_Angstroms << std::endl;
96  core::scoring::constraints::FuncOP const restraint_function = new core::scoring::constraints::HarmonicFunc(0, stddev_Angstroms);
97 
98  core::id::AtomID const fixed_pt(pose.atom_tree().root()->atom_id());
99 
100  core::conformation::Residue const & residue = pose.residue(lig_id);
102  core::id::AtomID( residue.nbr_atom(), lig_id),
103  fixed_pt,
104  residue.nbr_atom_xyz(),
105  restraint_function
106  );
107  constraint = pose.add_constraint(constraint);
108 
109  return constraint;
110 }
111 
112 
113 } //namespace ligand_docking
114 } //namespace protocols