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
core
pack
scmin
AtomTreeSCMinMinimizerMap.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/pack/scmin/AtomTreeSCMinMinimizerMap.hh
11
/// @brief Class for identifying the sidechain DOFs in the AtomTree which are free during
12
/// any particular call to the minimizer.
13
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
14
15
#ifndef INCLUDED_core_pack_scmin_AtomTreeSCMinMinimizerMap_hh
16
#define INCLUDED_core_pack_scmin_AtomTreeSCMinMinimizerMap_hh
17
18
// Unit headers
19
#include <
core/pack/scmin/AtomTreeSCMinMinimizerMap.fwd.hh
>
20
#include <
core/pack/scmin/SCMinMultifunc.hh
>
21
#include <
core/pack/scmin/SCMinMinimizerMap.hh
>
22
23
// Package Headers
24
#include <
core/pack/scmin/AtomTreeCollection.hh
>
25
26
// Project Headers
27
#include <
core/types.hh
>
28
#include <
core/conformation/Residue.fwd.hh
>
29
#include <
core/id/AtomID_Map.hh
>
30
#include <
core/id/DOF_ID.hh
>
31
// AUTO-REMOVED #include <core/id/DOF_ID_Mask.hh>
32
// AUTO-REMOVED #include <core/id/TorsionID.hh>
33
#include <
core/kinematics/MinimizerMapBase.hh
>
34
// AUTO-REMOVED #include <core/kinematics/AtomTree.fwd.hh>
35
#include <
core/kinematics/tree/Atom.fwd.hh
>
36
// AUTO-REMOVED #include <core/kinematics/DomainMap.hh>
37
#include <
core/scoring/DerivVectorPair.hh
>
38
#include <
core/optimization/types.hh
>
39
#include <
core/optimization/DOF_Node.hh
>
40
#include <
core/optimization/Multifunc.fwd.hh
>
41
42
//#include <core/pose/Pose.fwd.hh>
43
//#include <core/scoring/ScoreFunction.fwd.hh>
44
45
// Utility headers
46
#include <utility/vector1.hh>
47
#include <utility/pointer/ReferenceCount.hh>
48
49
#include <
core/id/DOF_ID_Map.hh
>
50
#include <
core/id/DOF_ID_Mask.fwd.hh
>
51
#include <
core/id/TorsionID.fwd.hh
>
52
#include <ObjexxFCL/FArray1D.hh>
53
54
55
namespace
core {
56
namespace
pack {
57
namespace
scmin {
58
59
/// @brief
60
class
AtomTreeSCMinMinimizerMap
:
public
SCMinMinimizerMap
61
{
62
public
:
63
typedef
optimization::DOF_Node
DOF_Node
;
64
typedef
optimization::DOF_NodeOP
DOF_NodeOP
;
65
66
public
:
67
AtomTreeSCMinMinimizerMap
();
68
virtual
~AtomTreeSCMinMinimizerMap
();
69
70
/// @brief the AtomTreeSCMinMinimizerMap has to know how many residues are in the pose; this allows
71
/// it to do O(1) updates to its DomainMap -- this function costs O(N).
72
virtual
73
void
set_total_residue
(
Size
total_residue );
74
75
/// @brief Disable the minimization for all residues. Ammortized O(1).
76
virtual
77
void
clear_active_dofs
();
78
79
/// @brief Activate all the dofs for a particular residue. Ammortized O(1).
80
virtual
81
void
activate_residue_dofs
(
Size
resindex );
82
83
/// @brief Invoked during the depth-first traversal through the AtomTree. The AtomTree
84
/// is indicating that a particular torsion is dependent on another torsion. Record
85
/// that fact.
86
virtual
87
void
88
add_torsion
(
89
DOF_ID
const
& new_torsion,
90
DOF_ID
const
& parent
91
);
92
93
/// @brief Invoked during the depth-first traversal through the AtomTree; the atom
94
/// tree is indicating that a given atom is controlled by a particular DOF. Record
95
/// that fact.
96
virtual
97
void
98
add_atom
(
99
AtomID
const
& atom_id,
100
DOF_ID
const
& dof_id
101
);
102
103
/// @brief Traverse the atom trees in preparation for minimization to tie together all the
104
/// DOFs and the atoms they control.
105
void
106
setup
(
AtomTreeCollectionOP
trees );
107
108
public
:
109
110
/// Accessors
111
Size
nactive_residues
()
const
{
return
nactive_residues_
; }
112
Size
active_residue
(
Size
index )
const
{ assert( index <=
nactive_residues_
);
return
active_residues_
[ index ]; }
113
114
/// @brief MinimizerMapBase class virtual accessor
115
virtual
kinematics::DomainMap
const
&
domain_map
()
const
{
return
domain_map_
; }
116
117
/// @brief Inline accessor
118
inline
kinematics::DomainMap
const
&
dm
()
const
{
return
domain_map_
; }
119
120
Size
n_dof_nodes
()
const
{
return
n_active_dof_nodes_
; }
121
122
/// @brief Initialize a multivec with the dofs reflected in the current residue(s)
123
void
starting_dofs
(
optimization::Multivec
& dofs )
const
;
124
125
/// @brief Assign the chi values to the residue(s)
126
void
assign_dofs_to_mobile_residues
(
optimization::Multivec
const
& dofs );
127
128
optimization::DOF_Node
&
129
dof_node
(
Size
index ) {
130
assert( index > 0 && index <=
n_active_dof_nodes_
);
131
return
*
dof_nodes_
[ index ];
132
}
133
134
virtual
135
conformation::Residue
const
&
136
residue
(
Size
seqpos )
const
;
137
138
optimization::DOF_Node
const
&
139
dof_node_for_chi
(
Size
resid,
Size
chiid )
const
;
140
141
id::TorsionID
142
tor_for_dof
(
id::DOF_ID
const
& dofid )
const
;
143
144
kinematics::tree::Atom
const
&
145
atom
(
AtomID
const
& atid )
const
;
146
147
void
zero_atom_derivative_vectors
();
148
149
/// @brief propagate f1/f2's up from children to parents
150
void
link_torsion_vectors
();
151
152
void
set_natoms_for_residue
(
Size
resid,
Size
natoms );
153
154
optimization::MultifuncOP
155
make_multifunc
(
156
pose::Pose
& p,
157
utility::vector1< conformation::ResidueCOP >
const
& bg_residues,
158
scoring::ScoreFunction
const
& sfxn,
159
scoring::MinimizationGraph
& mingraph)
160
{
161
optimization::MultifuncOP
retval(
new
SCMinMultifunc
(p,bg_residues,sfxn,mingraph,*
this
) );
162
return
retval;
163
}
164
165
protected
:
166
void
reset_dof_nodes
();
167
168
private
:
169
utility::vector1< ResidueAtomTreeCollectionOP >
atcs_for_residues_
;
170
171
id::DOF_ID_Mask
dof_mask_
;
// used in recursive descent through an atom tree
172
utility::vector1< optimization::DOF_NodeOP >
dof_nodes_
;
173
Size
n_active_dof_nodes_
;
174
175
AtomTreeCollectionOP
atom_tree_collection_
;
176
utility::vector1< Size >
atoms_representing_chis_
;
177
utility::vector1< Size >
atoms_representing_ds_
;
178
utility::vector1< Size >
atoms_representing_thetas_
;
179
180
utility::vector1< Size >
chi_start_for_active_residue_
;
// what's the index of the first chi for a particular active residue?
181
//fpd not sure if nonideal analogues are needed for this ...
182
utility::vector1< utility::vector1< Size >
>
active_residue_atom_to_dofnode_index_
;
183
184
/// For parent_dof lookup: track which dofs a particular atom are responsible for.
185
Size
dof_start_for_focused_residue_
;
186
Size
ndofs_added_for_focused_residue_
;
187
};
188
189
190
191
}
// namespace scmin
192
}
// namespace pack
193
}
// namespace core
194
195
#endif
Generated on Sat Jun 1 2013 11:33:48 for Rosetta 3.5 by
1.8.4