51 #include <basic/Tracer.hh>
57 #include <numeric/random/random.hh>
61 #include <basic/options/option.hh>
62 #include <basic/options/keys/packing.OptionKeys.gen.hh>
65 #include <utility/vector1.hh>
76 scoring::ScoreFunction
const & sfxn,
77 scoring::MinimizationGraph
const & mingraph
80 static basic::Tracer
TR(
"core.pack.min_pack",basic::t_info );
81 static numeric::random::RandomGenerator
RG(22307);
103 if ( task->being_packed( ii )) {
104 scminmap->activate_residue_dofs( ii );
106 scminmap->set_natoms_for_residue( ii, pose.
residue( ii ).
natoms() );
128 eiter != eiter_end; ++eiter ) {
130 mingraph->add_edge( (*eiter)->get_first_node_ind(), (*eiter)->get_second_node_ind() );
141 if ( task.
being_packed( ii ) || mingraph->get_node( ii )->num_edges() != 0 ) {
143 * mingraph->get_minimization_node( ii ), pose.
residue( ii ),
144 sc_min_map, pose,
false, dummy );
148 eiter = mingraph->edge_list_begin(), eiter_end = mingraph->edge_list_end();
149 eiter != eiter_end; ++eiter ) {
150 Size const node1 = (*eiter)->get_first_node_ind();
151 Size const node2 = (*eiter)->get_second_node_ind();
157 minedge, sc_min_map, pose,
true,
false,
167 iter != iter_end; ++iter ) {
169 if ( (*iter)->minimize_in_whole_structure_context( pose ) )
continue;
172 if ( !lrec || lrec->empty() )
continue;
176 rni = lrec->const_neighbor_iterator_begin( ii ),
177 rniend = lrec->const_neighbor_iterator_end( ii );
178 (*rni) != (*rniend); ++(*rni) ) {
179 Size const r1 = rni->lower_neighbor_id();
180 Size const r2 = rni->upper_neighbor_id();
181 Size const jj = ( r1 == ii ? r2 : r1 );
182 bool const res_moving_wrt_eachother(
true );
189 lower_res, upper_res, *iter, *mingraph, sc_min_map, pose,
190 res_moving_wrt_eachother,
false, rni, dummy );
229 using namespace basic::options;
230 using namespace basic::options::OptionKeys::packing;
232 if ( option[ minpack_temp_schedule ].user() ) {
233 return option[ minpack_temp_schedule ]();
257 using namespace basic::options;
258 using namespace basic::options::OptionKeys::packing;
260 if ( option[ minpack_temp_schedule ].user() ) {
261 return option[ minpack_temp_schedule ]();
267 temps.push_back( 20 );
268 temps.push_back( 10 );
269 temps.push_back( 3 );
270 temps.push_back( 1 );
271 temps.push_back( .6 );
272 temps.push_back( .4 );
273 temps.push_back( .3 );
274 temps.push_back( .2 );
275 temps.push_back( .15 );
276 temps.push_back( .1 );
277 temps.push_back( .075 );
278 temps.push_back( .05 );
279 temps.push_back( .03 );
280 temps.push_back( .02 );
281 temps.push_back( .01 );
312 #ifdef APL_FULL_DEBUG
320 #ifdef APL_FULL_DEBUG
323 for (
Size ii = 1; ii <= debug_pose.total_residue(); ++ii ) {
324 if ( bgres[ ii ]->natoms() != debug_pose.residue( ii ).natoms() ) {
325 std::cout <<
"Residue " << ii <<
" natoms discrepancy" << std::endl;
327 for (
Size jj = 1; jj <= debug_pose.residue( ii ).natoms(); ++jj ) {
328 if ( bgres[ ii ]->
xyz( jj ).distance_squared( debug_pose.residue(ii).xyz(jj) ) > 1e-6 ) {
329 std::cout <<
"Coordinate discrepancy between debug pose and background residue " << ii <<
" at atom " << jj << std::endl;
333 for (
Size ii = 1; ii <= debug_pose.residue( resid ).natoms(); ++ii ) {
334 if ( curr_state.
momento_for_moltenres( moltenres_id ).
coord( ii ).distance_squared( debug_pose.residue( resid ).xyz( ii ) ) > 1e-6 ) {
335 std::cout <<
" Momento and debug pose coordinate discrepancy " << resid <<
" " << moltenres_id <<
" " << ii << std::endl;
338 std::cout <<
" get_residue_current_energy: " << resid << std::endl;
346 Size const restype_index_for_curr_rotamer = rotsets.
rotamer_set_for_residue( resid )->get_residue_type_index_for_rotamer( curr_rot );
350 #ifdef APL_FULL_DEBUG
353 std::cout <<
" RATC and momento coordinate discrepancy before func eval " << ii << std::endl;
358 Real dbpose_chi_ii = debug_pose.residue( resid ).chi()[ ii ] <= -180 ? debug_pose.residue( resid ).chi()[ ii ] + 360 : debug_pose.residue( resid ).chi()[ ii ];
359 if ( std::abs( ratc_chi_ii - dbpose_chi_ii ) > 1e-6 && std::abs( std::abs( ratc_chi_ii - dbpose_chi_ii) - 360 ) > 1e-3 ) {
360 std::cout <<
" Chi discrepancy between momento-restored ratc and debug pose " << ratc_chi_ii <<
" vs " << dbpose_chi_ii <<
" " << resid <<
" " << debug_pose.residue( resid ).name() <<
" chi: " << ii << std::endl;
368 scminmap.
set_natoms_for_residue( resid, atc->residue_atomtree_collection( resid ).active_restype().natoms() );
369 scminmap.
setup( atc );
381 Real funcval = (*scmin_func)( chi );
383 #ifdef APL_FULL_DEBUG
387 std::cout <<
" RATC and momento coordinate discrepancy! " << ii << std::endl;
392 std::cout <<
" measured chi " << std::endl;
394 for (
Size ii = 1; ii <= chi.size(); ++ii ) {
395 std::cout <<
" ratc desired: " << chi[ ii ] <<
" actual: " << numeric::dihedral_degrees( r.xyz( r.chi_atoms(ii)[ 1 ]), r.xyz( r.chi_atoms(ii)[2]), r.xyz( r.chi_atoms(ii)[3]), r.xyz( r.chi_atoms(ii)[4] ) ) << std::endl;
403 for (
Size ii = 1; ii <= chi.size(); ++ii ) {
405 std::cout <<
"chi discrepancy " << ratc.
active_residue().
chi()[ ii ] <<
" vs " << chi[ ii ] << std::endl;
408 for (
Size ii = 1; ii <= debug_pose.residue( resid ).natoms(); ++ii ) {
409 if ( ratc.
active_residue().
xyz( ii ).distance_squared( debug_pose.residue( resid ).xyz( ii ) ) > 1e-6 ) {
410 std::cout <<
"Coordinate discrepancy between debug pose and RATC for residue " << resid <<
" at atom " << ii << std::endl;
413 for (
Size ii = 1; ii <= debug_pose.total_residue(); ++ii ) {
414 if ( bgres[ ii ]->natoms() != debug_pose.residue( ii ).natoms() ) {
415 std::cout <<
"Residue " << ii <<
" natoms discrepancy" << std::endl;
417 for (
Size jj = 1; jj <= debug_pose.residue( ii ).natoms(); ++jj ) {
418 if ( bgres[ ii ]->
xyz( jj ).distance_squared( debug_pose.residue(ii).xyz(jj) ) > 1e-6 ) {
419 std::cout <<
"Coordinate discrepancy between debug pose and background residue " << ii <<
" at atom " << jj << std::endl;
449 Size const restype_index_for_curr_rotamer = rotsets.
rotamer_set_for_residue( iiresid )->get_residue_type_index_for_rotamer( curr_rot );
459 scminmap.
set_natoms_for_residue( iiresid, atc->residue_atomtree_collection( iiresid ).active_restype().natoms() );
461 scminmap.
setup( atc );
483 return (*scmin_func)( allchi );
499 Size rotamer_state_on_moltenres
500 #ifdef APL_FULL_DEBUG
516 Real start_energy_for_residue( 0.0 );
519 pose, bgres, sfxn, mingraph, scminmap,
520 curr_state, atc, rotsets, resid, moltenres_id
521 #ifdef APL_FULL_DEBUG
529 Size const restype_index_for_rotamer = rotsets.
rotamer_set_for_residue( resid )->get_residue_type_index_for_rotamer( rotamer_state_on_moltenres );
535 scminmap.
set_natoms_for_residue( resid, atc->residue_atomtree_collection( resid ).active_restype().natoms() );
541 scminmap.
setup( atc );
555 minimizer.
run( chi );
559 Real final_energy_for_residue = (*scmin_func)( chi );
563 return final_energy_for_residue - start_energy_for_residue;
580 Real lnprob = deltaE / temperature;
581 if ( lnprob < 10.0 ) {
582 Real probability = std::exp(-lnprob);
583 if ( probability > rg_uniform )
return true;
592 using namespace basic::options;
593 using namespace basic::options::OptionKeys::packing;
596 if ( option[ minpack_inner_iteration_scale ].user() ) {
597 scale = option[ minpack_inner_iteration_scale ]();
598 if ( scale < 0 ) scale = 0;
601 return scale * nrotamers;
613 using namespace pose;
614 using namespace scoring;
615 using namespace graph;
617 bool discrepancy(
false );
618 static int n_discreps( 0 );
625 if ( sfxn.
weights()[ kkst ] != 0.0 ) {
626 if ( std::abs( one_body_emap[ kkst ] - min_node_1b[ kkst ] ) > 1e-10 ) {
627 std::cout <<
" one body discrepancy " << kkst <<
": " << one_body_emap[ kkst ] <<
" " << min_node_1b[ kkst ] << std::endl;
635 iter != iter_end; ++iter ) {
636 Size ii( (*iter)->get_first_node_ind() );
637 Size jj( (*iter)->get_second_node_ind() );
638 if ( ii != resid && jj != resid )
continue;
644 std::cout <<
"Minimization edge " << ii <<
" " << jj <<
" missing from minimization graph" << std::endl;
646 std::cout << std::endl;
653 bool etab_discrepancy(
false );
658 if ( sfxn.weights()[ kkst ] != 0.0 ) {
659 if ( std::abs( emap[ kkst ] - emap2[ kkst ] ) > 1e-10 ) {
660 std::cout <<
" " << ii <<
" " << jj <<
" " << kkst <<
" discrepancy: " << emap[ kkst ] <<
" " << emap2[ kkst ] << std::endl;
665 etab_discrepancy =
true;
670 if ( etab_discrepancy ) {
671 std::cout <<
"etable discrepancy" << std::endl;
683 pose.
dump_pdb(
"discrepancy_pose_" + utility::to_string( n_discreps ) +
".pdb" );
700 #ifdef APL_FULL_DEBUG
708 for (
Size ii = 1; ii <= rotsets->nmoltenres(); ++ii ) {
709 Size const ii_resid = rotsets->moltenres_2_resid( ii );
710 Size const ii_rotamer_on_moltenres =
static_cast< Size > ( rotsets->nrotamers_for_moltenres( ii ) *
RG.uniform() + 1 );
715 pose, bgres, sfxn, *mingraph, *scminmap, min_options, curr_state,
716 atc, *rotsets, ii_resid, ii, ii_rotamer_on_moltenres
717 #ifdef APL_FULL_DEBUG
721 atc->moltenres_atomtree_collection( ii ).save_momento( curr_state.
state_momento( ii ) );
723 bgres[ ii_resid ] = atc->moltenres_atomtree_collection( ii ).active_residue_cop();
725 #ifdef APL_FULL_DEBUG
726 debug_pose.replace_residue( ii_resid, atc->moltenres_atomtree_collection( ii ).active_residue(), false );
732 #ifdef APL_FULL_DEBUG
733 Real debug_pose_start_score( sfxn( debug_pose ) );
734 if ( std::abs( debug_pose_start_score - totalE ) > 1e-3 ) {
735 std::cout <<
"Initial energy assignment disagrees with actual initial energy " << totalE <<
" " << debug_pose_start_score << std::endl;
736 debug_pose.energies().total_energies().show_weighted( std::cout, sfxn.
weights() );
737 std::cout << std::endl;
738 for (
Size kk = 1; kk <= debug_pose.total_residue(); ++kk ) {
745 best_state = curr_state;
758 using namespace interaction_graph;
759 using namespace rotamer_set;
760 using namespace basic::options;
761 using namespace basic::options::OptionKeys::packing;
764 Real start_score( sfxn( pose ) );
779 sfxn.
setup_for_packing( pose, task->repacking_residues(), task->designing_residues() );
780 if ( option[ minpack_disable_bumpcheck ] ) task->set_bump_check(
false );
783 rotsets->set_task( task );
784 rotsets->build_rotamers( pose, sfxn, packer_neighbor_graph );
785 rotsets->prepare_sets_for_packing( pose, sfxn );
789 scminmap->set_nonideal(nonideal);
800 minimizer =
"lbfgs_armijo";
808 #ifdef APL_FULL_DEBUG
817 scminmap, min_options, curr_state, best_state, atc, rotsets
818 #ifdef APL_FULL_DEBUG
826 for (
Size ii = 1; ii <= temps.size(); ++ii ) {
827 Real ii_temperature = temps[ ii ];
829 for (
Size jj = 1, jj_end =
n_inner_iterations( ii_temperature, rotsets->nrotamers() ); jj <= jj_end; ++jj ) {
830 Size const jj_ranrotamer =
static_cast< Size > ( rotsets->nrotamers() *
RG.uniform() + 1 );
831 Size const jj_moltenres_id = rotsets->moltenres_for_rotamer( jj_ranrotamer );
832 Size const jj_resid = rotsets->moltenres_2_resid( jj_moltenres_id );
833 Size const jj_rotamer_state_on_moltenres = rotsets->rotid_on_moltenresidue( jj_ranrotamer );
835 #ifdef APL_FULL_DEBUG
837 if ( bgres[ jj_resid ] ) {
840 if ( ! curr_state.any_unassigned() ) {
841 for (
Size kk = 1; kk <= rotsets->nmoltenres(); ++kk ) {
842 Size kkresid = rotsets->moltenres_2_resid( kk );
843 for (
Size ll = 1; ll <= bgres[ kkresid ]->natoms(); ++ll ) {
845 std::cout <<
" DEBUG error: debug pose and bgres disagree: " << kkresid <<
" " << bgres[ kkresid ]->atom_name( ll ) << std::endl;
854 pose, bgres, sfxn, *mingraph, *scminmap, min_options, curr_state,
855 atc, *rotsets, jj_resid, jj_moltenres_id, jj_rotamer_state_on_moltenres
856 #ifdef APL_FULL_DEBUG
861 #ifdef APL_FULL_DEBUG
863 Real debug_before = sfxn( debug_pose );
865 debug_pose.
replace_residue( jj_resid, atc->moltenres_atomtree_collection( jj_moltenres_id ).active_residue(), false );
866 Real debug_after = sfxn( debug_pose );
868 Real real_deltaE = debug_after - debug_before;
869 if ( !curr_state.any_unassigned() && std::abs( real_deltaE - deltaE ) > 1e-3 ) {
870 std::cout <<
"DeltaE mismatch: " << real_deltaE <<
" vs " << deltaE << std::endl;
875 std::cout <<
"Difference in energies: before vs after " << std::endl;
877 std::cout << std::endl;
879 }
else if ( !curr_state.any_unassigned() ) {
885 if ( curr_state.any_unassigned() ||
pass_metropolis( ii_temperature, deltaE ) ) {
888 if ( curr_state.any_unassigned() ) {
889 if ( curr_state.orig_rotamer_id_for_moltenres( jj_moltenres_id ) == 0 && curr_state.n_unassigned() == 1 ) {
891 atc->moltenres_atomtree_collection( jj_moltenres_id ).save_momento( curr_state.state_momento( jj_moltenres_id ) );
892 curr_state.assign_state( jj_moltenres_id, jj_rotamer_state_on_moltenres );
893 bgres[ jj_resid ] = atc->moltenres_atomtree_collection( jj_moltenres_id ).active_residue_cop();
895 std::cout <<
"Initial assignment total energy: " << totalE << std::endl;
896 #ifdef APL_FULL_DEBUG
897 if ( std::abs( debug_after - totalE ) > 1e-3 ) {
898 std::cout <<
"Initial energy assignment disagrees with actual initial energy" << std::endl;
905 curr_state.assign_energy( totalE );
906 best_state = curr_state;
908 atc->moltenres_atomtree_collection( jj_moltenres_id ).save_momento( curr_state.state_momento( jj_moltenres_id ) );
909 curr_state.assign_state( jj_moltenres_id, jj_rotamer_state_on_moltenres );
910 bgres[ jj_resid ] = atc->moltenres_atomtree_collection( jj_moltenres_id ).active_residue_cop();
913 Real alt_totalE = curr_state.energy() + deltaE;
914 curr_state.assign_energy( alt_totalE );
916 #ifdef APL_FULL_DEBUG
917 if ( std::abs( alt_totalE - debug_after ) > 1e-3 ) {
918 std::cout <<
"total energy mismatch: " << debug_after <<
" " << alt_totalE << std::endl;
922 atc->moltenres_atomtree_collection( jj_moltenres_id ).save_momento( curr_state.state_momento( jj_moltenres_id ) );
923 curr_state.assign_state( jj_moltenres_id, jj_rotamer_state_on_moltenres );
924 bgres[ jj_resid ] = atc->moltenres_atomtree_collection( jj_moltenres_id ).active_residue_cop();
925 if ( curr_state.energy() < best_state.energy() ) {
927 #ifdef APL_FULL_DEBUG
928 if ( std::abs( totalE - curr_state.energy() ) > 1e-6 ) {
929 std::cout <<
"totalE and curr_state energy mismatch " << totalE <<
" " << curr_state.energy() << std::endl;
932 curr_state.assign_energy( totalE );
933 if ( totalE < best_state.energy() ) {
934 best_state = curr_state;
943 atc->moltenres_atomtree_collection( jj_moltenres_id ).
944 update_from_momento( curr_state.momento_for_moltenres( jj_moltenres_id ) );
945 bgres[ jj_resid ] = atc->moltenres_atomtree_collection( jj_moltenres_id ).active_residue_cop();
946 #ifdef APL_FULL_DEBUG
949 if ( before_sub_rotamer && before_sub_rotamer->natoms() == bgres[ jj_resid ]->natoms() ) {
950 for (
Size kk = 1; kk <= before_sub_rotamer->natoms(); ++kk ) {
951 if ( before_sub_rotamer->xyz( kk ).distance_squared( bgres[ jj_resid ]->
xyz( kk ) ) > 1e-5 ) {
952 std::cout <<
"Failed to properly restore the previous state after rejecting substitution at residue " << jj_resid <<
" atom " << kk << std::endl;
956 std::cout <<
"NATOMS discrepancy in before-sub rotamer with bgrotamer" << std::endl;
966 for (
Size ii = 1; ii <= rotsets->nmoltenres(); ++ii ) {
967 Size iiresid = rotsets->moltenres_2_resid( ii );
968 atc->moltenres_atomtree_collection( ii ).update_from_momento( best_state.momento_for_moltenres( ii ) );
969 pose.
replace_residue( iiresid, atc->moltenres_atomtree_collection( ii ).active_residue(), false );
972 Real final_score( sfxn( pose ) );
973 TR <<
"min pack final score: " << final_score <<
" start_score: " << start_score << std::endl;
984 using namespace pose;
985 using namespace scoring;
986 using namespace graph;
987 using namespace interaction_graph;
989 bool discrepancy(
false );
990 static int n_discreps( 0 );
996 if ( std::abs( onebody_energy - sig_onebody_energy ) > 1e-5 ) {
997 std::cout <<
" onebody energy discrepancy: " << onebody_energy <<
" " << sig_onebody_energy <<
" " << onebody_energy - sig_onebody_energy << std::endl;
1012 iter != iter_end; ++iter ) {
1013 Size ii( (*iter)->get_first_node_ind() );
1014 Size jj( (*iter)->get_second_node_ind() );
1015 if ( ii != resid && jj != resid )
continue;
1016 SimpleEdge
const * simple_edge =
static_cast< SimpleEdge
const *
> ( ig.
find_edge( ii, jj ) );
1020 if ( ! simple_edge ) {
1021 std::cout <<
"Simple edge " << ii <<
" " << jj <<
" missing from simple interaction graph" << std::endl;
1023 std::cout << std::endl;
1030 Real ig_edge_energy = simple_edge->get_proposed_energy();
1031 if ( std::abs( edge_energy - ig_edge_energy ) > 1e-5 ) {
1032 std::cout <<
" twobody energy discrepancy: " << ii <<
" " << jj <<
" " << edge_energy <<
" " << ig_edge_energy <<
" " << edge_energy - ig_edge_energy << std::endl;
1037 if ( discrepancy ) {
1039 pose.
dump_pdb(
"discrepancy_pose_" + utility::to_string( n_discreps ) +
".pdb" );
1049 Size ranrot_on_moltenres
1062 Real rand_btw_0_and_1 =
RG.uniform();
1067 for (
Size ii = 1; ii <= rotdata.
nchi(); ++ii ) {
1069 Real const iichi_randval =
RG.uniform();
1071 resatc.
set_chi( ii, rotdata.
chi_mean()[ii] - iisd + 2 * iisd * iichi_randval );
1075 for (
Size ii = 1; ii <= ran_restype->n_proton_chi(); ++ii ) {
1076 Size ii_chi = ran_restype->proton_chi_2_chi( ii );
1081 Real iichi_sdev = ii_chi_extra_samples[ ii_chi_extra_samples.size() ];
1083 Real rand_btw_0_and_1 =
RG.uniform();
1084 Size sample =
static_cast< Size > ( ii_chi_samples.size() * rand_btw_0_and_1 ) + 1;
1085 Real sample_dev =
RG.uniform();
1086 resatc.
set_chi( ii_chi, ii_chi_samples[ sample ] - iichi_sdev + 2 * sample_dev * iichi_sdev );
1089 return ran_rotblock_for_ranrot;
1117 #ifdef APL_FULL_DEBUG
1124 Real start_score( sfxn( pose ) );
1126 sfxn.
setup_for_packing( pose, task->repacking_residues(), task->designing_residues() );
1149 for (
Size ii = 1; ii <= temps.size(); ++ii ) {
1150 Real ii_temperature = temps[ ii ];
1153 Real accum_deltaE( 0 );
1155 for (
Size jj = 1; jj <= jj_end; ++jj ) {
1157 Size const random_sample_rot =
static_cast< Size > ( n_sample_rots *
RG.uniform() + 1 );
1164 atc->moltenres_atomtree_collection( ran_moltres),
1165 ranrot_on_moltenres );
1167 Real const neg_deltaE = ig.
consider_substitution( ran_res, atc->moltenres_atomtree_collection( ran_moltres ).active_residue_cop() );
1168 Real const deltaE = -1 * neg_deltaE;
1170 #ifdef APL_FULL_DEBUG
1171 Real curE = sfxn( debug_pose );
1172 debug_pose.
replace_residue( ran_res, atc->moltenres_atomtree_collection( ran_moltres ).active_residue(), false );
1173 Real altE = sfxn( debug_pose );
1174 Real actual_deltaE = altE - curE;
1175 if ( ! curr_state.any_unassigned() && std::abs( actual_deltaE - deltaE ) > 1e-5 ) {
1176 std::cout <<
"DeltaE discrepancy replacing residue " << ran_res <<
" "
1177 << actual_deltaE <<
" " << deltaE <<
" " << actual_deltaE - deltaE << std::endl;
1183 if ( curr_state.any_unassigned() ||
pass_metropolis( ii_temperature, deltaE ) ) {
1186 accum_deltaE += deltaE;
1190 bool const any_previously_unassigned = curr_state.any_unassigned();
1191 bool const last_unassigned_assigned = any_previously_unassigned &&
1192 curr_state.orig_rotamer_id_for_moltenres( ran_moltres ) == 0 &&
1193 curr_state.n_unassigned() == 1;
1196 atc->moltenres_atomtree_collection( ran_moltres ).save_momento( curr_state.state_momento( ran_moltres ) );
1197 curr_state.assign_state( ran_moltres, ranrot_baserot_id );
1199 if ( any_previously_unassigned ) {
1200 if ( last_unassigned_assigned ) {
1203 curr_state.assign_energy( totalE );
1204 best_state = curr_state;
1207 Real alt_totalE = curr_state.energy() + deltaE;
1208 curr_state.assign_energy( alt_totalE );
1210 if ( curr_state.energy() < best_state.energy() ) {
1212 assert( std::abs( totalE - curr_state.energy() ) < 1e-5 );
1213 curr_state.assign_energy( totalE );
1214 if ( totalE < best_state.energy() ) {
1215 best_state = curr_state;
1227 atc->moltenres_atomtree_collection( ran_moltres ).update_from_momento( curr_state.momento_for_moltenres( ran_moltres ) );
1229 #ifdef APL_FULL_DEBUG
1230 debug_pose.
replace_residue( ran_res, atc->moltenres_atomtree_collection( ran_moltres ).active_residue(), false );
1234 std::cout <<
"Finished temperature " << ii_temperature <<
" with energy " << curr_state.energy() <<
" and best energy " << best_state.energy()
1235 <<
" accept rate: " << ((double) naccepts )/ jj_end <<
" avg deltaE: " << accum_deltaE / ( naccepts == 0 ? 1 : naccepts ) << std::endl;
1242 atc->moltenres_atomtree_collection( ii ).update_from_momento( best_state.momento_for_moltenres( ii ) );
1243 pose.
replace_residue( iiresid, atc->moltenres_atomtree_collection( ii ).active_residue(), false );
1246 Real final_score( sfxn( pose ) );
1247 TR <<
"stochastic pack final score: " << final_score <<
" start_score: " << start_score << std::endl;