Skip to content

Commit

Permalink
Fix docstrings for commands
Browse files Browse the repository at this point in the history
  • Loading branch information
padix-key committed Jun 8, 2020
1 parent 393e9d7 commit 61b0691
Showing 1 changed file with 72 additions and 48 deletions.
120 changes: 72 additions & 48 deletions src/ammolite/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,9 @@ def alter(self, selection, expression):
Parameters
----------
selection : str or ndarray, dtype=bool
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
expression : str
Expand Down Expand Up @@ -396,8 +397,9 @@ def cartoon(self, type, selection=None):
- ``'arrow'`` or
- ``'dumbbell'``.
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -416,8 +418,9 @@ def center(self, selection=None, state=None, origin=True):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down Expand Up @@ -452,8 +455,9 @@ def clip(self, mode, distance, selection=None, state=None):
distance : float
The meaning of this parameter depends on `mode`.
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -479,8 +483,9 @@ def color(self, color, selection=None):
color : str or tuple(float, float, float)
Either a *PyMOL* color name or a tuple containing an RGB
value (0.0 to 1.0).
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down Expand Up @@ -514,8 +519,9 @@ def desaturate(self, selection=None, a=0.5):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -535,8 +541,9 @@ def disable(self, selection=None):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -557,8 +564,9 @@ def distance(self, name, selection1, selection2, cutoff=None, mode=None,
----------
name : str
Name of the distance object to create.
selection1, selection2 : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection1, selection2 : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
cutoff : float, optional
Expand Down Expand Up @@ -600,8 +608,9 @@ def dss(self, selection=None, state=None):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -624,8 +633,9 @@ def enable(self, selection=None):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down Expand Up @@ -661,8 +671,9 @@ def hide(self, representation, selection=None):
- ``'slice'`` or
- ``'cell'``.
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -680,8 +691,9 @@ def indicate(self, selection=None):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -699,8 +711,9 @@ def label(self, selection, text):
Parameters
----------
selection : str or ndarray, dtype=bool
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
text : str
Expand All @@ -719,8 +732,9 @@ def orient(self, selection=None, state=None):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -743,8 +757,9 @@ def origin(self, selection=None, state=None):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -771,8 +786,9 @@ def select(self, name, selection=None):
----------
name : str
Name of the selection object to create.
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down Expand Up @@ -806,8 +822,9 @@ def set(self, name, value, selection=None, state=None):
value : object
The new value for the given setting name.
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down Expand Up @@ -845,8 +862,9 @@ def set_bond(self, name, value, selection1=None, selection2=None,
value : object
The new value for the given setting name.
selection1, selection2 : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection1, selection2 : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, `selection1` applies to all atoms of this
Expand Down Expand Up @@ -893,8 +911,9 @@ def show(self, representation, selection=None):
- ``'slice'`` or
- ``'cell'``.
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down Expand Up @@ -931,8 +950,9 @@ def show_as(self, representation, selection=None):
- ``'slice'`` or
- ``'cell'``.
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand All @@ -951,8 +971,9 @@ def smooth(self, selection=None, passes=1, window=5,
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down Expand Up @@ -998,8 +1019,9 @@ def unset(self, name, selection=None, state=None):
- ``'transparency'`` (for surfaces) or
- ``'sphere_transparency'``.
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down Expand Up @@ -1034,8 +1056,9 @@ def unset_bond(self, name, selection1=None, selection2=None, state=None):
- ``'stick_color'`` or
- ``'stick_transparency'``.
selection1, selection2 : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection1, selection2 : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, `selection1` applies to all atoms of this
Expand Down Expand Up @@ -1065,8 +1088,9 @@ def zoom(self, selection=None, buffer=0.0, state=None, complete=False):
Parameters
----------
selection : str or ndarray, dtype=bool, optional
A boolean mask or a *PyMOL* selection expression that
selection : str or int or slice or ndarray, dtype=bool or ndarray, dtype=int, optional
A *Biotite* compatible atom selection index,
e.g. a boolean mask, or a *PyMOL* selection expression that
selects the atoms of this *PyMOL* object to apply the
command on.
By default, the command is applied on all atoms of this
Expand Down

0 comments on commit 61b0691

Please sign in to comment.