Skip to content

Commit 88934c7

Browse files
committed
Update docs.
1 parent 077da5a commit 88934c7

File tree

3 files changed

+39
-35
lines changed

3 files changed

+39
-35
lines changed

src/parameters.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ cdef class Parameters:
1010
"""
1111
Stores parameter values to be used by calculation.
1212
13-
Default parameters are
14-
::
15-
defaultParameters = {
13+
Default parameters are ::
14+
15+
Parameters.defaultParameters = {
1616
'algorithm' : LeeRichards,
1717
'probe-radius' : freesasa_default_parameters.probe_radius,
1818
'n-points' : freesasa_default_parameters.shrake_rupley_n_points,

src/result.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ cdef class Result:
112112
the second dimension residue number. I.e. ``result["A"]["5"]`` gives the
113113
:py:class:`.ResidueArea` of residue number 5 in chain A.
114114
115-
Relative areas are normalized to 1, but can be larger than one for
115+
Relative areas are normalized to 1, but can be > 1 for
116116
residues in unusual conformations or at the ends of chains.
117117
118118
Returns:

src/structure.pyx

Lines changed: 35 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,57 +6,61 @@ cdef class Structure:
66
Represents a protein structure, including its atomic radii.
77
88
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.
1010
11-
Since it is intended to be a static structure the word 'get' is
12-
omitted in the getter-functions.
11+
Default options are ::
1312
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+
}
2331
2432
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.
3034
3135
"""
3236
cdef freesasa_structure* _c_structure
3337
cdef const freesasa_classifier* _c_classifier
3438
cdef int _c_options
3539

3640
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+
}
4347

4448
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
4953
}
5054

5155
def __init__(self, fileName=None, classifier=None,
5256
options = defaultOptions):
5357
"""
5458
Constructor
5559
56-
If PDB file is provided, the structure will be constructed
60+
If a PDB file is provided, the structure will be constructed
5761
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()`.
6064
6165
Args:
6266
fileName (str): PDB file (if `None` empty structure generated).
@@ -65,7 +69,7 @@ cdef class Structure:
6569
This classifier will also be used in calls to :py:meth:`.Structure.addAtom()`
6670
but only if it's the default classifier, one of the standard
6771
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
6973
C API).
7074
options (dict): specify which atoms and models to include, default is
7175
:py:attr:`.Structure.defaultOptions`

0 commit comments

Comments
 (0)