Rosetta
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
pymol_chains.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 src/basic/pymol_chains.cc
11 /// @brief method definitions for a couple PyMOL helper functions
12 /// @author Labonte
13 /// @note I am simply moving the definitions out of the header file where they used to reside.
14 
15 // Unit header
16 #include <basic/pymol_chains.hh>
17 
18 // Numeric header
19 #include <numeric/types.hh>
20 
21 // C++ header
22 #include <string>
23 
24 namespace basic {
25 
28 {
29  return pymol_chains.length();
30 }
31 
32 char
34 {
35  return pymol_chains[ ( i - 1 ) % pymol_chains.size() ];
36 }
37 
40 {
41  numeric::Size i = pymol_chains.find( c );
42  if ( i == pymol_chains.size() ) return 0;
43  return i + 1;
44 }
45 
46 } // namespace basic
char get_pymol_chain(numeric::Size i)
Definition: pymol_chains.cc:33
platform::Size Size
Definition: types.hh:42
rosetta project type declarations. Should be kept updated with core/types.hh. This exists because num...
numeric::Size get_pymol_num_unique_ids()
Definition: pymol_chains.cc:27
numeric::Size get_pymol_chain_index_1(char c)
Definition: pymol_chains.cc:39
static std::string const pymol_chains("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz!@#$&.<>?]{}|-_\\~=%")