29 #include <utility/string_util.hh>
34 #include <basic/Tracer.hh>
37 namespace simple_moves{
39 static basic::Tracer
TR(
"protocols.simple_moves.O2M_MutateMover" );
43 using namespace core::pack::task;
44 using namespace core::pack::task::operation;
45 using namespace core::chemical;
46 using namespace core::conformation;
49 TR <<
"Task factory not initialized" << std::endl;
53 TR <<
"Score function not initialized" << std::endl;
57 PoseSP starting_pose = (*pmap[
"input"])[0];
61 for(
core::Size resi = 1; resi <= starting_pose->total_residue(); ++resi ){
62 if( starting_task->residue_task( resi ).being_designed() && starting_pose->residue(resi).is_protein() ) {
63 std::list<ResidueTypeCOP>
const & allowed( starting_task->residue_task( resi ).allowed_residue_types() );
64 for( std::list<ResidueTypeCOP>::const_iterator itr=allowed.begin(); itr != allowed.end(); itr++ ){
65 if( (*itr)->aa() != starting_pose->residue( resi ).aa() ) {
66 PoseSP working_pose(
new Pose( *starting_pose) );
72 **itr, working_pose->residue(resi),
73 working_pose->conformation());
76 *new_res, working_pose->conformation() );
77 working_pose->replace_residue(resi, *new_res,
false );
80 TR <<
"Mutated pos " << resi <<
" from " << starting_pose->residue( resi ).name3() <<
" to " << working_pose->residue( resi ).name3() << std::endl;
83 mut_pos += starting_pose->residue( resi ).name1();
84 mut_pos += working_pose->residue(resi).name1();
85 mut_pos += utility::to_string(resi);
87 pmap[
"input"]->push_back( working_pose );
95 utility::lua::LuaObject
const & score_fxns,
96 utility::lua::LuaObject
const & tasks,
99 if( def[
"scorefxn"] ) {