Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
types.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 core/scoring/hbonds/types.hh
11 /// @brief core::scoring package type declarations
12 /// @author Stuart G. Mentzer (Stuart_Mentzer@objexx.com)
13 
14 #ifndef INCLUDED_core_scoring_hbonds_types_hh
15 #define INCLUDED_core_scoring_hbonds_types_hh
16 
17 // Package headers
19 
20 // Utility headers
21 #include <utility/exit.hh>
22 
23 #include <core/types.hh>
24 #include <core/chemical/types.hh>
25 // AUTO-REMOVED #include <ObjexxFCL/FArray3D.hh>
26 
27 
28 #include <numeric/xyzVector.fwd.hh>
29 
30 // AUTO-REMOVED #include <utility>
31 
32 #include <ObjexxFCL/FArray3D.fwd.hh>
33 
34 
35 
36 namespace core {
37 namespace scoring {
38 namespace hbonds {
39 
40 struct HBondDerivs {
41  DerivVectorPair don_deriv; // derivative vectors for the heavyatom donor for a hydrogen
42  DerivVectorPair h_deriv; // derivative vectors for the hydrogen forming a hydrogen bond
43  DerivVectorPair acc_deriv; // derivative vectors for the heavyatom acceptor for a hydrogen
44  DerivVectorPair abase_deriv; // derivative vectors for the acceptor base
45  DerivVectorPair abase2_deriv; // derivative vectors for the acceptor base 2 -- for sp2 acceptors
46 };
47 
48 /////////////////////////////////////////////////////////////////////////////////
49 /////// WARNING WARNING WARNING
50 ///////
51 /////// if you modify the hbond types please update the strings name
52 /////// in ScoreTypeManager.cc
53 ///////
54 /////// WARNING WARNING WARNING
55 /////////////////////////////////////////////////////////////////////////////////
56 
57 
59  hbw_NONE = 1,
66 };
67 
68  ///////////////////////////////////////////////////////////////////////////////
69  ////// WARNING WARNING WARNING
70  //////
71  ////// Changing the HBAccChemType or HBDonChemType will change the
72  ////// sort order in hbonds::hbtrie::HBAtom::operator<(...) and
73  ////// hbonds::hbtrie::HBAtom::operator==(...). Changing the sort
74  ////// order will __definitely__ cause trajectory changes. So make
75  ////// changes very carefully!
76  //////
77  //////////////////////////////////////////////////////////////////////////////
78 
79 
82  hbacc_PBA, // hbacc_PROTEIN_BB_AMIDE
83  hbacc_CXA, // hbacc_CARBOXAMIDE
84  hbacc_CXL, // hbacc_CARBOXYL
85  hbacc_IMD, // hbacc_IMIDAZOL_DELTA
86  hbacc_IME, // hbacc_IMIDAZOL_EPSILON
87  hbacc_AHX, // hbacc_AROMATIC_HYDROXYL
88  hbacc_HXL, // hbacc_HYDROXY
89  hbacc_PCA_DNA, // hbacc_PHOSPHATE_CARBONYL_DNA
90  hbacc_PES_DNA, // hbacc_PHOSPHATE_ESTER_DNA
91  hbacc_RRI_DNA, // hbacc_RIBOSE_RING_DNA
92  hbacc_PCA_RNA, // hbacc_PHOSPHATE_CARBONYL_RNA
93  hbacc_PES_RNA, // hbacc_PHOSPHATE_ESTER_RNA
94  hbacc_RRI_RNA, // hbacc_RIBOSE_RING_RNA
95  hbacc_H2O, // hbacc_WATER
103 };
104 
107  hbdon_PBA, // hbdon_PROTEIN_BB_AMIDE
108  hbdon_CXA, // hbdon_CARBOXAMIDE
109  hbdon_IMD, // hbdon_IMIDAZOL_DELTA
110  hbdon_IME, // hbdon_IMIDAZOL_EPSILON
111  hbdon_IND, // hbdon_INDOL
112  hbdon_AMO, // hbdon_AMINO
113  hbdon_GDE, // hbdon_GUANIDINIUM_EPSILON
114  hbdon_GDH, // hbdon_DIHYDRO_GUANIDINIUM
115  hbdon_AHX, // hbdon_AROMATIC_HYDROXYL
116  hbdon_HXL, // hbdon_HYDROXYL
117  hbdon_H2O, // hbdon_WATER
121 };
122 
123 
124 
125 
356 };
357 
358 enum HBSeqSep{
359  seq_sep_other = 1, // // all other sequence separation not specified
360  seq_sep_M4, // // acc_rsd.seqpos() - don_rsd.seqpos() = -4
361  seq_sep_M3, // // acc_rsd.seqpos() - don_rsd.seqpos() = -3
362  seq_sep_M2, // // acc_rsd.seqpos() - don_rsd.seqpos() = -2
363  seq_sep_PM1, // // abs(acc_rsd.seqpos() - don_rsd.seqpos()) = 1
364  seq_sep_P2, // // acc_rsd.seqpos() - don_rsd.seqpos() = 2
365  seq_sep_P3, // // acc_rsd.seqpos() - don_rsd.seqpos() = -3
366  seq_sep_P4, // // acc_rsd.seqpos() - don_rsd.seqpos() = 4
368 };
369 
370 
371 void
372 HBEval_lookup_initializer( ObjexxFCL::FArray3D<HBEvalType> & hbe );
373 
374 extern ObjexxFCL::FArray3D<HBEvalType> const HBEval_lookup;
375 
376 
377 ///////////////////////////////////////////////////////////
378 //:::DEPRICATION NOTICE::::
379 //
380 // Note backbone/sidechain identification is used
381 //1) packing: eg since the backbone is fixed, backbone-backbone, and
382 // backbone-sidechain interactions can be precomputed. This is found
383 // by looking at rsd.is_backbone()
384 //2) environmental dependence is only applied to side chains, (ask
385 //Tanja or Lin, because I don't know why)
386 //3) to take some account of variable correlation,
387 //sidechain-sidechain hbonds have two different angle potentials
388 //that depend on the AH distance so hbe_is_BB_type is used.
389 //
390 //
391 //Backbone/sidechain distinctions are tricky when one looks at
392 //modified-proteins or non-proteins. Since these functions are only
393 //used in questional circumstances they are depricated and will be
394 //removed in subsiquent versions of the hbond-potential.
395 //
396 //
397 
398 bool hbe_is_BB_type( HBEvalType hbe );
399 
400 bool hbe_is_SC_type( HBEvalType hbe );
401 
402 
403 
405 get_hbond_weight_type( HBEvalType const & hbe_type );
406 
407 
408 
410 get_hbe_acc_hybrid( HBEvalType const & hbe );
411 
414 
415  // distance from the acceptor atom to the hydrogen
417 
418  // cosine of the base-acceptor-hydrogen angle
419  // the base is acceptor hybridization dependent:
420  // sp2 hybrid -> base = res.atom_base(atm_num)
421  // sp3 hybrid -> base = res.abase2(atm_num)
422  // ring hybrid-> base = (res.atom_base(atm_num) + res.abase2(atm_num))/2
423  // let BAunit = unit vector from base to the acceptor
424  // let AHunit = unit vector from acceptor to hydrogen
425  // cosBAH = BAunit <dot> AHunit
427 
428  // cosine of the acceptor-hydrogen-donor angle
429  // let AHunit = unit vector from acceptor to the hydrogen
430  // let HDunit = unit vector from hydrogen to donor
431  // cosAHD = AHDunit <dot> HDunit
433 
434 
435  // the angle formed by the acceptor-hydrogen-donor
436  // this the interior angle measured in radians.
437 
438  // In score12, the hydrogen bond score function evaluated the cosine
439  // of exterior BAH and AHD angles rather than the angles
440  // themselves. This was done for two reasons:
441  //
442  // 1) The cosine of the exterior angle is easy to evaluate, just
443  // take the dot product of the noralized bond vectors.
444  //
445  // 2) When projecting uniform density density over cartesian
446  // space onto the theta angle in spherical coordinates, the
447  // resulting density is not uniform. This happens because the
448  // change in the volume of the conic section per unit angle
449  // depends on the angle itself. It turns out that the
450  // distribution of the cosine of the angle is uniform. Therefore
451  // when estimating distributions, as is done for knowledge based
452  // potentials, one should normalize the distribution by computing
453  // the distrbution in "cosine" space.
454  //
455  // Because density estimation should be done in cosine space and the
456  // cosine of the angles is easy to evaluate, the polynomials in the
457  // hydrogen bond score function were defined as functions of the
458  // cosine of the angles.
459  //
460  // A limitation of this parametrization is that the dynamic range
461  // from optimal AHD angle (180 degrees) to decent AHD angle (~160
462  // degrees) is compressed. This can be seen by noticing that the
463  // acos(x) around zero is steep, so a small change in x results in
464  // large change in acos(x). To create polynomials that have such a
465  // tight distribution requires them to be relatively high degree.
466  //
467  // As an alternative, the AHD angle can be used directly in the
468  // parametrization.
470 
471  // Torsional angle about the base-acceptor bond vector
472  // Not yet implemented (11/09) but coming soon...
474 
476 };
477 
479  hbderiv_NONE = 1, // no derivative
480  hbderiv_ABE_GO, // standard hbond derivative calculation
481  hbderiv_ABE_GO_NO_xD, // needed for geometric solvation craziness
482  hbderiv_ABE_GO_NO_xH, // needed for geometric solvation craziness
484 };
485 
486 extern Real DUMMY_DERIV;
487 extern HBondDerivs DUMMY_DERIVS; // f1/f2 vectors for four atoms
488 extern HBondDerivs const ZERO_DERIV2D;
489 
490 Size
492  HBDonChemType don_chem_type,
493  HBAccChemType acc_chem_type,
494  HBSeqSep seq_sep_type
495 );
496 
497 
498 
499 } // namespace hbonds
500 } // namespace scoring
501 } // namespace core
502 
503 
504 #endif // INCLUDED_core_scoring_types_HH