21 #include <basic/options/option.hh>
23 #include <basic/prof.hh>
26 #include <numeric/numeric.functions.hh>
27 #include <numeric/xyzMatrix.hh>
31 #include <utility/vector1.hh>
32 #include <utility/exit.hh>
33 #ifdef __native_client__
47 #include <basic/options/keys/holes.OptionKeys.gen.hh>
75 PROF_START( basic::DALPHABALL );
78 std::string cmd = basic::options::option[ basic::options::OptionKeys::holes::dalphaball ]();
79 redi::pstream proc( cmd +
" totalsurf" );
81 proc <<
"NPOINTS" << std::endl << pb.
nballs() << std::endl <<
"COORDS" << std::endl;
84 proc <<
b.x() <<
" " <<
b.y() <<
" " <<
b.z() <<
" " <<
b.r() + probe_radius <<
" " << std::endl;
87 proc <<
"END" << std::endl << redi::peof;
106 PROF_STOP( basic::DALPHABALL );
119 using namespace core;
128 initialize_AtomID_Map<Real>(result.surf,pb);
129 initialize_AtomID_Map<Real>(result.vol ,pb);
131 PROF_START( basic::DALPHABALL );
133 std::string cmd = basic::options::option[ basic::options::OptionKeys::holes::dalphaball ]();
134 redi::pstream proc( cmd +
" surf_vol" );
136 proc <<
"NPOINTS" << std::endl << pb.
nballs() << std::endl <<
"COORDS" << std::endl;
139 proc <<
b.x() <<
" " <<
b.y() <<
" " <<
b.z() <<
" " <<
b.r() + probe_radius <<
" " << std::endl;
142 proc <<
"END" << std::endl << redi::peof;
144 result.tot_surf = 0.0;
145 result.tot_vol = 0.0;
149 proc >> index >> s >> v;
151 std::cerr <<
"DALPHABALL output indicies not matching! " << i <<
"!=" << index << std::endl;
156 result.tot_surf += s;
160 PROF_STOP( basic::DALPHABALL );
173 using namespace core;
179 PROF_START( basic::DALPHABALL );
183 initialize_AtomID_Map<Real>(result.surf,pb);
184 initialize_AtomID_Map<Real>(result.vol ,pb);
185 initialize_AtomID_Map<numeric::xyzVector<Real> >(result.dsurf,pb);
186 initialize_AtomID_Map<numeric::xyzVector<Real> >(result.dvol ,pb);
188 std::string cmd = basic::options::option[ basic::options::OptionKeys::holes::dalphaball ]();
189 redi::pstream proc( cmd +
" surf_vol_deriv" );
191 proc <<
"NPOINTS" << std::endl << pb.
nballs() << std::endl <<
"COORDS" << std::endl;
194 proc <<
b.x() <<
" " <<
b.y() <<
" " <<
b.z() <<
" " <<
b.r() + probe_radius <<
" " << std::endl;
197 proc <<
"END" << std::endl << redi::peof;
199 result.tot_surf = 0.0;
200 result.tot_vol = 0.0;
202 Real s,v,dsx,dsy,dsz,dvx,dvy,dvz;
204 proc >> index >> s >> v >> dsx >> dsy >> dsz >> dvx >> dvy >> dvz;
206 std::cerr <<
"DALPHABALL output indicies not matching! " << i <<
"!=" << index << std::endl;
213 result.tot_surf += s;
217 PROF_STOP( basic::DALPHABALL );