Rosetta 3.5
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
protocols
noesy_assign
PeakAssignment.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 protocols/noesy_assign/PeakAssignment.hh
11
/// @author Oliver Lange
12
13
#ifndef INCLUDED_protocols_noesy_assign_PeakAssignment_HH
14
#define INCLUDED_protocols_noesy_assign_PeakAssignment_HH
15
16
17
// Unit Headers
18
#include <
protocols/noesy_assign/PeakAssignment.fwd.hh
>
19
20
// Package Headers
21
#include <
protocols/noesy_assign/CrossPeak.hh
>
22
#include <
protocols/noesy_assign/ResonanceList.hh
>
23
#include <
protocols/noesy_assign/Resonance.hh
>
24
25
26
// Project Headers
27
// AUTO-REMOVED #include <core/scoring/constraints/AmbiguousNMRDistanceConstraint.hh>
28
#include <
core/pose/Pose.fwd.hh
>
29
// AUTO-REMOVED #include <core/scoring/constraints/Func.hh>
30
31
#include <
core/id/NamedAtomID.fwd.hh
>
32
#include <
core/types.hh
>
33
34
// Utility headers
35
#include <utility/exit.hh>
36
#include <utility/vector1.hh>
37
#include <utility/pointer/ReferenceCount.hh>
38
39
//// C++ headers
40
// AUTO-REMOVED #include <cstdlib>
41
#include <string>
42
// AUTO-REMOVED #include <list>
43
#include <map>
44
#include <iostream>
45
46
#include <
core/scoring/constraints/Func.hh
>
47
48
//Auto Headers
49
#include <
core/scoring/constraints/AmbiguousNMRDistanceConstraint.fwd.hh
>
50
namespace
protocols {
51
namespace
noesy_assign {
52
53
54
///@brief fast access to assignments that are stored in CrossPeak -- similar to FragID
55
class
PeakAssignment
:
public
utility::pointer::ReferenceCount
{
56
public
:
57
///@brief Automatically generated virtual destructor for class deriving directly from ReferenceCount
58
virtual
~PeakAssignment
();
59
typedef
core::scoring::constraints::AmbiguousNMRDistanceConstraintOP
NmrConstraintOP
;
60
typedef
core::scoring::constraints::AmbiguousNMRDistanceConstraint
NmrConstraint
;
61
62
PeakAssignment
(
CrossPeakAP
const
&,
core::Size
assign_spin1,
core::Size
assign_spin2 );
63
64
core::Size
spin_id
(
core::Size
select )
const
{
65
runtime_assert( select == 1 || select == 2 );
66
return
select == 1 ?
spin_assign_index1_
:
spin_assign_index2_
;
67
}
68
69
///@brief return resonance_id, i.e., pointer into Resonance list that will resolve in assigned atom
70
core::Size
resonance_id
(
core::Size
select )
const
{
71
runtime_assert( select == 1 || select == 2 );
72
return
select == 1 ?
resonance1_
:
resonance2_
;
73
}
74
75
bool
has_label
(
core::Size
select )
const
{
76
return
crosspeak_
->has_label( select );
77
}
78
79
bool
has_proton
(
core::Size
select )
const
{
80
return
crosspeak_
->has_proton( select );
81
}
82
83
84
///@brief return resonance_id, i.e., pointer into Resonance list that will resolve in assigned atom
85
core::Size
label_resonance_id
(
core::Size
select )
const
;
86
87
///@brief returns atom 1 or 2 of the assigned cross-peak. --- might throw Exception if atom not found in ResonanceList
88
core::id::NamedAtomID
const
&
atom
(
core::Size
iatom )
const
{
89
return
resonances
()[
resonance_id
( iatom ) ].atom();
90
}
91
92
core::id::NamedAtomID
const
&
label_atom
(
core::Size
iatom )
const
{
93
return
resonances
()[
label_resonance_id
( iatom ) ].atom();
94
}
95
96
CALIBRATION_ATOM_TYPE
calibration_atom_type
(
core::Size
iatom )
const
{
97
return
resonances
()[
resonance_id
( iatom ) ].calibration_atom_type();
98
}
99
100
NmrConstraintOP
create_constraint
(
101
core::pose::Pose
const
& pose,
102
core::scoring::constraints::FuncOP
= NULL )
const
;
103
104
///@brief returns residue number of a1 or a2 of the assigned cross-peak, --- might throw Exception if atom not found
105
core::Size
resid
(
core::Size
iatom )
const
{
106
return
resonances
()[
resonance_id
( iatom ) ].resid();
107
}
108
109
bool
operator==
(
PeakAssignment
const
& other )
const
{
110
return
crosspeak_
.get() == other.
crosspeak_
.get() &&
spin_id
( 1 ) == other.
spin_id
( 1 ) &&
spin_id
( 2 ) == other.
spin_id
( 2 );
111
}
112
113
bool
is_symmetric_partner_of
(
PeakAssignment
const
& other )
const
;
114
115
ResonanceList
const
&
resonances
()
const
;
//can't inline due to circularity
116
//void invalidate_assignment();
117
118
CrossPeak
&
crosspeak
() {
return
*
crosspeak_
; };
119
CrossPeak
const
&
crosspeak
()
const
{
return
*
crosspeak_
; }
120
121
//core::Size assignment_index() const { return assignment_index_; }
122
void
set_symmetry
(
core::Real
setting = 0 ) {
123
symmetry_compliance_
= setting;
124
}
125
126
core::Real
symmetry_compliance
()
const
{
127
return
symmetry_compliance_
;
128
}
129
130
core::Real
chemshift_compliance
()
const
{
131
return
chemshift_overlap_
;
//Ck
132
}
133
134
void
set_network_anchoring
(
core::Real
setting ) {
135
network_anchoring_
= setting;
136
// network_anchoring_per_residue_ = reswise_setting;
137
}
138
139
void
set_network_anchoring_per_residue
(
core::Real
reswise_setting ) {
140
network_anchoring_per_residue_
= reswise_setting;
141
}
142
143
core::Real
network_anchoring
()
const
{
144
return
network_anchoring_
;
145
}
146
147
core::Real
network_anchoring_per_residue
()
const
{
148
return
network_anchoring_per_residue_
;
149
}
150
151
core::Real
decoy_compatibility
()
const
{
152
return
decoy_compatibility_
;
153
}
154
155
void
set_decoy_compatibility
(
core::Real
setting ) {
156
decoy_compatibility_
= setting;
157
}
158
159
void
update_chemshiftscore_from_peak
();
160
void
update_upperdistance_score
();
161
162
///@brief this is not normalized
163
core::Real
peak_volume
()
const
;
164
165
///@brief only correct if peak_volumes have been update in CrossPeaks.
166
core::Real
normalized_peak_volume
()
const
;
167
168
void
show
( std::ostream& os )
const
;
169
170
void
dump_weights
( std::ostream& os )
const
;
171
172
void
set_native_distance_viol
(
core::Real
setting ) {
173
native_distance_viol_
= setting;
174
}
175
core::Real
native_distance_viol
() {
176
return
native_distance_viol_
;
177
}
178
179
private
:
180
void
update_resonances_from_peak
();
181
182
CrossPeakAP
crosspeak_
;
183
core::Size
spin_assign_index1_
;
//points to assignment of spin1 and spin2
184
core::Size
spin_assign_index2_
;
//points to assignment of spin1 and spin2
185
core::Size
resonance1_
;
//the spin1 and spin2 resonance (short cut to avoid lengthy access thru CrossPeak)
186
core::Size
resonance2_
;
//the spin1 and spin2 resonance (short cut to avoid lengthy access thru CrossPeak)
187
188
189
// should these live in inherited class or in PeakAssignmentWeights ?
190
core::Real
chemshift_overlap_
;
//Ck
191
core::Real
symmetry_compliance_
;
//Tk
192
bool
covalent_compliance_
;
//Ok
193
core::Real
decoy_compatibility_
;
//Dk
194
core::Real
network_anchoring_
;
//Nk
195
core::Real
network_anchoring_per_residue_
;
//N_{AB}
196
core::Real
native_distance_viol_
;
197
198
};
199
200
std::ostream&
operator<<
( std::ostream& os,
PeakAssignment
const
& pa );
201
202
extern
PeakAssignment
const
BOGUS_ASSIGNMENT
;
203
204
}
205
}
206
#endif
Generated on Sat Jun 1 2013 12:01:19 for Rosetta 3.5 by
1.8.4