Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RNA_Mg_KnowledgeBasedPotential.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/scoring/rna/RNA_Mg_KnowledgeBasedPotential.hh
11 /// @brief
12 /// @author Rhiju Das
13 
14 
15 // Unit Headers
17 
18 // Package headers
20 
21 // Project headers
22 #include <core/pose/Pose.hh>
26 
27 // Utility headers
28 #include <utility/vector1.hh>
29 #include <basic/Tracer.hh>
30 
31 
32 static basic::Tracer tr("core.scoring.rna.RNA_Mg_KnowledgeBasedPotential");
33 
34 namespace core {
35 namespace scoring {
36 namespace rna {
37 
38 /// @details ctor
40  gaussian_parameter_phosphate_oxygen_(-5.93, 2.22, 0.55 ), // amplitude, center, width
41  gaussian_parameter_imine_ (-3.41, 2.40, 0.33 ),
42  gaussian_parameter_exocyclic_oxygen_(-4.20, 2.33, 0.43 ), // Reduced this from 5.2 to 3.4 after seeing too many close interactions.
43  gaussian_parameter_o2star_ (-3.88, 2.54, 0.34 ),
44  gaussian_parameter_phosphate_p_ ( 5.00, 2.00, 0.25 ), //this is a penalty!
45  gaussian_parameter_polar_H_ ( 5.00, 2.25, 0.50 ), //this is a penalty!
46  gaussian_parameter_nonpolar_H_ ( 5.00, 2.00, 0.50 ), //this is a penalty!
47  //gaussian_parameter_aromatic_H_ ( 5.00, 2.00, 0.50 ), //assume no penalty here. Just a guess.
48 
49  gaussian_parameter_phosphate_oxygen_indirect_(-1.96, 4.07, 0.51 ), // longer-range, water-mediated interactions
50  gaussian_parameter_imine_indirect_ (-1.24, 4.18, 0.28 ),
51  gaussian_parameter_exocyclic_oxygen_indirect_(-1.93, 4.08, 0.45 ),
52  gaussian_parameter_o2star_indirect_ (-1.28, 4.10, 0.37 ),
53 
54  gaussian_parameter_costheta_phosphate_oxygen_( 1.00, -0.91, 0.49 ), // amplitude, center, width of angular 'form factor'
55  gaussian_parameter_costheta_imine_ ( 1.00, -0.97, 0.18 ), // note how sharp this is!
56  gaussian_parameter_costheta_exocyclic_oxygen_( 1.00, -0.79, 0.34 ),
57  gaussian_parameter_costheta_o2star_ ( 1.00, -0.91, 0.49 ), // not enough stats, copy from phosphate_oxygen
58  gaussian_parameter_costheta_polar_H_ ( 1.00, -1.00, 0.25 ), //guess
59  gaussian_parameter_costheta_nonpolar_H_ ( 1.00, -1.00, 0.25 ), //guess
60 
61  gaussian_parameter_costheta_phosphate_oxygen_indirect_( 1.00, -0.74, 0.55 ), // amplitude, center, width of angular 'form factor'
62  gaussian_parameter_costheta_imine_indirect_ ( 1.00, -0.94, 0.46 ),
63  gaussian_parameter_costheta_exocyclic_oxygen_indirect_( 1.00, -0.56, 0.61 ),
64  gaussian_parameter_costheta_o2star_indirect_ ( 1.00, -0.74, 0.55 ) // not enough stats, copy from phosphate_oxygen
65 
66 {
67 }
68 
69 //////////////////////////////////////////////////////////////////
72  bool is_phosphate_oxygen( false );
73  return get_mg_potential_gaussian_parameter( rsd, j, is_phosphate_oxygen );
74 }
75 
76 
77 /////////////////////////////////
78 // This is actually pretty general, and would even work for non-RNA residues, but
79 // for now stick to RNA where I've tried to derive a reasonable low resolution potential
80 // from the available PDB statistics in the RNA09 set.
83 
84  is_phosphate_oxygen = false;
85 
86  if ( rsd.is_RNA() ) {
87 
88  std::string const atom_type_name = rsd.atom_type( j ).name();
89 
90  //tr << "atom check: " << j << " " << atom_type_name << "." << std::endl;
91 
92  // This information should probably go into a special RNA_Mg_Potential.cc function or something.
93  if ( atom_type_name == "OOC" ) { // This is a O1P or O2P nonbridging phosphate oxygen
94  is_phosphate_oxygen = true;
96  } else if ( atom_type_name == "Nhis" ) { // imine nitrogens
98  } else if ( atom_type_name == "OCbb" ) { // exocyclic oxygens
100  } else if ( rsd.atom_name( j ) == " O2*" ){
102  } else if ( rsd.atom_name(j) == " P " ){
104  } else if ( atom_type_name == "Hpol" ){
106  } else if ( atom_type_name == "Hapo" ) { //|| atom_type_name == "Haro" ){
108  }
109  }
110 
111  return Gaussian_parameter( 0.0, 0.0, 0.0 );
112 }
113 
114 
115 /////////////////////////////////
118 
119  if ( rsd.is_RNA() ) {
120 
121  std::string const atom_type_name = rsd.atom_type( j ).name();
122 
123  // This information should probably go into a special RNA_Mg_Potential.cc function or something.
124  if ( atom_type_name == "OOC" ) { // This is a O1P or O2P nonbridging phosphate oxygen
126  } else if ( atom_type_name == "Nhis" ) { // imine nitrogens
128  } else if ( atom_type_name == "OCbb" ) { // exocyclic oxygens
130  } else if ( rsd.atom_name( j ) == " O2*" ){
132  }
133  }
134 
135  return Gaussian_parameter( 0.0, 0.0, 0.0 );
136 }
137 
138 
139 /////////////////////////////////
142 
143  if ( rsd.is_RNA() ) {
144 
145  std::string const atom_type_name = rsd.atom_type( j ).name();
146 
147  // This information should probably go into a special RNA_Mg_Potential.cc function or something.
148  if ( atom_type_name == "OOC" ) { // This is a O1P or O2P nonbridging phosphate oxygen
150  } else if ( atom_type_name == "Nhis" ) { // imine nitrogens
152  } else if ( atom_type_name == "OCbb" ) { // exocyclic oxygens
154  } else if ( rsd.atom_name( j ) == " O2*" ){
156  } else if ( atom_type_name == "Hpol" ){
158  } else if ( atom_type_name == "Hapo" ) { //|| atom_type_name == "Haro" ){
160  }
161  }
162 
163  return Gaussian_parameter( 0.0, 0.0, 0.0 );
164 }
165 
166 /////////////////////////////////
169 
170  if ( rsd.is_RNA() ) {
171 
172  std::string const atom_type_name = rsd.atom_type( j ).name();
173 
174  // This information should probably go into a special RNA_Mg_Potential.cc function or something.
175  if ( atom_type_name == "OOC" ) { // This is a O1P or O2P nonbridging phosphate oxygen
177  } else if ( atom_type_name == "Nhis" ) { // imine nitrogens
179  } else if ( atom_type_name == "OCbb" ) { // exocyclic oxygens
181  } else if ( rsd.atom_name( j ) == " O2*" ){
183  }
184  }
185 
186  return Gaussian_parameter( 0.0, 0.0, 0.0 );
187 }
188 
189 
190 //////////////////////////////////////////////////////////////////////////////////////////
191 void
193 {
194  //We don't know a priori which atom numbers correspond to which
195  // atom names (e.g., O2* on an adenosine could be different depending
196  // on whether its at a chainbreak, terminus, etc.)
197  //Better to do a quick setup every time to pinpoint atoms that require
198  // monitoring for Mg binding.
199 
201 
202  if ( rna_scoring_info.mg_calculation_annotated_sequence() == pose.annotated_sequence() ) {
203  // tr << "matching sequence -- early return from setup_info_for_mg_calculation" << std::endl;
204  return; // should be up to date
205  }
207 
208  utility::vector1< bool > & is_magnesium = rna_scoring_info.nonconst_is_magnesium();
210  atom_numbers( rna_scoring_info.nonconst_atom_numbers_for_mg_calculation() );
211 
212  Size const total_residue( pose.total_residue() );
213 
214  atom_numbers.resize( total_residue );
215  is_magnesium.resize( total_residue );
216 
217  for (Size i = 1; i <= total_residue; i++ ) {
218 
219  conformation::Residue const & rsd( pose.residue( i ) );
220  is_magnesium[ i ] = false;
221  atom_numbers[ i ].clear();
222 
223  if ( rsd.is_RNA() ) {
224 
225 
226  // we go over all atoms, because we are putting in some repulsions (from polar hydrogens & phosphorus)
227  for (Size j = 1; j <= rsd.natoms(); j++ ){
228  Gaussian_parameter gaussian_parameter = get_mg_potential_gaussian_parameter( rsd, j );
229  //tr << j << rsd.atom_name(j) << " ==> gaussian parameter " << gaussian_parameter.center << std::endl;
230  if ( gaussian_parameter.center > 0.0 ) atom_numbers[ i ].push_back( j );
231  }
232 
233  } else if ( rsd.name3() == " MG" ){
234  is_magnesium[ i ] = true;
235  }
236 
237  //tr << rsd.name3() << ' ' << i << ' ' << is_magnesium[ i ] << std::endl;
238 
239  }
240 }
241 
242 
243 } // namespace rna
244 } // namespace scoring
245 } // namespace core
246