-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add _str2num and _deg2rad _utils * Add cif file keys list to sample data * Add key_value_pairs reader and cell_params reader to parse * Add tests for key reader * Add tests for new utils * Reorder test_key_reader * Improve documentation for regex * Add warnings and tests to read_key_value_pairs * Restore trailing spaces to downloaded CIF files * Properly track keys containing "-" * Improved tests for key value pair reader * Add key-value tests for INTENTIONALLY_BAD_CIF.cif * Fix docs * Enable top of page button * Update brand primary colors * Improve docs for parse.py * Add __future__.annotations imports to relevant files * Fix typo * Seperate _errors from _templates * Clean up docstring return types * Add PDB cif to test suite * Fix test in test_key_reader * Clean up patterns.py and add remove_nondelimiting_whitespace * Update table_reader to use remove_nondelimiting_whitespace * Allow value reader to read mmCIF files * Update test_table_reader.py * Remove seperate mmCIF reader * Add docs for patterns module * Fix cast_to_float default value * Update docs * Add documentation for __call__ * Update regex_filter param documentation * Fix typo * Remove unneeded comment * Fix default values in docs * Fix typo * Minor doc fix * Fix typo * Remove duplicate Introduction from index * Remove duplicate entries from toc * Add source for PDB cif * Add mmCIF flag to read_cell_params * Add quickstart.rst * Fix comment in quickstart * Remove unnecessary line in quickstart * Fix image path in README.rst * Update regex documentation * Fix CI * Documentation fix * Documentation fix for regex filter * Comment fixes * Fix #8 * Fix typo in _parsed_line_generator docs Co-authored-by: Kelly Wang <47036428+klywang@users.noreply.github.com> * Typo fix * Move tip block comment * Untrack cif files from end-of-file-fixer * Add missing key to CifData namedtuple * Remove __future__ annotations * Remove type | type
- Loading branch information
1 parent
ee5894e
commit dfd640c
Showing
25 changed files
with
2,068 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
data_cif_file | ||
|
||
_journal_year 1999 | ||
_journal_page_first 0 | ||
_journal_page_last 123 | ||
|
||
_chemical_name_mineral 'Copper FCC' | ||
_chemical_formula_sum 'Cu' | ||
|
||
_cell_length_a 3.6 | ||
_cell_length_b 3.6 | ||
_cell_length_c 3.6 | ||
_cell_angle_alpha 90.0 | ||
_cell_angle_beta 90.0 | ||
_cell_angle_gamma 90.0 | ||
|
||
|
||
loop_ | ||
_atom_site_label | ||
_atom_site_fract_x | ||
_atom_site_fract_y | ||
_atom_site_fract_z | ||
_atom_site_type_symbol | ||
_atom_site_Wyckoff_label | ||
Cu1 0.0000000000 0.0000000000 0.0000000000 Cu a | ||
|
||
_symmetry_space_group_name_H-M 'Fm-3m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Patterns Module | ||
============================== | ||
|
||
.. rubric:: Overview | ||
|
||
.. automodule:: parsnip.patterns | ||
:members: | ||
:special-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class ParseWarning(Warning): | ||
def __init__(self, message): | ||
self.message = message | ||
|
||
def __str__(self): | ||
return repr(self.message) | ||
|
||
|
||
class ParseError(RuntimeError): | ||
def __init__(self, message): | ||
self.message = message | ||
|
||
def __str__(self): | ||
return repr(self.message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
class ParseWarning(Warning): | ||
def __init__(self, message): | ||
self.message = message | ||
import numpy as np | ||
|
||
def __str__(self): | ||
return repr(self.message) | ||
|
||
def _str2num(val: str): | ||
"""Convert a string value to an integer if possible, or a float otherwise.""" | ||
return float(val) if "." in val else int(val) | ||
|
||
class ParseError(RuntimeError): | ||
def __init__(self, message): | ||
self.message = message | ||
|
||
def __str__(self): | ||
return repr(self.message) | ||
def _deg2rad(val: float): | ||
"""Convert a value in degrees to one in radians.""" | ||
return val * np.pi / 180 |
Oops, something went wrong.