Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BindingSiteConstraint.hh
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
11 /// @brief
12 
13 #ifndef INCLUDED_protocols_constraints_additional_BindingSiteConstraint_hh
14 #define INCLUDED_protocols_constraints_additional_BindingSiteConstraint_hh
15 
16 // Package headers
24 
25 // Project headers
26 #include <core/pose/Pose.fwd.hh>
27 #include <core/id/AtomID.hh>
28 
29 // ObjexxFCL headers
30 #include <ObjexxFCL/FArray2D.hh>
31 
32 // C++ Headers
33 #include <map>
34 
35 #include <utility/vector1.hh>
36 
37 
38 
39 namespace protocols {
40 namespace constraints_additional {
41 
43 public:
44 
45  /// null constructor
47  core::scoring::constraints::Constraint( core::scoring::atom_pair_constraint ) /// ? TO DO -- give own scoretype
48  { }
49 
50  /// ctor from atom list + input pose
52  utility::vector1< AtomID > const & atms,
53  core::pose::Pose const &start_pose,
54  core::scoring::ScoreType scoretype = core::scoring::atom_pair_constraint /// ? TO DO -- give own scoretype
55  );
56 
57  /// ctor from a vector of atom positions (in lieu of a pose)
59  utility::vector1< AtomID > const & atms,
60  ObjexxFCL::FArray2D< core::Real > tgt_pos,
61  ObjexxFCL::FArray2D< core::Real > tgt_pos_centroid,
62  core::scoring::ScoreType scoretype = core::scoring::atom_pair_constraint /// ? TO DO -- give own scoretype
63  );
64 
67  }
68 
69  ///
70  void
72 
73  // do some pre-scoring calculations
75 
76  // align the atoms
77  // ... placing a vector -- from each atom to the the rotated >target< atoms -- in the database
79  utility::vector1< bool > const & ) const;
80 
81  // call the setup_for_derivatives for each constraint
83 
84  // atom deriv
85  virtual
86  void
87  fill_f1_f2(
88  AtomID const & atom,
90  core::Vector & F1,
91  core::Vector & F2,
92  core::scoring::EnergyMap const & weights
93  ) const;
94 
95  std::string type() const;
96 
97  ///
98  Size
99  natoms() const;
100 
101  virtual
103  remap_resid( core::id::SequenceMapping const &seqmap ) const;
104 
105  ///
106  AtomID const &
107  atom( Size const n ) const;
108 
109  void show( std::ostream& out ) const;
110 
111  void show_def( std::ostream& out, core::pose::Pose const & pose ) const;
112  void read_def( std::istream& in, core::pose::Pose const & pose, core::scoring::constraints::FuncFactory const & func_factory );
113 
114  Size show_violations( std::ostream & out, core::pose::Pose const & pose, core::Size verbose_level, core::Real threshold = 1.0 ) const;
115 
116 protected:
117  void init( core::pose::Pose const & start_pose );
118 
119 private:
120  // data
122  ObjexxFCL::FArray2D< core::Real > tgt_pos_;
123  ObjexxFCL::FArray2D< core::Real > tgt_pos_centroid_;
124 
125  // map of pos->tgt in rotated struct
126  static std::map< AtomID , numeric::xyzVector< core::Real > > rot_db;
127 
128  // database mapping constraints to RB transformations
129  // static std::map< AtomID , ?? > transformDB;
130 };
131 
132 }
133 }
134 
135 #endif