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
import_pose
pose_stream
MetaPoseInputStream.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 src/core/import_pose/pose_stream/MetaPoseInputStream.cc
11
/// @brief
12
/// @author James Thompson
13
14
// libRosetta headers
15
16
#include <
core/types.hh
>
17
#include <
core/chemical/ResidueTypeSet.fwd.hh
>
18
#include <
core/pose/Pose.fwd.hh
>
19
20
#include <
core/import_pose/pose_stream/PoseInputStream.hh
>
21
#include <
core/import_pose/pose_stream/PoseInputStream.fwd.hh
>
22
#include <
core/import_pose/pose_stream/MetaPoseInputStream.hh
>
23
24
#include <utility/exit.hh>
25
26
#include <utility/vector1.hh>
27
28
29
namespace
core {
30
namespace
import_pose {
31
namespace
pose_stream {
32
33
void
34
MetaPoseInputStream::add_pose_input_stream
(
PoseInputStreamOP
input ) {
35
input_streams_
.push_back( input );
36
}
37
38
utility::vector1< PoseInputStreamOP >
39
MetaPoseInputStream::get_input_streams
() {
40
return
input_streams_
;
41
}
42
43
bool
MetaPoseInputStream::has_another_pose
() {
44
45
if
(
current_index_
>
input_streams_
.size() )
return
false
;
46
if
(
input_streams_
[
current_index_
]->
has_another_pose
() )
return
true
;
47
48
// move to next input_stream that has an available pose if necessary
49
while
(
current_index_
<=
input_streams_
.size() &&
50
!
input_streams_
[
current_index_
]->has_another_pose()
51
)
52
++
current_index_
;
53
54
if
(
current_index_
>
input_streams_
.size() )
return
false
;
55
56
// if we've gotten here, current_input_stream_ has another pose!
57
return
true
;
58
}
59
60
void
MetaPoseInputStream::reset
(){
61
for
(
Size
n = 1; n <=
input_streams_
.size(); n++ )
input_streams_
[n]->
reset
();
62
current_index_
= 1;
63
}
64
65
66
void
MetaPoseInputStream::fill_pose
(
67
core::pose::Pose
& pose,
68
core::chemical::ResidueTypeSet
const
& residue_set
69
) {
70
// check to make sure that we have more poses!
71
if
( !
has_another_pose
() ) {
72
utility_exit_with_message(
"MetaPoseInputStream: called fill_pose, but I have no more Poses!"
);
73
}
74
75
// (*current_input_stream_)->fill_pose( pose, residue_set );
76
input_streams_
[
current_index_
]->fill_pose( pose, residue_set );
77
}
78
79
void
MetaPoseInputStream::fill_pose
(
80
core::pose::Pose
& pose
81
) {
82
// check to make sure that we have more poses!
83
if
( !
has_another_pose
() ) {
84
utility_exit_with_message(
"MetaPoseInputStream: called fill_pose, but I have no more Poses!"
);
85
}
86
87
// (*current_input_stream_)->fill_pose( pose, residue_set );
88
input_streams_
[
current_index_
]->fill_pose( pose );
89
}
90
91
}
// pose_stream
92
}
// import_pose
93
}
// core
Generated on Sat Jun 1 2013 11:32:52 for Rosetta 3.5 by
1.8.4