Rosetta
Namespaces | Macros
PyAssert.hh File Reference
#include <utility/exit.hh>

Namespaces

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

Macros

#define PyAssert(x, m)   { if(!(x)) utility_exit_with_message(m); }
 PyAssert macro. Check if statement is true and call utility_exit otherwise, which in turn will throw boost::python exception that python interpreter will catch. This macro works only when PYROSETTA macro was defined. More...
 

Detailed Description

Author
Sergey Lyskov
Note
Defining special assert version for PyRosetta build. It will allow to perform some additional verification for PyRosetta build.

Macro Definition Documentation

◆ PyAssert

#define PyAssert (   x,
 
)    { if(!(x)) utility_exit_with_message(m); }

PyAssert macro. Check if statement is true and call utility_exit otherwise, which in turn will throw boost::python exception that python interpreter will catch. This macro works only when PYROSETTA macro was defined.

Example of usage: PyAssert( (residue_num > 0) && (residue_num<=pose.size()), "Residue not found in pose!" )