20 #include <basic/Tracer.hh>
25 #include <ObjexxFCL/string.functions.hh>
26 #include <ObjexxFCL/format.hh>
30 #include <utility/vector1.hh>
42 using namespace ObjexxFCL;
44 static basic::Tracer
TR(
"core.scoring.packing.PoseBalls");
52 if( sqdist > 121.0 ) {
54 }
else if( sqdist < 81.0 ) {
57 Real dist = sqrt( sqdist );
58 return sqr(1.0 -
sqr( (dist - 9.0) / (11.0 - 9.0) ) );
66 left_justify( trimmed_name ); trim( trimmed_name );
78 using namespace numeric;
81 ObjexxFCL::FArray1D_char dssp_reduced_secstruct(pose.
n_residue());
87 if( pose.
pdb_info() ) num_unrec = pose.
pdb_info()->get_num_unrecognized_atoms();
113 }
else if( Hmode == 1 ) {
119 }
else if( Hmode == 2 ) {
124 id_to_index_[ aid ] = ++index;
125 index_to_id_.push_back( aid );
128 atom_num_.push_back(ia);
134 secstruct_.push_back( dssp_reduced_secstruct(ir) );
136 if( pose.
pdb_info() ) bfac_.push_back( pose.
pdb_info()->temperature(ir,ia) );
137 else bfac_.push_back( 0.0 );
145 atom_parent_.push_back(index);
147 res_num_.push_back(ir);
155 std::map<core::Size,core::Size> atomcount;
156 std::map<core::Size,core::Size> resnum;
157 core::Size rescount = 0, skippedlig = 0, skippedligH = 0;
158 for(
core::Size i = 1; i <= num_unrec; ++i ) {
160 core::Real radius = arm.get_radius(a.atom_name(),a.res_name());
161 if( Hmode < 2 && radius <= 1.2 ) {
165 if( radius <= 0.1 ) {
170 if(
"HOH" == (a.res_name()) ||
"DOD" == (a.res_name()) ) {
175 if( resnum.find(a.res_num()) == resnum.end() ) {
177 atomcount[a.res_num()] = 0;
179 id_to_index_.resize( resnum[a.res_num()], pose.
pdb_info()->get_unrecognized_res_size(a.res_num()) );
181 id_to_index_[ aid ] = ++index;
182 index_to_id_.push_back( aid );
183 atom_name_.push_back(a.atom_name());
184 atom_type_.push_back(0);
185 secstruct_.push_back(
'U');
186 atom_num_.push_back(atomcount[a.res_num()]);
187 atom_parent_.push_back(index);
188 is_heavy_.push_back( radius > 1.3 );
189 res_name_.push_back(a.res_name());
190 res_num_.push_back(resnum[a.res_num()]);
191 bfac_.push_back( a.temp() );
192 balls_.push_back(
Ball( a.coords(), radius ) );
203 using namespace numeric;
206 smooth_nb_.resize(nballs_);
209 for(
core::Size i = 1; i <= nballs_; i++ ) smooth_nb_[i] = 0.0;
216 if(
'E'==secstruct_[i] ) atype = 18+3*(atype-18)+0;
217 else if(
'H'==secstruct_[i] ) atype = 18+3*(atype-18)+1;
218 else if(
'L'==secstruct_[i] ) atype = 18+3*(atype-18)+2;
222 if( !is_heavy_[j] )
continue;
224 Real const d2( ixyz.distance_squared(jxyz) );
249 using namespace ObjexxFCL::fmt;
251 for(
Size i = 1; i <= nballs(); i++ ) {
253 out <<
std::string(
"ATOM " + I( 5, i ) +
" "+LJ(4,atom_name(i))+
" "+LJ(3,res_name(i))+
" " +
" "
254 + I( 4, res_num(i) ) +
" "
255 + F( 8, 3, ball(i).x() ) + F( 8, 3, ball(i).y() ) + F( 8, 3, ball(i).z() )
256 + F( 6, 2, 1.0 ) +
' ' + F( 5, 2, ball(i).r() ) ) +
"\n";