Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DDPscore.cc
Go to the documentation of this file.
1 // (c) Copyright Rosetta Commons Member Institutions.
2 // (c) This file is part of the Rosetta software suite and is made available under license.
3 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
4 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
5 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
6 
7 ///@file core/scoring/Interface/DDPscore.cc
8 ///@brief Implementation of distance dependent interface score
9 ///@detailed The distance dependent score is a knowledge based potential specialized for
10 /// protein interfaces. This class loads and accesses the lookup tables.
11 ///@author Hermann Zellner (hermann1.zellner@biologie.uni-regensburg.de)
12 
13 #include <utility/vector1.hh>
16 
17 // AUTO-REMOVED #include <basic/options/option.hh>
18 // AUTO-REMOVED #include <basic/options/keys/score.OptionKeys.gen.hh>
19 // AUTO-REMOVED #include <core/pose/Pose.hh>
20 
21 // AUTO-REMOVED #include <basic/Tracer.hh>
23 // AUTO-REMOVED #include <core/scoring/ContextGraphTypes.hh>
24 // AUTO-REMOVED #include <numeric/constants.hh>
25 
27 // AUTO-REMOVED #include <core/chemical/AtomType.hh>
29 
30 
31 #include <core/kinematics/Jump.hh>
32 
33 namespace core{
34 namespace scoring{
35 namespace interface{
36 
37 
38 
39 
43 ) const {
44  return new DDPscore;
45 }
46 
49  ScoreTypes sts;
50  sts.push_back( interface_dd_pair );
51  return sts;
52 }
53 
54 
56  parent( new DDPscoreCreator ),
57  lookup_table_( core::scoring::ScoringManager::get_instance()->get_DDPLookupTable() )
58 { }
59 
61 {
62  return new DDPscore(*this);
63 }
64 
66 {
67  //pose.update_residue_neighbors();
68 }
69 
71  pose::Pose&,
73  utility::vector1< bool > const & ) const
74 {
75  //pose.update_residue_neighbors();
76 }
77 
79 {
80  //pose.update_residue_neighbors();
81 }
82 
84 {
85  return false;
86 }
87 
90  const core::pose::Pose &,
93  ) const {}
94 
95 
97  core::conformation::Residue const & rsd2,
98  core::conformation::Residue const & rsd1,
99  const core::pose::Pose &,
102 ) const
103 {
104  assert (rsd1.seqpos() != rsd2.seqpos()); //only call for distinct residues
105 
106  if (rsd1.chain() != rsd2.chain()) // Only score contacts across the interface
107  {
108  core::Real distance = 1e3;
109  for ( core::conformation::Atoms::const_iterator atom_it_1 = rsd1.atom_begin();
110  atom_it_1 != rsd1.heavyAtoms_end(); atom_it_1++)
111  {
112  for ( core::conformation::Atoms::const_iterator atom_it_2 = rsd2.atom_begin();
113  atom_it_2 != rsd2.heavyAtoms_end(); atom_it_2++)
114  {
115  if ( atom_it_1->xyz().distance(atom_it_2->xyz()) < distance )
116  {
117  distance = atom_it_1->xyz().distance(atom_it_2->xyz());
118  }
119  }
120  }
121 
122  if (
123  distance >= 10. ||
124  distance < 1.5 ||
125  lookup_table_.get_potentials( rsd1.aa(), rsd2.aa(), distance ) > 0. )
126  {
127  emap[ interface_dd_pair ] += 0.; // noop
128  }
129  else
130  {
131  emap[ interface_dd_pair ] += lookup_table_.get_potentials( rsd1.aa(), rsd2.aa(), distance );
132  }
133  }
134  else
135  {
136  emap[ interface_dd_pair ] += 0.; // noop
137  }
138 
139 }
140 
141 
142 
144 {
145 
146 }
147 
149  return 8.0;
150 }
153 {
154  return 1; // Initial versioning
155 }
156 
157 
158 } // InterfacePotentials
159 } // scoring
160 } // core