Skip to content

Commit

Permalink
Added concrete example to Quickstart section.
Browse files Browse the repository at this point in the history
  • Loading branch information
smelandr committed Jan 28, 2017
1 parent 666843e commit 54ae484
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,37 @@ Import `nmrstarlib` library and create generator function that will yield
... print(starfile.source) # print source of StarFile
... print(list(starfile.keys())) # print StarFile saveframe categories
>>>
>>> # For example, let's read two files: one using BMRB id and the other one using URL:
>>> starfile_gen = nmrstarlib.read_files("15000", "http://rest.bmrb.wisc.edu/bmrb/NMR-STAR3/18569")
>>>
>>> for starfile in starfile_gen:
... print("BMRB id:", starfile.bmrbid)
... print("Source:", starfile.source)
... print("List of saveframes and comments:", list(starfile.keys()))
BMRB id: 15000
Source: http://rest.bmrb.wisc.edu/bmrb/NMR-STAR3/15000
List of saveframes and comments: ['data', 'comment_0', 'save_entry_information', 'comment_1',
'save_citation_1', 'comment_2', 'save_assembly', 'comment_3', 'save_F5-Phe-cVHP', 'comment_4',
'save_natural_source', 'comment_5', 'save_experimental_source', 'comment_6','save_chem_comp_PHF',
'comment_7', 'comment_8', 'save_unlabeled_sample', 'save_selectively_labeled_sample',
'comment_9', 'save_sample_conditions', 'comment_10', 'save_NMRPipe', 'save_PIPP', 'save_SPARKY',
'save_CYANA', 'save_X-PLOR_NIH', 'comment_11', 'comment_12', 'save_spectrometer_1',
'save_spectrometer_2', 'save_spectrometer_3', 'save_spectrometer_4', 'save_spectrometer_5',
'save_spectrometer_6', 'save_NMR_spectrometer_list', 'comment_13', 'save_experiment_list',
'comment_14', 'comment_15', 'comment_16', 'save_chemical_shift_reference_1', 'comment_17',
'comment_18', 'save_assigned_chem_shift_list_1']
BMRB id: 18569
Source: http://rest.bmrb.wisc.edu/bmrb/NMR-STAR3/18569
List of saveframes and comments: ['data', 'comment_0', 'save_entry_information', 'comment_1',
'save_entry_citation', 'comment_2', 'save_assembly', 'comment_3', 'save_EVH1', 'comment_4',
'save_natural_source', 'comment_5', 'save_experimental_source', 'comment_6', 'comment_7',
'save_sample_1', 'save_sample_2', 'save_sample_3', 'save_sample_4', 'comment_8',
'save_sample_conditions_1', 'save_sample_conditions_2', 'save_sample_conditions_3',
'save_sample_conditions_4', 'comment_9', 'save_AZARA', 'save_xwinnmr', 'save_ANSIG',
'save_CNS', 'comment_10', 'comment_11', 'save_spectrometer_1', 'save_spectrometer_2',
'save_NMR_spectrometer_list', 'comment_12', 'save_experiment_list', 'comment_13',
'comment_14', 'comment_15', 'save_chemical_shift_reference_1', 'comment_16', 'comment_17',
'save_assigned_chem_shift_list_1', 'comment_18', 'save_combined_NOESY_peak_list']
.. note:: Read `User Guide`_ and `The nmrstarlib Tutorial`_ on ReadTheDocs_ to learn more and see code examples on using
`nmrstarlib` as a library and as a command-line tool.
Expand Down

0 comments on commit 54ae484

Please sign in to comment.