45 #include <numeric/conversions.hh>
50 #include <ObjexxFCL/format.hh>
66 StepWiseRNA_VDW_Bin_Screener::StepWiseRNA_VDW_Bin_Screener():
72 bin_min_(
int(-max_distance_/atom_bin_size_) ),
73 bin_max_(
int(max_distance_/atom_bin_size_) ),
74 bin_offset_( std::abs(bin_min_)+1 ),
75 num_clash_atom_cutoff_(3),
76 write_to_file_(false),
77 Is_reference_xyz_setup_(false),
78 Is_VDW_screen_bin_setup_(false),
79 user_inputted_VDW_screen_pose_(false),
80 VDW_rep_alignment_RMSD_CUTOFF_(0.001),
81 tolerate_off_range_atom_bin_(true),
82 num_atom_pos_bin_out_of_range_message_outputted_(0),
83 VDW_rep_screen_with_physical_pose_verbose_(true),
84 physical_pose_clash_dist_cutoff_(1.2),
85 use_VDW_rep_pose_for_screening_(false),
129 bool const verbose=
true;
131 if(verbose)
Output_title_text(
"Enter StepWiseRNA_VDW_Bin_Screener::setup_using_working_pose");
133 Size const reference_res( job_parameters->working_reference_res() );
141 create_VDW_screen_bin(working_pose, job_parameters->working_moving_res_list(), job_parameters->Is_prepend(), reference_xyz, verbose);
143 if(verbose)
Output_title_text(
"Exit StepWiseRNA_VDW_Bin_Screener::setup_using_working_pose");
154 std::map< core::Size, core::Size > & full_to_sub)
const {
156 Output_title_text(
"Enter StepWiseRNA_VDW_Bin_Screener::get_matching_res_in_VDW_rep_screen_pose");
157 clock_t
const time_start( clock() );
159 using namespace ObjexxFCL;
177 std::cout <<
"VDW_rep_ignore_matching_res_[1]==\"false\", will NOT delete residues in VDW_rep_pose that exist in the working_pose" << std::endl;
181 Output_title_text(
"Exit StepWiseRNA_VDW_Bin_Screener::delete_matching_res_in_VDW_rep_screen_pose");
187 Output_boolean(
"check_VDW_rep_no_match_res=", check_VDW_rep_no_match_res ); std::cout << std::endl;
190 std::cout <<
"atom_atom_dist_cutoff= " << dist_cutoff << std::endl;
197 if(no_match_res_segment_pair.size()!=2) utility_exit_with_message(
"no_match_res_segment_pair.size()!=2");
202 if(start_res>=end_res) utility_exit_with_message(
"start_res=" + string_of(start_res) +
">=" + string_of(end_res) +
"end_res");
204 for(
Size full_seq_num=start_res; full_seq_num<=end_res; full_seq_num++){
205 Size const working_seq_num= full_to_sub[full_seq_num];
206 if(working_seq_num==0)
continue;
208 if(
Contain_seq_num( working_seq_num , no_match_res_list ) ) utility_exit_with_message(
"seq_num " + string_of(working_seq_num) +
" is already in the no_match_res_list!");
209 no_match_res_list.push_back( working_seq_num );
219 for(
Size working_seq=1; working_seq<=working_pose.
total_residue(); working_seq++){
221 Size num_match_res=0;
223 for(
Size VDW_rep_seq=1; VDW_rep_seq<=VDW_rep_screen_pose.
total_residue(); VDW_rep_seq++){
228 if( VDW_rep_rsd.
aa()!=working_rsd.
aa() )
continue;
236 if( working_first_sc_name!=VDW_rep_first_sc_name){
237 utility_exit_with_message(
"working_first_sc_name=" + working_first_sc_name +
"!="+ VDW_rep_first_sc_name +
"=VDW_rep_first_sc_name");
242 if( (working_rsd.
xyz(working_first_sc_at)-VDW_rep_rsd.
xyz(VDW_rep_first_sc_at)).length_squared() > dist_cutoff*dist_cutoff )
continue;
245 bool found_O1P=
false;
bool found_O2P=
false;
bool found_O5=
false;
bool found_P=
false;
247 for(
Size working_at=1; working_at<=working_rsd.
natoms(); working_at++){
256 if(working_atom_name==
" O1P"){ found_O1P=
true;
continue; }
257 if(working_atom_name==
" O2P"){ found_O2P=
true;
continue; }
258 if(working_atom_name==
" O5*"){ found_O5=
true;
continue; }
259 if(working_atom_name==
" P "){ found_P=
true;
continue; }
261 if(working_atom_name==
"1H5*"){
continue; }
262 if(working_atom_name==
"2H5*"){
continue; }
263 if(working_atom_name==
"2HO*"){
continue; }
265 if(working_rsd.
atom_type(working_at).
name()==
"VIRT")
continue;
267 if ( VDW_rep_rsd.
has( working_atom_name ) ==false ) utility_exit_with_message(
"VDW_rep_rsd does not have atom= " + working_atom_name +
"!");
269 Size const VDW_rep_at = VDW_rep_rsd.
atom_index( working_atom_name );
272 if(working_atom_name!=VDW_rep_atom_name){
273 utility_exit_with_message(
"working_atom_name!=VDW_rep_atom_name, working_atom_name= " + working_atom_name +
" VDW_rep_atom_name= " + VDW_rep_atom_name);
276 if( ( working_rsd.
xyz(working_at)-VDW_rep_rsd.
xyz(VDW_rep_at) ).length_squared() > (dist_cutoff*dist_cutoff) ){
277 std::cout <<
"dist_cutoff= " << dist_cutoff <<
"| working_seq= " << working_seq <<
"| VDW_rep_seq= " << VDW_rep_seq <<
" |";
278 std::cout <<
"(working_rsd.xyz(working_at)-VDW_rep_rsd.xyz(VDW_rep_at)).length()=" << (working_rsd.
xyz(working_at)-VDW_rep_rsd.
xyz(VDW_rep_at)).length() << std::endl;
279 utility_exit_with_message( working_atom_name +
" of working_rsd and " + VDW_rep_atom_name +
" of VDW_rep_rsd are not within dist_cutoff" );
283 if(found_O1P==
false) utility_exit_with_message(
"found_O1P==false");
284 if(found_O2P==
false) utility_exit_with_message(
"found_O2P==false");
285 if(found_O5==
false) utility_exit_with_message(
"found_O5==false");
286 if(found_P==
false) utility_exit_with_message(
"found_P==false");
289 utility_exit_with_message(
"working_seq " + string_of(working_seq) +
" is already in the delete_res_list! working_seq=" +string_of(working_seq)+
" VDW_rep_seq= " + string_of(VDW_rep_seq) +
".");
292 utility_exit_with_message(
"VDW_rep_seq " + string_of(VDW_rep_seq) +
" is already in the delete_res_list! working_seq=" +string_of(working_seq)+
" VDW_rep_seq= " + string_of(VDW_rep_seq) +
".");
296 working_matching_res_list.push_back(working_seq);
297 VDW_rep_matching_res_list.push_back(VDW_rep_seq);
302 utility_exit_with_message(
" working_seq= " + string_of(working_seq) +
" is in both no_match_res_list and delete_res_list!" );
305 for(
Size ii=1; ii<=working_align_res.size(); ii++){
306 if(working_seq==working_align_res[ii]){
307 if(VDW_rep_seq!=VDW_rep_screen_align_res[ii]){
308 utility_exit_with_message(
"working_seq==working_align_res[ii] but VDW_rep_seq!=VDW_rep_screen_align_res[ii]" );
315 if(num_match_res>1) utility_exit_with_message(
"num_match_res>1 for working_seq=" + working_seq );
323 for(
Size working_seq=1; working_seq<=working_pose.
total_residue(); working_seq++){
328 if(
Contain_seq_num(working_seq, working_align_res) ) utility_exit_with_message(
"working_seq= " + string_of(working_seq) +
" is a working_align_res!" );
330 if( check_VDW_rep_no_match_res ){
331 if(
Contain_seq_num(working_seq, no_match_res_list)==
false) utility_exit_with_message(
"working_seq= "+ string_of(working_seq)+
" is NOT in both no_match_res_list and matching_res_list!");
337 for(
Size VDW_rep_seq=1; VDW_rep_seq<= VDW_rep_screen_pose.
total_residue(); VDW_rep_seq++){
342 utility_exit_with_message(
"VDW_rep_seq= " + string_of(VDW_rep_seq) +
" is a VDW_rep_screen_align_res but is not in VDW_rep_matching_res_list!" );
362 std::cout <<
"Total time get_matching_res_in_VDW_rep_screen_pose: " <<
static_cast<Real>( clock() - time_start ) / CLOCKS_PER_SEC <<
" SECONDS" << std::endl;
364 Output_title_text(
"Exit StepWiseRNA_VDW_Bin_Screener::delete_matching_res_in_VDW_rep_screen_pose");
367 return VDW_rep_matching_res_list;
384 bool const verbose)
const {
386 using namespace core::pose;
387 using namespace ObjexxFCL;
388 using namespace core::scoring;
392 if(verbose)
Output_title_text(
"Enter StepWiseRNA_VDW_Bin_Screener::align_VDW_rep_screen_pose()");
396 if(VDW_rep_screen_align_res.size()!=working_align_res.size()){
397 utility_exit_with_message(
"Size of VDW_rep_screen_align_res ( " + string_of(VDW_rep_screen_align_res.size()) +
") != working_align_res (" + string_of(working_align_res.size()) +
")" );
401 working_pose.
dump_pdb(
"VDW_rep_screen_bin_BEFORE_ALIGN_working_pose.pdb" );
402 VDW_rep_screen_pose.
dump_pdb(
"VDW_rep_screen_bin_BEFORE_ALIGN_VDW_rep_screen_pose.pdb" );
406 std::map< core::Size, core::Size > res_map;
409 if(verbose) std::cout <<
"VDW_rep_screen_align_res--->working_align_res" << std::endl;
411 for(
Size ii=1; ii<=working_align_res.size(); ii++){
413 Size const res_num_1=VDW_rep_screen_align_res[ii];
414 Size const res_num_2=working_align_res[ii];
417 utility_exit_with_message(
"res_num_1 (" + string_of(res_num_1)+
") > VDW_rep_screen_pose.total_residue() (" + string_of(VDW_rep_screen_pose.
total_residue())+
")!");
421 utility_exit_with_message(
"res_num_2 (" + string_of(res_num_2)+
") > working_pose.total_residue() (" + string_of(working_pose.
total_residue())+
")!");
424 if(verbose) std::cout << res_num_1 <<
" ---> " << res_num_2 << std::endl;
426 res_map[ res_num_1 ] = res_num_2;
433 if(verbose) std::cout <<
"before superimpose_pose" << std::endl;
438 if(verbose) std::cout <<
"after superimpose_pose" << std::endl;
441 working_pose.
dump_pdb(
"VDW_rep_screen_bin_AFTER_ALIGN_working_pose.pdb" );
442 VDW_rep_screen_pose.
dump_pdb(
"VDW_rep_screen_bin_AFTER_ALIGN_VDW_rep_screen_pose.pdb" );
447 for(
Size n=1; n<=working_align_res.size(); n++){
449 Size const res_num_1=VDW_rep_screen_align_res[n];
450 Size const res_num_2=working_align_res[n];
458 sum_sd=sum_sd/(atom_count);
459 Real rmsd=sqrt(sum_sd);
461 if(atom_count==0) rmsd=99.99;
464 std::cout <<
"rmsd= " << rmsd <<
" Angstrom between res " << res_num_1 <<
" of VDW_rep_screen_align_res and res " << res_num_2 <<
" of working_pose" << std::endl;
469 std::cout <<
"rmsd= " << rmsd <<
" >(" <<
VDW_rep_alignment_RMSD_CUTOFF_ <<
") Angstrom between res " << res_num_1 <<
" of VDW_rep_screen_align_res and res " << res_num_2 <<
" of working_pose" << std::endl;
470 utility_exit_with_message(
"rmsd>VDW_rep_alignment_RMSD_CUTOFF!");
474 if(verbose)
Output_title_text(
"Exit StepWiseRNA_VDW_Bin_Screener::align_VDW_rep_screen_pose()");
499 std::map< core::Size, core::Size > & full_to_sub,
500 bool const verbose)
const {
502 using namespace core::pose;
503 using namespace ObjexxFCL;
504 using namespace core::chemical;
510 std::cout <<
"importing VDW_rep_screen_pose: " << VDW_rep_screen_info.
pose_name << std::endl;
511 if(VDW_rep_screen_info.
pose_name==
"") utility_exit_with_message(VDW_rep_screen_info.
pose_name==
"");
530 VDW_rep_screen_info.
VDW_pose=VDW_rep_screen_pose;
539 using namespace core::pose;
540 using namespace ObjexxFCL;
543 bool const verbose=
true;
545 Output_title_text(
"Enter StepWiseRNA_VDW_Bin_Screener::FARFAR_setup_using_user_input_VDW_pose");
547 if( ( All_VDW_rep_screen_pose_info.size() % 3 ) != 0 ){
548 utility_exit_with_message(
"( All_VDW_rep_screen_pose_info.size() % 3 ) != 0. Example: VWC_rep_screen_pose.pdb 6-44(align_res of VWD_rep_screen_pose) 1-33(align_res of working_pose)" );
555 for(
Size n=1; n<=All_VDW_rep_screen_pose_info.size(); n+=3){
562 VDW_rep_screen_info.
input_string+=
"pose_name= " + All_VDW_rep_screen_pose_info[n];
563 VDW_rep_screen_info.
input_string+=
" VDW_align_res_string= " + All_VDW_rep_screen_pose_info[n+1];
564 VDW_rep_screen_info.
input_string+=
" full_align_res_string= " + All_VDW_rep_screen_pose_info[n+2];
566 std::cout <<
"Adding VDW_screen_rep_pose_info #" << VDW_rep_screen_info.
import_ID <<
": " << VDW_rep_screen_info.
input_string << std::endl;
568 VDW_rep_screen_info.
pose_name=All_VDW_rep_screen_pose_info[n];
572 for(
Size ii=1; ii<=VDW_rep_screen_align_res_string.size(); ii++){
576 for(
Size ii=1; ii<=full_align_res_string.size(); ii++){
580 if(VDW_rep_screen_info.
VDW_align_res.size()==0) utility_exit_with_message(
"VDW_align_ress.size()==0" );
581 if(VDW_rep_screen_info.
full_align_res.size()==0) utility_exit_with_message(
"full_align_res.size()==0!");
584 utility_exit_with_message(
"Size of VDW_align_res ( " + string_of(VDW_rep_screen_info.
VDW_align_res.size()) +
") != working_align_res (" + string_of(VDW_rep_screen_info.
working_align_res.size()) +
")" );
595 std::map< core::Size, core::Size > full_to_sub;
609 if(verbose)
Output_title_text(
"Exit StepWiseRNA_VDW_Bin_Screener::FARFAR_setup_using_user_input_VDW_pose");
621 using namespace core::pose;
622 using namespace ObjexxFCL;
623 using namespace core::chemical;
624 using namespace core::scoring;
628 bool const verbose=
true;
631 Output_title_text(
"Enter StepWiseRNA_VDW_Bin_Screener::setup_using_user_input_VDW_pose");
633 if(( All_VDW_rep_screen_pose_info.size() % 3 ) != 0){
634 utility_exit_with_message(
"All_VDW_rep_screen_pose_info.size() % 3 ) != 0. Example: VWC_rep_screen_pose.pdb 6-44(align_res of VWD_rep_screen_pose) 1-33(align_res of working_pose)" );
641 for(
Size n=1; n<=All_VDW_rep_screen_pose_info.size(); n+=3){
648 VDW_rep_screen_info.
input_string+=
"pose_name= " + All_VDW_rep_screen_pose_info[n];
649 VDW_rep_screen_info.
input_string+=
" VDW_align_res_string= " + All_VDW_rep_screen_pose_info[n+1];
650 VDW_rep_screen_info.
input_string+=
" full_align_res_string= " + All_VDW_rep_screen_pose_info[n+2];
652 std::cout <<
"Checking VDW_screen_rep_pose_info #" << VDW_rep_screen_info.
import_ID <<
": " << VDW_rep_screen_info.
input_string << std::endl;
654 VDW_rep_screen_info.
pose_name=All_VDW_rep_screen_pose_info[n];
659 for(
Size ii=1; ii<=VDW_rep_screen_align_res_string.size(); ii++){
663 for(
Size ii=1; ii<=full_align_res_string.size(); ii++){
667 if(VDW_rep_screen_info.
VDW_align_res.size()==0) utility_exit_with_message(
"Size of VDW_align_res.size()==0" );
668 if(VDW_rep_screen_info.
full_align_res.size()==0) utility_exit_with_message(
"full_align_res.size()==0!");
671 utility_exit_with_message(
"Size of VDW_align_res ( " + string_of(VDW_rep_screen_info.
VDW_align_res.size()) +
") != working_align_res (" + string_of(VDW_rep_screen_info.
working_align_res.size()) +
")" );
677 std::cout <<
"Ignoring VDW_screen_rep_pose_info #" << VDW_rep_screen_info.
import_ID <<
" since full_align_res.size()!=working_align_res.size()!";
678 std::cout <<
" full_align_res.size()= " << VDW_rep_screen_info.
full_align_res.size();
679 std::cout <<
" working_align_res.size()= " << VDW_rep_screen_info.
working_align_res.size();
680 std::cout << std::endl;
691 utility_exit_with_message(
"A residue in working_align_res is not a working_fixed_res!" );
700 std::map< core::Size, core::Size >
const const_full_to_sub=job_parameters->const_full_to_sub();
701 std::map< core::Size, core::Size > full_to_sub=const_full_to_sub;
712 std::cout <<
"--------------------------------------------------------" << std::endl;
714 ObjexxFCL::FArray1D< bool >
const & partition_definition = job_parameters->partition_definition();
715 bool const root_partition = partition_definition( const_working_pose.
fold_tree().
root() );
716 Size num_rep_screen_pose_info_in_root_partition=0;
722 std::cout <<
"Check if VDW screen_rep_pose_info #" << VDW_rep_screen_info.
import_ID <<
": " << VDW_rep_screen_info.
input_string <<
" is in root partition." << std::endl;
726 bool contain_moving_partition_res=
false;
729 if ( partition_definition( seq_num ) != root_partition ) {
730 contain_moving_partition_res=
true;
735 if(contain_moving_partition_res==
false){
736 std::cout <<
"VDW_screen_rep_pose_info #" << VDW_rep_screen_info.
import_ID <<
" is in root partition! " << std::endl;
738 num_rep_screen_pose_info_in_root_partition++;
745 if(num_rep_screen_pose_info_in_root_partition==0){
751 for (
Size n=1; n <= working_fixed_res.size(); n++){
752 Size seq_num=working_fixed_res[n];
753 if ( partition_definition( seq_num ) == root_partition ) {
754 working_fixed_res_in_root_partition.push_back(seq_num);
759 if(working_fixed_res_in_root_partition.size()==0) {
760 std::cout <<
"No VDW_screener_pose since working_fixed_res_in_root_partition.size()==0, probably build inward " << std::endl;
764 utility_exit_with_message(
"num_rep_screen_pose_info_in_root_partition==0!");
770 Size const reference_res=job_parameters->working_reference_res();
771 std::cout <<
"--------------------------------------------------------" << std::endl;
772 std::cout <<
"Get reference xyz: " << std::endl;
773 std::cout <<
"working_reference_res = " << reference_res << std::endl;
776 std::cout <<
"--------------------------------------------------------" << std::endl;
783 if(verbose)
Output_title_text(
"Exit StepWiseRNA_VDW_Bin_Screener::setup_using_user_input_VDW_pose");
791 bool const Is_prepend,
792 std::ofstream & outfile_act){
794 bool output_once=
false;
796 std::cout <<
"pose.total_residue()= " << pose.
total_residue()<< std::endl;
814 virtual_atom_list.push_back( std::make_pair( n, rsd.
type().
atom_name(
at) ) );
819 bool Is_moving_phosphate=
false;
828 if(Is_moving_phosphate){
829 moving_phosphate_atom_list.push_back( std::make_pair( n, rsd.
type().
atom_name(
at) ) );
838 outfile_act << rsd.
xyz(
at)[0] <<
" ";
839 outfile_act << rsd.
xyz(
at)[1] <<
" ";
840 outfile_act << rsd.
xyz(
at)[2] <<
" ";
845 Real const moving_atom_radius=1.0;
846 Real const clash_dist_cutoff=0.8;
852 Real const sum_radius=moving_atom_radius+VDW_radius-clash_dist_cutoff-max_binning_error;
857 if(output_once==
false){
859 std::cout <<
"seq_num= " << n <<
" atom_name= " << rsd.
type().
atom_name(
at) <<
" VDW_radius= " << VDW_radius;
860 std::cout <<
" moving_atom_radius= " << moving_atom_radius <<
" clash_dist_cutoff= " << clash_dist_cutoff;
861 std::cout <<
" max_binning_error= " << max_binning_error <<
" sum_radius " << sum_radius << std::endl;
862 std::cout <<
"max_bin_offset= " << max_bin_offset <<
" min_bin_offset= " <<min_bin_offset << std::endl;
866 for(
int x_bin_offset=min_bin_offset; x_bin_offset<=max_bin_offset; x_bin_offset++){
867 for(
int y_bin_offset=min_bin_offset; y_bin_offset<=max_bin_offset; y_bin_offset++){
868 for(
int z_bin_offset=min_bin_offset; z_bin_offset<=max_bin_offset; z_bin_offset++){
871 xyz_bin.
x+=x_bin_offset;
872 xyz_bin.
y+=y_bin_offset;
873 xyz_bin.
z+=z_bin_offset;
879 if( (xyz_pos-rsd.
xyz(
at)).length_squared() < sum_radius*sum_radius){
892 std::cout <<
"VIRTUAL_ATOM_LIST: " << std::endl;
893 for(
Size ii=1; ii<=virtual_atom_list.size(); ii++){
894 std::cout << virtual_atom_list[ii].first <<
"-" << virtual_atom_list[ii].second <<
" ";
896 std::cout << std::endl;
898 std::cout <<
"MOVING_PHOSPHATE_ATOM_LIST: " << std::endl;
899 for(
Size ii=1; ii<=moving_phosphate_atom_list.size(); ii++){
900 std::cout << moving_phosphate_atom_list[ii].first <<
"-" << moving_phosphate_atom_list[ii].second <<
" ";
902 std::cout << std::endl;
909 bool const Is_prepend,
917 pose_list.push_back(pose);
918 list_of_ignore_res_list.push_back(ignore_res_list);
919 list_of_Is_prepend.push_back(Is_prepend);
921 create_VDW_screen_bin(pose_list, list_of_ignore_res_list, list_of_Is_prepend, reference_xyz, verbose);
936 for(
Size n=1; n<=VDW_rep_screen_info_list.size(); n++){
937 if(VDW_rep_screen_info_list[n].in_root_partition==
true){
938 pose_list.push_back(VDW_rep_screen_info_list[n].VDW_pose);
939 list_of_ignore_res_list.push_back(VDW_rep_screen_info_list[n].VDW_ignore_res);
940 list_of_Is_prepend.push_back(
false );
944 create_VDW_screen_bin(pose_list, list_of_ignore_res_list, list_of_Is_prepend, reference_xyz, verbose);
956 std::cout <<
"------------------Enter create_pose_bin function------------------ " << std::endl;
957 std::cout <<
"max_distance_= " <<
max_distance_ << std::endl;
959 std::cout <<
"bin_min_= " <<
bin_min_ << std::endl;
960 std::cout <<
"bin_max_= " <<
bin_max_ << std::endl;
961 std::cout <<
"bin_offset_= " <<
bin_offset_ << std::endl;
963 std::cout <<
"pose_list.size()= " << pose_list.size() << std::endl;
971 if(pose_list.size()!=list_of_ignore_res_list.size()){
972 utility_exit_with_message(
"pose_list.size(){" + ObjexxFCL::string_of(pose_list.size()) +
"}!={" + ObjexxFCL::string_of(list_of_ignore_res_list.size()) +
"}list_of_ignore_res_list.size()");
975 if(pose_list.size()!=list_of_Is_prepend.size()){
976 utility_exit_with_message(
"pose_list.size(){" + ObjexxFCL::string_of(pose_list.size()) +
"}!={" + ObjexxFCL::string_of(list_of_Is_prepend.size()) +
"}list_of_ignore_res_list.size()");
986 if(
VDW_screen_bin_.size()!=0) utility_exit_with_message(
"VDW_screen_bin_.size()!=0 before setup!");
989 std::ofstream outfile_act;
992 for(
Size n=1; n<=pose_list.size(); n++){
993 std::cout <<
"--------------Enter update_VDW_screen_bin() for pose #" << n <<
" (count only include VDW_poses in root partition!)--------------" << std::endl;
995 std::cout <<
"--------------Exit update_VDW_screen_bin() for pose #" << n <<
" (count only include VDW_poses in root partition!)--------------" << std::endl;
1002 Size occupied_bin_count=0;
1003 Size total_bin_count=0;
1004 for(
int x_bin=1; x_bin<=
bin_max_*2; x_bin++){
1005 for(
int y_bin=1; y_bin<=
bin_max_*2; y_bin++){
1006 for(
int z_bin=1; z_bin<=
bin_max_*2; z_bin++){
1013 if(total_bin_count==0) utility_exit_with_message(
"total_bin_count of thre_dim_VDW_bin==0!");
1015 std::cout <<
"VDW_screen_bin_: occupied_bin_count = " << occupied_bin_count <<
" out of total_bin_count = " << total_bin_count << std::endl;
1016 std::cout <<
"------------------Exit create_pose_bin function------------------ " << std::endl;
1026 Size const & moving_res,
1037 Size num_clash_atom=0;
1038 for(
Size n = 1; n <= xyz_list.size(); n++){
1042 if(xyz_list[n].first.rsd()!=moving_res){
1043 std::cout <<
"xyz_list[n].first.rsd()= " << xyz_list[n].first.rsd() <<
" moving_res= " << moving_res << std::endl;
1044 utility_exit_with_message(
"xyz_list[n].first.rsd()!=moving_res");
1048 Size const at=xyz_list[n].first.atomno();
1077 Size num_clash_atom=0;
1105 bool const local_verbose){
1109 if(moving_res_list.size()==0) utility_exit_with_message(
"moving_res_list.size()==0!");
1112 std::cout <<
"------------VDW_rep_screen_with_physical_pose_INFO------------" << std::endl;
1118 std::cout <<
"--------------------------------------------------------------" << std::endl;
1136 for(
Size ii=1; ii<=moving_res_list.size(); ii++){
1138 Size const moving_res=moving_res_list[ii];
1142 if(residues_in_contact)
return false;
1165 for(
int n=0; n<=2; n++){
1167 utility_exit_with_message(
"( ( (inputted_reference_xyz[n]-0.00001) > reference_xyz_[n] ) || ( (inputted_reference_xyz[n]+0.00001) < reference_xyz_[n]) )");
1168 std::cout <<
"inputted_reference_xyz= " << inputted_reference_xyz[0] <<
" " << inputted_reference_xyz[1] <<
" " << inputted_reference_xyz[2] << std::endl;
1180 if(
VDW_screen_bin_.size()==0) utility_exit_with_message(
"Is_VDW_screen_bin_setup_==true but VDW_screen_bin_==0!");
1191 if(atom_pos_bin.
x<1 || (atom_pos_bin.
x > (
bin_max_*2)) ||
1192 atom_pos_bin.
y<1 || (atom_pos_bin.
y > (
bin_max_*2)) ||
1193 atom_pos_bin.
z<1 || (atom_pos_bin.
z > (
bin_max_*2)) ){
1212 std::cout <<
"bin_max_*2= " <<
bin_max_*2 << std::endl;
1213 std::cout <<
" atom_pos_bin.x= " << atom_pos_bin.
x <<
" atom_pos_bin.y= " << atom_pos_bin.
y <<
" atom_pos_bin.z= " << atom_pos_bin.
z << std::endl;
1214 std::cout <<
"atom_pos_bin out of range!" << std::endl;
1221 utility_exit_with_message(
"atom_pos_bin out of range!");
1260 if(atom_pos_ref_frame[0]<0) atom_bin.
x--;
1261 if(atom_pos_ref_frame[1]<0) atom_bin.
y--;
1262 if(atom_pos_ref_frame[2]<0) atom_bin.
z--;
1300 std::ofstream outfile;
1302 outfile.open(filename.c_str());
1306 for(atom_bin.
x=1; atom_bin.
x<=
int(
bin_max_*2); atom_bin.
x++){
1307 for(atom_bin.
y=1; atom_bin.
y<=
int(
bin_max_*2); atom_bin.
y++){
1308 for(atom_bin.
z=1; atom_bin.
z<=
int(
bin_max_*2); atom_bin.
z++){
1312 outfile << atom_pos[0] <<
" ";
1313 outfile << atom_pos[1] <<
" ";
1314 outfile << atom_pos[2] <<
" ";