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
constraints
SkipViolFunc.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 src/core/scoring/constraints/ScalarWeightedFunc.hh
11
/// @brief Weighted constraint function that encapsulates other constraints
12
/// @author James Thompson, Greg Taylor
13
/// @details The ScalarWeightedFunc is a class used to scale other
14
/// constraints by multiplying it by a constant value.
15
/// This is useful in cases where constraint templates are similar
16
/// to each other and should be down-weighted to avoid double counting
17
/// for the same structural information.
18
19
20
#ifndef INCLUDED_core_scoring_constraints_SkipViolFunc_hh
21
#define INCLUDED_core_scoring_constraints_SkipViolFunc_hh
22
23
#include <
core/scoring/constraints/Func.hh
>
24
#include <
core/types.hh
>
25
26
namespace
core {
27
namespace
scoring {
28
namespace
constraints {
29
30
class
SkipViolFunc
:
public
Func
{
31
public
:
32
SkipViolFunc
(
33
Real
const
weight,
34
FuncOP
myfunc
35
):
weight_
( weight ),
36
count_viols_
( 0 ),
37
func_to_weight_
( myfunc ) {}
38
39
~SkipViolFunc
() {};
40
41
FuncOP
42
clone
()
const
{
return
new
SkipViolFunc
( *
this
); }
43
44
Real
func
(
Real
const
x )
const
;
45
Real
dfunc
(
Real
const
x )
const
;
46
47
void
read_data
( std::istream& );
48
49
/// @brief show some sort of stringified representation of the violations for this constraint.
50
virtual
core::Size
show_violations
( std::ostream& out,
Real
r,
core::Size
verbose_level,
Real
threshold = 1 )
const
;
51
52
/// @brief shows the definition of this function, usually the string type of function and the
53
/// parameters passed in to the constructor.
54
virtual
void
show_definition
( std::ostream & out )
const
;
55
56
Size
viols
()
const
{
57
return
count_viols_
;
58
}
59
60
private
:
61
Real
weight_
;
62
core::Size
count_viols_
;
63
FuncOP
func_to_weight_
;
64
65
//typedef std::map< std::string, scoring::constraints::FuncOP > FuncTypes;
66
// static FuncTypes func_types_;
67
68
};
69
}
// constraints
70
}
// scoring
71
}
// core
72
73
#endif
Generated on Sat Jun 1 2013 11:35:49 for Rosetta 3.5 by
1.8.4