27 #include <basic/options/option.hh>
30 #include <utility/exit.hh>
32 #include <basic/prof.hh>
35 #include <numeric/numeric.functions.hh>
36 #include <numeric/xyzMatrix.hh>
37 #include <numeric/xyzVector.hh>
41 #include <utility/vector1.hh>
43 #ifdef __native_client__
57 #include <basic/options/keys/holes.OptionKeys.gen.hh>
84 PROF_START( basic::DALPHABALL );
86 std::string cmd = basic::options::option[ basic::options::OptionKeys::holes::dalphaball ]();
87 redi::pstream proc( cmd );
89 proc <<
"NPOINTS" << std::endl << pb.
nballs() << std::endl <<
"COORDS" << std::endl;
92 proc <<
b.x() <<
" " <<
b.y() <<
" " <<
b.z() <<
" " <<
b.r() <<
" " << std::endl;
94 proc <<
"WEIGHTS" << std::endl;
104 proc <<
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" << std::endl;
106 for(
Size j = (atom_num-1)*24+5; j <= atom_num*24; j++ ) {
107 proc << params.
param(res_name)[j] / 12.56637 <<
" ";
112 proc <<
"END" << std::endl << redi::peof;
117 for(
Size a = 1; a <= 20; a++ ) {
119 proc >> ialpha >> index >> val;
120 if( a != ialpha || i != index ) {
121 std::cerr <<
"DALPHABALL output indicies not matching! " << i <<
"!=" << index <<
" " << a <<
"!=" << ialpha << std::endl;
122 utility_exit_with_message(
"DALPHABALL output indicies not matching!" );
133 if( a==1 && atom_num==1 ) {
135 raw_score -= params.
rho();
141 PROF_STOP( basic::DALPHABALL );
152 Real anb5=0,anb10=0,anb15=0,anb20=0;
153 for(
Size j = 1; j < i; j++ ) {
157 if( 225 >= dis2 ) anb15++;
158 if( 100 >= dis2 ) anb10++;
159 if( 25 >= dis2 ) anb5 ++;
162 raw_score += params.
param(res_name)[24*(atom_num-1)+1] * anb5 / 14.61869 ;
163 raw_score += params.
param(res_name)[24*(atom_num-1)+2] * anb10 / 116.94952;
164 raw_score += params.
param(res_name)[24*(atom_num-1)+3] * anb15 / 394.70462;
165 raw_score += params.
param(res_name)[24*(atom_num-1)+4] * anb20 / 935.59614;
186 using namespace core;
187 using namespace numeric;
190 PROF_START( basic::DALPHABALL_DERIV );
192 for(
Size ir = 1; ir <= derivs.size(); ir++ ) {
193 for(
Size ia = 1; ia <= derivs.n_atom(ir); ia++ ) {
197 redi::pstream proc(
std::string(basic::options::option[ basic::options::OptionKeys::holes::dalphaball ]()) +
" DERIV" );
199 proc <<
"NPOINTS" << std::endl << pb.
nballs() << std::endl <<
"COORDS" << std::endl;
202 proc <<
b.x() <<
" " <<
b.y() <<
" " <<
b.z() <<
" " <<
b.r() <<
" " << std::endl;
204 proc <<
"WEIGHTS" << std::endl;
214 proc <<
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" << std::endl;
216 for(
Size j = (atom_num-1)*24+5; j <= atom_num*24; j++ ) {
217 proc << params.
param(res_name)[j] / 12.56637 <<
" ";
222 proc <<
"END" << std::endl << redi::peof;
225 for(
Size a = 1; a <= 20; a++ ) {
227 proc >> val >> dx >> dy >> dz;
238 if( a==1 && atom_num==1 ) {
240 raw_score -= params.
rho();
266 PROF_STOP( basic::DALPHABALL );