15 #include <ObjexxFCL/FArray1D.fwd.hh>
16 #include <ObjexxFCL/FArray1D.hh>
17 #include <ObjexxFCL/format.hh>
18 #include <basic/MetricValue.hh>
19 #include <basic/Tracer.hh>
42 #include <numeric/random/random.hh>
54 #include <utility/exit.hh>
55 #include <utility/tag/Tag.hh>
56 #include <utility/vector0.hh>
57 #include <utility/vector1.hh>
61 namespace simple_filters {
63 static basic::Tracer
TR(
"protocols.simple_filters.AlaScan" );
82 distance_threshold_( dist ),
84 symmetry_( symmetry ),
109 chain1_ = tag->getOption<
bool >(
"partner1", 0 );
110 chain2_ = tag->getOption<
bool >(
"partner2", 1 );
111 jump_ = tag->getOption<
Size >(
"jump", 1 );
112 runtime_assert( chain1_ || chain2_ );
115 symmetry_ = tag->getOption<
bool >(
"symmetry", 0 );
116 repack( tag->getOption<
bool >(
"repack", 1 ) );
119 using namespace core::scoring::symmetry;
121 TR<<
"Symmetric AlaScan with distance threshold of "<<
distance_threshold_<<
" Ang "<<
". jump="<<jump_<<
" partner1="<<chain1_<<
", partner2="<<chain2_<<
" using "<<
repeats_<<
" repeats."<<std::endl;
124 using namespace core::scoring;
126 TR<<
"AlaScan with distance threshold of "<<
distance_threshold_<<
" Ang "<<
". jump="<<jump_<<
" partner1="<<chain1_<<
", partner2="<<chain2_<<
" using "<<
repeats_<<
" repeats repack "<<
repack()<<std::endl;
134 TR<<
"WARNING: Non-protein residue "<< resi<<
" was requested for ala-scan. Returning 0"<<std::endl;
142 TR<<
"Energy calculations are carried out with repacking in the bound and unbound states (ddG)\n";
144 TR<<
"Energy calculations are carried out without repackign in the bound and unbound states (dG)\n";
151 using namespace core::pack::task;
153 PackerTaskOP task = TaskFactory::create_packer_task( pose );
154 task->initialize_from_command_line().or_include_current(
true );
157 task->nonconst_residue_task( resi ).restrict_absent_canonical_aas( allowed_aas );
159 task->nonconst_residue_task( resj ).prevent_repacking();
165 accumulate_ddg += (rb_jump==0 ? energy_filter.
compute( pose ) : ddg_filter.
compute( pose ) );;
185 core::Size upstream_jump_res, downstream_jump_res;
189 core::Size const chain_begin( chain1_ ? 1 : downstream_jump_res );
193 interface_obj.
jump( rb_jump == 0 ? 1 : rb_jump );
196 interface_obj.calculate( pose );
203 accumulate_ddg += (rb_jump==0 ? energy_filter.
compute( const_pose ) : ddg_filter.
compute( const_pose ) );
206 for(
core::Size resi = chain_begin; resi <= chain_end; ++resi ){
208 if( interface_obj.is_interface( resi ) ){
210 core::Real const diff_ddg( mut_ddg - wt_ddg );
213 char const chain( pose_info->chain( resi ) );
214 core::Size const number( pose_info->number( resi ) );
216 out<<
" "<<res_type<<
" "<<number<<
" "<<chain<<
" : "<< ObjexxFCL::fmt::F (9,4,diff_ddg)<<
'\n';
229 dynamic_cast<core::conformation::symmetry::SymmetricConformation & > ( pose.
conformation()) );
239 accumulate_ddg += ddg.
compute( const_pose );
247 if ( !symm_conf.
Symmetry_Info()->bb_is_independent(resi) )
continue;
250 using namespace core::pack::task;
252 PackerTaskOP task = TaskFactory::create_packer_task( pose );
253 task->initialize_from_command_line().or_include_current(
true );
257 task->nonconst_residue_task( resi ).restrict_absent_canonical_aas( allowed_aas );
259 task->nonconst_residue_task( resj ).prevent_repacking();
266 core::Real const diff_ddg( mut_ddg - wt_ddg );
273 out<<
" "<<res_type<<
" "<< resi <<
" : "<< ObjexxFCL::fmt::F (9,4,diff_ddg)<<
'\n';