FreeSASA  2.0
Open source SASA calculations
View on GitHub
Macros | Typedefs | Functions
Selection

Interface for selecting a group of atoms and integrating their area. More...

Macros

#define FREESASA_MAX_SELECTION_NAME   50
 The maximum length of a selection name. More...
 

Typedefs

typedef struct freesasa_selection freesasa_selection
 Struct to store a selection generated by freesasa_selection_new().
 

Functions

freesasa_selectionfreesasa_selection_new (const char *command, const freesasa_structure *structure, const freesasa_result *result)
 Get area of a selection. More...
 
void freesasa_selection_free (freesasa_selection *selection)
 Free selection. More...
 
const char * freesasa_selection_name (const freesasa_selection *selection)
 Name of the selection. More...
 
const char * freesasa_selection_command (const freesasa_selection *selection)
 Command that was used to generate the selection. More...
 
double freesasa_selection_area (const freesasa_selection *selection)
 Area of the selection. More...
 
int freesasa_selection_n_atoms (const freesasa_selection *selection)
 Number of atoms that matched the selection. More...
 

Detailed Description

Interface for selecting a group of atoms and integrating their area.

Macro Definition Documentation

#define FREESASA_MAX_SELECTION_NAME   50

The maximum length of a selection name.

See also
freesasa_select_area()

Definition at line 175 of file freesasa.h.

Function Documentation

freesasa_selection* freesasa_selection_new ( const char *  command,
const freesasa_structure structure,
const freesasa_result result 
)

Get area of a selection.

Uses subset of the select syntax from Pymol (name, symbol, resn, resi and chain), the keyword "select" is implicit. All commands are case insensitive. Valid selections would be, for example,

selection_name, resn ala+arg 
selection_name, chain a and resi 1+3-20 and not resn gly

After selecting the atoms from the freesasa_structure pointer specified by the command the area of those atoms is summed up using the freesasa_result pointer.

The return value should be freed with freesasa_selection_free().

See also
Selection syntax
Parameters
commandThe selection
structureThe structure to select from
resultThe results to integrate
Returns
The selection. NULL if something went wrong. Use freesasa_selection_name(), freesasa_selection_command(), freesasa_selection_area() and freesasa_selection_n_atoms() to access results of selection.
void freesasa_selection_free ( freesasa_selection selection)

Free selection.

Parameters
selectionThe selection
const char* freesasa_selection_name ( const freesasa_selection selection)

Name of the selection.

Parameters
selectionThe selection
Returns
the name
const char* freesasa_selection_command ( const freesasa_selection selection)

Command that was used to generate the selection.

Parameters
selectionThe selection
Returns
The command
double freesasa_selection_area ( const freesasa_selection selection)

Area of the selection.

Parameters
selectionThe selection
Returns
The area
int freesasa_selection_n_atoms ( const freesasa_selection selection)

Number of atoms that matched the selection.

Parameters
selectionThe selection
Returns
Number of atoms