115#define FREESASA_DEF_ALGORITHM FREESASA_LEE_RICHARDS
116#define FREESASA_DEF_PROBE_RADIUS 1.4
117#define FREESASA_DEF_SR_N 100
118#define FREESASA_DEF_LR_N 20
124#define freesasa_default_classifier freesasa_protor_classifier
133#define FREESASA_CONFLICTING_CLASSIFIERS "conflicting-classifiers"
164 FREESASA_ATOM_APOLAR = 0,
165 FREESASA_ATOM_POLAR = 1,
166 FREESASA_ATOM_UNKNOWN = 2,
226#define FREESASA_MAX_SELECTION_NAME 50
327 const char *group_PDB;
328 const char auth_asym_id;
329 const char *auth_seq_id;
330 const char *pdbx_PDB_ins_code;
331 const char *auth_comp_id;
332 const char *auth_atom_id;
333 const char *label_alt_id;
334 const char *type_symbol;
335 const double Cartn_x;
336 const double Cartn_y;
337 const double Cartn_z;
534 const char *res_name,
535 const char *atom_name);
549 const char *res_name,
550 const char *atom_name);
837 const char *atom_name,
838 const char *residue_name,
839 const char *residue_number,
841 double x,
double y,
double z);
891 const char *atom_name,
892 const char *residue_name,
893 const char *residue_number,
895 double x,
double y,
double z,
1015 const double *radii);
freesasa_error_codes
Error codes.
@ FREESASA_WARN
Something went wrong, but results might still be meaningful (value will always be negative).
@ FREESASA_SUCCESS
All is ok (value will always be zero).
@ FREESASA_FAIL
Something went seriously wrong (value will always be negative).
freesasa_verbosity
Verbosity levels.
@ FREESASA_V_DEBUG
Print all errors, warnings and debug messages.
@ FREESASA_V_NORMAL
Print all errors and warnings.
@ FREESASA_V_SILENT
Print no errors and warnings.
@ FREESASA_V_NOWARNINGS
Print only errors.
const freesasa_classifier freesasa_naccess_classifier
NACCESS classifier.
freesasa_classifier * freesasa_classifier_from_file(FILE *file)
Generate a classifier from a config-file.
void freesasa_classifier_free(freesasa_classifier *classifier)
Frees a classifier object.
const char * freesasa_classifier_name(const freesasa_classifier *classifier)
The name of a classifier.
const freesasa_classifier freesasa_oons_classifier
OONS classifier.
freesasa_atom_class
Atom classes.
double freesasa_classifier_radius(const freesasa_classifier *classifier, const char *res_name, const char *atom_name)
Use a classifier to determine the radius of a given atom.
const char * freesasa_classifier_class2str(freesasa_atom_class atom_class)
Names for freesasa_atom_class.
const freesasa_classifier freesasa_protor_classifier
ProtOr classifier.
struct freesasa_classifier freesasa_classifier
Classifier struct.
freesasa_atom_class freesasa_classifier_class(const freesasa_classifier *classifier, const char *res_name, const char *atom_name)
Use a classifier to determine the class of a given atom.
freesasa_nodearea freesasa_result_classes(const freesasa_structure *structure, const freesasa_result *result)
Results by classes.
FILE * freesasa_get_err_out(void)
Get pointer to error file.
void freesasa_set_err_out(FILE *err)
Set where to write errors.
freesasa_algorithm
The FreeSASA algorithms.
const int FREESASA_DEF_NUMBER_THREADS
Default number of threads.
freesasa_result * freesasa_calc_structure(const freesasa_structure *structure, const freesasa_parameters *parameters)
Calculates SASA based on a given structure.
int freesasa_set_verbosity(freesasa_verbosity v)
Set the global verbosity level.
freesasa_node * freesasa_calc_tree(const freesasa_structure *structure, const freesasa_parameters *parameters, const char *name)
Calculates SASA for a structure and returns as a tree of freesasa_node.
freesasa_verbosity freesasa_get_verbosity(void)
Get the current verbosity level.
freesasa_result * freesasa_calc_coord(const double *xyz, const double *radii, int n, const freesasa_parameters *parameters)
Calculates SASA based on a given set of coordinates and radii.
const freesasa_parameters freesasa_default_parameters
The default parameters for FreeSASA.
void freesasa_result_free(freesasa_result *result)
Frees a freesasa_result object.
@ FREESASA_LEE_RICHARDS
Lee & Richards' algorithm.
@ FREESASA_SHRAKE_RUPLEY
Shrake & Rupley's algorithm.
int freesasa_select_area(const char *command, char *name, double *area, const freesasa_structure *structure, const freesasa_result *result)
Get area of a selection.
const char * freesasa_node_atom_residue_number(const freesasa_node *node)
Atom residue number.
freesasa_node * freesasa_node_parent(freesasa_node *node)
The parent of a node.
int freesasa_node_atom_is_polar(const freesasa_node *node)
Is atom polar.
const char * freesasa_node_structure_chain_labels(const freesasa_node *node)
All chain labels in a structure.
int freesasa_node_structure_n_chains(const freesasa_node *node)
The number of chains in a structure.
int freesasa_node_atom_is_mainchain(const freesasa_node *node)
Does atom belong to the main chain/backbone.
int freesasa_node_chain_n_residues(const freesasa_node *node)
The number of residues in a chain.
int freesasa_tree_add_result(freesasa_node *tree, const freesasa_result *result, const freesasa_structure *structure, const char *name)
Add a new set of results to a tree.
const char * freesasa_node_residue_number(const freesasa_node *node)
Residue number.
const freesasa_nodearea * freesasa_node_area(const freesasa_node *node)
The freesasa_nodearea of all atoms belonging to a node.
int freesasa_node_structure_model(const freesasa_node *node)
Model number of a structure (from input PDB)
freesasa_node * freesasa_tree_new(void)
Generates empty freesasa_node of type FREESASA_NODE_ROOT.
freesasa_nodetype freesasa_node_type(const freesasa_node *node)
The type of a node.
int freesasa_node_residue_n_atoms(const freesasa_node *node)
Number of atoms in a residue.
char freesasa_node_atom_chain(const freesasa_node *node)
Atom chain.
freesasa_node * freesasa_tree_init(const freesasa_result *result, const freesasa_structure *structure, const char *name)
Init tree based on result and structure.
int freesasa_tree_join(freesasa_node *tree1, freesasa_node **tree2)
Join two trees.
const char * freesasa_node_atom_residue_name(const freesasa_node *node)
Atom residue name.
int freesasa_node_structure_add_selection(freesasa_node *node, const freesasa_selection *selection)
Add a selection result to a structure node.
int freesasa_node_free(freesasa_node *root)
Free tree.
const char * freesasa_node_name(const freesasa_node *node)
The name of a node.
double freesasa_node_atom_radius(const freesasa_node *node)
Atom radius.
const freesasa_result * freesasa_node_structure_result(const freesasa_node *node)
Raw results for a structure.
freesasa_node * freesasa_node_next(freesasa_node *node)
Next sibling of a node.
freesasa_nodetype
Node types.
const char * freesasa_node_atom_pdb_line(const freesasa_node *node)
Line in PDB atom was generated from.
int freesasa_node_structure_n_atoms(const freesasa_node *node)
The number of atoms in a structure.
const freesasa_selection ** freesasa_node_structure_selections(const freesasa_node *node)
Selection results for a structure.
struct freesasa_node freesasa_node
Result node.
freesasa_node * freesasa_node_children(freesasa_node *node)
The children of a node.
const char * freesasa_node_classified_by(const freesasa_node *node)
The name of the classifier used to generate the node.
freesasa_output_options
Output options.
const freesasa_nodearea * freesasa_node_residue_reference(const freesasa_node *node)
The reference area for a node from the classifier used to generate the tree.
const freesasa_parameters * freesasa_node_result_parameters(const freesasa_node *node)
Parameter values used to calculate result.
int freesasa_tree_export(FILE *output, freesasa_node *root, int options)
Outputs result in format specified by options.
@ FREESASA_NODE_STRUCTURE
Structure node.
@ FREESASA_NODE_ATOM
Atom node.
@ FREESASA_NODE_CHAIN
Chain node.
@ FREESASA_NODE_RESULT
Result node, wraps results for one or more related structures.
@ FREESASA_NODE_NONE
for specifying not a valid node.
@ FREESASA_NODE_RESIDUE
Residue node.
@ FREESASA_NODE_ROOT
Root node, wraps one or more unrelated results.
@ FREESASA_OUTPUT_SKIP_REL
Don't output relative areas, for example if structure has manually set radii, invalidating reference ...
@ FREESASA_CIF
CIF output with SASA values and SASA radius appended.
@ FREESASA_XML
XML output.
@ FREESASA_PDB
PDB output (with B-factors replaced by SASA values, and occupancy by radius).
@ FREESASA_OUTPUT_ATOM
Output data for atoms, residues, chains and structure.
@ FREESASA_JSON
JSON output.
@ FREESASA_LOG
Simple plain text results.
@ FREESASA_RES
A list of the integrated SASA of each residue type.
@ FREESASA_SEQ
The SASA of each residue in the sequence.
@ FREESASA_OUTPUT_CHAIN
Output data for chains and structure.
@ FREESASA_RSA
RSA output (not affected by atom, residue, etc above).
@ FREESASA_OUTPUT_RESIDUE
Output data for residues, chains and structure.
@ FREESASA_OUTPUT_STRUCTURE
Output data only for the whole structure.
void freesasa_selection_free(freesasa_selection *selection)
Free selection.
freesasa_selection * freesasa_selection_new(const char *command, const freesasa_structure *structure, const freesasa_result *result)
Get area of a selection.
const char * freesasa_selection_command(const freesasa_selection *selection)
Command that was used to generate the selection.
struct freesasa_selection freesasa_selection
Selection struct.
const char * freesasa_selection_name(const freesasa_selection *selection)
Name of the selection.
int freesasa_selection_n_atoms(const freesasa_selection *selection)
Number of atoms that matched the selection.
double freesasa_selection_area(const freesasa_selection *selection)
Area of the selection.
void freesasa_structure_atom_set_radius(freesasa_structure *structure, int i, double radius)
Set atom radius.
int freesasa_structure_model(const freesasa_structure *structure)
Get model number for structure.
const char * freesasa_structure_atom_symbol(const freesasa_structure *structure, int i)
Get atom symbol.
void freesasa_structure_free(freesasa_structure *structure)
Free structure.
int freesasa_structure_n_residues(const freesasa_structure *structure)
Get number of residues.
freesasa_structure_options
Options for reading structure from PDB.
char freesasa_structure_atom_chain(const freesasa_structure *structure, int i)
Get chain label.
const char * freesasa_structure_chain_labels(const freesasa_structure *structure)
Get string listing all chains in structure.
freesasa_structure * freesasa_structure_new(void)
Allocate empty structure.
freesasa_structure * freesasa_structure_get_chains(const freesasa_structure *structure, const char *chains, const freesasa_classifier *classifier, int options)
Create new structure consisting of a selection chains from the provided structure.
struct freesasa_structure freesasa_structure
Struct for structure object.
void freesasa_structure_set_radius(freesasa_structure *structure, const double *radii)
Override the radii set when the structure was initialized.
int freesasa_structure_add_atom(freesasa_structure *structure, const char *atom_name, const char *residue_name, const char *residue_number, char chain_label, double x, double y, double z)
Add individual atom to structure using default behavior.
int freesasa_structure_add_atom_wopt(freesasa_structure *structure, const char *atom_name, const char *residue_name, const char *residue_number, char chain_label, double x, double y, double z, const freesasa_classifier *classifier, int options)
Add individual atom to structure.
char freesasa_structure_residue_chain(const freesasa_structure *structure, int r_i)
Get chain residue belongs to.
const double * freesasa_structure_coord_array(const freesasa_structure *structure)
Get array of coordinates.
int freesasa_structure_chain_residues(const freesasa_structure *structure, char chain, int *first, int *last)
Get indices of first and last residues of a chain.
const char * freesasa_structure_classifier_name(const freesasa_structure *structure)
Name of classifier used to generate structure.
double freesasa_structure_atom_radius(const freesasa_structure *structure, int i)
Get atom radius.
const char * freesasa_structure_residue_name(const freesasa_structure *structure, int r_i)
Get name of residue.
freesasa_structure ** freesasa_structure_array(FILE *pdb, int *n, const freesasa_classifier *classifier, int options)
Init array of structures from PDB.
const char * freesasa_structure_atom_res_number(const freesasa_structure *structure, int i)
Get residue number.
const double * freesasa_structure_radius(const freesasa_structure *structure)
Returns a pointer to an array of the radii of each atom.
int freesasa_structure_n_chains(const freesasa_structure *structure)
Get number of chains.
const char * freesasa_structure_atom_res_name(const freesasa_structure *structure, int i)
Get residue name.
int freesasa_structure_n(const freesasa_structure *structure)
Get number of atoms.
freesasa_structure * freesasa_structure_from_pdb(FILE *pdb, const freesasa_classifier *classifier, int options)
Init structure with coordinates from pdb-file.
const char * freesasa_structure_atom_name(const freesasa_structure *structure, int i)
Get atom name.
int freesasa_structure_add_cif_atom(freesasa_structure *structure, freesasa_cif_atom *atom, const freesasa_classifier *classifier, int options)
Add atoms from a mmCIF file to a structure.
int freesasa_structure_residue_atoms(const freesasa_structure *structure, int r_i, int *first, int *last)
Get indices of first and last atoms of a residue.
const char * freesasa_structure_residue_number(const freesasa_structure *structure, int r_i)
Get residue number.
int freesasa_structure_chain_atoms(const freesasa_structure *structure, char chain, int *first, int *last)
Get indices of first and last atoms of a chain.
@ FREESASA_SEPARATE_MODELS
Read MODELs as separate structures.
@ FREESASA_SKIP_UNKNOWN
Skip atom when unknown atom is encountered.
@ FREESASA_INCLUDE_HYDROGEN
Include hydrogen atoms.
@ FREESASA_RADIUS_FROM_OCCUPANCY
Read atom radius from occupancy field.
@ FREESASA_JOIN_MODELS
Read MODELs as part of one big structure.
@ FREESASA_SEPARATE_CHAINS
Read separate chains as separate structures.
@ FREESASA_INCLUDE_HETATM
Include HETATM entries.
@ FREESASA_HALT_AT_UNKNOWN
Halt reading when unknown atom is encountered.
Struct to store data about a mmCIF atom site.
Struct to store integrated SASA values for either a full structure or a subset thereof.
double side_chain
Side-chain SASA.
double apolar
Apolar SASA.
double main_chain
Main-chain/Backbone SASA.
const char * name
Name of substructure.
double unknown
SASA of unknown class (neither polar nor apolar).
Struct to store parameters for SASA calculation.
freesasa_algorithm alg
Algorithm.
int shrake_rupley_n_points
Number of test points in S&R calculation.
double probe_radius
Probe radius (in Ångström).
int n_threads
Number of threads to use, if compiled with thread-support.
int lee_richards_n_slices
Number of slices per atom in L&R calculation.
Struct to store results of SASA calculation.
freesasa_parameters parameters
Parameters used when generating result.
int n_atoms
Number of atoms.
double * sasa
SASA of each atom in Ångström^2.
double total
Total SASA in Ångström^2.