1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
/* These are included here so that the _CRT_SECURE_.. macro above will have the desired effect */
extern "C" _MSC_VER
/* The library is intended to be compiled with C99, but this macro
allows us to compile it with C89 too, to test MSC compatibility */
/**
Calculate SASA using S&R algorithm.
@param sasa The results are written to this array, the user has to
make sure it is large enough.
@param c Coordinates of the object to calculate SASA for.
@param radii Array of radii for each sphere.
@param param Parameters specifying resolution, probe radius and
number of threads. If NULL :.freesasa_default_parameters is used.
@return ::FREESASA_SUCCESS on success, ::FREESASA_WARN if multiple
threads are requested when compiled in single-threaded mode (with
error message). ::FREESASA_FAIL if memory allocation failure.
*/
int ;
/**
Calculate SASA using L&R algorithm.
Solvent accessible surface area for each atom is written to the
array 'sasa'. The user is responsible for making sure this has the
right size. The argument grid sets the distance between grid
points in Å. Returns FREESASA_SUCCESS on success, FREESASA_WARN if
multiple threads are requested when compiled in single-threaded
mode (with error message).
@param sasa The results are written to this array, the user has to
make sure it is large enough.
@param c Coordinates of the object to calculate SASA for.
@param radii Array of radii for each sphere.
@param param Parameters specifying resolution, probe radius and
number of threads. If NULL :.freesasa_default_parameters is used.
@return ::FREESASA_SUCCESS on success, ::FREESASA_WARN if
multiple threads are requested when compiled in single-threaded
mode (with error message). ::FREESASA_FAIL if memory allocation
failure.
*/
int ;
/**
Calculate SASA based on a coordinate object, radii and parameters
Wrapper for freesasa_lee_richards() and freesasa_shrake_rupley()
that creates a result object.
Return value is dynamically allocated, should be freed with
freesasa_result_free().
@param c Coordinates
@param radii Atomi radii
@param parameters Parameters
@return Result of calculation, NULL if something went wrong.
*/
freesasa_result *
;
int ;
/**
Print RSA-file
@param output Output-file.
@param root A tree with stored results.
@param options Bitfield with option ::FREESASA_OUTPUT_SKIP_REL to specify
if REL column should be populated or not. If the classifier has no
reference values, it will be left empty either way.
@return ::FREESASA_SUCCESS on success, ::FREESASA_FAIL if problems
writing to file.
*/
int ;
/**
Export to JSON
Not thread-safe.
@param output Output-file.
@param root A tree with stored results.
@param parameters Parameters used in the calculation (NULL means
defaults are assumed).
@param options Bitfield with options ::FREESASA_OUTPUT_STRUCTURE,
::FREESASA_OUTPUT_CHAIN and ::FREESASA_OUTPUT_RESIDUE, that specify
depth of the tree to output. If `options == 0` all levels are
written. The options ::FREESASA_OUTPUT_SKIP_REL specifies
if REL column should be populated or not. If the classifier has no
reference values, it will be left empty either way.
@return ::FREESASA_SUCCESS on success, ::FREESASA_FAIL if problems
writing to file.
*/
int ;
/**
Export to XML
@param output Output-file.
@param root A tree with stored results.
@param parameters Parameters used in the calculation (NULL means
defaults are assumed).
@param options Bitfield with options ::FREESASA_OUTPUT_STRUCTURE,
::FREESASA_OUTPUT_CHAIN and ::FREESASA_OUTPUT_RESIDUE, that specify
depth of the tree to output. If `options == 0` all levels
written. The options ::FREESASA_OUTPUT_SKIP_REL specifies
if REL column should be populated or not. If the classifier has no
reference values, it will be left empty either way.
@return ::FREESASA_SUCCESS on success, ::FREESASA_FAIL if problems
writing to file.
*/
int ;
/**
Write SASA values and atomic radii to new PDB-file.
Takes PDB information from the provided structure and writes a new
PDB-file to output, where the B-factors have been replaced with
the atom's SASA values in the results, and the occupancy
factors with the radii.
Will only work if the structure was initialized from a PDB-file, i.e.
using freesasa_structure_from_pdb() or freesasa_structure_array().
@param output Output-file
@param structure A ::freesasa_node of type ::FREESASA_NODE_STRUCTURE
@return ::FREESASA_SUCCESS if file written successfully.
::FREESASA_FAIL if there is no previous PDB input to base output
on or if there were problems writing to the file.
*/
int ;
/**
Write per-residue-type output
*/
int ;
/**
Write SASA per residue in sequence output
*/
int ;
/**
Write standard log message.
*/
int ;
/**
Clone results object
*/
freesasa_result *
;
/**
Clone selection object
*/
freesasa_selection *
;
/**
Get coordinates.
@param structure A structure.
@return The coordinates of the structure as a ::coord_t struct.
*/
const coord_t *
;
/**
The class of an atom, in the classifier used to initialize the structure.
@param structure A structure.
@param i Atom index.
@return The class.
*/
freesasa_atom_class
;
/**
The PDB line used to generate the atom.
@param structure A structure.
@param i Atom index.
@return The line, NULL if structure wasn't generated from a PDB file.
*/
const char *
;
/**
Add a reference number to the document used to generate the structure from a CIF file,
used when exporting to CIF file.
@param structure A structure.
@param ref Reference number for document. >= 1.
@param release_func A function that can be called when freeing the structure, to trigger
the destructor for the CIF document. This can be NULL if one wants another mode
of control over the CIF document.
@return ::FREESASA_SUCCESS if success.
::FREESASA_FAIL if memory allocation error.
*/
void ;
/**
Retrieve the reference number for the CIF document used to generate the structure
from a CIF file.
@param structure A structure.
@return The reference number. 0 if structure is not from CIF file.
*/
size_t ;
/**
Retrieve the reference number for the CIF document used to generate the structure
from a CIF file, in a structure node.
@param node A node of type ::FREESASA_NODE_STRUCTURE.
@return Reference to CIF document.
@ingroup node
*/
size_t
;
const freesasa_nodearea *
;
/**
Get the index of a chain.
@param structure A structure.
@param chain The chain label.
@return The index of `chain` in the structure. ::FREESASA_FAIL
if `chain` not found.
*/
int ;
/**
Extract area to provided ::freesasa_nodearea object
Main-chain / side-chain atoms are defined by
::freesasa_backbone_classifier.
@param area Area will be stored here
@param structure Structure to use for classification
@param result The areas to use
@param atom_index Index of atom in question
@return ::FREESASA_SUCCESS. ::FREESASA_FAIL if memory
allocation for name fails.
*/
int ;
/**
Adds all members of term to corresponding members of sum
@param sum Object to add to
@param term Object to add
*/
void ;
/**
Compute nodearea for a range of atoms
*/
void ;
/**
Calculate relative SASA values for a residue
If the array `ref_values` does not have an entry that has the same
`name` as `abs`, `rel->name` will be `NULL`.
@param rel Store results here, will have same name as `abs`
@param abs Absolute SASA for residue
@param reference Reference SASA for the residue
*/
void ;
/**
Is an atom a backbone atom
@param atom_name Name of atom
@return 1 if the atom_name equals CA, N, O or C after whitespace
is trimmed, 0 else. (i.e. does not check if it is an actual atom)
*/
int ;
/**
Holds range in a file, to be initalized with ftell() and used
with fseek().
*/
;
/**
For convenience, get a file range that covers a whole file.
@param file The file to study
@return the ::file_range.
*/
;
/**
Algorithm name
@param algorithm The algorithm
@return Name
*/
const char *
;
/**
Print failure message using format string and arguments.
Prefer using the macro fail_msg().
@param format Format string
@return ::FREESASA_FAIL
*/
int ;
/**
Print warning message using format string and arguments.
@param format Format string
@return ::FREESASA_WARN
*/
int ;
/**
Print warning message using function, file and line-number.
Usually used via the macro mem_fail().
@param func Name of the function that failed
@param file The file where the function is.
@param line Line number for the error.
@return ::FREESASA_FAIL
*/
int ;
/**
Returns string explaining return values of pthread_create() and
pthread_join().
@param error_code The error code
@return A string describing the error code.
*/
const char *
;
/**
Prints fail message with function name, file name, and line number.
Mainly intended to be used by the macros fail_msg() and mem_fail().
@param file The file name
@param line The line number
@param msg The error message
@return ::FREESASA_FAIL
*/
int ;
}
/* FREESASA_INTERNAL_H */