18 #include <basic/database/open.hh>
19 #include <basic/options/option.hh>
20 #include <basic/options/keys/in.OptionKeys.gen.hh>
27 #include <numeric/interpolation/spline/SplineGenerator.hh>
28 #include <utility/io/izstream.hh>
32 #include <utility/vector1.hh>
58 sts.push_back(
suck );
66 utility::io::izstream izin;
67 basic::database::open( izin, basic::options::option[ basic::options::OptionKeys::in::file::sucker_params ]() );
76 std::istringstream iss(s);
79 if( !(iss >> tmp ) )
break;
83 if( iss >> tmp ) point.push_back(tmp);
84 points.push_back(point);
87 assert( points.size() >= 2 );
98 using namespace numeric::interpolation::spline;
99 SplineGenerator sg( points[ 1 ][1], points[ 1 ][2], points[ 1 ][3],
100 points[points.size()][1], points[points.size()][2], points[points.size()][3] );
102 for(
Size i = 2; i < points.size(); ++i ) {
103 if( points[i].
size() == 2 ) sg.add_known_value( points[i][1], points[i][2] );
104 if( points[i].
size() == 3 ) sg.add_known_value( points[i][1], points[i][2], points[i][3] );
107 interp_ = sg.get_interpolator();
128 return ( ( 1 <= atype && atype <= 6 )
129 || ( 18 <= atype && atype <= 19 )
146 using namespace core;
147 using namespace conformation;
154 if(
"SUCK" == name1 &&
"SUCK" == name2 )
return;
155 if(
"SUCK" != name1 &&
"SUCK" != name2 )
return;
157 Residue const & rsd( (
"SUCK" != name1 ) ? rsd1 : rsd2 );
158 Residue const & sck( (
"SUCK" == name1 ) ? rsd1 : rsd2 );
165 Real const d = atom_xyz.distance( suck_xyz );
168 interp_->interpolate( d, f, df );
190 using namespace numeric;
193 if(
"SUCK" == pose.
residue(
id.rsd()).name() ) {
195 assert( 1 <=
id.atomno() &&
id.atomno() <= 3 );
196 if(
id.atomno() > 1 )
return;
201 if(
"SUCK" == res.name() )
continue;
203 for(
int ia = 1; ia <= (
int)res.nheavyatoms(); ++ia ) {
209 Real const d = suck_xyz.distance(atom_xyz);
217 Real const dist( f2.length() );
219 interp_->interpolate( dist, dummy, deriv );
221 F1 += ( deriv / dist ) * weights[
suck ] * f1;
222 F2 += ( deriv / dist ) * weights[
suck ] * f2;
258 Real const d = suck_xyz.distance(atom_xyz);
266 Real const dist( f2.length() );
268 interp_->interpolate( dist, dummy, deriv );
270 F1 += ( deriv / dist ) * weights[
suck ] * f1;
271 F2 += ( deriv / dist ) * weights[
suck ] * f2;