Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DisulfideMatchingDatabase.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 sw=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/disulfides/CentroidDisulfideDatabase.cc
11 /// @brief Centroid Disulfide Energy Databases
12 /// @author rvernon@u.washington.edu
13 /// @date 02/09/10
14 
15 // Unit Headers
17 
18 // Project Headers
19 // AUTO-REMOVED #include <core/conformation/Conformation.hh>
21 // AUTO-REMOVED #include <core/chemical/ResidueTypeSet.hh>
22 // AUTO-REMOVED #include <core/chemical/ChemicalManager.hh>
23 #include <basic/database/open.hh>
24 // AUTO-REMOVED #include <core/scoring/constraints/util.hh>
26 #include <core/kinematics/RT.hh>
27 
28 // Utility Headers
29 #include <utility/io/izstream.hh>
30 #include <utility/vector1.hh>
31 
32 
33 #include <basic/Tracer.hh>
34 
35 #include <core/kinematics/Jump.hh>
36 
37 static basic::Tracer TR("core.scoring.disulfides.CentroidMatchingDatabase");
38 
39 
40 using namespace core;
43 using std::string;
44 using utility::vector1;
45 
46 namespace core {
47 namespace scoring {
48 namespace disulfides {
49 
50 /**
51  * Constructor
52  */
54 {
55  db_init_ = false;
56 }
57 
58 /**
59  * Deconstructor
60  */
62 
63 void
65 
66  utility::io::izstream disulfide_database;
67 
68  basic::database::open(disulfide_database, "sampling/disulfide_jump_database_wip.dat");
69 
70  std::string line;
71 
73 
74  getline(disulfide_database, line);
75  while ( !disulfide_database.eof() ) {
76  std::istringstream line_stream(line);
77  std::string junk;
79 
80  line_stream >> junk >> junk >> junk >> junk >> junk >> junk >> junk >> junk >> junk >> rt;
81 
82  disulfides.push_back(rt);
83 
84  //std::cout << "RT " << rt << std::endl;
85 
86  getline(disulfide_database, line);
87  }
88 
89  //std::cout << "READ DIS DB " << disulfides.size() << std::endl;
90 
91  db_disulfides_ = disulfides;
92 }
93 
96 
97  if (db_init_ == false) {
98  //std::cout << "READING DB " << std::endl;
100 
101  if (db_disulfides_.size() == 0) {
102  utility_exit_with_message("Failure to Read Disulfide Database");
103  }
104 
105  db_init_ = true;
106  }
107 
108  return db_disulfides_;
109 }
110 
111 } // disulfides
112 } // scoring
113 } // core