Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RotamerSampleOptions.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 // :noTabs=false:tabSize=4:indentSize=4:
4 //
5 // (c) Copyright Rosetta Commons Member Institutions.
6 // (c) This file is part of the Rosetta software suite and is made available under license.
7 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
8 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
9 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
10 
11 /// @file core/pack/task/RotamerSampleOptions.cc
12 /// @brief
13 /// @author Andrew Leaver-Fay (leaverfa@email.unc.edu)
14 
15 #include <string>
16 
18 #include <core/types.hh>
19 
20 #include <utility/exit.hh>
21 // AUTO-REMOVED #include <utility/vector0.hh>
22 // AUTO-REMOVED #include <utility/string_util.hh>
23 
24 #include <utility/vector0_bool.hh>
25 
26 
27 namespace core {
28 namespace pack {
29 namespace task {
30 
33 {
34  utility::vector0< std::string > rotsample_names;
35  rotsample_names.reserve( ExtraRotSampleCardinality );
36  rotsample_names.push_back( "NO_EXTRA_CHI_SAMPLES" );
37  rotsample_names.push_back( "EX_ONE_STDDEV" );
38  rotsample_names.push_back( "EX_ONE_HALF_STEP_STDDEV" );
39  rotsample_names.push_back( "EX_TWO_FULL_STEP_STDDEVS" );
40  rotsample_names.push_back( "EX_TWO_HALF_STEP_STDDEVS" );
41  rotsample_names.push_back( "EX_FOUR_HALF_STEP_STDDEVS" );
42  rotsample_names.push_back( "EX_THREE_THIRD_STEP_STDDEVS" );
43  rotsample_names.push_back( "EX_SIX_QUARTER_STEP_STDDEVS" );
44 
45  for ( Size ii = 0; ii < ExtraRotSampleCardinality; ++ii ) {
46  if ( name == rotsample_names[ ii ] ) {
47  return ExtraRotSample( ii );
48  }
49  }
50 
51  utility_exit_with_message( "ERROR: Could not find ExtraRotSample ID for string '" + name + "'" );
52  return NO_EXTRA_CHI_SAMPLES;
53 }
54 
55 
56 bool
58 {
59  utility::vector0< std::string > rotsample_names;
60  rotsample_names.reserve( ExtraRotSampleCardinality );
61  rotsample_names.push_back( "NO_EXTRA_CHI_SAMPLES" );
62  rotsample_names.push_back( "EX_ONE_STDDEV" );
63  rotsample_names.push_back( "EX_ONE_HALF_STEP_STDDEV" );
64  rotsample_names.push_back( "EX_TWO_FULL_STEP_STDDEVS" );
65  rotsample_names.push_back( "EX_TWO_HALF_STEP_STDDEVS" );
66  rotsample_names.push_back( "EX_FOUR_HALF_STEP_STDDEVS" );
67  rotsample_names.push_back( "EX_THREE_THIRD_STEP_STDDEVS" );
68  rotsample_names.push_back( "EX_SIX_QUARTER_STEP_STDDEVS" );
69 
70  for ( Size ii = 0; ii < ExtraRotSampleCardinality; ++ii ) {
71  if ( name == rotsample_names[ ii ] ) {
72  return true;
73  }
74  }
75  return false;
76 }
77 
78 
79 } // namespace task
80 } // namespace pack
81 } // namespace core
82