Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
trie_vs_trie.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file core/scoring/trie/trie_vs_trie.cc
11 /// @brief
12 /// @author Andrew Leaver-Fay (aleaverfay@gmail.com)
13 
14 // Unit Headers
16 
17 // Project Headers
18 #include <core/types.hh>
19 
20 namespace core {
21 namespace scoring {
22 namespace trie {
23 
24 void
26  utility::vector1< Size > const & total_rotamers_2_unique_rotamers_1,
27  utility::vector1< Size > const & total_rotamers_2_unique_rotamers_2,
28  ObjexxFCL::FArray2D< core::PackerEnergy > & pair_energy_table,
29  ObjexxFCL::FArray2A< core::PackerEnergy > const & rot_rot_table
30 )
31 {
32  using namespace ObjexxFCL;
33 
34  Size const nrots1 = total_rotamers_2_unique_rotamers_1.size();
35  Size const nrots2 = total_rotamers_2_unique_rotamers_2.size();
36 
37  FArray2A< core::PackerEnergy > etable_proxy( pair_energy_table, nrots2, nrots1 );
38  for ( Size ii = 1; ii <= nrots1; ++ii ) {
39  Size const ii_inorder = total_rotamers_2_unique_rotamers_1[ ii ];
40  for ( Size jj = 1; jj <= nrots2; ++jj ) {
41  Size const jj_inorder = total_rotamers_2_unique_rotamers_2[ jj ];
42  etable_proxy( jj, ii ) = rot_rot_table( jj_inorder, ii_inorder );
43  //std::cout << "Writing inorder cell (" << jj_inorder << ", " << ii_inorder << ") to orig_order cell (";
44  //std::cout << jj << ", " << ii << ") with value: " << rot_rot_table( jj_inorder, ii_inorder ) << std::endl;
45  }
46  }
47  //std::cout << "finished converting inorder table" << std::endl;
48 }
49 
50 
51 } // namespace trie
52 } // namespace scoring
53 } // namespace core
54