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
match
output
SameRotamerComboGrouper.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
// :noTabs=false:tabSize=4:indentSize=4:
4
//
5
// (c) Copyright Rosetta Commons Member Institutions.
6
// (c) This file is part of the Rosetta software suite and is made available under license.
7
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9
// (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10
11
/// @file protocols/match/output/SameRotamerComboGrouper.cc
12
/// @brief
13
/// @author Alex Zanghellini (zanghell@u.washington.edu)
14
/// @author Andrew Leaver-Fay (aleaverfay@gmail.com), porting to mini
15
16
// Unit headers
17
#include <
protocols/match/output/SameRotamerComboGrouper.hh
>
18
19
// Package headers
20
#include <
protocols/match/output/MatchGrouper.hh
>
21
#include <
protocols/match/Hit.hh
>
22
23
// Utility headers
24
#include <utility/exit.hh>
25
26
#include <utility/OrderedTuple.hh>
27
28
29
namespace
protocols {
30
namespace
match
{
31
namespace
output {
32
33
SameRotamerComboGrouper::SameRotamerComboGrouper
() : n_geometric_constraints_( 0 ) {}
34
SameRotamerComboGrouper::SameRotamerComboGrouper
(
Size
ncst ) : n_geometric_constraints_( ncst ) {}
35
36
SameRotamerComboGrouper::~SameRotamerComboGrouper
() {}
37
38
SameRotamerComboGrouper::Size
39
SameRotamerComboGrouper::assign_group_for_match
(
40
match
const
& m
41
)
42
{
43
return
assign_group_for_match
(
match_dspos1
( m, 1 ) );
44
}
45
46
SameRotamerComboGrouper::Size
47
SameRotamerComboGrouper::assign_group_for_match
(
48
match_dspos1
const
& m
49
)
50
{
51
runtime_assert( m.
upstream_hits
.size() ==
n_geometric_constraints_
);
52
53
utility::vector1< Size >
rot_vector(
n_geometric_constraints_
* 2, 0 );
54
for
(
Size
ii = 1; ii <=
n_geometric_constraints_
; ++ii ) {
55
rot_vector[ ii ] = m.
upstream_hits
[ ii ].scaffold_build_id();
56
rot_vector[
n_geometric_constraints_
+ ii ] = m.
upstream_hits
[ ii ].upstream_conf_id();
57
}
58
59
RotamerComboCountMap::const_iterator iter =
rotamer_combo_indexer_
.find( rot_vector );
60
if
( iter ==
rotamer_combo_indexer_
.end() ) {
61
Size
next_index =
rotamer_combo_indexer_
.size() + 1;
62
rotamer_combo_indexer_
[ rot_vector ] = next_index;
63
return
next_index;
64
}
else
{
65
return
iter->second;
66
}
67
}
68
69
void
70
SameRotamerComboGrouper::reset
()
71
{
72
rotamer_combo_indexer_
.clear();
73
}
74
75
void
76
SameRotamerComboGrouper::set_n_geometric_constraints
(
Size
n_csts )
77
{
78
n_geometric_constraints_
= n_csts;
79
}
80
81
82
}
83
}
84
}
Generated on Sat Jun 1 2013 11:59:45 for Rosetta 3.5 by
1.8.4