@@ -6,57 +6,61 @@ cdef class Structure:
6
6
Represents a protein structure, including its atomic radii.
7
7
8
8
Initialized from PDB-file. Calculates atomic radii using default
9
- classifier, or custom one provided as argument to initalizer
9
+ classifier, or custom one provided as argument to initalizer.
10
10
11
- Since it is intended to be a static structure the word 'get' is
12
- omitted in the getter-functions.
11
+ Default options are ::
13
12
14
- The default options are:
15
- ::
16
- defaultOptions = {
17
- 'hetatm' : False,
18
- 'hydrogen' : False,
19
- 'join-models' : False,
20
- 'skip-unknown' : False,
21
- 'halt-at-unknown' : False
22
- }
13
+ Structure.defaultOptions = {
14
+ 'hetatm' : False, # False: skip HETATM
15
+ # True: include HETATM
16
+
17
+ 'hydrogen' : False, # False: ignore hydrogens
18
+ # True: include hydrogens
19
+
20
+ 'join-models' : False, # False: Only use the first MODEL
21
+ # True: Include all MODELs
22
+
23
+ 'skip-unknown' : False, # False: Guess radius for unknown atoms
24
+ # based on element
25
+ # True: Skip unknown atoms
26
+
27
+ 'halt-at-unknown' : False # False: set radius for unknown atoms,
28
+ # that can not be guessed to 0.
29
+ # True: Throw exception on unknown atoms.
30
+ }
23
31
24
32
Attributes:
25
- defaultOptions: Default options for reading structure from PDB.
26
- By default ignore HETATM, Hydrogens, only use first
27
- model. For unknown atoms try to guess the radius, if
28
- this fails, assign radius 0 (to allow changing the
29
- radius later).
33
+ defaultOptions: Default options for reading structure from PDB.
30
34
31
35
"""
32
36
cdef freesasa_structure* _c_structure
33
37
cdef const freesasa_classifier* _c_classifier
34
38
cdef int _c_options
35
39
36
40
defaultOptions = {
37
- ' hetatm' : False ,
38
- ' hydrogen' : False ,
39
- ' join-models' : False ,
40
- ' skip-unknown' : False ,
41
- ' halt-at-unknown' : False
42
- }
41
+ ' hetatm' : False ,
42
+ ' hydrogen' : False ,
43
+ ' join-models' : False ,
44
+ ' skip-unknown' : False ,
45
+ ' halt-at-unknown' : False
46
+ }
43
47
44
48
defaultStructureArrayOptions = {
45
- ' hetatm' : False ,
46
- ' hydrogen' : False ,
47
- ' separate-chains' : True ,
48
- ' separate-models' : False
49
+ ' hetatm' : False ,
50
+ ' hydrogen' : False ,
51
+ ' separate-chains' : True ,
52
+ ' separate-models' : False
49
53
}
50
54
51
55
def __init__ (self , fileName = None , classifier = None ,
52
56
options = defaultOptions):
53
57
"""
54
58
Constructor
55
59
56
- If PDB file is provided, the structure will be constructed
60
+ If a PDB file is provided, the structure will be constructed
57
61
based on the file. If not, this simply initializes an empty
58
- structure and the other arguments are ignored. In this case
59
- atoms will have to be added manually using addAtom().
62
+ structure with the given classifier and options. Atoms will then
63
+ have to be added manually using `:py:meth:`.Structure. addAtom()` .
60
64
61
65
Args:
62
66
fileName (str): PDB file (if `None` empty structure generated).
@@ -65,7 +69,7 @@ cdef class Structure:
65
69
This classifier will also be used in calls to :py:meth:`.Structure.addAtom()`
66
70
but only if it's the default classifier, one of the standard
67
71
classifiers from :py:meth:`.Classifier.getStandardClassifier()`,
68
- or defined by a config-file (i.e. if it is defined in the underlying
72
+ or defined by a config-file (i.e. if it uses the underlying
69
73
C API).
70
74
options (dict): specify which atoms and models to include, default is
71
75
:py:attr:`.Structure.defaultOptions`
0 commit comments