Skip to content

Commit bcc5121

Browse files
committed
working example
1 parent f08d024 commit bcc5121

1 file changed

Lines changed: 12 additions & 17 deletions

File tree

  • package/MDAnalysis/fetch

package/MDAnalysis/fetch/pdb.py

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -236,26 +236,21 @@ def from_DOI(doi, file_name, remove_prefix=True, cache_path=None):
236236
237237
Examples
238238
--------
239-
Download a single PDB file:
239+
Download a single DOI file:
240240
241-
>>> mda.fetch.from_PDB("1AKE", file_format="cif")
242-
'./MDAnalysis_pdbs/1AKE.cif'
243-
244-
Download multiple PDB files with a progress bar:
241+
>>> from_DOI("https://doi.org/10.6084/m9.figshare.5108170",
242+
... file_name="adk4AKE.psf")
243+
'./MDAnalysis_pdbs/adk4AKE.psf'
245244
246-
>>> mda.fetch.from_PDB(["1AKE", "4BWZ"], progressbar=True)
247-
['./MDAnalysis_pdbs/1AKE.pdb.gz', './MDAnalysis_pdbs/4BWZ.pdb.gz']
248-
249-
Download a single PDB file and convert it to a universe:
250-
251-
>>> mda.Universe(mda.fetch.from_PDB("1AKE"), file_format="pdb.gz")
252-
<Universe with 3816 atoms>
253-
254-
Download multiple PDB files and convert each of them into a universe:
255-
256-
>>> [mda.Universe(pdb) for pdb in mda.fetch.from_PDB(["1AKE", "4BWZ"], progressbar=True)]
257-
[<Universe with 3816 atoms>, <Universe with 2824 atoms>]
245+
>>> from_DOI("doi.org/10.6084/m9.figshare.5108170",
246+
... file_name="adk4AKE.psf")
247+
'./MDAnalysis_pdbs/adk4AKE.psf'
258248
249+
250+
Support pooch specified DOI format:
251+
>>> from_DOI("doi:10.6084/m9.figshare.5108170",
252+
... file_name="adk4AKE.psf")
253+
'./MDAnalysis_pdbs/adk4AKE.psf'
259254
260255
.. versionadded:: 2.11.0
261256
"""

0 commit comments

Comments
 (0)