Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
656e9e1
Add _str2num and _deg2rad _utils
janbridley Apr 5, 2024
1e74eb7
Add cif file keys list to sample data
janbridley Apr 5, 2024
c369fd1
Add key_value_pairs reader and cell_params reader to parse
janbridley Apr 5, 2024
672c4e3
Add tests for key reader
janbridley Apr 5, 2024
e0b693f
Add tests for new utils
janbridley Apr 5, 2024
79350fc
Reorder test_key_reader
janbridley Apr 5, 2024
04b3344
Improve documentation for regex
janbridley Apr 5, 2024
b59eab1
Add warnings and tests to read_key_value_pairs
janbridley Apr 5, 2024
87303b9
Restore trailing spaces to downloaded CIF files
janbridley Apr 8, 2024
90120c7
Properly track keys containing "-"
janbridley Apr 8, 2024
d4203da
Improved tests for key value pair reader
janbridley Apr 8, 2024
8c3c014
Add key-value tests for INTENTIONALLY_BAD_CIF.cif
janbridley Apr 8, 2024
9c91bde
Fix docs
janbridley Apr 8, 2024
9aaba90
Enable top of page button
janbridley Apr 8, 2024
6ea7882
Update brand primary colors
janbridley Apr 8, 2024
0169783
Improve docs for parse.py
janbridley Apr 8, 2024
a404d19
Add __future__.annotations imports to relevant files
janbridley Apr 9, 2024
4903f80
Fix typo
janbridley Apr 10, 2024
a333c5c
Seperate _errors from _templates
janbridley Apr 10, 2024
b0f386b
Clean up docstring return types
janbridley Apr 10, 2024
96acd85
Add PDB cif to test suite
janbridley Apr 10, 2024
a6ebf33
Fix test in test_key_reader
janbridley Apr 10, 2024
f8dbaa3
Clean up patterns.py and add remove_nondelimiting_whitespace
janbridley Apr 10, 2024
b1e0bdd
Update table_reader to use remove_nondelimiting_whitespace
janbridley Apr 10, 2024
51328be
Allow value reader to read mmCIF files
janbridley Apr 10, 2024
06abb57
Update test_table_reader.py
janbridley Apr 10, 2024
98a2201
Remove seperate mmCIF reader
janbridley Apr 10, 2024
93909f8
Add docs for patterns module
janbridley Apr 10, 2024
d4d931b
Fix cast_to_float default value
janbridley Apr 10, 2024
1d86db9
Update docs
janbridley Apr 10, 2024
0528d36
Add documentation for __call__
janbridley Apr 10, 2024
40c7fb8
Update regex_filter param documentation
janbridley Apr 10, 2024
56c1e21
Fix typo
janbridley Apr 10, 2024
853a166
Remove unneeded comment
janbridley Apr 10, 2024
8b19268
Fix default values in docs
janbridley Apr 10, 2024
fd295a8
Fix typo
janbridley Apr 10, 2024
3e5e77c
Minor doc fix
janbridley Apr 10, 2024
ffa59a7
Fix typo
janbridley Apr 10, 2024
7f80005
Remove duplicate Introduction from index
janbridley Apr 10, 2024
1e8c01d
Remove duplicate entries from toc
janbridley Apr 10, 2024
56d80de
Add source for PDB cif
janbridley Apr 10, 2024
5d47d10
Add mmCIF flag to read_cell_params
janbridley Apr 10, 2024
dfbf5ed
Add quickstart.rst
janbridley Apr 10, 2024
28a7025
Fix comment in quickstart
janbridley Apr 10, 2024
e60cd1b
Remove unnecessary line in quickstart
janbridley Apr 10, 2024
6e82566
Fix image path in README.rst
janbridley Apr 11, 2024
a772261
Update regex documentation
janbridley Apr 11, 2024
7d03311
Fix CI
janbridley Apr 11, 2024
1f05fd7
Update __init__.py
janbridley Apr 15, 2024
0ddaa48
Add unitcells module
janbridley Apr 15, 2024
e1616ab
Add documentation links
janbridley Apr 15, 2024
04b19a3
Fix doc file naming
janbridley Apr 15, 2024
451fd8b
Remove resolved TODO
janbridley Apr 15, 2024
bba2849
Add top level description to unitcells
janbridley Apr 15, 2024
8d243ad
Default regex filters to None
janbridley Apr 15, 2024
5fece58
Fix default setting for nondelimiting_whitespace_replacement
janbridley Apr 15, 2024
85b7dff
Remove outdated comment
janbridley Apr 15, 2024
f4aefa7
Fix tests
janbridley Apr 15, 2024
43f0263
Add tests for symmetry operations
janbridley Apr 15, 2024
a713c06
Fix precision issues
janbridley Apr 15, 2024
a0a01cd
Increase string lines threshold
janbridley Apr 15, 2024
8c7f2c0
Remove in-file tests
janbridley Apr 15, 2024
8d5969d
Return unrounded values
janbridley Apr 15, 2024
923ce2c
Add test_extract_unit_cell
janbridley Apr 15, 2024
f96c7a9
Add distance calculation util for uniqueness comparison
janbridley Apr 26, 2024
b124cac
Add function to build basis vector matrix from box
janbridley Apr 26, 2024
cbf17ba
Update unitcell builder and rename to extract_atomic_positions
janbridley Apr 26, 2024
6ab5cd6
Update docstrings
janbridley Apr 26, 2024
e0eccb9
Clarify function naming
janbridley Apr 26, 2024
9bb9b2f
Change space group for IncStrDb_Ccmm.cif to standard format
janbridley Apr 26, 2024
a19b068
Remove unnecessary transpose in basis vector function
janbridley Apr 26, 2024
b3803be
Update unitcell tests to use ase
janbridley Apr 26, 2024
bf532c6
Filter out ase warnings
janbridley Apr 26, 2024
037d5d8
Switch catch_warnings to filterwarnings for python 3.9 compat
janbridley Apr 26, 2024
a1382d3
Add pytest to test requirements
janbridley Apr 27, 2024
b45218d
Fix top of page buttons and add view link
janbridley May 10, 2024
2ab4288
Fix logo on README.rst
janbridley May 10, 2024
e4cbbb8
Merge remote-tracking branch 'origin/main' into feature/supercells
janbridley May 22, 2024
e35ed1b
Merge branch 'main' into feature/supercells
janbridley Jun 3, 2024
bdc832d
Add readable assertion error in unitcells.py
janbridley Jun 10, 2024
c30d23e
Improve assertion error in _safe_eval
janbridley Jun 10, 2024
0632944
Remove unused distance-merge code
janbridley Jun 10, 2024
a023be2
Merge branch 'main' into feature/supercells
janbridley Dec 19, 2024
d65e094
Improve CI resilience
janbridley Dec 19, 2024
ccb13fd
Remove dependabot
janbridley Dec 19, 2024
e562353
Add requirements.txt for py3.6 and py3.7
janbridley Dec 19, 2024
d50b3ee
Update requirements.yaml CI action
janbridley Dec 19, 2024
78fbd68
Remove temporary lines from ci
janbridley Dec 19, 2024
9a2a5e7
Add future-annotations package
janbridley Dec 19, 2024
e0f186b
Fix annotations
janbridley Dec 19, 2024
22b145f
Disable testing on py3.6
janbridley Dec 20, 2024
f046aa0
Update doc requirements
janbridley Dec 20, 2024
3a3dbde
Decapitalize changelog and credits
janbridley Dec 20, 2024
e91767d
Swap tests to us UV
janbridley Dec 20, 2024
77184f6
Fix uv version
janbridley Dec 20, 2024
f3ae2d1
Clean up CI script
janbridley Dec 20, 2024
b85b73b
Activate venv
janbridley Dec 20, 2024
606be0b
Remove setup.py
janbridley Dec 20, 2024
a1be853
Fix CI
janbridley Dec 20, 2024
446f441
Clean up CI
janbridley Dec 20, 2024
cefdb5c
Simplify CI
janbridley Dec 20, 2024
7385f4b
Clean up overview
janbridley Dec 20, 2024
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
Prev Previous commit
Next Next commit
Restore trailing spaces to downloaded CIF files
  • Loading branch information
janbridley committed Apr 10, 2024
commit 87303b936bd38b219814c8c529a97f3a8d222a74
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ repos:
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: tests/sample_data
- id: check-builtin-literals
- id: check-executables-have-shebangs
- id: check-json
Expand Down
9 changes: 5 additions & 4 deletions tests/sample_data/AFLOW_mC24.cif
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# S. Curtarolo, The AFLOW Library of Crystallographic Prototypes: Part 3,
# Comp. Mat. Sci. 199, 110450 (2021). (doi=10.1016/j.commatsci.2021.110450)

# CIF file
# CIF file
data_findsym-output
_audit_creation_method FINDSYM

Expand All @@ -37,7 +37,7 @@ _publ_Section_title
;

# Found in The American Mineralogist Crystal Structure Database, 2003

_aflow_title 'Clinocervantite ($\beta$-Sb$_{2}$O$_{4}$) Structure'
_aflow_proto 'A2B_mC24_15_2f_ce'
_aflow_params 'a,b/a,c/a,\beta,y_{2},x_{3},y_{3},z_{3},x_{4},y_{4},z_{4}'
Expand All @@ -47,13 +47,14 @@ _aflow_Pearson 'mC24'

_symmetry_space_group_name_H-M "C 1 2/c 1"
_symmetry_Int_Tables_number 15

_cell_length_a 12.06100
_cell_length_b 4.83600
_cell_length_c 5.38300
_cell_angle_alpha 90.00000
_cell_angle_beta 103.12000
_cell_angle_gamma 90.00000


loop_
_space_group_symop_id
Expand All @@ -66,7 +67,7 @@ _space_group_symop_operation_xyz
6 -x+1/2,y+1/2,-z+1/2
7 -x+1/2,-y+1/2,-z
8 x+1/2,-y+1/2,z+1/2

loop_
_atom_site_label
_atom_site_type_symbol
Expand Down
4 changes: 2 additions & 2 deletions tests/sample_data/B-IncStrDb_Ccmm.cif
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ loop_
'Overeijnder, H.'
'Tuinstra, F.'

_publ_section_title
_publ_section_title
;The average structure of K~2~MoO~4~ in the incommensurate phase at 633K
;

_exptl_crystal_type_of_structure cryst
_diffrn_ambient_temperature 633
_diffrn_source x-ray

_exptl_special_details
_exptl_special_details
;Guinier-Lenne camera. Peak intensities estimated with an optical densitometer
;

Expand Down
56 changes: 28 additions & 28 deletions tests/sample_data/CCDC_1446529_Pm-3m.cif
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#######################################################################
#
# This file contains crystal structure data downloaded from the
# Cambridge Structural Database (CSD) hosted by the Cambridge
#######################################################################
#
# This file contains crystal structure data downloaded from the
# Cambridge Structural Database (CSD) hosted by the Cambridge
# Crystallographic Data Centre (CCDC).
#
# Full information about CCDC data access policies and citation
# guidelines are available at http://www.ccdc.cam.ac.uk/access/V1
#
# Audit and citation data items may have been added by the CCDC.
# Please retain this information to preserve the provenance of
# this file and to allow appropriate attribution of the data.
#
#
# Full information about CCDC data access policies and citation
# guidelines are available at http://www.ccdc.cam.ac.uk/access/V1
#
# Audit and citation data items may have been added by the CCDC.
# Please retain this information to preserve the provenance of
# this file and to allow appropriate attribution of the data.
#
#######################################################################

data_MAPbBr3_RT
Expand All @@ -21,9 +21,9 @@ _citation_id
_citation_doi
_citation_year
1 10.1021/acscentsci.6b00055 2016
_audit_update_record
_audit_update_record
;
2016-01-10 deposited with the CCDC. 2024-04-02 downloaded from the CCDC.
2016-01-10 deposited with the CCDC. 2024-04-08 downloaded from the CCDC.
;

_audit_creation_method SHELXL-2014/7
Expand Down Expand Up @@ -52,7 +52,7 @@ _space_group_IT_number 221
_space_group_name_H-M_alt 'P m -3 m'
_space_group_name_Hall '-P 4 2 3'

_shelx_space_group_comment
_shelx_space_group_comment
;
The symmetry employed for this shelxl refinement is uniquely defined
by the following loop, which should always be used as a source of
Expand Down Expand Up @@ -146,7 +146,7 @@ _exptl_absorpt_special_details ?
_diffrn_ambient_temperature 296(2)
_diffrn_radiation_wavelength 0.7293
_diffrn_radiation_type synchrotron
_diffrn_source
_diffrn_source
;
Advanced Light Source, station 11.3.1
;
Expand Down Expand Up @@ -179,11 +179,11 @@ _reflns_Friedel_coverage 0.000
_reflns_Friedel_fraction_max .
_reflns_Friedel_fraction_full .

_reflns_special_details
_reflns_special_details
;
Reflections were merged by SHELXL according to the crystal
class for the calculation of statistics and refinement.

_reflns_Friedel_fraction is defined as the number of unique
Friedel pairs measured divided by the number that would be
possible theoretically, ignoring centric projections and
Expand All @@ -195,27 +195,27 @@ _computing_cell_refinement 'SAINT V8.34A(Bruker, 2013)'
_computing_data_reduction SAINT
_computing_structure_solution 'SHELXT (Sheldrick, 2012)'
_computing_structure_refinement 'SHELXL-2014/7 (Sheldrick, 2014)'
_computing_molecular_graphics
_computing_molecular_graphics
;
SHELXTL 5.1, XP (Sheldrick, 1994)
ShelXle Rev 699 (Hubschle, 2011)
WinCoot, (P.Emsley, B.Lohkamp W.G.Scott and K.Cowtand, 2010)
;
_computing_publication_material SHELXL-2014/7
_refine_special_details
_refine_special_details
;
Hydrogen atoms were not found in the difference map, so were not refined
in the structure.
in the structure.

The methylammonium positions were found in the difference map.
The methylammonium positions were found in the difference map.
The carbon and the nitrogens share the same position in all three sites.
They were refined with EADP & EXYZ. A DFIX was initially used, but then as
the refinement progressed, a SADI was employed over all three.
the refinement progressed, a SADI was employed over all three.
;
_refine_ls_structure_factor_coef Fsqd
_refine_ls_matrix_type full
_refine_ls_weighting_scheme calc
_refine_ls_weighting_details
_refine_ls_weighting_details
'w=1/[\s^2^(Fo^2^)+(0.0263P)^2^+0.0660P] where P=(Fo^2^+2Fc^2^)/3'
_atom_sites_solution_primary 'intrinsic phasing'
_atom_sites_solution_secondary difmap
Expand Down Expand Up @@ -271,7 +271,7 @@ _atom_site_aniso_U_12
Pb01 0.02551(17) 0.02551(17) 0.02551(17) 0.000 0.000 0.000
Br02 0.0222(5) 0.1364(11) 0.1364(11) 0.000 0.000 0.000

_geom_special_details
_geom_special_details
;
All esds (except the esd in the dihedral angle between two l.s. planes)
are estimated using the full covariance matrix. The cell esds are taken
Expand Down Expand Up @@ -535,7 +535,7 @@ _refine_diff_density_max 0.464
_refine_diff_density_min -0.593
_refine_diff_density_rms 0.151

_shelx_res_file
_shelx_res_file
;

sad_a.res created by SHELXL-2014/7
Expand Down Expand Up @@ -656,10 +656,10 @@ _shelx_res_checksum 94550

# start Validation Reply Form

_vrf_PLAT973_I
_vrf_PLAT973_I
;
PROBLEM: Check Calcd Positive Residual Density on Pb01 2.62 eA-3
RESPONSE: Disorder in this site should have been seen in related disorders,
and as it is less than 3% of a Pb, it was left alone.
and as it is less than 3% of a Pb, it was left alone.

;
8 changes: 0 additions & 8 deletions tests/sample_data/COD_1540955_aP16.cif
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# Data taken from COD (Crystallography Open Database)
# All credit goes to the following:
# Grazulis, S., Chateigner, D., Downs, R. T., Yokochi, A. T., Quiros, M., Lutterotti,
# L., Manakova, E., Butkus, J., Moeck, P. & Le Bail, A. (2009). Crystallography Open
# Database – an open-access collection of crystal structures. Journal of Applied
# Crystallography, 42, 726-729.


#------------------------------------------------------------------------------
#$Date: 2016-02-13 21:28:24 +0200 (Sat, 13 Feb 2016) $
#$Revision: 176429 $
Expand Down