30 #include <basic/Tracer.hh>
31 #include <ObjexxFCL/format.hh>
32 #include <utility/string_util.hh>
33 #include <utility/tag/Tag.hh>
34 #include <utility/vector1.hh>
35 #include <utility/exit.hh>
39 static basic::Tracer
TR(
"protocols.toolbox.task_operations.SelectBySASAOperation" );
43 namespace task_operations {
51 SelectBySASAOperation::SelectBySASAOperation(
std::string mode,
std::string state,
core::Real probe_radius,
core::Real core_asa,
core::Real surface_asa,
std::string jump_nums,
std::string sym_dof_names,
bool core,
bool boundary,
bool surface,
bool verbose ):
54 probe_radius_(probe_radius),
56 surface_asa_(surface_asa),
57 jump_nums_(jump_nums),
58 sym_dof_names_(sym_dof_names),
79 layername.append(
"core");
84 layername.append(
"_boundary");
86 layername.append(
"boundary");
92 layername.append(
"_surface");
94 layername.append(
"surface");
100 utility_exit_with_message(
"The layers are not set properly. Core, boundary, and surface are all set to false. At least one layer needs to be selected.");
103 std::string selected_pos(
"select " + layername +
", resi ");
105 std::string boundary_pos(
"select boundary, resi ");
110 if(
state_ ==
"monomer") {
123 if(
state_ ==
"monomer" ) {
132 if(
state_ ==
"unbound" ) {
133 int sym_aware_jump_id = 0;
136 for (
Size i = 1; i <= sym_dof_name_list.size(); i++) {
139 translate->step_size( 1000.0 );
140 translate->apply( sasa_pose );
144 for (
Size i = 1; i <= jump_list.size(); i++) {
147 translate->step_size( 1000.0 );
148 translate->apply( sasa_pose );
169 if ((
mode_ ==
"mc") && (j > itype)) {
173 atom_mask.
set( atom,
true );
181 if (
mode_ ==
"sc" ) {
187 sc_sasas[i] += atom_sasa[
AtomID(j,i)];
190 final_sasas = sc_sasas;
196 bool prevent_repacking;
198 prevent_repacking = 1;
200 if (!indy_resi[iaa]) {
206 TR.Debug << iaa <<
" res_count = " << res_count <<
" sasa = " << final_sasas[iaa] << std::endl;
209 selected_pos.append(ObjexxFCL::string_of(res_count) +
"+");
210 prevent_repacking = 0;
212 core_pos.append(ObjexxFCL::string_of(res_count) +
"+");
215 selected_pos.append(ObjexxFCL::string_of(res_count) +
"+");
216 prevent_repacking = 0;
218 surface_pos.append(ObjexxFCL::string_of(res_count) +
"+");
221 selected_pos.append(ObjexxFCL::string_of(res_count) +
"+");
222 prevent_repacking = 0;
224 boundary_pos.append(ObjexxFCL::string_of(res_count) +
"+");
226 if( prevent_repacking ){
233 TR << selected_pos << std::endl;
234 TR << core_pos << std::endl;
235 TR << boundary_pos << std::endl;
236 TR << surface_pos << std::endl;
250 core_ = tag->getOption<
bool >(
"core", 0 );
251 boundary_ = tag->getOption<
bool >(
"boundary", 0 );
252 surface_ = tag->getOption<
bool >(
"surface", 0 );
253 verbose_ = tag->getOption<
bool >(
"verbose", 0 );
266 core_ = def[
"core"] ? def[
"core"].to<
bool >() : 0;
267 boundary_ = def[
"boundary"] ? def[
"boundary"].to<
bool >() : 0;
268 surface_ = def[
"surface"] ? def[
"surface"].to<
bool >() : 0;
269 verbose_ = def[
"verbose"] ? def[
"verbose"].to<
bool >() : 0;