9 #include <basic/options/keys/sicdock.OptionKeys.gen.hh>
10 #include <basic/options/option.hh>
11 #include <basic/options/option_macros.hh>
12 #include <numeric/constants.hh>
13 #include <numeric/xyz.functions.hh>
14 #include <numeric/xyz.io.hh>
15 #include <ObjexxFCL/format.hh>
16 #include <ObjexxFCL/string.functions.hh>
17 #include <utility/io/ozstream.hh>
18 #include <utility/string_util.hh>
30 using ObjexxFCL::fmt::I;
31 using ObjexxFCL::fmt::F;
32 using ObjexxFCL::fmt::RJ;
49 RCR b(
h->natom() > o.h->natom() ? *
this : o );
50 RCR s(
h->natom() <= o.h->natom() ? *
this : o );
52 XC s2b(
b.h->translation() + ( ~
b.x * (s.x-s.h->translation()) ) );
53 for(Hash::const_iterator i = s.h->begin(); i != s.h->end(); ++i){
54 if(
b.h->clash_raw( s2b * *i ) )
return true;
62 RCR b(
h->natom() > o.h->natom() ? *
this : o );
63 RCR s(
h->natom() <= o.h->natom() ? *
this : o );
66 XC s2b(
b.h->translation() + ( ~
b.x * (s.x-s.h->translation()) ) );
67 for(Hash::const_iterator i = s.h->begin(); i != s.h->end(); ++i){
68 count +=
b.h->nbcount_raw( s2b * *i );
75 for(
Size ir = 1; ir <= pose->n_residue(); ++ir) {
76 for(
Size ia = 1; ia <= pose->residue_type(ir).natoms(); ++ia) {
78 pose->set_xyz( aid,
x.xform(pose->xyz(aid)) );
85 pose()->dump_pdb(out);
89 pose()->dump_pdb(fname);
93 for(
Size ir = 1; ir <=
p->n_residue(); ++ir){
95 v =
x *
p->xyz(
AID(1,ir)); out<<
"ATOM "<<I(5,3*ir-2)<<
' '<<
" N "<<
' '<<
"GLY"<<
' '<<chain<<I(4,ir)<<
" "<<F(8,3,v.x())<<F(8,3,v.y())<<F(8,3,v.z())<<F(6,2,1.0)<<F(6,2,1.0)<<endl;
96 v =
x *
p->xyz(
AID(2,ir)); out<<
"ATOM "<<I(5,3*ir-1)<<
' '<<
" CA "<<
' '<<
"GLY"<<
' '<<chain<<I(4,ir)<<
" "<<F(8,3,v.x())<<F(8,3,v.y())<<F(8,3,v.z())<<F(6,2,1.0)<<F(6,2,1.0)<<endl;
97 v =
x *
p->xyz(
AID(3,ir)); out<<
"ATOM "<<I(5,3*ir-0)<<
' '<<
" C "<<
' '<<
"GLY"<<
' '<<chain<<I(4,ir)<<
" "<<F(8,3,v.x())<<F(8,3,v.y())<<F(8,3,v.z())<<F(6,2,1.0)<<F(6,2,1.0)<<endl;
105 Real const thresh_2 =
h->grid_size2();
106 for(Hash::const_iterator i = o.h->begin(); i != o.h->end(); ++i){
107 VC u( o.x.xform(*i-o.h->translation()) );
108 for(Hash::const_iterator j =
h->begin(); j !=
h->end(); ++j){
109 VC v(
x.xform(*j-
h->translation()) );
110 if( u.distance_squared(v) < thresh_2 )
return true;
118 Real const thresh_2 =
h->grid_size2();
119 for(Hash::const_iterator i = o.h->begin(); i != o.h->end(); ++i){
120 VC u( o.x.xform(*i-o.h->translation()) );
121 for(Hash::const_iterator j =
h->begin(); j !=
h->end(); ++j){
122 VC v(
x.xform(*j-
h->translation()) );
123 if( u.distance_squared(v) <= thresh_2 ) count++;