Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PeakAssignmentResidueMap.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 CrossPeakList.hh
11 /// @author Oliver Lange
12 
13 #ifndef INCLUDED_protocols_noesy_assign_PeakAssignmentResidueMap_HH
14 #define INCLUDED_protocols_noesy_assign_PeakAssignmentResidueMap_HH
15 
16 
17 // Unit Headers
20 // AUTO-REMOVED #include <protocols/noesy_assign/ResonanceList.hh>
21 #include <core/types.hh>
22 
23 // Package Headers
26 
27 // Project Headers
28 
29 // Utility headers
30 // AUTO-REMOVED #include <utility/exit.hh>
31 // #include <utility/excn/Exceptions.hh>
32 #include <utility/vector1.hh>
33 #include <utility/pointer/ReferenceCount.hh>
34 // #include <numeric/numeric.functions.hh>
35 // #include <core/util/prof.hh>
36 //#include <core/util/Tracer.hh>
37 // #include <core/options/option.hh>
38 // #include <core/options/keys/abinitio.OptionKeys.gen.hh>
39 // #include <core/options/keys/run.OptionKeys.gen.hh>
40 //#include <core/options/keys/templates.OptionKeys.gen.hh>
41 
42 //// C++ headers
43 // AUTO-REMOVED #include <cstdlib>
44 // AUTO-REMOVED #include <string>
45 #include <list>
46 #include <set>
47 #include <map>
48 
50 
51 
52 namespace protocols {
53 namespace noesy_assign {
54 
55 
56 
57 ///@brief fast access to assignments by residue number
59 public:
60  typedef std::list< PeakAssignmentOP > PeakAssignments;
61  typedef std::map< core::Size, PeakAssignments > PeakAssignmentMap;
63 
65  virtual ~PeakAssignmentResidueMap();
66 
67  ///@brief add all PeakAssignments in all Crosspeaks of list
68  void add( CrossPeakList const& );
69 
70  ///@brief add individual PeakAssignment
71  void add( PeakAssignmentOP const& );
72 
73 
74  ///@brief add all resonances for backward compatibility in covalent-part of network-analysis
75  void add_all_atoms( ResonanceList const& );
76 
77  ///@brief remove individual PeakAssignment
78  void remove( PeakAssignment const& );
79 
80  ///@brief invalidate non symmetric peaks
81  void check_for_symmetric_peaks( CrossPeakList&, bool accumulate_symmetry );
82 
83  ///@brief remove all ambiguous assignments to i,i+1 CrossPeaks.
84 
85  //commented out 9/10/12 because the only relevant action within the subroutine is commented out already
86  //void invalidate_competitors_to_sequential_NOE( CrossPeakList& );
87 
88  void network_analysis( Size n_total_assignments );
89  void network_analysis2( ResonanceList const& resonances );
90  ///@brief get list of PeakAssignments for pair of residues --- throws Exception
91  PeakAssignments const& assignments( core::Size resi, core::Size resj ) const;
93 
94  ///@brief add assignments found between resi and resj to collector
95  void assignments( core::Size resi, core::Size resj, PeakAssignments& collector ) const;
96 
97  ///@brief has some (valid or invalid) assignments between residue pair
98  bool has( core::Size resi, core::Size resj );
99 
101  return residues_.size();
102  }
103 
104 private:
105  ///@brief same as "assignments()" but returns BOGUS_ASSIGNMENTS if not found
106  PeakAssignments const& _assignments( core::Size resi, core::Size resj ) const;
108 
109  ///@brief subroutine to compute Nk for alpha->gamma->beta path.
111  PeakAssignment const& alpha_beta,
112  core::id::NamedAtomID const& gamma_atom,
113  bool connect_in_i,
114  bool connect_in_j,
115  bool sequential,
116  PeakAssignments const& close_to_i_assignments,
117  PeakAssignments const& close_to_j_assignments,
118  core::Real longrange_peak_volume
119  /*either the a-g or g-b peak_volume (corresponding to the "false" in one of the connect_in_i/j */
120  ) const;
121 
122  ///@brief subroutine to collect putative gammas that need to be queried due to covalent structure
123  void fill_covalent_gammas( Size, std::map< core::id::NamedAtomID, bool >& collector ) const;
124 
125 
126  //find out if we have an initial assignment to gamma
127  /// map with resid of atom(2) as search key.
128  ///per residue - a PeakAssignmentMap --- all residues that are connected by an initial assignment
131 
132  // a little redundancy in the residue number
133  // but saves lot of time later we can just reference these objects.
134  typedef std::set< core::id::NamedAtomID > AtomList;
136 
137  //for reach residue list of NamedAtomIDs
139 };
140 
141 }
142 }
143 
144 #endif