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
FuncFactory.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/constraints/FuncFactory.cc
11
/// @brief Factory for creating various types of constraints.
12
/// @author Greg Taylor <gktaylor@u.washington.edu>
13
14
// Unit headers
15
#include <
core/scoring/constraints/Func.hh
>
16
#include <
core/scoring/constraints/FuncFactory.hh
>
17
18
// Package headers
19
#include <
core/scoring/constraints/SumFunc.hh
>
20
#include <
core/scoring/constraints/SOGFunc.hh
>
21
#include <
core/scoring/constraints/USOGFunc.hh
>
22
#include <
core/scoring/constraints/SoedingFunc.hh
>
23
#include <
core/scoring/constraints/HarmonicFunc.hh
>
24
#include <
core/scoring/constraints/SigmoidFunc.hh
>
25
#include <
core/scoring/constraints/CircularHarmonicFunc.hh
>
26
#include <
core/scoring/constraints/MixtureFunc.hh
>
27
#include <
core/scoring/constraints/ScalarWeightedFunc.hh
>
28
#include <
core/scoring/constraints/CountViolFunc.hh
>
29
#include <
core/scoring/constraints/SkipViolFunc.hh
>
30
#include <
core/scoring/constraints/SquareWellFunc.hh
>
31
#include <
core/scoring/constraints/SquareWell2Func.hh
>
32
#include <
core/scoring/constraints/GaussianFunc.hh
>
33
#include <
core/scoring/constraints/ConstantFunc.hh
>
34
#include <
core/scoring/constraints/BoundConstraint.hh
>
35
#include <
core/scoring/constraints/SplineFunc.hh
>
36
#include <
core/scoring/constraints/FadeFunc.hh
>
37
#include <
core/scoring/constraints/LinearPenaltyFunction.hh
>
38
#include <
core/scoring/constraints/KarplusFunc.hh
>
39
#include <
core/scoring/constraints/IdentityFunc.hh
>
40
#include <
core/scoring/constraints/FlatHarmonicFunc.hh
>
41
#include <
core/scoring/constraints/TopOutFunc.hh
>
42
43
#include <utility/exit.hh>
44
#include <utility/pointer/owning_ptr.hh>
45
#include <utility/pointer/ReferenceCount.hh>
46
#include <utility/vector1.hh>
47
48
using namespace
core::scoring::constraints;
49
50
void
FuncFactory::add_type
(
std::string
type_name,
FuncOP
new_func ) {
51
func_types_
[ type_name ] =
new_func
;
52
}
53
54
FuncOP
FuncFactory::new_func
(
std::string
const
& type )
const
{
55
FuncTypes::const_iterator iter =
func_types_
.find( type );
56
if
( iter !=
func_types_
.end() ) {
57
return
iter->second->clone();
58
}
else
{
59
utility_exit_with_message(
"FuncFactory: unknown constraint function type: "
+ type );
60
return
NULL;
61
}
62
}
63
64
// initialization of functions which this factory knows how to instantiate
65
FuncFactory::FuncFactory
(
void
) {
66
FuncFactory::add_type
(
"HARMONIC"
,
new
HarmonicFunc
(0,0) );
67
FuncFactory::add_type
(
"SIGMOID"
,
new
SigmoidFunc
(0,1) );
68
FuncFactory::add_type
(
"CIRCULARHARMONIC"
,
new
CircularHarmonicFunc
(0,0) );
69
FuncFactory::add_type
(
"MIXTUREFUNC"
,
new
MixtureFunc
(0,0,0,0,0,0) );
70
FuncFactory::add_type
(
"SCALARWEIGHTEDFUNC"
,
new
ScalarWeightedFunc
(0,0) );
71
FuncFactory::add_type
(
"COUNTVIOLFUNC"
,
new
CountViolFunc
(0,0) );
72
FuncFactory::add_type
(
"SKIPVIOLFUNC"
,
new
SkipViolFunc
(0,0) );
73
FuncFactory::add_type
(
"GAUSSIANFUNC"
,
new
GaussianFunc
(0,0) );
74
FuncFactory::add_type
(
"CONSTANTFUNC"
,
new
ConstantFunc
(0.) );
75
FuncFactory::add_type
(
"BOUNDED"
,
new
BoundFunc
(0,0,0,
"dummy"
) );
76
FuncFactory::add_type
(
"PERIODICBOUNDED"
,
new
PeriodicBoundFunc
(0,0,0,
"dummy"
,6.28) );
77
FuncFactory::add_type
(
"OFFSETPERIODICBOUNDED"
,
new
OffsetPeriodicBoundFunc
(0,0,0,
"dummy"
,6.28,0.0) );
78
FuncFactory::add_type
(
"SUMFUNC"
,
new
SumFunc
() );
79
FuncFactory::add_type
(
"SOGFUNC"
,
new
SOGFunc
() );
80
FuncFactory::add_type
(
"USOGFUNC"
,
new
USOGFunc
() );
81
FuncFactory::add_type
(
"SOEDINGFUNC"
,
new
SoedingFunc
() );
82
FuncFactory::add_type
(
"SPLINE"
,
new
SplineFunc
() );
83
FuncFactory::add_type
(
"SQUARE_WELL"
,
new
SquareWellFunc
(0,0) );
84
FuncFactory::add_type
(
"SQUARE_WELL2"
,
new
SquareWell2Func
(0,0,0) );
85
FuncFactory::add_type
(
"FADE"
,
new
FadeFunc
(0,0,0) );
86
FuncFactory::add_type
(
"LINEAR_PENALTY"
,
new
LinearPenaltyFunction
(0,0,0,0) );
87
FuncFactory::add_type
(
"KARPLUS"
,
new
KarplusFunc
(6.98,-1.38,1.72,-1.05,0,0,0));
88
FuncFactory::add_type
(
"IDENTITY"
,
new
IdentityFunc
() );
89
FuncFactory::add_type
(
"FLAT_HARMONIC"
,
new
FlatHarmonicFunc
( 0, 0, 0 ) );
90
FuncFactory::add_type
(
"TOPOUT"
,
new
TopOutFunc
( 0, 0, 0 ) );
91
}
Generated on Sat Jun 1 2013 11:35:32 for Rosetta 3.5 by
1.8.4