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
/**
@file
@author Simon Mitternacht
The following functions all extract info from the PDB lines `ATOM`
and `HETATM`. Valid lines have to begin with either `ATOM` or
`HETATM` and be sufficiently long to contain the value in
question.
*/
/**
Finds the location of all MODEL entries in the file pdb, returns
the number of models found.
The array *ranges will be dynamically allocated to contain a
file ranges for each model.
@return Returns 0 if no MODEL lines were found (for example an
X-ray structure with only one model) and sets *ranges to
NULL. A return value of 0 doesn't have to mean the file is
empty. ::FREESASA_FAIL if malloc-failure.
*/
int ;
/**
Finds the location of all chains within the file range 'model'.
@param pdb The pdb-file
@param model The ::file_range to search for chains within.
@param ranges The address to a dynamically allocated array
containing the ::file_range of each chain will be stored here.
@param options Bitfield, can be used to set
::FREESASA_INCLUDE_HETATM.
@return Number of chains found. Returns ::FREESASA_FAIL if memory
allocation fails.
*/
int ;
/**
Get atom name from a PDB line.
Extracts the whole atom name field from an `ATOM` or `HETATM` PDB
line, including padding, i.e. a string of ::PDB_ATOM_NAME_STRL
characters. For example `" CA "` for a regular C-alpha. If the
line is invalid, the name will be an empty string and the function
returns ::FREESASA_FAIL.
@param name The name is written to this string.
@param line Line from a PDB file.
@return ::FREESASA_SUCCESS if input is readable, else ::FREESASA_FAIL.
*/
int ;
/**
Get residue name from a PDB line.
Extracts the whole residue name from an `ATOM` or `HETATM` PDB
line, i.e. a string of ::PDB_ATOM_RES_NAME_STRL characters. For
example `"ALA"` for an Alanine. If theline is invalid, the name
will be an empty string and the function returns ::FREESASA_FAIL.
@param name The name is written to this string.
@param line Line from a PDB file.
@return ::FREESASA_SUCCESS if input is readable, else ::FREESASA_FAIL.
*/
int ;
/**
Get atom coordinates from a PDB line.
Extracts x-, y- and z-coordinates from an `ATOM` or `HETATM` PDB
line. If the line is invalid, the function returns ::FREESASA_FAIL
and coord will remain unchanged.
@param coord The coordiantes are written to this array as x,y,z.
@param line Line from a PDB file.
@return ::FREESASA_SUCCESS if input is readable, else ::FREESASA_FAIL.
*/
int ;
/**
Get residue number from a PDB line.
Extracts residue number (ResSeq) as a string from an `ATOM` or
`HETATM` PDB line as a string. String format is used because not
all residue-numbers are numbers. The string should have length
::PDB_ATOM_RES_NUMBER_STRL. If the line is invalid, the number will be an
empty string and the function returns ::FREESASA_FAIL.
@param number The residue number will be saved to this string.
@param line Line from a PDB file.
@return ::FREESASA_SUCCESS if input is readable, else ::FREESASA_FAIL.
*/
int ;
/**
Get chain label from PDB line.
Extracts the one character chain label (Chain identifier) from an
`ATOM` or `HETATM` PDB line (i.e. `'A'`, `'B'`, `'C'`, ...)
@param line Line from a PDB file.
@return The chain label. If the line is invalid, the function
returns '\0'.
*/
char ;
/**
Get alternate coordinate label from PDB line.
If there is more than one set of coordinates for an atom there
will be a label 'A', 'B', etc (Alternate location indicator). Else
the label is ' '.
@param line Line from a PDB file.
@return The label. If line is invalid, the function returns
'\0'.
*/
char ;
/**
Get element symbol from PDB line.
Writes padded string to argument symbol, i.e. " C", "SE", etc.
@param symbol The symbol will be written to this string.
@param line Line from a PDB file.
@return ::FREESASA_SUCCESS line has 78 or more characters. ::FREESASA_FAIL if
line too short. Does not check if symbol is valid.
*/
int ;
/**
Get occupancy from PDB line
@param occ The occupancy will be written to this location.
@param line Line from a PDB file
@return ::FREESASA_SUCCESS if line is long enough, starts with
ATOM or HETATM, and characters 55-60 contain a number.
*/
int ;
/**
Get temperature factor (B-factor) from PDB line
@param bfac The B-factor will be written to this location.
@param line Line from a PDB file
@return ::FREESASA_SUCCESS if line is long enough, starts with
ATOM or HETATM, and characters 61-66 contain a number.
*/
int ;
/**
Is atom Hydrogen?
Checks if an atom from an `ATOM` or `HETATM` PDB line is Hydrogen.
@param line Line from a PDB file.
@return 1 if Hydrogen (or deuterium). 0 otherwise. If line is
invalid, the function returns ::FREESASA_FAIL.
*/
int ;
/* FREESASA_PDB_H */