Rosetta Utilities  2014.35
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
utility Namespace Reference

unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 1. More...

Namespaces

 excn
 
 factory
 
 file
 
 graph
 
 io
 
 json_spirit
 
 keys
 
 libsvm
 
 lua
 
 options
 
 pointer
 
 query
 
 signals
 
 sql_database
 
 tag
 
 thread
 
 tools
 

Classes

class  BitSet
 Simple bit set. More...
 
class  BitVector
 Simple bit vector. More...
 
class  Bound
 Bound value class. More...
 
struct  COP_to_Python_converter
 
class  DereferenceIterator
 const_iterator class for SilentFileData container. More...
 
class  EXCN_utility_exit
 
class  Factory
 
class  FactoryRegister
 
class  fixedsizearray1
 
class  fixedsizearray1const_iterator
 
class  fixedsizearray1iterator
 
class  FixedSizeLexicographicalIterator
 
class  heap
 
struct  history_queue_struct
 
class  in_place_list
 
class  IndirectSorter
 Sorts a container of things indirectly. More...
 
class  Inline_File_Provider
 
class  Inline_File_Provider_Hook
 
class  LexicographicalIterator
 
class  list_element
 
class  OrderedTuple
 The ordered tuple takes a container class T and defines comparison operators so that the tuple may be sorted. More...
 
class  PeriodicSplineReader
 Class: PeriodicSplineReader. More...
 
class  predicate_cmp_filename
 
class  PyExitCallback
 This class for holding callback function. More...
 
struct  RawType
 Meta-programming classes to provide the pointer type for down_cast. More...
 
struct  RawType< T & >
 
struct  RawType< T * >
 
class  recent_history_queue
 A class for keeping track of a subset of elements in a set that are pushed into a queue in a certain order, and which fall off the end of the queue in ther order in which they arrive. Elements in the set can be bumped to the front of the queue. More...
 
class  Show
 
class  SimulateMPI
 singleton class storing simulated MPI state More...
 
class  SimulateMPIData
 
class  SimulateMPIMessage
 
struct  SortFirst
 
struct  SortSecond
 
class  subset_mapping
 This class handles the bookeeping to map between a set of integer ids in the "source" enumeration to a subset of those ids – the destination enumartion. Elements in the source enumeration that do not map to elements in the destination enumeration are represented by the value 0. Both enumerations should count from 1. Once the class has been initialized, this class offers O(1) mapping between elements in the enumerations. More...
 
class  TopScoreSelector
 The TopScoreSelector keeps an in-place, sorted, singly-linked list of the N top-scoring objects and their scores that it encounters. In the case of ties, the first object(s) encountered are kept. Class T must have a default constructor, a copy constructor, and must be assignable. Class S must be assignable and comparable, both by a < operator and by a > operator. More...
 
class  vector0
 std::vector with assert-checked bounds More...
 
class  vector0< bool, A >
 std::vector with assert-checked bounds: bool specialization
 
class  vector1
 std::vector with 1-based indexing More...
 
class  vector1< bool, A >
 std::vector with 1-based indexing: bool specialization
 
class  vectorL
 std::vector with L-based indexing More...
 
class  vectorL< L, bool, A >
 std::vector with L-based indexing: bool specialization
 
struct  vectorL_IndexSelector
 vectorL index type selector: Nonnegative lower index non-specialization More...
 
struct  vectorL_IndexSelector< false >
 vectorL index type selector: Negative lower index specialization More...
 
struct  vectorL_ZeroSelector
 vectorL lower index zero selector: Nonzero lower index non-specialization More...
 
struct  vectorL_ZeroSelector< false >
 vectorL lower index zero selector: Zero lower index specialization More...
 

Typedefs

typedef void(* UtilityExitCallBack )(void)
 
typedef
utility::pointer::owning_ptr
< heap
heapOP
 
typedef
utility::pointer::owning_ptr
< heap const > 
heapCOP
 
typedef
utility::pointer::owning_ptr
< Inline_File_Provider_Hook
Inline_File_Provider_HookOP
 
typedef
utility::pointer::owning_ptr
< Inline_File_Provider_Hook
const > 
Inline_File_Provider_HookCOP
 
typedef pointer::owning_ptr
< subset_mapping
subset_mappingOP
 
typedef pointer::owning_ptr
< subset_mapping const > 
subset_mappingCOP
 
typedef
utility::pointer::owning_ptr
< PyExitCallback
PyExitCallbackOP
 
typedef
utility::pointer::owning_ptr
< PyExitCallback const > 
PyExitCallbackCOP
 
typedef
utility::pointer::owning_ptr
< SimulateMPIMessage
SimulateMPIMessageOP
 
typedef
utility::pointer::owning_ptr
< SimulateMPIMessage const > 
SimulateMPIMessageCOP
 
typedef vector0< boolvector0_bool
 
typedef vector0< short intvector0_short
 
typedef vector0< intvector0_int
 
typedef vector0< long intvector0_long
 
typedef vector0< unsigned
short int
vector0_ushort
 
typedef vector0< unsigned intvector0_uint
 
typedef vector0< unsigned long
int
vector0_ulong
 
typedef vector0< platform::Sizevector0_size_t
 
typedef vector0< platform::Sizevector0_size
 
typedef vector0< platform::SSizevector0_ssize_t
 
typedef vector0< platform::SSizevector0_ssize
 
typedef vector0< floatvector0_float
 
typedef vector0< doublevector0_double
 
typedef vector0< long doublevector0_longdouble
 
typedef vector0< char > vector0_char
 
typedef vector0< unsigned char > vector0_uchar
 
typedef vector0< signed char > vector0_schar
 
typedef vector1< boolvector1_bool
 
typedef vector1< short intvector1_short
 
typedef vector1< intvector1_int
 
typedef vector1< long intvector1_long
 
typedef vector1< unsigned
short int
vector1_ushort
 
typedef vector1< unsigned intvector1_uint
 
typedef vector1< unsigned long
int
vector1_ulong
 
typedef vector1< std::size_t > vector1_size_t
 
typedef vector1< std::size_t > vector1_size
 
typedef vector1< platform::SSizevector1_ssize_t
 
typedef vector1< platform::SSizevector1_ssize
 
typedef vector1< floatvector1_float
 
typedef vector1< doublevector1_double
 
typedef vector1< long doublevector1_longdouble
 
typedef vector1< char > vector1_char
 
typedef vector1< unsigned char > vector1_uchar
 
typedef vector1< signed char > vector1_schar
 

Enumerations

enum  simulate_mpi_message_type {
  smpi_char = 1, smpi_integer, smpi_string, smpi_double,
  smpi_integers, smpi_doubles
}
 

Functions

void sys_sleep (double const seconds)
 Sleep for a specified number of seconds. More...
 
std::string timestamp ()
 Generate timestamp string. More...
 
std::string timestamp_short ()
 Generate timestamp string, short format. More...
 
void encode6bit (const unsigned char *memory, unsigned int length, std::string &jar)
 
int decode6bit (unsigned char *memory, const std::string &jar)
 
void swap4_aligned (void *v, long ndata)
 
unsigned char code_to_6bit (unsigned char _6bit)
 
unsigned char code_from_6bit (unsigned char _8bit)
 
void encode_24_to_32 (unsigned char i0, unsigned char i1, unsigned char i2, unsigned char &o0, unsigned char &o1, unsigned char &o2, unsigned char &o3)
 
void decode_32_to_24 (unsigned char i0, unsigned char i1, unsigned char i2, unsigned char i3, unsigned char &o0, unsigned char &o1, unsigned char &o2)
 
template<typename B >
BitSet< B > operator+ (BitSet< B > const &a, BitSet< B > const &b)
 BitSet + BitSet: Union. More...
 
template<typename B >
BitSet< B > operator| (BitSet< B > const &a, BitSet< B > const &b)
 BitSet | BitSet: Union. More...
 
template<typename B >
BitSet< B > operator- (BitSet< B > const &a, BitSet< B > const &b)
 BitSet - BitSet: Difference. More...
 
template<typename B >
void swap (BitSet< B > &a, BitSet< B > &b)
 swap( BitSet, BitSet ) More...
 
template<typename B >
bool operator== (BitSet< B > const &a, BitSet< B > const &b)
 BitSet == BitSet. More...
 
template<typename B >
bool operator!= (BitSet< B > const &a, BitSet< B > const &b)
 BitSet != BitSet. More...
 
template<typename B >
BitVector< B > operator+ (BitVector< B > const &a, BitVector< B > const &b)
 BitVector + BitVector: Union. More...
 
template<typename B >
BitVector< B > operator| (BitVector< B > const &a, BitVector< B > const &b)
 BitVector | BitVector: Union. More...
 
template<typename B >
BitVector< B > operator- (BitVector< B > const &a, BitVector< B > const &b)
 BitVector - BitVector: Difference. More...
 
template<typename B >
void swap (BitVector< B > &a, BitVector< B > &b)
 swap( BitVector, BitVector ) More...
 
template<typename B >
bool operator== (BitVector< B > const &a, BitVector< B > const &b)
 BitVector == BitVector. More...
 
template<typename B >
bool operator!= (BitVector< B > const &a, BitVector< B > const &b)
 BitVector != BitVector. More...
 
template<class Target , class Source >
Target down_cast (Source &s)
 Fast assert-checked polymorphic down-cast: reference argument. More...
 
template<class Target , class Source >
Target down_cast (Source *p)
 Fast assert-checked polymorphic down-cast: pointer argument. More...
 
void set_main_exit_callback (UtilityExitCallBack=0)
 Set call back funtion that will be called on utility::exit. Use this function to overload default behavior of sys.exit to more appropriate to your application Defaut value for callback function is 0, whicth mean no sys exit is called. More...
 
std::vector
< UtilityExitCallBack > & 
get_all_exit_callbacks ()
 Array to hold all additional exit-callbacks. More...
 
void add_exit_callback (UtilityExitCallBack)
 Add additional callback function that will be called before standard exit(…) is executed. [Note: do not confuse this function with 'set_main_exit_callback' which is replacing the end behavior of exit(…)]. More...
 
void remove_exit_callback (UtilityExitCallBack)
 Remove additional callback function that was previously added by using add_exit_callback. More...
 
void exit (std::string const &file, int const line, std::string const &message, int const status)
 Exit with file + line + message + optional status. More...
 
int cond_exit (bool condition, std::string const &file, int const line, std::string const &message, int const status)
 Conditional Exit with file + line + message + optional status. More...
 
void exit (std::string const &file, int const line, int const status=1) NORETURN
 Exit with file + line + optional status. More...
 
void exit (int const status, std::string const &file, int const line)
 Exit with file + line + status. More...
 
template<typename BidirectionalIterator , typename T >
BidirectionalIterator find_closest (BidirectionalIterator first, BidirectionalIterator last, const T &value)
 Returns an iterator on the sorted range [first, last) nearest to value. If value is equidistant between adjacent elements, the lesser is returned. More...
 
template<typename T >
int argmin (const std::vector< T > &iterable)
 Returns the argument whose value is minimal according to operator<. More...
 
template<typename T >
int argmin (const utility::vector1< T > &iterable)
 Returns the argument whose value is minimal according to operator<. More...
 
template<typename T >
int argmax (const std::vector< T > &iterable)
 Returns the argument whose value is maximal according to operator>. More...
 
template<typename T >
int argmax (const utility::vector1< T > &iterable)
 Returns the argument whose value is maximal according to operator>. More...
 
int mpi_rank ()
 
int mpi_nprocs ()
 
int receive_integer_from_anyone ()
 Use MPI to wait until some node sends an integer – usually its own mpi_rank so that it can send further messages. More...
 
std::string receive_string_from_node (int source)
 Use MPI to receive a string from a particular node. More...
 
void send_string_to_node (int destination, std::string const &message)
 
char receive_char_from_node (int source)
 Use MPI to receive a single char from a particular node. More...
 
void send_char_to_node (int destination, char message)
 
int receive_integer_from_node (int source)
 Use MPI to receive a single integer from a particular node. More...
 
void send_integer_to_node (int destination, int message)
 
utility::vector1< intreceive_integers_from_node (int source)
 Use MPI to receive a vector of integers from a particular node. More...
 
void send_integers_to_node (int destination, utility::vector1< int > const &message)
 
double receive_double_from_node (int source)
 Use MPI to receive a single double from a particular node. More...
 
void send_double_to_node (int destination, double message)
 
utility::vector1< doublereceive_doubles_from_node (int source)
 Use MPI to receive a vector of doubles from a particular node. More...
 
void send_doubles_to_node (int destination, utility::vector1< double > const &message)
 
platform::Size get_undefined_size ()
 Get a numeric value for Size that represents an "undefined" value. More...
 
bool is_undefined (platform::Size const &val)
 Check if a Size is undefined (i.e has the same value as utility::get_undefined_size() ) More...
 
platform::Real get_undefined_real ()
 Get a numeric value for Real that represents an "undefined" value. More...
 
bool is_undefined (platform::Real const &val)
 Check if a Real is undefined (i.e has the same value as utility::get_undefined_real() ) More...
 
bool is_nan (platform::Real const &val)
 
bool is_inf (platform::Real const &val)
 
platform::Real round (platform::Real const &val)
 
platform::Real copysign (platform::Real const &x, platform::Real const &y)
 
template<class T >
utility::pointer::access_ptr< T > PyAP (T &o)
 Function to create argument for Python subclassing. More...
 
template<class T >
T * wrap_access_pointer_get_function (pointer::access_ptr< T > rs)
 
template<class T >
void wrap_access_pointer (std::string class_name)
 
bool operator== (history_queue_struct const &a, history_queue_struct const &b)
 
std::string msg_name (simulate_mpi_message_type msg_type)
 
template<class T >
std::ostream & operator<< (std::ostream &os, std::vector< T > const &v)
 Output function for std::vector object. More...
 
template<class T >
std::ostream & operator<< (std::ostream &os, utility::vector1< T > const &v)
 Output function for utility::vector1 object. More...
 
template<typename T1 , typename T2 >
std::ostream & operator<< (std::ostream &os, std::pair< T1, T2 > const &v)
 Output function for std::pair object. More...
 
template<typename T1 , typename T2 >
std::ostream & operator<< (std::ostream &os, std::map< T1, T2 > const &m)
 Output function for std::map object. More...
 
template<typename T >
std::ostream & operator<< (std::ostream &os, std::list< T > const &l)
 Output function for std::list object. More...
 
void ReadFromFileOrDie (const std::string &filename, std::string *contents)
 Reads the contents of <filename> into <contents>, preserving newline characters. Aborts if an error is encoutered. More...
 
utility::vector1< std::string > split (const std::string &s)
 split given std::string using ' ' symbol. More...
 
utility::vector1< std::string > split_whitespace (const std::string &s)
 split given std::string using whitespace as a separator. Unlike string_split_multi_delim(), any group of mixed whitespace counts only as a single seperator. More...
 
std::string join (utility::vector1< std::string > const &s, std::string const &connector)
 combine strings with anything More...
 
std::string join (std::vector< std::string > const &s, std::string const &connector)
 combine strings with anything More...
 
std::string join (std::string const &string_w_spaces, std::string const &connector)
 join space separations in a string with a connector such as '_' More...
 
std::list< std::string > split_to_list (const std::string &s)
 split given std::string using ' ' symbol. More...
 
std::set< std::string > split_to_set (std::string const &s)
 split given std::string to a set using ' ' symbol. More...
 
utility::vector1< std::string > string_split (std::string const &in, char splitchar)
 
utility::vector1< std::string > string_split_simple (std::string const &in, char splitchar= ' ')
 split to vector1< std::string > using arbitrary split character, but no empty strings (closer to python string::split) More...
 
utility::vector1< std::string > string_split_multi_delim (std::string const &in, std::string splitchars)
 
float string2float (std::string st)
 convert a string to a float, returns -1 on failure More...
 
int string2int (std::string st)
 convert a string to an int, returns -1 on failure More...
 
platform::Size string2Size (std::string st)
 convert a string to a Size, returns numeric::get_undefined_size() on failure More...
 
platform::Real string2Real (std::string st)
 convert a string to a Real, returns numeric::get_undefined_real() on failure More...
 
void string2uint (const std::string &x, unsigned int *y)
 
bool trimmed_compare (std::string const &s1, std::string const &s2)
 compares two strings ignoring leading and trailing spaces More...
 
bool startswith (std::string const &haystack, std::string const &needle)
 True iff haystack starts with needle. More...
 
bool endswith (std::string const &haystack, std::string const &needle)
 True iff haystack ends with needle. More...
 
void slurp (std::istream &in, std::string &out)
 
void trim (std::string &s, const std::string &drop)
 
std::string trim (std::string const &s, std::string const &drop=" ")
 create a new string that drops all the unwanted substrings of the original string. More...
 
void add_spaces_left_align (std::string &st, std::size_t const newlen)
 adds spaces to a left aligned string until a given length is reached More...
 
void add_spaces_right_align (std::string &st, std::size_t const newlen)
 adds spaces to a right aligned string until a given length is reached More...
 
bool is_string_numeric (std::string const &input)
 
std::string file_contents (std::string const &file_name)
 Read the entire contents of a file into a string. All end-of-line characters are replaced by "\n". Throws a utility::excn::EXCN_msg_exception if the file cannot be opened. More...
 
std::string file_basename (const std::string &full_path)
 
std::string filename (const std::string &path)
 
std::string pathname (const std::string &path)
 
std::string replace_environment_variables (std::string input)
 find all environment variables with the form ${VARIABLE} and replace with the contents of that environment variable. if the environment variable does not exist, return string::npos More...
 
std::string string_to_sha1 (std::string const &input_string)
 
std::string make_tag_with_dashes (utility::vector1< int > res_vector)
 Compactifies vectors of ints: 1 2 3 9 10 11 to "1-3 9-11". More...
 
std::string make_tag_with_dashes (utility::vector1< int > res_vector, utility::vector1< char > chain_vector)
 
std::string make_tag (utility::vector1< int > res_vector)
 
std::pair< std::vector< int >
, std::vector< char > > 
get_resnum_and_chain (std::string const &s, bool &string_is_ok)
 converts string like "1-3 20-22" or "A:1-5 B:20-22" to vectors containing resnums and chains. More...
 
bool get_resnum_and_chain_from_one_tag (std::string const &tag, std::vector< int > &resnum, std::vector< char > &chains)
 helper function for get_resnum_and_chain More...
 
platform::Size get_num_digits (platform::Size value)
 
std::string replace_in (std::string const name_in, std::string const find_string, std::string const replace_string)
 find/replace strings within input string. More...
 
template<class T >
std::string join (utility::vector1< T > const &vector, std::string const &connector)
 combine vector with anything More...
 
bool same_ignoring_spaces (std::string const &s1, std::string const &s2)
 Compares two strings, ignoring spaces. Useful for comparing atom name strings which have pdb-alignment built into them. Slightly dangerous if you consider the fact that atom names in the PDB are different for different indentation rules: ' CA ' is c-alpha. 'CA ' is calcium. More...
 
void replace_in (std::string &s, const char from, const char *to)
 
template<class T >
std::string to_string (const T &t)
 
template<class T >
T const from_string (std::string const &s, T)
 
template<class T >
utility::vector1< T > const string_split (std::string const &in, char splitchar, T)
 
bool is_true_string (std::string const &value_str)
 String accepted as a true value? More...
 
bool is_false_string (std::string const &value_str)
 String accepted as a false value? More...
 
short int min (short int const a, short int const b)
 min( short int, short int ) More...
 
int min (int const a, int const b)
 min( int, int ) More...
 
long int min (long int const a, long int const b)
 min( long int, long int ) More...
 
unsigned short int min (unsigned short int const a, unsigned short int const b)
 min( unsigned short int, unsigned short int ) More...
 
unsigned int min (unsigned int const a, unsigned int const b)
 min( unsigned int, unsigned int ) More...
 
unsigned long int min (unsigned long int const a, unsigned long int const b)
 min( unsigned long int, unsigned long int ) More...
 
float min (float const a, float const b)
 min( float, float ) More...
 
double min (double const a, double const b)
 min( double, double ) More...
 
long double min (long double const a, long double const b)
 min( long double, long double ) More...
 
template<typename T >
T const & min (T const &a, T const &b, T const &c)
 min( a, b, c ) More...
 
template<typename T >
T const & min (T const &a, T const &b, T const &c, T const &d)
 min( a, b, c, d ) More...
 
template<typename T >
T const & min (T const &a, T const &b, T const &c, T const &d, T const &e)
 min( a, b, c, d, e ) More...
 
template<typename T >
T const & min (T const &a, T const &b, T const &c, T const &d, T const &e, T const &f)
 min( a, b, c, d, e, f ) More...
 
short int max (short int const a, short int const b)
 max( short int, short int ) More...
 
int max (int const a, int const b)
 max( int, int ) More...
 
long int max (long int const a, long int const b)
 max( long int, long int ) More...
 
unsigned short int max (unsigned short int const a, unsigned short int const b)
 max( unsigned short int, unsigned short int ) More...
 
unsigned int max (unsigned int const a, unsigned int const b)
 max( unsigned int, unsigned int ) More...
 
unsigned long int max (unsigned long int const a, unsigned long int const b)
 max( unsigned long int, unsigned long int ) More...
 
float max (float const a, float const b)
 max( float, float ) More...
 
double max (double const a, double const b)
 max( double, double ) More...
 
long double max (long double const a, long double const b)
 max( long double, long double ) More...
 
template<typename T >
T const & max (T const &a, T const &b, T const &c)
 max( a, b, c ) More...
 
template<typename T >
T const & max (T const &a, T const &b, T const &c, T const &d)
 max( a, b, c, d ) More...
 
template<typename T >
T const & max (T const &a, T const &b, T const &c, T const &d, T const &e)
 max( a, b, c, d, e ) More...
 
template<typename T >
T const & max (T const &a, T const &b, T const &c, T const &d, T const &e, T const &f)
 max( a, b, c, d, e, f ) More...
 
template<class T >
max (vector1< T > const &input)
 Find the largest value in a vector. More...
 
template<class T >
min (vector1< T > const &input)
 Find the smallest value in a vector. More...
 
template<class T >
vector1< T >::Size arg_max (vector1< T > const &input)
 find the index of the largest value in a vector More...
 
template<class T >
vector1< T >::Size arg_min (vector1< T > const &input)
 find the index of the smallest value in a vector More...
 
template<class T >
void insert_middle (vector1< T > &vect, typename vector1< T >::Size const position, T const new_value, bool expand)
 
template<class T >
void arg_greatest_several (vector1< T > const &input, vector1< typename vector1< T >::Size > &arg_list)
 Finds indices of the n largest items in input vector, where n is size of the arg_list vector. The indices are reported in decreasing sorted order by the value of the corresponding position in the input vector. If m is the size of the input vector, then this function is O( m n**2) More...
 
template<class T >
void arg_least_several (vector1< T > const &input, vector1< typename vector1< T >::Size > &arg_list)
 Finds indices of the n smallest items in input vector, where n is size of the arg_list vector. The indices are reported in increasing sorted order by the value of the corresponding position in the input vector. If m is the size of the input vector, then this function is O( m n**2) More...
 
template<platform::SSize L, typename T , typename A >
bool operator== (vectorL< L, T, A > const &a, vectorL< L, T, A > const &b)
 vectorL == vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator!= (vectorL< L, T, A > const &a, vectorL< L, T, A > const &b)
 vectorL != vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator< (vectorL< L, T, A > const &a, vectorL< L, T, A > const &b)
 vectorL < vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator<= (vectorL< L, T, A > const &a, vectorL< L, T, A > const &b)
 vectorL <= vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator>= (vectorL< L, T, A > const &a, vectorL< L, T, A > const &b)
 vectorL >= vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator> (vectorL< L, T, A > const &a, vectorL< L, T, A > const &b)
 vectorL > vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator== (vectorL< L, T, A > const &a, std::vector< T, A > const &b)
 vectorL == std::vector More...
 
template<platform::SSize L, typename T , typename A >
bool operator!= (vectorL< L, T, A > const &a, std::vector< T, A > const &b)
 vectorL != std::vector More...
 
template<platform::SSize L, typename T , typename A >
bool operator< (vectorL< L, T, A > const &a, std::vector< T, A > const &b)
 vectorL < std::vector More...
 
template<platform::SSize L, typename T , typename A >
bool operator<= (vectorL< L, T, A > const &a, std::vector< T, A > const &b)
 vectorL <= std::vector More...
 
template<platform::SSize L, typename T , typename A >
bool operator>= (vectorL< L, T, A > const &a, std::vector< T, A > const &b)
 vectorL >= std::vector More...
 
template<platform::SSize L, typename T , typename A >
bool operator> (vectorL< L, T, A > const &a, std::vector< T, A > const &b)
 vectorL > std::vector More...
 
template<platform::SSize L, typename T , typename A >
bool operator== (std::vector< T, A > const &a, vectorL< L, T, A > const &b)
 std::vector == vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator!= (std::vector< T, A > const &a, vectorL< L, T, A > const &b)
 std::vector != vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator< (std::vector< T, A > const &a, vectorL< L, T, A > const &b)
 std::vector < vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator<= (std::vector< T, A > const &a, vectorL< L, T, A > const &b)
 std::vector <= vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator>= (std::vector< T, A > const &a, vectorL< L, T, A > const &b)
 std::vector >= vectorL More...
 
template<platform::SSize L, typename T , typename A >
bool operator> (std::vector< T, A > const &a, vectorL< L, T, A > const &b)
 std::vector > vectorL More...
 
template<platform::SSize L, typename T , typename A >
void swap (vectorL< L, T, A > &a, vectorL< L, T, A > &b)
 swap( vectorL, vectorL ) More...
 
template<platform::SSize L, typename T , typename A >
void swap (vectorL< L, T, A > &a, std::vector< T, A > &b)
 swap( vectorL, std::vector ) More...
 
template<platform::SSize L, typename T , typename A >
void swap (std::vector< T, A > &a, vectorL< L, T, A > &b)
 swap( std::vector, vectorL ) More...
 
template<platform::SSize L, typename A >
bool operator== (vectorL< L, bool, A > const &a, vectorL< L, bool, A > const &b)
 vectorL == vectorL More...
 
template<platform::SSize L, typename A >
bool operator!= (vectorL< L, bool, A > const &a, vectorL< L, bool, A > const &b)
 vectorL != vectorL More...
 
template<platform::SSize L, typename A >
bool operator< (vectorL< L, bool, A > const &a, vectorL< L, bool, A > const &b)
 vectorL < vectorL More...
 
template<platform::SSize L, typename A >
bool operator<= (vectorL< L, bool, A > const &a, vectorL< L, bool, A > const &b)
 vectorL <= vectorL More...
 
template<platform::SSize L, typename A >
bool operator>= (vectorL< L, bool, A > const &a, vectorL< L, bool, A > const &b)
 vectorL >= vectorL More...
 
template<platform::SSize L, typename A >
bool operator> (vectorL< L, bool, A > const &a, vectorL< L, bool, A > const &b)
 vectorL > vectorL More...
 
template<platform::SSize L, typename A >
bool operator== (vectorL< L, bool, A > const &a, std::vector< bool, A > const &b)
 vectorL == std::vector More...
 
template<platform::SSize L, typename A >
bool operator!= (vectorL< L, bool, A > const &a, std::vector< bool, A > const &b)
 vectorL != std::vector More...
 
template<platform::SSize L, typename A >
bool operator< (vectorL< L, bool, A > const &a, std::vector< bool, A > const &b)
 vectorL < std::vector More...
 
template<platform::SSize L, typename A >
bool operator<= (vectorL< L, bool, A > const &a, std::vector< bool, A > const &b)
 vectorL <= std::vector More...
 
template<platform::SSize L, typename A >
bool operator>= (vectorL< L, bool, A > const &a, std::vector< bool, A > const &b)
 vectorL >= std::vector More...
 
template<platform::SSize L, typename A >
bool operator> (vectorL< L, bool, A > const &a, std::vector< bool, A > const &b)
 vectorL > std::vector More...
 
template<platform::SSize L, typename A >
bool operator== (std::vector< bool, A > const &a, vectorL< L, bool, A > const &b)
 std::vector == vectorL More...
 
template<platform::SSize L, typename A >
bool operator!= (std::vector< bool, A > const &a, vectorL< L, bool, A > const &b)
 std::vector != vectorL More...
 
template<platform::SSize L, typename A >
bool operator< (std::vector< bool, A > const &a, vectorL< L, bool, A > const &b)
 std::vector < vectorL More...
 
template<platform::SSize L, typename A >
bool operator<= (std::vector< bool, A > const &a, vectorL< L, bool, A > const &b)
 std::vector <= vectorL More...
 
template<platform::SSize L, typename A >
bool operator>= (std::vector< bool, A > const &a, vectorL< L, bool, A > const &b)
 std::vector >= vectorL More...
 
template<platform::SSize L, typename A >
bool operator> (std::vector< bool, A > const &a, vectorL< L, bool, A > const &b)
 std::vector > vectorL More...
 
template<platform::SSize L, typename A >
void swap (vectorL< L, bool, A > &a, vectorL< L, bool, A > &b)
 swap( vectorL, vectorL ) More...
 
template<platform::SSize L, typename A >
void swap (vectorL< L, bool, A > &a, std::vector< bool, A > &b)
 swap( vectorL, std::vector ) More...
 
template<platform::SSize L, typename A >
void swap (std::vector< bool, A > &a, vectorL< L, bool, A > &b)
 swap( std::vector, vectorL ) More...
 

Variables

static void(* main_exit_callback )(void)=0
 Place holder for 'end-action' of utility::exit(…) More...
 

Detailed Description

unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 1.

#include <core/conformation/signals/GeneralEvent.hh> – Illegal and unneccessary

STL Headers.

determines all possible rings in a graph.

#include <iostream> // debug only

if you have a container of OPs: i.e., typedef std::list< SilentStructOP > SilentStructs; you can now call this function with the SilentStructs container instead of the SilentFileData objects by my_func( DereferenceIterator< SilentStructs >( decoys().begin() ), DereferenceIterator< SilentStructs >( decoys().end() ) );

Author
Oliver Lange

RingDetection

Hanser, Th., Jauffret, Ph., Kaufmann, G., "A New Algorithm for Exhaustive Ring Perception in a Molecular Graph", Laboratoire de Modeles Informatiques Appliques a la Synthese, URA 405 du CNRS, Universite Louis Pasteur, 67000 Strasbourg, France, Received May 15, 1996

Date
02/13/2014

This detects rings in residues!

Author
Steven Combs (steve.nosp@m.n.co.nosp@m.mbs1@.nosp@m.gmai.nosp@m.l.com), Ralf Mueller, Jeff Menden
Ken Jung

#include <core/pose/signals/DestructionEvent.hh> – Illegal and unneccessary

Typedef Documentation

typedef void(* utility::UtilityExitCallBack)(void)

Enumeration Type Documentation

This is for unit testing mpi code in a single processor. The idea is to buffer the messages in the SimulateMPIData stored in the SimulateMPI. To use this class, call initialize_simulation( nprocs ), then set the mpi rank can be set manually, and the functions in mpi_util are usable. By setting the mpi_rank to a different processor, other messages can be sent and received. See test/utility/simulate_mpi.cxxtest for examples.

Enumerator
smpi_char 
smpi_integer 
smpi_string 
smpi_double 
smpi_integers 
smpi_doubles 

Function Documentation

void utility::add_exit_callback ( UtilityExitCallBack  cb)

Add additional callback function that will be called before standard exit(…) is executed. [Note: do not confuse this function with 'set_main_exit_callback' which is replacing the end behavior of exit(…)].

References get_all_exit_callbacks().

void utility::add_spaces_left_align ( std::string &  st,
std::size_t const  newlen 
)

adds spaces to a left aligned string until a given length is reached

void utility::add_spaces_right_align ( std::string &  st,
std::size_t const  newlen 
)

adds spaces to a right aligned string until a given length is reached

template<class T >
void utility::arg_greatest_several ( vector1< T > const &  input,
vector1< typename vector1< T >::Size > &  arg_list 
)

Finds indices of the n largest items in input vector, where n is size of the arg_list vector. The indices are reported in decreasing sorted order by the value of the corresponding position in the input vector. If m is the size of the input vector, then this function is O( m n**2)

If arg_list has more entries than input, then it is resized at the end of this function to have as many entries as the input.

References insert_middle().

template<class T >
void utility::arg_least_several ( vector1< T > const &  input,
vector1< typename vector1< T >::Size > &  arg_list 
)

Finds indices of the n smallest items in input vector, where n is size of the arg_list vector. The indices are reported in increasing sorted order by the value of the corresponding position in the input vector. If m is the size of the input vector, then this function is O( m n**2)

If arg_list has more entries than input, then it is resized at the end of this function to have as many entries as the input.

References insert_middle().

template<class T >
vector1< T >::Size utility::arg_max ( vector1< T > const &  input)

find the index of the largest value in a vector

class T must provide an operator < () and operator = (). Error if input.size() == 0

References basic::T().

template<class T >
vector1< T >::Size utility::arg_min ( vector1< T > const &  input)

find the index of the smallest value in a vector

class T must provide an operator < () and operator = (). Error if input.size() == 0

References basic::T().

template<typename T >
int utility::argmax ( const std::vector< T > &  iterable)

Returns the argument whose value is maximal according to operator>.

Adheres to STL numbering (0-indexed).

template<typename T >
int utility::argmax ( const utility::vector1< T > &  iterable)

Returns the argument whose value is maximal according to operator>.

Adheres to Rosetta numbering (1-indexed).

template<typename T >
int utility::argmin ( const std::vector< T > &  iterable)

Returns the argument whose value is minimal according to operator<.

Adheres to STL numbering (0-indexed).

template<typename T >
int utility::argmin ( const utility::vector1< T > &  iterable)

Returns the argument whose value is minimal according to operator<.

Adheres to Rosetta numbering (1-indexed).

unsigned char utility::code_from_6bit ( unsigned char  _8bit)
inline

Referenced by decode_32_to_24().

unsigned char utility::code_to_6bit ( unsigned char  _6bit)
inline

uuencode

Referenced by encode_24_to_32().

int utility::cond_exit ( bool  condition,
std::string const &  file,
int const  line,
std::string const &  message,
int const  status 
)

Conditional Exit with file + line + message + optional status.

Conditional Exit with file + line + message + optional status. WIll exit if the condition is not met!

References exit().

platform::Real utility::copysign ( platform::Real const &  x,
platform::Real const &  y 
)
inline

Referenced by numeric::statistics::w().

int utility::decode6bit ( unsigned char *  memory,
const std::string &  jar 
)

References decode_32_to_24().

void utility::decode_32_to_24 ( unsigned char  i0,
unsigned char  i1,
unsigned char  i2,
unsigned char  i3,
unsigned char &  o0,
unsigned char &  o1,
unsigned char &  o2 
)
inline

References code_from_6bit().

Referenced by decode6bit().

template<class Target , class Source >
Target utility::down_cast ( Source &  s)
inline

Fast assert-checked polymorphic down-cast: reference argument.

Note
Usage: down_cast< Type & > where Type can be const-qualified
For down-casting when you know the cast is valid
Can't use for hierarchies with virtual base classes
Assert intentionally won't compile if a virtual base class is present

References basic::options::OptionKeys::in::file::s.

Referenced by utility::pointer::down_pointer_cast(), utility::options::OptionCollection::operator()(), and utility::options::OptionCollection::operator[]().

template<class Target , class Source >
Target utility::down_cast ( Source *  p)
inline

Fast assert-checked polymorphic down-cast: pointer argument.

Note
Usage: down_cast< Type * > where Type can be const-qualified
For down-casting when you know the cast is valid
Can't use for hierarchies with virtual base classes
Assert intentionally won't compile if a virtual base class is present
void utility::encode6bit ( const unsigned char *  memory,
unsigned int  length,
std::string &  jar 
)
void utility::encode_24_to_32 ( unsigned char  i0,
unsigned char  i1,
unsigned char  i2,
unsigned char &  o0,
unsigned char &  o1,
unsigned char &  o2,
unsigned char &  o3 
)
inline

References code_to_6bit().

Referenced by encode6bit().

bool utility::endswith ( std::string const &  haystack,
std::string const &  needle 
)

True iff haystack ends with needle.

void utility::exit ( std::string const &  file,
int const  line,
std::string const &  message,
int const  status 
)
void utility::exit ( std::string const &  file,
int const  line,
int const  status = 1 
)
inline

Exit with file + line + optional status.

References exit().

void utility::exit ( int const  status,
std::string const &  file,
int const  line 
)
inline

Exit with file + line + status.

Note
Deprecated: For backwards compatibility with earlier version

References exit().

std::string utility::file_basename ( const std::string &  full_path)

References filename().

std::string utility::file_contents ( std::string const &  file_name)

Read the entire contents of a file into a string. All end-of-line characters are replaced by "\n". Throws a utility::excn::EXCN_msg_exception if the file cannot be opened.

References utility::io::izstream::close(), utility::io::getline(), line, and utility::options::OptionKeys::options::table::text.

Referenced by utility::io::FileContentsMap::get_file_contents(), and utility::io::FileContentsMap::get_file_contents_ref().

std::string utility::filename ( const std::string &  path)
template<typename BidirectionalIterator , typename T >
BidirectionalIterator utility::find_closest ( BidirectionalIterator  first,
BidirectionalIterator  last,
const T &  value 
)

Returns an iterator on the sorted range [first, last) nearest to value. If value is equidistant between adjacent elements, the lesser is returned.

template<class T >
T const utility::from_string ( std::string const &  s,
 
)
inline
std::vector< UtilityExitCallBack >& utility::get_all_exit_callbacks ( )

Array to hold all additional exit-callbacks.

Referenced by add_exit_callback(), exit(), and remove_exit_callback().

platform::Size utility::get_num_digits ( platform::Size  value)
std::pair< std::vector< int >, std::vector< char > > utility::get_resnum_and_chain ( std::string const &  s,
bool string_is_ok 
)
bool utility::get_resnum_and_chain_from_one_tag ( std::string const &  tag,
std::vector< int > &  resnum,
std::vector< char > &  chains 
)

helper function for get_resnum_and_chain

References basic::options::OptionKeys::run::chain.

Referenced by get_resnum_and_chain(), and utility::options::ResidueChainVectorOption::value_of().

platform::Real utility::get_undefined_real ( )
inline

Get a numeric value for Real that represents an "undefined" value.

Referenced by string2Real().

platform::Size utility::get_undefined_size ( )
inline

Get a numeric value for Size that represents an "undefined" value.

References max().

Referenced by is_undefined(), and string2Size().

template<class T >
void utility::insert_middle ( vector1< T > &  vect,
typename vector1< T >::Size const  position,
T const  new_value,
bool  expand 
)

References swap(), and basic::T().

Referenced by arg_greatest_several(), and arg_least_several().

bool utility::is_false_string ( std::string const &  value_str)
inline

String accepted as a false value?

Referenced by utility::tag::Tag::getOption(), and utility::options::BooleanOption::is_false_value().

bool utility::is_inf ( platform::Real const &  val)
inline

References numeric::isinf().

Referenced by numeric::statistics::w().

bool utility::is_nan ( platform::Real const &  val)
inline
bool utility::is_string_numeric ( std::string const &  input)
bool utility::is_true_string ( std::string const &  value_str)
inline

String accepted as a true value?

Referenced by utility::tag::Tag::getOption(), and utility::options::BooleanOption::is_true_value().

bool utility::is_undefined ( platform::Size const &  val)
inline

Check if a Size is undefined (i.e has the same value as utility::get_undefined_size() )

References get_undefined_size().

bool utility::is_undefined ( platform::Real const &  val)
inline

Check if a Real is undefined (i.e has the same value as utility::get_undefined_real() )

References numeric::isinf(), and numeric::isnan().

template<class T >
std::string utility::join ( utility::vector1< T > const &  vector,
std::string const &  connector 
)

combine vector with anything

References basic::options::OptionKeys::begin.

std::string utility::join ( utility::vector1< std::string > const &  s,
std::string const &  connector 
)
std::string utility::join ( std::vector< std::string > const &  s,
std::string const &  connector 
)

combine strings with anything

References basic::options::OptionKeys::begin.

std::string utility::join ( std::string const &  string_w_spaces,
std::string const &  connector 
)

join space separations in a string with a connector such as '_'

References join(), split(), and trim().

std::string utility::make_tag ( utility::vector1< int res_vector)

References tag.

std::string utility::make_tag_with_dashes ( utility::vector1< int res_vector)

Compactifies vectors of ints: 1 2 3 9 10 11 to "1-3 9-11".

std::string utility::make_tag_with_dashes ( utility::vector1< int res_vector,
utility::vector1< char >  chain_vector 
)

References runtime_assert, and tag.

template<class T >
T utility::max ( vector1< T > const &  input)

Find the largest value in a vector.

class T must provide an operator < () and operator = (). Error if input.size() == 0

References basic::T().

short int utility::max ( short int const  a,
short int const  b 
)
inline
int utility::max ( int const  a,
int const  b 
)
inline
long int utility::max ( long int const  a,
long int const  b 
)
inline
unsigned short int utility::max ( unsigned short int const  a,
unsigned short int const  b 
)
inline
unsigned int utility::max ( unsigned int const  a,
unsigned int const  b 
)
inline
unsigned long int utility::max ( unsigned long int const  a,
unsigned long int const  b 
)
inline
float utility::max ( float const  a,
float const  b 
)
inline
double utility::max ( double const  a,
double const  b 
)
inline
long double utility::max ( long double const  a,
long double const  b 
)
inline
template<typename T >
T const& utility::max ( T const &  a,
T const &  b,
T const &  c 
)
inline

max( a, b, c )

template<typename T >
T const& utility::max ( T const &  a,
T const &  b,
T const &  c,
T const &  d 
)
inline

max( a, b, c, d )

References max().

template<typename T >
T const& utility::max ( T const &  a,
T const &  b,
T const &  c,
T const &  d,
T const &  e 
)
inline

max( a, b, c, d, e )

References max(), and max().

template<typename T >
T const& utility::max ( T const &  a,
T const &  b,
T const &  c,
T const &  d,
T const &  e,
T const &  f 
)
inline

max( a, b, c, d, e, f )

References max(), and max().

short int utility::min ( short int const  a,
short int const  b 
)
inline
int utility::min ( int const  a,
int const  b 
)
inline
template<class T >
T utility::min ( vector1< T > const &  input)

Find the smallest value in a vector.

class T must provide an operator < () and operator = (). Error if input.size() == 0

References basic::T().

long int utility::min ( long int const  a,
long int const  b 
)
inline
unsigned short int utility::min ( unsigned short int const  a,
unsigned short int const  b 
)
inline
unsigned int utility::min ( unsigned int const  a,
unsigned int const  b 
)
inline
unsigned long int utility::min ( unsigned long int const  a,
unsigned long int const  b 
)
inline
float utility::min ( float const  a,
float const  b 
)
inline
double utility::min ( double const  a,
double const  b 
)
inline
long double utility::min ( long double const  a,
long double const  b 
)
inline
template<typename T >
T const& utility::min ( T const &  a,
T const &  b,
T const &  c 
)
inline

min( a, b, c )

template<typename T >
T const& utility::min ( T const &  a,
T const &  b,
T const &  c,
T const &  d 
)
inline

min( a, b, c, d )

References min().

template<typename T >
T const& utility::min ( T const &  a,
T const &  b,
T const &  c,
T const &  d,
T const &  e 
)
inline

min( a, b, c, d, e )

References min(), and min().

template<typename T >
T const& utility::min ( T const &  a,
T const &  b,
T const &  c,
T const &  d,
T const &  e,
T const &  f 
)
inline

min( a, b, c, d, e, f )

References min(), and min().

int utility::mpi_nprocs ( )
int utility::mpi_rank ( )
std::string utility::msg_name ( simulate_mpi_message_type  msg_type)
template<typename B >
bool utility::operator!= ( BitSet< B > const &  a,
BitSet< B > const &  b 
)
template<typename B >
bool utility::operator!= ( BitVector< B > const &  a,
BitVector< B > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator!= ( vectorL< L, bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator!= ( vectorL< L, bool, A > const &  a,
std::vector< bool, A > const &  b 
)

vectorL != std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator!= ( vectorL< L, T, A > const &  a,
vectorL< L, T, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator!= ( std::vector< bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)

std::vector != vectorL

template<platform::SSize L, typename T , typename A >
bool utility::operator!= ( vectorL< L, T, A > const &  a,
std::vector< T, A > const &  b 
)

vectorL != std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator!= ( std::vector< T, A > const &  a,
vectorL< L, T, A > const &  b 
)

std::vector != vectorL

template<typename B >
BitSet< B > utility::operator+ ( BitSet< B > const &  a,
BitSet< B > const &  b 
)
template<typename B >
BitVector< B > utility::operator+ ( BitVector< B > const &  a,
BitVector< B > const &  b 
)
template<typename B >
BitSet< B > utility::operator- ( BitSet< B > const &  a,
BitSet< B > const &  b 
)
template<typename B >
BitVector< B > utility::operator- ( BitVector< B > const &  a,
BitVector< B > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator< ( vectorL< L, bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator< ( vectorL< L, bool, A > const &  a,
std::vector< bool, A > const &  b 
)

vectorL < std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator< ( vectorL< L, T, A > const &  a,
vectorL< L, T, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator< ( std::vector< bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)

std::vector < vectorL

template<platform::SSize L, typename T , typename A >
bool utility::operator< ( vectorL< L, T, A > const &  a,
std::vector< T, A > const &  b 
)

vectorL < std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator< ( std::vector< T, A > const &  a,
vectorL< L, T, A > const &  b 
)

std::vector < vectorL

template<class T >
std::ostream& utility::operator<< ( std::ostream &  os,
std::vector< T > const &  v 
)

Output function for std::vector object.


Predefined functions for Tracer IO We originally moved them out of name spaces so we can use them right away - without specifying it. Returned to utility namespace, as some compilers did not find the operator otherwise! – rhiju

template<class T >
std::ostream& utility::operator<< ( std::ostream &  os,
utility::vector1< T > const &  v 
)

Output function for utility::vector1 object.

template<typename T1 , typename T2 >
std::ostream& utility::operator<< ( std::ostream &  os,
std::pair< T1, T2 > const &  v 
)

Output function for std::pair object.

template<typename T1 , typename T2 >
std::ostream& utility::operator<< ( std::ostream &  os,
std::map< T1, T2 > const &  m 
)

Output function for std::map object.

template<typename T >
std::ostream& utility::operator<< ( std::ostream &  os,
std::list< T > const &  l 
)

Output function for std::list object.

References basic::options::OptionKeys::in::file::l.

template<platform::SSize L, typename A >
bool utility::operator<= ( vectorL< L, bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator<= ( vectorL< L, bool, A > const &  a,
std::vector< bool, A > const &  b 
)

vectorL <= std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator<= ( vectorL< L, T, A > const &  a,
vectorL< L, T, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator<= ( std::vector< bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)

std::vector <= vectorL

template<platform::SSize L, typename T , typename A >
bool utility::operator<= ( vectorL< L, T, A > const &  a,
std::vector< T, A > const &  b 
)

vectorL <= std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator<= ( std::vector< T, A > const &  a,
vectorL< L, T, A > const &  b 
)

std::vector <= vectorL

bool utility::operator== ( history_queue_struct const &  a,
history_queue_struct const &  b 
)
inline
template<typename B >
bool utility::operator== ( BitSet< B > const &  a,
BitSet< B > const &  b 
)
template<typename B >
bool utility::operator== ( BitVector< B > const &  a,
BitVector< B > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator== ( vectorL< L, bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator== ( vectorL< L, bool, A > const &  a,
std::vector< bool, A > const &  b 
)

vectorL == std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator== ( vectorL< L, T, A > const &  a,
vectorL< L, T, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator== ( std::vector< bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)

std::vector == vectorL

template<platform::SSize L, typename T , typename A >
bool utility::operator== ( vectorL< L, T, A > const &  a,
std::vector< T, A > const &  b 
)

vectorL == std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator== ( std::vector< T, A > const &  a,
vectorL< L, T, A > const &  b 
)

std::vector == vectorL

template<platform::SSize L, typename A >
bool utility::operator> ( vectorL< L, bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator> ( vectorL< L, bool, A > const &  a,
std::vector< bool, A > const &  b 
)

vectorL > std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator> ( vectorL< L, T, A > const &  a,
vectorL< L, T, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator> ( std::vector< bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)

std::vector > vectorL

template<platform::SSize L, typename T , typename A >
bool utility::operator> ( vectorL< L, T, A > const &  a,
std::vector< T, A > const &  b 
)

vectorL > std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator> ( std::vector< T, A > const &  a,
vectorL< L, T, A > const &  b 
)

std::vector > vectorL

template<platform::SSize L, typename A >
bool utility::operator>= ( vectorL< L, bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator>= ( vectorL< L, bool, A > const &  a,
std::vector< bool, A > const &  b 
)

vectorL >= std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator>= ( vectorL< L, T, A > const &  a,
vectorL< L, T, A > const &  b 
)
template<platform::SSize L, typename A >
bool utility::operator>= ( std::vector< bool, A > const &  a,
vectorL< L, bool, A > const &  b 
)

std::vector >= vectorL

template<platform::SSize L, typename T , typename A >
bool utility::operator>= ( vectorL< L, T, A > const &  a,
std::vector< T, A > const &  b 
)

vectorL >= std::vector

template<platform::SSize L, typename T , typename A >
bool utility::operator>= ( std::vector< T, A > const &  a,
vectorL< L, T, A > const &  b 
)

std::vector >= vectorL

template<typename B >
BitSet< B > utility::operator| ( BitSet< B > const &  a,
BitSet< B > const &  b 
)
template<typename B >
BitVector< B > utility::operator| ( BitVector< B > const &  a,
BitVector< B > const &  b 
)
std::string utility::pathname ( const std::string &  path)
template<class T >
utility::pointer::access_ptr<T> utility::PyAP ( T &  o)

Function to create argument for Python subclassing.

References basic::options::OptionKeys::out::file::o.

void utility::ReadFromFileOrDie ( const std::string &  filename,
std::string *  contents 
)

Reads the contents of <filename> into <contents>, preserving newline characters. Aborts if an error is encoutered.

References utility::io::getline(), basic::options::OptionKeys::in::in, line, basic::options::OptionKeys::ufv::ss, and utility_exit_with_message.

char utility::receive_char_from_node ( int  source)

Use MPI to receive a single char from a particular node.

References utility::SimulateMPI::receive_char_from_node(), and utility::SimulateMPI::simulate_mpi().

double utility::receive_double_from_node ( int  source)

Use MPI to receive a single double from a particular node.

References utility::SimulateMPI::receive_double_from_node(), and utility::SimulateMPI::simulate_mpi().

utility::vector1< double > utility::receive_doubles_from_node ( int  source)

Use MPI to receive a vector of doubles from a particular node.

References utility::SimulateMPI::receive_doubles_from_node(), and utility::SimulateMPI::simulate_mpi().

int utility::receive_integer_from_anyone ( )

Use MPI to wait until some node sends an integer – usually its own mpi_rank so that it can send further messages.

References utility::SimulateMPI::receive_integer_from_anyone(), and utility::SimulateMPI::simulate_mpi().

int utility::receive_integer_from_node ( int  source)

Use MPI to receive a single integer from a particular node.

References utility::SimulateMPI::receive_integer_from_node(), and utility::SimulateMPI::simulate_mpi().

utility::vector1< int > utility::receive_integers_from_node ( int  source)

Use MPI to receive a vector of integers from a particular node.

References utility::SimulateMPI::receive_integers_from_node(), and utility::SimulateMPI::simulate_mpi().

std::string utility::receive_string_from_node ( int  source)
void utility::remove_exit_callback ( UtilityExitCallBack  cb)

Remove additional callback function that was previously added by using add_exit_callback.

References basic::options::OptionKeys::begin, and get_all_exit_callbacks().

std::string utility::replace_environment_variables ( std::string  input)

find all environment variables with the form ${VARIABLE} and replace with the contents of that environment variable. if the environment variable does not exist, return string::npos

References basic::options::OptionKeys::cutoutdomain::end, basic::options::OptionKeys::cutoutdomain::start, and utility_exit_with_message.

Referenced by utility::options::OptionCollection::load_options_from_stream().

void utility::replace_in ( std::string &  s,
const char  from,
const char *  to 
)
inline
std::string utility::replace_in ( std::string const  name_in,
std::string const  find_string,
std::string const  replace_string 
)

find/replace strings within input string.

References name.

platform::Real utility::round ( platform::Real const &  val)
inline
bool utility::same_ignoring_spaces ( std::string const &  s1,
std::string const &  s2 
)
inline

Compares two strings, ignoring spaces. Useful for comparing atom name strings which have pdb-alignment built into them. Slightly dangerous if you consider the fact that atom names in the PDB are different for different indentation rules: ' CA ' is c-alpha. 'CA ' is calcium.

void utility::send_char_to_node ( int  destination,
char  message 
)
void utility::send_double_to_node ( int  destination,
double  message 
)
void utility::send_doubles_to_node ( int  destination,
utility::vector1< double > const &  message 
)
void utility::send_integer_to_node ( int  destination,
int  message 
)
void utility::send_integers_to_node ( int  destination,
utility::vector1< int > const &  message 
)
void utility::send_string_to_node ( int  destination,
std::string const &  message 
)
void utility::set_main_exit_callback ( UtilityExitCallBack  my_callback)

Set call back funtion that will be called on utility::exit. Use this function to overload default behavior of sys.exit to more appropriate to your application Defaut value for callback function is 0, whicth mean no sys exit is called.

References main_exit_callback.

Referenced by utility::PyExitCallback::set_PyExitCallBack().

void utility::slurp ( std::istream &  in,
std::string &  out 
)

References utility::io::getline(), and line.

utility::vector1< std::string > utility::split ( const std::string &  s)
std::list< std::string > utility::split_to_list ( const std::string &  s)

split given std::string using ' ' symbol.

split given std::string using ' ' symbol.

References numeric::add(), and basic::options::OptionKeys::cutoutdomain::start.

Referenced by utility::options::OptionCollection::load_option_from_file().

std::set< std::string > utility::split_to_set ( const std::string &  s)

split given std::string to a set using ' ' symbol.

split given std::string using ' ' symbol.

References numeric::add(), and basic::options::OptionKeys::cutoutdomain::start.

utility::vector1< std::string > utility::split_whitespace ( const std::string &  s)

split given std::string using whitespace as a separator. Unlike string_split_multi_delim(), any group of mixed whitespace counts only as a single seperator.

References basic::options::OptionKeys::ufv::ss.

bool utility::startswith ( std::string const &  haystack,
std::string const &  needle 
)

True iff haystack starts with needle.

float utility::string2float ( std::string  st)

convert a string to a float, returns -1 on failure

convert a string to a float

References basic::options::OptionKeys::ufv::ss.

int utility::string2int ( std::string  st)

convert a string to an int, returns -1 on failure

convert a string to an int

References basic::options::OptionKeys::ufv::ss.

Referenced by basic::Tracer::calculate_tracer_level(), and basic::message_listening::DbMoverMessageListener::deserialize_data().

platform::Real utility::string2Real ( std::string  st)

convert a string to a Real, returns numeric::get_undefined_real() on failure

References get_undefined_real(), and basic::options::OptionKeys::ufv::ss.

platform::Size utility::string2Size ( std::string  st)

convert a string to a Size, returns numeric::get_undefined_size() on failure

References get_undefined_size(), and basic::options::OptionKeys::ufv::ss.

void utility::string2uint ( const std::string &  x,
unsigned int y 
)
utility::vector1< std::string > utility::string_split ( std::string const &  in,
char  splitchar = ' ' 
)
template<class T >
utility::vector1<T> const utility::string_split ( std::string const &  in,
char  splitchar,
 
)
inline
utility::vector1< std::string > utility::string_split_multi_delim ( std::string const &  in,
std::string  splitchars = " \t" 
)

split to vector< std::string > using any of arbitrary split characters

utility::vector1< std::string > utility::string_split_simple ( std::string const &  in,
char  splitchar 
)

split to vector1< std::string > using arbitrary split character, but no empty strings (closer to python string::split)

split to vector1< std::string > using arbitrary split character, but no empty strings (closer to python string::split)

std::string utility::string_to_sha1 ( std::string const &  input_string)
template<typename B >
void utility::swap ( BitSet< B > &  a,
BitSet< B > &  b 
)

swap( BitSet, BitSet )

template<typename B >
void utility::swap ( BitVector< B > &  a,
BitVector< B > &  b 
)

swap( BitVector, BitVector )

template<platform::SSize L, typename A >
void utility::swap ( vectorL< L, bool, A > &  a,
vectorL< L, bool, A > &  b 
)
inline

swap( vectorL, vectorL )

template<platform::SSize L, typename A >
void utility::swap ( vectorL< L, bool, A > &  a,
std::vector< bool, A > &  b 
)
inline

swap( vectorL, std::vector )

template<platform::SSize L, typename A >
void utility::swap ( std::vector< bool, A > &  a,
vectorL< L, bool, A > &  b 
)
inline

swap( std::vector, vectorL )

template<platform::SSize L, typename T , typename A >
void utility::swap ( vectorL< L, T, A > &  a,
vectorL< L, T, A > &  b 
)
inline

swap( vectorL, vectorL )

template<platform::SSize L, typename T , typename A >
void utility::swap ( vectorL< L, T, A > &  a,
std::vector< T, A > &  b 
)
inline

swap( vectorL, std::vector )

template<platform::SSize L, typename T , typename A >
void utility::swap ( std::vector< T, A > &  a,
vectorL< L, T, A > &  b 
)
inline

swap( std::vector, vectorL )

void utility::swap4_aligned ( void *  v,
long  ndata 
)
inline
void utility::sys_sleep ( double const  seconds)

Sleep for a specified number of seconds.

References utility::io::oc::cout.

Referenced by utility::file::rand_sleep().

std::string utility::timestamp ( )

Generate timestamp string.

Referenced by basic::Tracer::prepend_channel_name(), and timestamp_short().

std::string utility::timestamp_short ( )

Generate timestamp string, short format.

References timestamp().

template<class T >
std::string utility::to_string ( const T &  t)
inline
void utility::trim ( std::string &  s,
const std::string &  drop 
)
std::string utility::trim ( std::string const &  s,
std::string const &  drop 
)

create a new string that drops all the unwanted substrings of the original string.

References trim().

bool utility::trimmed_compare ( std::string const &  s1,
std::string const &  s2 
)

compares two strings ignoring leading and trailing spaces

compares two strings ignoring leading and trailing spaces

template<class T >
void utility::wrap_access_pointer ( std::string  class_name)

References basic::T().

template<class T >
T* utility::wrap_access_pointer_get_function ( pointer::access_ptr< T >  rs)

Variable Documentation

void(* utility::main_exit_callback)(void)=0
static

Place holder for 'end-action' of utility::exit(…)

Referenced by exit(), and set_main_exit_callback().