18 #include <basic/Tracer.hh>
24 #include <utility/vector1.hh>
26 static basic::Tracer
TR(
"protocols.packstat.SimplePDB");
37 set<pair<string,string> > errors;
44 spheres.push_back(
Sphere( xyz, radius ) );
45 }
else if( radius < 0 ) {
46 errors.insert( pair<string,string>(atom.
type,atom.
res) );
50 TR <<
"ignoring unknown atom types:" << std::endl;
51 for(set<pair<string,string> >::iterator i = errors.begin(); i != errors.end(); ++i) {
52 TR <<
"(" << i->first <<
"," << i->second <<
"), ";
76 Size MIN_RES_ATOM_COUNT = 1;
78 using namespace numeric;
79 using namespace utility;
81 int last_res_num = -12345;
82 char last_chain =
'*';
84 if( i->resnum != last_res_num || i->chain != last_chain ) {
86 last_res_num = i->resnum;
87 last_chain = i->chain;
93 last_res_num = -12345;
95 Size res_atom_count = 0;
97 if( i->resnum != last_res_num || i->chain != last_chain ) {
99 if( res_atom_count >= MIN_RES_ATOM_COUNT ){
100 centers.push_back(center/res_atom_count);
106 last_res_num = i->resnum;
107 last_chain = i->chain;
112 if( res_atom_count >= MIN_RES_ATOM_COUNT ) centers.push_back( center/res_atom_count );
121 if(
atoms_[i].res ==
"HOH" ) {
132 using namespace core;
143 compute_sasa_generic<SimplePDB_Atom>(
atoms_, 3.0 );
145 bool removed =
false;
146 for(
Size i = 1; i <= atoms_.size(); ++i ) {
148 if(
"HOH" != atoms_[i].res || atoms_[i].sasa == 0 ) {
149 newatoms.push_back( atoms_[i] );
154 if( !removed )
break;