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
scoring
SecondaryStructureWeights.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
//
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/ScoringManager.hh
11
/// @brief Scoring manager class header
12
/// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
13
14
#include <
core/scoring/SecondaryStructureWeights.hh
>
15
16
// numeric headers
17
#include <numeric/random/random.hh>
18
19
#include <utility/vector1.hh>
20
21
22
// utility headers
23
24
// ObjexxFCL headers
25
26
// C++ headers
27
28
namespace
core {
29
namespace
scoring {
30
31
static
numeric::random::RandomGenerator
ss_weights_RG
(82645);
32
33
SecondaryStructureWeights::~SecondaryStructureWeights
() {}
34
35
/// @brief initialize to default values, also load proper data bins from external files
36
void
37
SecondaryStructureWeights::initialize
()
38
{
39
// weights
40
setup_parallel_antiparallel_weights
();
41
42
// additional settings
43
set_ss_lowstrand
( 0 );
44
set_ss_cutoff
( 6 );
45
// set_ss_lowstrand( 1 );
46
// set_ss_cutoff( 11 );
47
48
set_localstrandpair_penalty
( 0.0 );
49
set_seq_sep_scale
( 20.0 );
50
set_max_strand_dist_cutoff
( 12.0 );
51
set_strand_dist_cutoff
( 6.5 );
52
set_stretch_strand_dist_cutoff
(
false
);
53
set_handedness_score_flag
(
false
);
54
}
55
56
57
/// @details if not randomizing weights, all weights set to 1.0
58
void
59
SecondaryStructureWeights::setup_parallel_antiparallel_weights
(
60
bool
const
& randomize_weights
61
)
62
{
63
if
( randomize_weights ) {
64
// Choose whether to weight up parallel or antiparallel
65
Real
randomnumber =
ss_weights_RG
.uniform();
66
Real
randomweight = 10.0 *
ss_weights_RG
.uniform();
// Pretty drastic reweighting...
67
if
( randomnumber < 0.5 ){
68
set_parallel_weight
( randomweight );
69
set_antiparallel_weight
( 1.0/randomweight );
70
}
else
{
71
set_parallel_weight
( 1.0/randomweight );
72
set_antiparallel_weight
( randomweight );
73
}
74
}
else
{
// default weights
75
set_parallel_weight
( 1.0 );
76
set_antiparallel_weight
( 1.0 );
77
}
78
}
79
80
81
}
82
}
Generated on Sat Jun 1 2013 11:40:17 for Rosetta 3.5 by
1.8.4