20 #include <utility/vector1.hh>
25 namespace interaction_graph {
57 curr_state_one_body_energy_( 0.0f ),
58 curr_state_total_energy_( 0.0f ),
59 alternate_state_( 0 ),
60 alternate_state_one_body_energy_( 0 ),
61 alternate_state_total_energy_( 0 ),
62 alternate_state_is_being_considered_( false ),
63 procrastinated_( false )
149 std::cout <<
"curr_state_sparse_mat_info_ ";
153 std::cout <<
"Curr Two Body Energies:";
157 std::cout << std::endl;
161 std::cout <<
"Alt Two Body Energies:";
165 std::cout << std::endl <<
"-----------------" << std::endl;
209 total_memory +=
edge_matrix_ptrs_.size() *
sizeof( FArray1A< core::PackerEnergy > );
291 if (new_state == 0) {
340 if (new_state == 0 ) {
388 get_energy_following_partial_state_assignment();
432 std::copy( alt_position1,
488 int edge_making_energy_request
492 edge_making_energy_request,
521 int edge_to_altered_neighbor,
522 int other_node_new_state,
530 other_node_new_state_sparse_info;
559 std::cout <<
"curr_state_sparse_mat_info_ ";
562 std::cout <<
"curr_state_one_body_energy_ ";
568 std::cout << std::endl;
644 int count_neighbs_with_higher_indices = 0;
656 FArray2D_int
const & edge_aa_neighb_offsets =
662 ++count_neighbs_with_higher_indices;
668 jj, count_neighbs_with_higher_indices) =
669 neighb_num_states_per_aa[ jj ];
728 get_lazy_node(0)->get_num_states_for_aa_types(),
729 get_lazy_node(1)->get_num_states_for_aa_types()
731 curr_state_energy_( 0.0f ),
732 partial_state_assignment_( false ),
733 ran_annealing_since_pair_energy_table_cleared_( false )
785 FArray2_bool
const & aa_neighbors
828 int const node1state,
840 node1state, node2state );
1026 int node_not_substituted = ! node_substituted;
1028 int nodes_curr_states[2];
1031 nodes_curr_states[ node_substituted ] = new_state;
1032 nodes_curr_states_sparse_info[ node_substituted ] = new_state_sparse_info;
1034 nodes_curr_states[ node_not_substituted ] =
1036 nodes_curr_states_sparse_info[ node_not_substituted ] =
1038 get_sparse_mat_info_for_curr_state();
1047 new_state_sparse_info
1078 int node_not_substituted = ! node_substituted;
1122 int node_not_substituted = ! node_substituted;
1129 new_state_sparse_info
1160 int nodes_curr_states[2];
1163 for (
int ii = 0; ii < 2; ++ii) {
1164 nodes_curr_states[ ii ] =
1166 nodes_curr_states_sparse_info[ ii ] =
1251 FArray2D_int
const &
1307 int nodes_states[ 2 ],
1311 bool one_node_in_zero_state = ( nodes_states[0] == 0 || nodes_states[1] == 0 );
1313 if ( one_node_in_zero_state ) {
1317 sparse_matrix_indices_[0],
1318 sparse_matrix_indices_[1]);
1321 compute_pair_energy_for_current_state(
1324 sparse_matrix_indices_[0],
1325 sparse_matrix_indices_[1],
1331 ObjexxFCL::FArray2D< core::PackerEnergy >
1341 for (
Size ii = 1; ii <= submat.size2(); ++ii ) {
1342 for (
Size jj = 1; jj <= submat.size1(); ++jj ) {
1344 int const ii_state = ii + iioffset;
1345 int const jj_state = jj + jjoffset;
1348 ii_state, jj_state );
1350 get_otf_node(0)->get_sparse_mat_info_for_state( ii_state ),
1351 get_otf_node(1)->get_sparse_mat_info_for_state( jj_state ),
1353 submat(jj,ii) = iijjenergy;
1367 int other_node = node == 0 ? 1 : 0;
1372 int const other_node_num_states =
1375 for (
int ii = 1; ii <= other_node_num_states; ++ii) {
1574 project_deltaE_for_substitution( new_state, prev_energy_for_node );
1675 sum += ((
LazyEdge*) *iter)->get_two_body_table_size();
1704 std::cout <<
"State Assignment: " << std::endl;
1712 ((
LazyEdge*) (*iter))->print_current_energy();
1782 int first_node_ind = (*edge_iter)->get_first_node_ind();
1783 int second_node_ind = (*edge_iter)->get_second_node_ind();
1787 esum += ((
LazyEdge*) (*edge_iter))->get_current_two_body_energy();
1809 ObjexxFCL::FArray2D< core::PackerEnergy >
1853 return total_memory;
1880 return new LazyNode(
this, node_index, num_states );
1907 return new LazyEdge(
this, index1, index2 );
1938 get_one_body_energy_current_state();
1944 ((
LazyEdge*) *iter)->get_current_two_body_energy();