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
simple_moves
DumpPdb.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 protocols/moves/DumpPdb.cc
11
/// @brief
12
/// @author Sarel Fleishman (sarelf@u.washington.edu), Jacob Corn (jecorn@u.washington.edu)
13
14
// Unit headers
15
#include <
protocols/simple_moves/DumpPdb.hh
>
16
#include <
protocols/simple_moves/DumpPdbCreator.hh
>
17
18
19
#include <
core/pose/Pose.hh
>
20
#include <
core/scoring/ScoreFunction.hh
>
21
#include <
protocols/rosetta_scripts/util.hh
>
22
#include <utility/tag/Tag.hh>
23
#include <basic/Tracer.hh>
24
25
#include <utility/basic_sys_util.hh>
26
27
#ifdef USEMPI
28
#include <utility/mpi_util.hh>
29
#include <utility/string_util.hh>
30
#endif
31
32
namespace
protocols {
33
namespace
simple_moves {
34
35
using namespace
core;
36
using namespace
std;
37
using namespace
core::scoring;
38
using namespace
protocols::moves;
39
40
static
basic::Tracer
TR
(
"protocols.simple_moves.DumpPdb"
);
41
42
std::string
43
DumpPdbCreator::keyname
()
const
44
{
45
return
DumpPdbCreator::mover_name
();
46
}
47
48
protocols::moves::MoverOP
49
DumpPdbCreator::create_mover
()
const
{
50
return
new
DumpPdb
;
51
}
52
53
std::string
54
DumpPdbCreator::mover_name
()
55
{
56
return
"DumpPdb"
;
57
}
58
59
DumpPdb::DumpPdb
():
60
protocols::moves::
Mover
(
DumpPdbCreator
::mover_name() ),
61
fname_(
"dump.pdb"
),
62
scorefxn_(0),
63
addtime_(false)
64
{}
65
66
DumpPdb::DumpPdb
(
std::string
const
fname ) :
67
protocols::moves::
Mover
(
DumpPdbCreator
::mover_name() ),
68
fname_(fname),
69
scorefxn_(0),
70
addtime_(false)
71
{}
72
73
DumpPdb::~DumpPdb
() {}
74
75
void
DumpPdb::apply
(
core::pose::Pose
& pose ) {
76
std::string
name
(
fname_
);
77
if
(
addtime_
) {
78
#ifdef USEMPI
79
name +=
"_"
+ utility::to_string(
utility::mpi_rank
());
80
#endif
81
name +=
"_"
+ utility::timestamp_short() +
".pdb"
;
82
TR
<<
"Dumping PDB "
<< name << std::endl;
83
}
84
if
(
scorefxn_
) {
85
pose.
dump_scored_pdb
( name, *
scorefxn_
);
86
}
else
{
87
pose.
dump_pdb
( name );
88
}
89
}
90
91
void
DumpPdb::set_scorefxn
(
core::scoring::ScoreFunctionOP
scorefxn) {
92
scorefxn_
= scorefxn;
93
}
94
void
95
DumpPdb::parse_my_tag
(
TagPtr
const
tag,
DataMap
& data,
protocols::filters::Filters_map
const
&,
Movers_map
const
&,
core::pose::Pose
const
& )
96
{
97
fname_
= tag->getOption<
std::string
>(
"fname"
,
"dump.pdb"
);
98
if
( tag->hasOption(
"scorefxn"
) ) {
99
scorefxn_
=
protocols::rosetta_scripts::parse_score_function
( tag, data );
100
}
101
102
tag_time
( tag->getOption<
bool
>(
"tag_time"
,
false
) );
103
TR
<<
"dump pdb\n"
;
104
TR
<<
"WARNING: DEFINED DUMP_PDB MOVER. THIS IS USUALLY ONLY GOOD FOR DEBUGGING.\n"
;
105
TR
<<
"with filename "
<<
fname_
<<std::endl;
106
}
107
108
std::string
109
DumpPdb::get_name
()
const
{
110
return
DumpPdbCreator::mover_name
();
111
}
112
113
}
//simple_moves
114
}
//protocols
Generated on Sat Jun 1 2013 12:15:37 for Rosetta 3.5 by
1.8.4