17 #include <basic/MetricValue.hh>
23 #include <basic/Tracer.hh>
24 #include <utility/exit.hh>
25 #include <utility/string_util.hh>
27 #include <ObjexxFCL/format.hh>
33 #include <utility/vector1.hh>
40 namespace pose_metric_calculators {
42 SurfaceCalculator::SurfaceCalculator(
bool remove_nonprotein_res )
43 : total_surface_energy_(0.0), remove_nonprotein_res_(remove_nonprotein_res )
51 if ( key ==
"total_surface" ) {
55 }
else if ( key ==
"residue_surface" ) {
56 basic::check_cast( valptr, &
residue_surface_energy_,
"residue_surface expects to return a utility::vector1< Real >" );
60 basic::Error() <<
"This Calculator cannot compute metric " << key << std::endl;
70 if ( key ==
"total_surface" ) {
71 std::ostringstream ss;
76 }
else if ( key ==
"residue_surface" ) {
77 std::ostringstream ss;
87 ss <<
"] (UNWEIGHTED)";
92 basic::Error() <<
"This Calculator cannot compute metric " << key << std::endl;
106 bool has_nonprot_res(
false);
109 has_nonprot_res =
true;
113 if ( has_nonprot_res ) {
116 pureprotpose->update_residue_neighbors();