ElfPSP_ParallelABC
Protein Structure Prediction using Parallel Artificial Bee Colony Optimization
|
Routines for manipulating MovElem units, which represent relative movements within a protein. More...
Go to the source code of this file.
Macros | |
#define | MOVELEM_INLINE inline |
Typedefs | |
typedef unsigned char | MovElem |
Type that holds 2 movements, one for the backbone and one for the side chain. More... | |
Enumerations | |
enum | _MovUnits { FRONT = 0, LEFT = 1, RIGHT = 2, UP = 3, DOWN = 4 } |
Constants for making MovElem elements. | |
Functions | |
MOVELEM_INLINE MovElem | MovElem_make (unsigned char bb, unsigned char sc) |
Creates a MovElem. More... | |
MOVELEM_INLINE MovElem | MovElem_random () |
Returns a uniformly random MovElem. More... | |
MOVELEM_INLINE unsigned char | MovElem_getBB (MovElem elem) |
Returns the movement for the backbone (BB) stored in a MovElem. More... | |
MOVELEM_INLINE unsigned char | MovElem_getSC (MovElem elem) |
Returns the movement for the side chain (SC) stored in a MovElem. More... | |
MOVELEM_INLINE unsigned char | MovElem_to_number (MovElem elem) |
Convert a MovElem to a number. More... | |
MOVELEM_INLINE MovElem | MovElem_from_number (unsigned char num) |
Convert a number to MovElem. More... | |
MOVELEM_INLINE void | MovElem_print (MovElem elem, FILE *fp) |
Prints a movement in the format "%c,%c", without leading/trailing spaces. More... | |
Routines for manipulating MovElem units, which represent relative movements within a protein.
We decided to encode 2 relative movements in a each byte (char), each occupying 4 bits. The most significant bits hold a relative movement for the backbone chain.
typedef unsigned char MovElem |
Type that holds 2 movements, one for the backbone and one for the side chain.
The backbone movement is on the most significant 4 bits of this type. The side chain movement is on the least significant 4 bits. The type's size is supposed to be 1 byte.
MovChain is how we refer to an array of MovElem.
MOVELEM_INLINE MovElem MovElem_from_number | ( | unsigned char | num | ) |
Convert a number to MovElem.
Each possible MovElem map into a single number in interval [0, 24].
MOVELEM_INLINE unsigned char MovElem_getBB | ( | MovElem | elem | ) |
Returns the movement for the backbone (BB) stored in a MovElem.
MOVELEM_INLINE unsigned char MovElem_getSC | ( | MovElem | elem | ) |
Returns the movement for the side chain (SC) stored in a MovElem.
MOVELEM_INLINE MovElem MovElem_make | ( | unsigned char | bb, |
unsigned char | sc | ||
) |
Creates a MovElem.
bb | The backbone element (e.g. FRONT, LEFT) |
sc | The side-chain element (e.g. FRONT, LEFT) |
MOVELEM_INLINE void MovElem_print | ( | MovElem | elem, |
FILE * | fp | ||
) |
Prints a movement in the format "%c,%c", without leading/trailing spaces.
Prints to file 'fp'.
MOVELEM_INLINE MovElem MovElem_random | ( | ) |
Returns a uniformly random MovElem.
MOVELEM_INLINE unsigned char MovElem_to_number | ( | MovElem | elem | ) |
Convert a MovElem to a number.
Each possible MovElem map into a single number in interval [0, 24].