Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion package/MDAnalysis/fetch/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def from_PDB(
--------
Download a single PDB file:

>>> mda.fetch.from_PDB("1AKE", file_format="cif")
>>> import MDAnalysis as mda
>>> from MDAnalysis.fetch import from_PDB
>>> from_PDB("1AKE", file_format="cif")
'./MDAnalysis_pdbs/1AKE.cif'

Download multiple PDB files with a progress bar:
Expand Down
9 changes: 6 additions & 3 deletions package/MDAnalysis/lib/formats/libdcd.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,12 @@ cdef class DCDFile:
Examples
--------
>>> from MDAnalysis.lib.formats.libdcd import DCDFile
>>> with DCDFile('foo.dcd') as f:
>>> for frame in f:
>>> print(frame.x)
>>> try:
... with DCDFile('foo.dcd') as f:
... for frame in f:
... print(frame.x)
... except OSError:
... pass


Notes
Expand Down
19 changes: 12 additions & 7 deletions package/MDAnalysis/lib/formats/libmdaxdr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,12 @@ cdef class TRRFile(_XDRFile):
Examples
--------
>>> from MDAnalysis.lib.formats.libmdaxdr import TRRFile
>>> with TRRFile('foo.trr') as f:
>>> for frame in f:
>>> print(frame.x)

>>> try:
... with TRRFile('foo.trr') as f:
... for frame in f:
... print(frame.x)
... except OSError:
... pass
Notes
-----
This class can be pickled. The pickle will store filename, mode, current
Expand Down Expand Up @@ -706,9 +708,12 @@ cdef class XTCFile(_XDRFile):
Examples
--------
>>> from MDAnalysis.lib.formats.libmdaxdr import XTCFile
>>> with XTCFile('foo.trr') as f:
>>> for frame in f:
>>> print(frame.x)
>>> try:
... with XTCFile('foo.trr') as f:
... for frame in f:
... print(frame.x)
... except OSError:
... pass

Notes
-----
Expand Down
3 changes: 2 additions & 1 deletion package/MDAnalysis/lib/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,8 @@ def decompose_matrix(matrix):
True
>>> S = scale_matrix(0.123)
>>> scale, shear, angles, trans, persp = decompose_matrix(S)
>>> scale[0]
>>> result = float(scale[0])
>>> result
0.123
>>> R0 = euler_matrix(1, 2, 3)
>>> scale, shear, angles, trans, persp = decompose_matrix(R0)
Expand Down
9 changes: 6 additions & 3 deletions package/MDAnalysis/lib/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,12 @@ def greedy_splitext(p):
-------

>>> from MDAnalysis.lib.util import greedy_splitext
>>> greedy_splitext("/home/joe/protein.pdb.bz2")
('/home/joe/protein', '.pdb.bz2')

>>> import os
>>> path, ext = greedy_splitext("/home/joe/protein.pdb.bz2")
>>> path == '/home/joe' + os.path.sep + 'protein'
True
>>> ext == '.pdb.bz2'
True
"""
path, root = os.path.split(p)
extension = ""
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added package/doc/doctest/.doctrees/environment.pickle
Binary file not shown.
Binary file added package/doc/doctest/.doctrees/index.doctree
Binary file not shown.
Loading
Loading