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
swa
StepWiseIdentitySampleGenerator.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 StepWiseIdentitySampleGenerator
11
/// @brief Subclass of StepWisePoseSampleGenerator
12
/// @detailed
13
/// @author Rhiju Das
14
15
16
//////////////////////////////////
17
#include <
protocols/swa/StepWiseIdentitySampleGenerator.hh
>
18
#include <
protocols/swa/StepWisePoseSetup.hh
>
19
#include <
protocols/swa/InputStreamWithResidueInfo.hh
>
20
#include <
core/types.hh
>
21
// AUTO-REMOVED #include <core/pose/Pose.hh>
22
#include <utility/exit.hh>
23
// AUTO-REMOVED #include <ObjexxFCL/string.functions.hh>
24
25
//Auto Headers
26
#include <utility/vector1.hh>
27
28
using namespace
core;
29
30
namespace
protocols {
31
namespace
swa {
32
33
//////////////////////////////////////////////////////////////////////////
34
//constructor!
35
StepWiseIdentitySampleGenerator::StepWiseIdentitySampleGenerator(
InputStreamWithResidueInfoOP
input_stream ):
36
input_stream_( input_stream )
37
{
38
reset
();
39
}
40
41
StepWiseIdentitySampleGenerator::StepWiseIdentitySampleGenerator
(
42
InputStreamWithResidueInfoOP
input_stream,
43
StepWisePoseSetupOP
stepwise_pose_setup ):
44
input_stream_( input_stream ),
45
stepwise_pose_setup_( stepwise_pose_setup )
46
{
47
reset
();
48
}
49
50
//////////////////////////////////////////////////////////////////////////
51
void
52
StepWiseIdentitySampleGenerator::reset
(){
53
input_stream_
->reset();
54
}
55
56
//////////////////////////////////////////////////////////////////////////
57
bool
58
StepWiseIdentitySampleGenerator::has_another_sample
(){
59
return
(
input_stream_
->has_another_pose() );
60
}
61
62
//////////////////////////////////////////////////////////////////////////
63
void
64
StepWiseIdentitySampleGenerator::get_next_sample
(
core::pose::Pose
& pose )
65
{
66
67
if
( !
input_stream_
->has_another_pose() ) utility_exit_with_message(
"Asked IdentitySampleGenerator for another sample, but it did not have one!"
);
68
input_stream_
->copy_next_pose_segment( pose );
69
70
// This is annoying but necessary:
71
if
(
stepwise_pose_setup_
&&
stepwise_pose_setup_
->ready_to_align() ){
72
// std::cout << "ALIGNING POSE! " << std::endl;
73
stepwise_pose_setup_
->align_pose( pose );
74
}
75
76
}
77
78
///////////////////////////////////////////////////////
79
Size
80
StepWiseIdentitySampleGenerator::size
()
const
{
81
//we don't know a priori how many combinations there will be...
82
// yes, I guess we could precompute this by looking through both streams ahead of time.
83
return
0;
84
}
85
86
87
///////////////////////////////////////////////////////
88
void
89
StepWiseIdentitySampleGenerator::set_stepwise_pose_setup
(
StepWisePoseSetupOP
stepwise_pose_setup ){
90
stepwise_pose_setup_
= stepwise_pose_setup;
91
}
92
93
}
94
}
Generated on Sat Jun 1 2013 12:20:15 for Rosetta 3.5 by
1.8.4