├── tests ├── inputs │ ├── n01.txt │ ├── n02.txt │ ├── f05.filter │ ├── f13.filter │ ├── numeric.filter │ ├── val_to_id.filter │ ├── f02.filter │ ├── f03.filter │ ├── length2_fail.filter │ ├── length3.filter │ ├── set2_fail.filter │ ├── f08.filter │ ├── f14.filter │ ├── length2.filter │ ├── length4_fail.filter │ ├── length_fail.filter │ ├── numeric2.filter │ ├── strings2.filter │ ├── f01.filter │ ├── f11.filter │ ├── integers.lst │ ├── known_fail.filter │ ├── set_fail.filter │ ├── setzip_fail.filter │ ├── types.filter │ ├── f12.filter │ ├── known2_fail.filter │ ├── precedence2.filter │ ├── strings_fail.filter │ ├── clauses3_fail.filter │ ├── known3_fail.filter │ ├── precedence.filter │ ├── f06.filter │ ├── fuzzystring2_fail.filter │ ├── id_to_id.filter │ ├── val_to_val.filter │ ├── f06_fail.filter │ ├── fuzzystring_fail.filter │ ├── id_to_id-no-spaces.filter │ ├── numeric3.filter │ ├── setzip2_fail.filter │ ├── setzip3_fail.filter │ ├── string.filter │ ├── clauses2_fail.filter │ ├── clauses_fail.filter │ ├── f09.filter │ ├── known.filter │ ├── not-identifiers.lst │ ├── filter.txt │ ├── various-whitespace.filter │ ├── f04.filter │ ├── id_to_id-some-other-spaces.filter │ ├── strings3.filter │ ├── strings4.filter │ ├── nested_identifier.filter │ ├── numeric_and_strings2.filter │ ├── f07.filter │ ├── identifiers.lst │ ├── set5.filter │ ├── fuzzystring-no-spaces.filter │ ├── fuzzystring.filter │ ├── set6.filter │ ├── value.filter │ ├── numeric_and_strings.filter │ ├── set2.filter │ ├── boolean.filter │ ├── f10.filter │ ├── fuzzystring-leading-trailing-spaces.filter │ ├── set3.filter │ ├── value_fail.filter │ ├── length.filter │ ├── strings.filter │ ├── set.filter │ ├── setzip.filter │ ├── clauses.filter │ ├── set4.filter │ ├── setzip-spaces.filter │ ├── not-numbers.lst │ ├── reals.lst │ ├── various-whitespace.filter.log │ ├── filters.lst │ └── numbers.lst ├── scripts │ ├── Number │ ├── Filter │ ├── check_spelling.sh │ ├── filter_rsync_itemize_output.sh │ └── validate_json_schema.py ├── generated │ └── .gitignore ├── outputs │ ├── ere_numbers_004.out │ ├── .gitignore │ ├── pcre_numbers_004.out │ ├── ere_numbers_002.out │ ├── pcre_numbers_002.out │ ├── symops_pcre_to_ecma_001.out │ ├── ere_identifiers_002.out │ ├── pcre_identifiers_002.out │ ├── pcre_symops_003.out │ ├── ere_identifiers_001.out │ ├── pcre_identifiers_001.out │ ├── ebnf_numbers_001.out │ ├── Number_001.out │ ├── ere_numbers_005.out │ ├── pcre_numbers_005.out │ ├── Filter_030.out │ ├── ere_numbers_003.out │ ├── pcre_numbers_003.out │ ├── ebnf_numbers_002.out │ ├── Number_002.out │ ├── ere_numbers_001.out │ ├── pcre_numbers_001.out │ ├── Filter_005.out │ ├── ebnf_numbers_004.out │ ├── Filter_077.out │ └── Filter_023.out ├── cases │ ├── Filter_077.inp │ ├── Filter_002.opt │ ├── Filter_003.opt │ ├── Filter_004.opt │ ├── Filter_005.opt │ ├── Filter_006.opt │ ├── Filter_007.opt │ ├── Filter_008.opt │ ├── Filter_009.opt │ ├── Filter_010.opt │ ├── Filter_011.opt │ ├── Filter_012.opt │ ├── Filter_013.opt │ ├── Filter_014.opt │ ├── Filter_015.opt │ ├── Filter_016.opt │ ├── Filter_017.opt │ ├── Filter_018.opt │ ├── Filter_019.opt │ ├── Filter_020.opt │ ├── Filter_021.opt │ ├── Filter_022.opt │ ├── Filter_023.opt │ ├── Filter_024.opt │ ├── Filter_025.opt │ ├── Filter_026.opt │ ├── Filter_027.opt │ ├── Filter_028.opt │ ├── Filter_029.opt │ ├── Filter_030.opt │ ├── Filter_031.opt │ ├── Filter_032.opt │ ├── Filter_033.opt │ ├── Filter_034.opt │ ├── Filter_035.opt │ ├── Filter_036.opt │ ├── Filter_037.opt │ ├── Filter_038.opt │ ├── Filter_039.opt │ ├── Filter_040.opt │ ├── Filter_041.opt │ ├── Filter_042.opt │ ├── Filter_043.opt │ ├── Filter_044.opt │ ├── Filter_045.opt │ ├── Filter_046.opt │ ├── Filter_047.opt │ ├── Filter_048.opt │ ├── Filter_049.opt │ ├── Filter_050.opt │ ├── Filter_051.opt │ ├── Filter_052.opt │ ├── Filter_053.opt │ ├── Filter_054.opt │ ├── Filter_055.opt │ ├── Filter_056.opt │ ├── Filter_057.opt │ ├── Filter_058.opt │ ├── Filter_059.opt │ ├── Filter_060.opt │ ├── Filter_061.opt │ ├── Filter_062.opt │ ├── Filter_063.opt │ ├── Filter_064.opt │ ├── Filter_065.opt │ ├── Filter_066.opt │ ├── Filter_067.opt │ ├── Filter_068.opt │ ├── Filter_069.opt │ ├── Filter_070.opt │ ├── Filter_072.opt │ ├── Filter_074.inp │ ├── Filter_080.opt │ ├── Number_001.inp │ ├── Number_002.inp │ ├── Number_002.opt │ ├── Filter_001.inp │ ├── Filter_002.inp │ ├── Filter_003.inp │ ├── Filter_004.inp │ ├── Filter_005.inp │ ├── Filter_006.inp │ ├── Filter_007.inp │ ├── Filter_008.inp │ ├── Filter_009.inp │ ├── Filter_010.inp │ ├── Filter_011.inp │ ├── Filter_012.inp │ ├── Filter_013.inp │ ├── Filter_014.inp │ ├── Filter_025.inp │ ├── Filter_033.inp │ ├── Filter_035.inp │ ├── Filter_044.inp │ ├── Filter_054.inp │ ├── Filter_055.inp │ ├── Filter_056.inp │ ├── Filter_057.inp │ ├── Filter_061.inp │ ├── Filter_018.inp │ ├── Filter_024.inp │ ├── Filter_027.inp │ ├── Filter_028.inp │ ├── Filter_031.inp │ ├── Filter_032.inp │ ├── Filter_034.inp │ ├── Filter_039.inp │ ├── Filter_040.inp │ ├── Filter_042.inp │ ├── Filter_043.inp │ ├── Filter_045.inp │ ├── Filter_046.inp │ ├── Filter_047.inp │ ├── Filter_048.inp │ ├── Filter_049.inp │ ├── Filter_052.inp │ ├── Filter_058.inp │ ├── Filter_059.inp │ ├── Filter_060.inp │ ├── Filter_062.inp │ ├── Filter_063.inp │ ├── Filter_071.inp │ ├── Filter_001.opt │ ├── Filter_015.inp │ ├── Filter_016.inp │ ├── Filter_017.inp │ ├── Filter_021.inp │ ├── Filter_022.inp │ ├── Filter_023.inp │ ├── Filter_026.inp │ ├── Filter_029.inp │ ├── Filter_030.inp │ ├── Filter_036.inp │ ├── Filter_037.inp │ ├── Filter_038.inp │ ├── Filter_041.inp │ ├── Filter_053.inp │ ├── Filter_068.inp │ ├── Filter_071.opt │ ├── Filter_073.opt │ ├── Filter_074.opt │ ├── Filter_075.opt │ ├── Filter_076.opt │ ├── Filter_077.opt │ ├── Filter_078.inp │ ├── Filter_078.opt │ ├── Filter_079.inp │ ├── Filter_079.opt │ ├── Filter_081.inp │ ├── Filter_081.opt │ ├── Filter_082.opt │ ├── Number_001.opt │ ├── Filter_019.inp │ ├── Filter_020.inp │ ├── Filter_050.inp │ ├── Filter_051.inp │ ├── Filter_066.inp │ ├── Filter_069.inp │ ├── Filter_070.inp │ ├── Filter_076.inp │ ├── Filter_082.inp │ ├── Filter_065.inp │ ├── Filter_072.inp │ ├── Filter_067.inp │ ├── Filter_064.inp │ ├── Filter_080.inp │ ├── Filter_075.inp │ ├── Filter_073.inp │ ├── ere_numbers_003.sh │ ├── ere_numbers_001.sh │ ├── ere_numbers_002.sh │ ├── ere_numbers_004.sh │ ├── pcre_numbers_001.sh │ ├── pcre_numbers_003.sh │ ├── ere_numbers_005.sh │ ├── ere_identifiers_001.sh │ ├── pcre_identifiers_001.sh │ ├── ere_identifiers_002.sh │ ├── pcre_identifiers_002.sh │ ├── ebnf_numbers_001.sh │ ├── ebnf_numbers_002.sh │ ├── pcre_numbers_002.sh │ ├── pcre_numbers_004.sh │ ├── pcre_numbers_005.sh │ ├── pcre_symops_001.sh │ ├── pcre_symops_002.sh │ ├── pcre_symops_003.sh │ ├── ecma_symops_001.sh │ ├── ebnf_numbers_005.sh │ ├── ebnf_numbers_003.sh │ ├── ebnf_numbers_004.sh │ └── ebnf_numbers_006.sh ├── tools │ ├── .gitignore │ ├── grammatica-build.patch │ └── Dockerfile └── makefiles │ ├── Makelocal-display │ ├── Makeconfig-tools │ ├── Makelocal-spell │ ├── Makeconfig-grammars │ ├── Makelocal-docker │ ├── Makelocal-run │ ├── Makelocal-output │ ├── Makelocal-authors │ └── Makelocal-audit ├── dependencies └── installers │ ├── Debian-11 │ ├── Debian-12 │ └── Debian-10 │ └── install.sh ├── schemas └── src │ ├── json-schema │ └── v1.2 │ │ ├── jsonapi.json │ │ └── optimade.yaml │ ├── defs │ ├── v1.2 │ │ ├── properties │ │ │ ├── optimade │ │ │ │ ├── files │ │ │ │ │ ├── id.yaml │ │ │ │ │ ├── type.yaml │ │ │ │ │ ├── immutable_id.yaml │ │ │ │ │ ├── last_modified.yaml │ │ │ │ │ ├── description.yaml │ │ │ │ │ ├── atime.yaml │ │ │ │ │ ├── ctime.yaml │ │ │ │ │ ├── media_type.yaml │ │ │ │ │ ├── version.yaml │ │ │ │ │ ├── name.yaml │ │ │ │ │ ├── url.yaml │ │ │ │ │ ├── url_stable_until.yaml │ │ │ │ │ ├── modification_timestamp.yaml │ │ │ │ │ ├── size.yaml │ │ │ │ │ └── mtime.yaml │ │ │ │ ├── calculations │ │ │ │ │ ├── id.yaml │ │ │ │ │ ├── type.yaml │ │ │ │ │ ├── immutable_id.yaml │ │ │ │ │ └── last_modified.yaml │ │ │ │ ├── references │ │ │ │ │ ├── id.yaml │ │ │ │ │ ├── type.yaml │ │ │ │ │ ├── immutable_id.yaml │ │ │ │ │ ├── last_modified.yaml │ │ │ │ │ ├── year.yaml │ │ │ │ │ ├── doi.yaml │ │ │ │ │ ├── url.yaml │ │ │ │ │ ├── edition.yaml │ │ │ │ │ ├── pages.yaml │ │ │ │ │ ├── publisher.yaml │ │ │ │ │ ├── bib_type.yaml │ │ │ │ │ ├── chapter.yaml │ │ │ │ │ ├── key.yaml │ │ │ │ │ ├── note.yaml │ │ │ │ │ ├── volume.yaml │ │ │ │ │ ├── journal.yaml │ │ │ │ │ ├── month.yaml │ │ │ │ │ ├── school.yaml │ │ │ │ │ ├── series.yaml │ │ │ │ │ ├── address.yaml │ │ │ │ │ ├── crossref.yaml │ │ │ │ │ ├── number.yaml │ │ │ │ │ ├── title.yaml │ │ │ │ │ ├── annote.yaml │ │ │ │ │ ├── howpublished.yaml │ │ │ │ │ ├── institution.yaml │ │ │ │ │ ├── organization.yaml │ │ │ │ │ ├── booktitle.yaml │ │ │ │ │ ├── authors.yaml │ │ │ │ │ └── editors.yaml │ │ │ │ ├── structures │ │ │ │ │ ├── id.yaml │ │ │ │ │ ├── type.yaml │ │ │ │ │ ├── immutable_id.yaml │ │ │ │ │ ├── last_modified.yaml │ │ │ │ │ ├── space_group_it_number.yaml │ │ │ │ │ ├── chemical_formula_anonymous.yaml │ │ │ │ │ ├── nsites.yaml │ │ │ │ │ └── nelements.yaml │ │ │ │ └── common │ │ │ │ │ ├── species_name.yaml │ │ │ │ │ ├── symmetry_operation_xyz.yaml │ │ │ │ │ └── person.yaml │ │ │ └── core │ │ │ │ ├── last_modified.yaml │ │ │ │ ├── type.yaml │ │ │ │ ├── id.yaml │ │ │ │ ├── immutable_id.yaml │ │ │ │ └── features.yaml │ │ ├── unitsystems │ │ │ └── optimade │ │ │ │ └── optimade.yaml │ │ ├── prefixes │ │ │ └── si │ │ │ │ ├── ronna.yaml │ │ │ │ ├── ronto.yaml │ │ │ │ ├── exa.yaml │ │ │ │ ├── quecto.yaml │ │ │ │ ├── quetta.yaml │ │ │ │ ├── peta.yaml │ │ │ │ ├── atto.yaml │ │ │ │ ├── femto.yaml │ │ │ │ ├── yocto.yaml │ │ │ │ ├── yotta.yaml │ │ │ │ ├── zepto.yaml │ │ │ │ ├── zetta.yaml │ │ │ │ ├── deca.yaml │ │ │ │ ├── deci.yaml │ │ │ │ ├── giga.yaml │ │ │ │ ├── nano.yaml │ │ │ │ ├── hecto.yaml │ │ │ │ ├── kilo.yaml │ │ │ │ ├── mega.yaml │ │ │ │ ├── centi.yaml │ │ │ │ ├── milli.yaml │ │ │ │ ├── pico.yaml │ │ │ │ ├── tera.yaml │ │ │ │ ├── exbi.yaml │ │ │ │ ├── gibi.yaml │ │ │ │ ├── mebi.yaml │ │ │ │ ├── pebi.yaml │ │ │ │ ├── tebi.yaml │ │ │ │ ├── yobi.yaml │ │ │ │ ├── zebi.yaml │ │ │ │ └── kibi.yaml │ │ ├── standards │ │ │ └── optimade.yaml │ │ └── units │ │ │ ├── independent │ │ │ └── 1948 │ │ │ │ └── information │ │ │ │ └── bit.yaml │ │ │ ├── si │ │ │ ├── 1960 │ │ │ │ ├── base │ │ │ │ │ └── second.yaml │ │ │ │ └── named │ │ │ │ │ ├── hertz.yaml │ │ │ │ │ └── degcelsius.yaml │ │ │ ├── 1964 │ │ │ │ └── accepted │ │ │ │ │ └── litre.yaml │ │ │ ├── 1970 │ │ │ │ └── accepted │ │ │ │ │ ├── hour.yaml │ │ │ │ │ └── minute.yaml │ │ │ └── 1975 │ │ │ │ └── named │ │ │ │ └── becquerel.yaml │ │ │ └── iso-iec-80000 │ │ │ └── 2008 │ │ │ └── information_science_and_technology │ │ │ └── byte.yaml │ └── v1.3 │ │ ├── properties │ │ └── optimade │ │ │ ├── trajectories │ │ │ ├── id.yaml │ │ │ ├── type.yaml │ │ │ ├── immutable_id.yaml │ │ │ ├── last_modified.yaml │ │ │ ├── nelements.yaml │ │ │ ├── site_coordinate_span_description.yaml │ │ │ ├── chemical_formula_anonymous.yaml │ │ │ ├── space_group_it_number.yaml │ │ │ ├── reference_frames.yaml │ │ │ ├── nframes.yaml │ │ │ └── nsites.yaml │ │ │ ├── common │ │ │ └── wyckoff_position.yaml │ │ │ └── structures │ │ │ └── site_coordinate_span_description.yaml │ │ └── standards │ │ └── optimade.yaml │ ├── meta │ ├── v1.2 │ │ ├── common │ │ │ ├── id_field.yaml │ │ │ ├── symbol_list.yaml │ │ │ └── resource_list.yaml │ │ └── optimade │ │ │ ├── prefix_definition.yaml │ │ │ ├── physical_unit_definition.yaml │ │ │ ├── constant_definition.yaml │ │ │ ├── unitsystem_definition.yaml │ │ │ └── standard_definition.yaml │ └── v1.3 │ │ └── optimade │ │ └── standard_definition.yaml │ └── json-ld │ └── v1.2 │ └── optimade.yaml ├── .words.lst ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .rstcheck.cfg ├── .gitmodules ├── external ├── README.md └── GNU_Units │ └── README.md ├── .dir-locals.el └── .pre-commit-config.yaml /tests/inputs/n01.txt: -------------------------------------------------------------------------------- 1 | 3456 -------------------------------------------------------------------------------- /tests/inputs/n02.txt: -------------------------------------------------------------------------------- 1 | +.1E-123 -------------------------------------------------------------------------------- /tests/scripts/Number: -------------------------------------------------------------------------------- 1 | Filter -------------------------------------------------------------------------------- /tests/generated/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /tests/inputs/f05.filter: -------------------------------------------------------------------------------- 1 | a=1 2 | -------------------------------------------------------------------------------- /tests/outputs/ere_numbers_004.out: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/cases/Filter_077.inp: -------------------------------------------------------------------------------- 1 | a AND b 2 | -------------------------------------------------------------------------------- /tests/outputs/.gitignore: -------------------------------------------------------------------------------- 1 | /*.diff 2 | -------------------------------------------------------------------------------- /tests/outputs/pcre_numbers_004.out: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dependencies/installers/Debian-11: -------------------------------------------------------------------------------- 1 | Debian-10/ -------------------------------------------------------------------------------- /dependencies/installers/Debian-12: -------------------------------------------------------------------------------- 1 | Debian-10/ -------------------------------------------------------------------------------- /tests/cases/Filter_002.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_003.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_004.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_005.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_006.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_007.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_008.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_009.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_010.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_011.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_012.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_013.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_014.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_015.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_016.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_017.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_018.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_019.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_020.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_021.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_022.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_023.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_024.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_025.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_026.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_027.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_028.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_029.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_030.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_031.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_032.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_033.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_034.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_035.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_036.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_037.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_038.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_039.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_040.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_041.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_042.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_043.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_044.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_045.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_046.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_047.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_048.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_049.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_050.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_051.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_052.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_053.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_054.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_055.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_056.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_057.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_058.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_059.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_060.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_061.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_062.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_063.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_064.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_065.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_066.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_067.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_068.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_069.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_070.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_072.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Filter_074.inp: -------------------------------------------------------------------------------- 1 | true > FALSE 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_080.opt: -------------------------------------------------------------------------------- 1 | Filter_001.opt -------------------------------------------------------------------------------- /tests/cases/Number_001.inp: -------------------------------------------------------------------------------- 1 | ../inputs/n01.txt -------------------------------------------------------------------------------- /tests/cases/Number_002.inp: -------------------------------------------------------------------------------- 1 | ../inputs/n02.txt -------------------------------------------------------------------------------- /tests/cases/Number_002.opt: -------------------------------------------------------------------------------- 1 | Number_001.opt -------------------------------------------------------------------------------- /tests/inputs/f13.filter: -------------------------------------------------------------------------------- 1 | NOT a>b AND x>0 2 | -------------------------------------------------------------------------------- /tests/inputs/numeric.filter: -------------------------------------------------------------------------------- 1 | nelements > 3 -------------------------------------------------------------------------------- /tests/inputs/val_to_id.filter: -------------------------------------------------------------------------------- 1 | 5 < _exmpl_a -------------------------------------------------------------------------------- /tests/cases/Filter_001.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f01.filter -------------------------------------------------------------------------------- /tests/cases/Filter_002.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f02.filter -------------------------------------------------------------------------------- /tests/cases/Filter_003.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f03.filter -------------------------------------------------------------------------------- /tests/cases/Filter_004.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f04.filter -------------------------------------------------------------------------------- /tests/cases/Filter_005.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f05.filter -------------------------------------------------------------------------------- /tests/cases/Filter_006.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f06.filter -------------------------------------------------------------------------------- /tests/cases/Filter_007.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f07.filter -------------------------------------------------------------------------------- /tests/cases/Filter_008.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f08.filter -------------------------------------------------------------------------------- /tests/cases/Filter_009.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f09.filter -------------------------------------------------------------------------------- /tests/cases/Filter_010.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f10.filter -------------------------------------------------------------------------------- /tests/cases/Filter_011.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f11.filter -------------------------------------------------------------------------------- /tests/cases/Filter_012.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f12.filter -------------------------------------------------------------------------------- /tests/cases/Filter_013.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f13.filter -------------------------------------------------------------------------------- /tests/cases/Filter_014.inp: -------------------------------------------------------------------------------- 1 | ../inputs/f14.filter -------------------------------------------------------------------------------- /tests/cases/Filter_025.inp: -------------------------------------------------------------------------------- 1 | ../inputs/known.filter -------------------------------------------------------------------------------- /tests/cases/Filter_033.inp: -------------------------------------------------------------------------------- 1 | ../inputs/set2.filter -------------------------------------------------------------------------------- /tests/cases/Filter_035.inp: -------------------------------------------------------------------------------- 1 | ../inputs/set.filter -------------------------------------------------------------------------------- /tests/cases/Filter_044.inp: -------------------------------------------------------------------------------- 1 | ../inputs/value.filter -------------------------------------------------------------------------------- /tests/cases/Filter_054.inp: -------------------------------------------------------------------------------- 1 | ../inputs/set3.filter -------------------------------------------------------------------------------- /tests/cases/Filter_055.inp: -------------------------------------------------------------------------------- 1 | ../inputs/set4.filter -------------------------------------------------------------------------------- /tests/cases/Filter_056.inp: -------------------------------------------------------------------------------- 1 | ../inputs/set5.filter -------------------------------------------------------------------------------- /tests/cases/Filter_057.inp: -------------------------------------------------------------------------------- 1 | ../inputs/set6.filter -------------------------------------------------------------------------------- /tests/cases/Filter_061.inp: -------------------------------------------------------------------------------- 1 | ../inputs/types.filter -------------------------------------------------------------------------------- /tests/inputs/f02.filter: -------------------------------------------------------------------------------- 1 | (NOT a>b AND x>0) 2 | -------------------------------------------------------------------------------- /tests/inputs/f03.filter: -------------------------------------------------------------------------------- 1 | NOT (a>b) AND x>0 2 | -------------------------------------------------------------------------------- /tests/inputs/length2_fail.filter: -------------------------------------------------------------------------------- 1 | elements LENGTH -------------------------------------------------------------------------------- /tests/inputs/length3.filter: -------------------------------------------------------------------------------- 1 | elements LENGTH 42 -------------------------------------------------------------------------------- /tests/inputs/set2_fail.filter: -------------------------------------------------------------------------------- 1 | elements HAS IS "H" -------------------------------------------------------------------------------- /tests/cases/Filter_018.inp: -------------------------------------------------------------------------------- 1 | ../inputs/clauses.filter -------------------------------------------------------------------------------- /tests/cases/Filter_024.inp: -------------------------------------------------------------------------------- 1 | ../inputs/known_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_027.inp: -------------------------------------------------------------------------------- 1 | ../inputs/length2.filter -------------------------------------------------------------------------------- /tests/cases/Filter_028.inp: -------------------------------------------------------------------------------- 1 | ../inputs/length3.filter -------------------------------------------------------------------------------- /tests/cases/Filter_031.inp: -------------------------------------------------------------------------------- 1 | ../inputs/length.filter -------------------------------------------------------------------------------- /tests/cases/Filter_032.inp: -------------------------------------------------------------------------------- 1 | ../inputs/set2_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_034.inp: -------------------------------------------------------------------------------- 1 | ../inputs/set_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_039.inp: -------------------------------------------------------------------------------- 1 | ../inputs/setzip.filter -------------------------------------------------------------------------------- /tests/cases/Filter_040.inp: -------------------------------------------------------------------------------- 1 | ../inputs/strings2.filter -------------------------------------------------------------------------------- /tests/cases/Filter_042.inp: -------------------------------------------------------------------------------- 1 | ../inputs/strings.filter -------------------------------------------------------------------------------- /tests/cases/Filter_043.inp: -------------------------------------------------------------------------------- 1 | ../inputs/value_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_045.inp: -------------------------------------------------------------------------------- 1 | ../inputs/boolean.filter -------------------------------------------------------------------------------- /tests/cases/Filter_046.inp: -------------------------------------------------------------------------------- 1 | ../inputs/id_to_id.filter -------------------------------------------------------------------------------- /tests/cases/Filter_047.inp: -------------------------------------------------------------------------------- 1 | ../inputs/numeric.filter -------------------------------------------------------------------------------- /tests/cases/Filter_048.inp: -------------------------------------------------------------------------------- 1 | ../inputs/numeric2.filter -------------------------------------------------------------------------------- /tests/cases/Filter_049.inp: -------------------------------------------------------------------------------- 1 | ../inputs/numeric3.filter -------------------------------------------------------------------------------- /tests/cases/Filter_052.inp: -------------------------------------------------------------------------------- 1 | ../inputs/precedence.filter -------------------------------------------------------------------------------- /tests/cases/Filter_058.inp: -------------------------------------------------------------------------------- 1 | ../inputs/string.filter -------------------------------------------------------------------------------- /tests/cases/Filter_059.inp: -------------------------------------------------------------------------------- 1 | ../inputs/strings3.filter -------------------------------------------------------------------------------- /tests/cases/Filter_060.inp: -------------------------------------------------------------------------------- 1 | ../inputs/strings4.filter -------------------------------------------------------------------------------- /tests/cases/Filter_062.inp: -------------------------------------------------------------------------------- 1 | ../inputs/val_to_id.filter -------------------------------------------------------------------------------- /tests/cases/Filter_063.inp: -------------------------------------------------------------------------------- 1 | ../inputs/val_to_val.filter -------------------------------------------------------------------------------- /tests/cases/Filter_071.inp: -------------------------------------------------------------------------------- 1 | a . b. c .d . _ = 5 2 | -------------------------------------------------------------------------------- /tests/inputs/f08.filter: -------------------------------------------------------------------------------- 1 | ((NOT (a>b)) AND x>0) 2 | -------------------------------------------------------------------------------- /tests/inputs/f14.filter: -------------------------------------------------------------------------------- 1 | ((NOT (a>b)) AND ((x>0))) 2 | -------------------------------------------------------------------------------- /tests/inputs/length2.filter: -------------------------------------------------------------------------------- 1 | elements LENGTH = "42" -------------------------------------------------------------------------------- /tests/inputs/length4_fail.filter: -------------------------------------------------------------------------------- 1 | elements LENGTH IS 42 -------------------------------------------------------------------------------- /tests/inputs/length_fail.filter: -------------------------------------------------------------------------------- 1 | LENGTH elements 42 -------------------------------------------------------------------------------- /tests/inputs/numeric2.filter: -------------------------------------------------------------------------------- 1 | _exmpl_cell_volume<100.0 -------------------------------------------------------------------------------- /tests/inputs/strings2.filter: -------------------------------------------------------------------------------- 1 | chemical_formula = 42 -------------------------------------------------------------------------------- /tests/cases/Filter_001.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_015.inp: -------------------------------------------------------------------------------- 1 | ../inputs/clauses2_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_016.inp: -------------------------------------------------------------------------------- 1 | ../inputs/clauses3_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_017.inp: -------------------------------------------------------------------------------- 1 | ../inputs/clauses_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_021.inp: -------------------------------------------------------------------------------- 1 | ../inputs/fuzzystring.filter -------------------------------------------------------------------------------- /tests/cases/Filter_022.inp: -------------------------------------------------------------------------------- 1 | ../inputs/known2_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_023.inp: -------------------------------------------------------------------------------- 1 | ../inputs/known3_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_026.inp: -------------------------------------------------------------------------------- 1 | ../inputs/length2_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_029.inp: -------------------------------------------------------------------------------- 1 | ../inputs/length4_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_030.inp: -------------------------------------------------------------------------------- 1 | ../inputs/length_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_036.inp: -------------------------------------------------------------------------------- 1 | ../inputs/setzip2_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_037.inp: -------------------------------------------------------------------------------- 1 | ../inputs/setzip3_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_038.inp: -------------------------------------------------------------------------------- 1 | ../inputs/setzip_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_041.inp: -------------------------------------------------------------------------------- 1 | ../inputs/strings_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_053.inp: -------------------------------------------------------------------------------- 1 | ../inputs/precedence2.filter -------------------------------------------------------------------------------- /tests/cases/Filter_068.inp: -------------------------------------------------------------------------------- 1 | ../inputs/setzip-spaces.filter -------------------------------------------------------------------------------- /tests/cases/Filter_071.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_073.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_074.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_075.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_076.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_077.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_078.inp: -------------------------------------------------------------------------------- 1 | NOT boolean_valued_property 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_078.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_079.inp: -------------------------------------------------------------------------------- 1 | boolean_valued_property 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_079.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_081.inp: -------------------------------------------------------------------------------- 1 | title HAS ENDS WITH "MOF" 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_081.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_082.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Filter.g 2 | -------------------------------------------------------------------------------- /tests/cases/Number_001.opt: -------------------------------------------------------------------------------- 1 | tests/generated/Number.g 2 | -------------------------------------------------------------------------------- /tests/inputs/f01.filter: -------------------------------------------------------------------------------- 1 | a > b AND (a > 0 OR b > 0) 2 | -------------------------------------------------------------------------------- /tests/inputs/f11.filter: -------------------------------------------------------------------------------- 1 | ((NOT (a>b)) AND NOT ((x>0))) 2 | -------------------------------------------------------------------------------- /tests/inputs/integers.lst: -------------------------------------------------------------------------------- 1 | 3456 2 | -3456 3 | +3456 4 | -------------------------------------------------------------------------------- /tests/inputs/known_fail.filter: -------------------------------------------------------------------------------- 1 | chemical_formula KNOWN 2 | -------------------------------------------------------------------------------- /tests/inputs/set_fail.filter: -------------------------------------------------------------------------------- 1 | elements HAS "H", "He" 2 | -------------------------------------------------------------------------------- /tests/inputs/setzip_fail.filter: -------------------------------------------------------------------------------- 1 | elements HAS "H":6 2 | -------------------------------------------------------------------------------- /tests/inputs/types.filter: -------------------------------------------------------------------------------- 1 | _exmpl_some_string_property = 42 -------------------------------------------------------------------------------- /tests/cases/Filter_019.inp: -------------------------------------------------------------------------------- 1 | ../inputs/fuzzystring2_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_020.inp: -------------------------------------------------------------------------------- 1 | ../inputs/fuzzystring_fail.filter -------------------------------------------------------------------------------- /tests/cases/Filter_050.inp: -------------------------------------------------------------------------------- 1 | ../inputs/numeric_and_strings.filter -------------------------------------------------------------------------------- /tests/cases/Filter_051.inp: -------------------------------------------------------------------------------- 1 | ../inputs/numeric_and_strings2.filter -------------------------------------------------------------------------------- /tests/cases/Filter_066.inp: -------------------------------------------------------------------------------- 1 | ../inputs/id_to_id-no-spaces.filter -------------------------------------------------------------------------------- /tests/cases/Filter_069.inp: -------------------------------------------------------------------------------- 1 | ../inputs/various-whitespace.filter -------------------------------------------------------------------------------- /tests/cases/Filter_070.inp: -------------------------------------------------------------------------------- 1 | ../inputs/nested_identifier.filter -------------------------------------------------------------------------------- /tests/cases/Filter_076.inp: -------------------------------------------------------------------------------- 1 | TRUE = property AND TRUE = FALSE 2 | -------------------------------------------------------------------------------- /tests/cases/Filter_082.inp: -------------------------------------------------------------------------------- 1 | elements HAS ALL STARTS WITH "S" 2 | -------------------------------------------------------------------------------- /tests/inputs/f12.filter: -------------------------------------------------------------------------------- 1 | a>1 AND (b<10 OR c!=b OR x>100) 2 | -------------------------------------------------------------------------------- /tests/inputs/known2_fail.filter: -------------------------------------------------------------------------------- 1 | prototype_formula UNKNOWN 2 | -------------------------------------------------------------------------------- /tests/inputs/precedence2.filter: -------------------------------------------------------------------------------- 1 | a >= 0 AND NOT b < c OR c = 0 -------------------------------------------------------------------------------- /tests/inputs/strings_fail.filter: -------------------------------------------------------------------------------- 1 | chemical_formula = '42' 2 | -------------------------------------------------------------------------------- /tests/outputs/ere_numbers_002.out: -------------------------------------------------------------------------------- 1 | 3456 2 | -3456 3 | +3456 4 | -------------------------------------------------------------------------------- /tests/outputs/pcre_numbers_002.out: -------------------------------------------------------------------------------- 1 | 3456 2 | -3456 3 | +3456 4 | -------------------------------------------------------------------------------- /tests/cases/Filter_065.inp: -------------------------------------------------------------------------------- 1 | ../inputs/fuzzystring-no-spaces.filter -------------------------------------------------------------------------------- /tests/cases/Filter_072.inp: -------------------------------------------------------------------------------- 1 | property STARTS WITH another_property 2 | -------------------------------------------------------------------------------- /tests/inputs/clauses3_fail.filter: -------------------------------------------------------------------------------- 1 | ( ( chemical_formula = "Al" ) 2 | -------------------------------------------------------------------------------- /tests/inputs/known3_fail.filter: -------------------------------------------------------------------------------- 1 | chemical formula IS KNOWN 42 2 | -------------------------------------------------------------------------------- /tests/inputs/precedence.filter: -------------------------------------------------------------------------------- 1 | NOT a > b OR c = 100 AND f = "C2 H6" -------------------------------------------------------------------------------- /tests/tools/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | grammatica* 3 | grammatiker 4 | -------------------------------------------------------------------------------- /tests/cases/Filter_067.inp: -------------------------------------------------------------------------------- 1 | ../inputs/id_to_id-some-other-spaces.filter -------------------------------------------------------------------------------- /tests/inputs/f06.filter: -------------------------------------------------------------------------------- 1 | b="kva" AND (10 ) ) 2 | -------------------------------------------------------------------------------- /tests/inputs/fuzzystring2_fail.filter: -------------------------------------------------------------------------------- 1 | chemical_formula CONTAINS 42 2 | -------------------------------------------------------------------------------- /tests/inputs/id_to_id.filter: -------------------------------------------------------------------------------- 1 | ((NOT (_exmpl_a>_exmpl_b)) AND _exmpl_x>0) -------------------------------------------------------------------------------- /tests/inputs/val_to_val.filter: -------------------------------------------------------------------------------- 1 | ((NOT (_exmpl_a>_exmpl_b)) AND _exmpl_x>0) -------------------------------------------------------------------------------- /tests/cases/Filter_064.inp: -------------------------------------------------------------------------------- 1 | ../inputs/fuzzystring-leading-trailing-spaces.filter -------------------------------------------------------------------------------- /tests/cases/Filter_080.inp: -------------------------------------------------------------------------------- 1 | name:surname HAS STARTS WITH "J":CONTAINS "Doe" 2 | -------------------------------------------------------------------------------- /tests/inputs/f06_fail.filter: -------------------------------------------------------------------------------- 1 | b="kva" AND (10 ) ) 2 | -------------------------------------------------------------------------------- /tests/inputs/fuzzystring_fail.filter: -------------------------------------------------------------------------------- 1 | chemical_formula CONTAINS STARTS "Al" 2 | -------------------------------------------------------------------------------- /tests/inputs/id_to_id-no-spaces.filter: -------------------------------------------------------------------------------- 1 | ((NOT(_exmpl_a>_exmpl_b))AND_exmpl_x>0) -------------------------------------------------------------------------------- /schemas/src/json-schema/v1.2/jsonapi.json: -------------------------------------------------------------------------------- 1 | ../../../../external/json-api/schema.json -------------------------------------------------------------------------------- /tests/inputs/numeric3.filter: -------------------------------------------------------------------------------- 1 | _exmpl_bandgap > 5.0 AND _exmpl_molecular_weight < 350 -------------------------------------------------------------------------------- /tests/inputs/setzip2_fail.filter: -------------------------------------------------------------------------------- 1 | elements:elements:element_counts HAS "H":6 2 | -------------------------------------------------------------------------------- /tests/inputs/setzip3_fail.filter: -------------------------------------------------------------------------------- 1 | elements:element_counts HAS IS 'H':6,'He':7 2 | -------------------------------------------------------------------------------- /tests/inputs/string.filter: -------------------------------------------------------------------------------- 1 | chemical_formula = "H2O" AND prototype_formula != "AB" -------------------------------------------------------------------------------- /.words.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Materials-Consortia/OPTIMADE/develop/.words.lst -------------------------------------------------------------------------------- /tests/inputs/clauses2_fail.filter: -------------------------------------------------------------------------------- 1 | chemical_formula = "Al" AND OR prototype_formula = "A" -------------------------------------------------------------------------------- /tests/inputs/clauses_fail.filter: -------------------------------------------------------------------------------- 1 | chemical_formula = "Al" and prototype_formula = "A" 2 | -------------------------------------------------------------------------------- /tests/inputs/f09.filter: -------------------------------------------------------------------------------- 1 | aax <= +.1e8 OR c21 >= 10 AND NOT ( x != "Some string" ) 2 | -------------------------------------------------------------------------------- /tests/inputs/known.filter: -------------------------------------------------------------------------------- 1 | chemical_formula IS KNOWN AND prototype_formula IS UNKNOWN 2 | -------------------------------------------------------------------------------- /tests/inputs/not-identifiers.lst: -------------------------------------------------------------------------------- 1 | NOT 2 | An 3 | __Identifier__ 4 | 3334 5 | 34E+1 6 | -------------------------------------------------------------------------------- /tests/outputs/symops_pcre_to_ecma_001.out: -------------------------------------------------------------------------------- 1 | PASS: expanded regular expressions match. 2 | -------------------------------------------------------------------------------- /tests/inputs/filter.txt: -------------------------------------------------------------------------------- 1 | aax <= +.1e8 OR c21 >= 10 AND NOT ( x != "Some string" OR NOT a = b) -------------------------------------------------------------------------------- /tests/inputs/various-whitespace.filter: -------------------------------------------------------------------------------- 1 | NOTa 2 | 3 | > 4 | ___beta___ 5 | 6 | -------------------------------------------------------------------------------- /tests/outputs/ere_identifiers_002.out: -------------------------------------------------------------------------------- 1 | NOT 2 | An 3 | __Identifier__ 4 | 3334 5 | 34E+1 6 | -------------------------------------------------------------------------------- /tests/outputs/pcre_identifiers_002.out: -------------------------------------------------------------------------------- 1 | NOT 2 | An 3 | __Identifier__ 4 | 3334 5 | 34E+1 6 | -------------------------------------------------------------------------------- /tests/outputs/pcre_symops_003.out: -------------------------------------------------------------------------------- 1 | x,y,z 2 | -x,y,-z 3 | x+1/2,y+1/2,z 4 | -x+1/2,y+1/2,-z 5 | -------------------------------------------------------------------------------- /tests/inputs/f04.filter: -------------------------------------------------------------------------------- 1 | aax <= +.1e8 OR c21 >= 10 AND NOT ( x != "Some string" OR NOT a = b) 2 | -------------------------------------------------------------------------------- /tests/inputs/id_to_id-some-other-spaces.filter: -------------------------------------------------------------------------------- 1 | ((NOT(_exmpl_a > _exmpl_b) )AND_exmpl_x> 0 ) 2 | -------------------------------------------------------------------------------- /tests/inputs/strings3.filter: -------------------------------------------------------------------------------- 1 | prototype_formula CONTAINS "C2" AND prototype_formula STARTS WITH "A2" -------------------------------------------------------------------------------- /tests/inputs/strings4.filter: -------------------------------------------------------------------------------- 1 | prototype_formula STARTS "B2" AND prototype_formula ENDS WITH "D2" -------------------------------------------------------------------------------- /tests/cases/Filter_075.inp: -------------------------------------------------------------------------------- 1 | statements HAS ALL TRUE, = TRUE AND number:is_prime HAS ALL < 100 : TRUE 2 | -------------------------------------------------------------------------------- /tests/inputs/nested_identifier.filter: -------------------------------------------------------------------------------- 1 | relationships.references.authors.name CONTAINS "Dijkstra" 2 | -------------------------------------------------------------------------------- /tests/inputs/numeric_and_strings2.filter: -------------------------------------------------------------------------------- 1 | _exmpl_melting_point<300 AND nelements=4 AND elements="Si,O2" -------------------------------------------------------------------------------- /tests/cases/Filter_073.inp: -------------------------------------------------------------------------------- 1 | ((true = TRUE) AND (false = FALSE)) OR ((true != TRUE) AND (false != FALSE)) 2 | -------------------------------------------------------------------------------- /tests/inputs/f07.filter: -------------------------------------------------------------------------------- 1 | aax <= +.1e8 OR c21 >= "Sąžininga žąsis" AND NOT ( x != "Some \\ \"string\"" ) 2 | -------------------------------------------------------------------------------- /tests/inputs/identifiers.lst: -------------------------------------------------------------------------------- 1 | ident 2 | _ident_ 3 | id234 4 | id_id 5 | name_1234 6 | __cell_length__ 7 | -------------------------------------------------------------------------------- /tests/inputs/set5.filter: -------------------------------------------------------------------------------- 1 | _exmpl_element_counts HAS < 3 AND _exmpl_element_counts HAS ANY > 3, = 6, 4, != 8 2 | -------------------------------------------------------------------------------- /tests/outputs/ere_identifiers_001.out: -------------------------------------------------------------------------------- 1 | ident 2 | _ident_ 3 | id234 4 | id_id 5 | name_1234 6 | __cell_length__ 7 | -------------------------------------------------------------------------------- /tests/outputs/pcre_identifiers_001.out: -------------------------------------------------------------------------------- 1 | ident 2 | _ident_ 3 | id234 4 | id_id 5 | name_1234 6 | __cell_length__ 7 | -------------------------------------------------------------------------------- /tests/inputs/fuzzystring-no-spaces.filter: -------------------------------------------------------------------------------- 1 | chemical_formulaCONTAINS"Al"ANDchemical_formulaSTARTS"Al"ANDchemical_formulaENDS"Al" 2 | -------------------------------------------------------------------------------- /tests/inputs/fuzzystring.filter: -------------------------------------------------------------------------------- 1 | chemical_formula CONTAINS "Al" AND chemical_formula STARTS "Al" AND chemical_formula ENDS "Al" 2 | -------------------------------------------------------------------------------- /tests/inputs/set6.filter: -------------------------------------------------------------------------------- 1 | elements:_exmpl_element_counts:_exmpl_element_weights HAS ANY > 3:"He":>55.3 , = 6:>"Ti":<37.6 , 8:<"Ga":0 -------------------------------------------------------------------------------- /tests/inputs/value.filter: -------------------------------------------------------------------------------- 1 | nelements = 42 AND nelements > 42 AND nelements < 42 AND nelements != 42 AND nelements >= 42 AND nelements <= 42 -------------------------------------------------------------------------------- /tests/inputs/numeric_and_strings.filter: -------------------------------------------------------------------------------- 1 | _exmpl_aax <= +.1e8 OR nelements >= 10 AND NOT ( _exmpl_x != "Some string" OR NOT _exmpl_a = 7) 2 | -------------------------------------------------------------------------------- /tests/inputs/set2.filter: -------------------------------------------------------------------------------- 1 | elements HAS "H" AND elements HAS ALL "H" AND elements HAS ONLY "H" AND elements HAS ANY "H" AND elements HAS ONLY "H" -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Follow [these instructions on how to contribute](https://github.com/Materials-Consortia/OPTIMADE/wiki/How-to-contribute) 2 | -------------------------------------------------------------------------------- /tests/inputs/boolean.filter: -------------------------------------------------------------------------------- 1 | NOT ( chemical_formula = "Al" AND prototype_formula = "A" OR prototype_formula = "H2O" AND NOT chemical_formula = "Ti" ) -------------------------------------------------------------------------------- /tests/inputs/f10.filter: -------------------------------------------------------------------------------- 1 | aax <= +.1e8 OR c21 >= 10 AND NOT f = y OR NOT a >= b OR x = t OR ( NOT x != "Some string" OR a = b AND x > v AND NOT v < w) 2 | -------------------------------------------------------------------------------- /tests/makefiles/Makelocal-display: -------------------------------------------------------------------------------- 1 | #--*- Makefile -*-- 2 | 3 | VARIABLE=PATH 4 | 5 | .PHONY: display 6 | 7 | display: 8 | @echo ${VARIABLE}=${${VARIABLE}} 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .*.d 3 | .svn 4 | Makeconf* 5 | .idea/ 6 | .vscode/ 7 | .DS_Store 8 | schemas/output 9 | schemas/example/output 10 | *.pdf 11 | *.html 12 | -------------------------------------------------------------------------------- /tests/inputs/fuzzystring-leading-trailing-spaces.filter: -------------------------------------------------------------------------------- 1 | chemical_formula CONTAINS "Al" AND chemical_formula STARTS "Al" AND chemical_formula ENDS "Al" 2 | -------------------------------------------------------------------------------- /tests/inputs/set3.filter: -------------------------------------------------------------------------------- 1 | elements HAS "H" AND elements HAS ALL "H","He","Ga","Ta" AND elements HAS ONLY "H","He","Ga","Ta" AND elements HAS ANY "H", "He", "Ga", "Ta" -------------------------------------------------------------------------------- /tests/inputs/value_fail.filter: -------------------------------------------------------------------------------- 1 | nelements = 42 AND nelements > 42 AND nelements < 42 AND nelements != 42 AND nelements >= 42 AND nelements <= 42 AND nelements <> 42 2 | 3 | -------------------------------------------------------------------------------- /.rstcheck.cfg: -------------------------------------------------------------------------------- 1 | [rstcheck] 2 | report_level=WARNING 3 | ignore_roles= 4 | src, 5 | RFC, 6 | filter 7 | ignore_languages= 8 | filter, 9 | python 10 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/id" 3 | -------------------------------------------------------------------------------- /tests/inputs/length.filter: -------------------------------------------------------------------------------- 1 | elements LENGTH = 42 AND elements LENGTH > 42 AND elements LENGTH < 42 AND elements LENGTH != 42 AND elements LENGTH >= 42 AND elements LENGTH <= 42 2 | -------------------------------------------------------------------------------- /tests/scripts/Filter: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | GRAMMAR=$1 4 | INPUT_FILE=$2 5 | 6 | ./tests/tools/grammatiker/BNF/scripts/grammatica-tree \ 7 | ${GRAMMAR} \ 8 | ${INPUT_FILE} 9 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/calculations/id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/type.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/type" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/structures/id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/calculations/type.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/type" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/type.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/type" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/structures/type.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/type" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/type.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/type" 3 | -------------------------------------------------------------------------------- /tests/inputs/strings.filter: -------------------------------------------------------------------------------- 1 | chemical_formula = "He" AND chemical_formula > "He" AND chemical_formula < "He" AND chemical_formula <= "He" AND chemical_formula >= "He" AND chemical_formula != "He" -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please remember to label your issues according to topic, type and [potentially more](https://github.com/Materials-Consortia/OPTIMADE/wiki/Description-of-issue-labels). 2 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/immutable_id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/immutable_id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/last_modified.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/last_modified" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/calculations/immutable_id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/immutable_id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/immutable_id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/immutable_id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/last_modified.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/last_modified" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/structures/immutable_id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/immutable_id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/structures/last_modified.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/last_modified" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/immutable_id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/immutable_id" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/calculations/last_modified.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/last_modified" 3 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/last_modified.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $$inherit: "/v1.2/properties/core/last_modified" 3 | -------------------------------------------------------------------------------- /tests/inputs/set.filter: -------------------------------------------------------------------------------- 1 | elements HAS "H" AND elements HAS ALL "H","He","Ga","Ta" AND elements HAS ONLY "H","He","Ga","Ta" AND elements HAS ANY "H", "He", "Ga", "Ta" AND elements HAS ONLY "H","He","Ga","Ta" 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "dependencies/submodules/optimade-property-tools"] 2 | path = dependencies/submodules/optimade-property-tools 3 | url = https://github.com/Materials-Consortia/optimade-property-tools.git 4 | -------------------------------------------------------------------------------- /tests/inputs/setzip.filter: -------------------------------------------------------------------------------- 1 | elements:element_counts HAS "H":6 AND elements:element_counts HAS ALL "H":6,"He":7 AND elements:element_counts HAS ONLY "H":6 AND elements:element_counts HAS ANY "H":6,"He":7 AND elements:element_counts HAS ONLY "H":6,"He":7 -------------------------------------------------------------------------------- /schemas/src/meta/v1.2/common/id_field.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.2/common/id_field" 3 | title: "ID" 4 | description: "An IRI that is an ID" 5 | type: string 6 | format: "iri" 7 | -------------------------------------------------------------------------------- /tests/inputs/clauses.filter: -------------------------------------------------------------------------------- 1 | NOT ( chemical_formula = "Al" AND prototype_formula = "A" OR prototype_formula = "Al" AND NOT chemical_formula = "Ti" ) AND ( prototype_formula = "Ga" AND chemical_formula = "Ti" OR ( chemical_formula = "Na" AND chemical_formula = "Ti") ) -------------------------------------------------------------------------------- /tests/inputs/set4.filter: -------------------------------------------------------------------------------- 1 | elements:_exmpl_element_counts HAS "H":6 AND elements:_exmpl_element_counts HAS ALL "H":6,"He":7 AND elements:_exmpl_element_counts HAS ONLY "H":6 AND elements:_exmpl_element_counts HAS ANY "H":6,"He":7 AND elements:_exmpl_element_counts HAS ONLY "H":6,"He":7 -------------------------------------------------------------------------------- /tests/inputs/setzip-spaces.filter: -------------------------------------------------------------------------------- 1 | elements :element_counts HAS "H": 6 AND elements : element_counts HAS ALL "H" : 6,"He": 7 AND elements: element_counts HAS ONLY "H" :6 AND elements:element_counts HAS ANY "H" : 6,"He" : 7 AND elements : element_counts HAS ONLY "H" :6,"He": 7 2 | -------------------------------------------------------------------------------- /tests/scripts/check_spelling.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | spellcheck=$(aspell list -M -p ./.words.lst -l en_US < optimade.rst) 3 | if [ -n "$spellcheck" ] ; then 4 | echo "$spellcheck" 5 | (>&2 echo "Spelling errors found, please run "make fix_spelling" to fix them interactively.") 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please follow [the guidelines here](https://github.com/Materials-Consortia/OPTIMADE/wiki/How-to-contribute#submit-proposed-changes) to create a new pull request. 2 | If your pull request requires discussion, make sure the OPTIMADE developer list is alerted (for more info see the link above.) 3 | -------------------------------------------------------------------------------- /tests/tools/grammatica-build.patch: -------------------------------------------------------------------------------- 1 | 73,74c73,74 2 | < source="1.4" 3 | < target="1.5" 4 | --- 5 | > source="1.8" 6 | > target="1.8" 7 | 116,117c116,117 8 | < source="1.4" 9 | < target="1.5" 10 | --- 11 | > source="1.8" 12 | > target="1.8" 13 | -------------------------------------------------------------------------------- /tests/makefiles/Makeconfig-tools: -------------------------------------------------------------------------------- 1 | #---*- Makefile -*------------------------------------------------------- 2 | 3 | # Configure where the testing tools reside. The ${TOOL_DIR} variable, 4 | # as of 2018-11-20, is used in Makelocal-grammars, Makelocal-run, 5 | # Makelocal-tests and Makelocal-tools makefiles: 6 | 7 | TOOL_DIR = tests/tools 8 | -------------------------------------------------------------------------------- /tests/cases/ere_numbers_003.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided ERE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.ere 9 | 10 | #END DEPEND 11 | 12 | grep -E "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/reals.lst 13 | -------------------------------------------------------------------------------- /tests/cases/ere_numbers_001.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided ERE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.ere 9 | 10 | #END DEPEND 11 | 12 | grep -E "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/numbers.lst 13 | -------------------------------------------------------------------------------- /tests/cases/ere_numbers_002.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided ERE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.ere 9 | 10 | #END DEPEND 11 | 12 | grep -E "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/integers.lst 13 | -------------------------------------------------------------------------------- /tests/cases/ere_numbers_004.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided ERE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.ere 9 | 10 | #END DEPEND 11 | 12 | grep -E "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/not-numbers.lst 13 | -------------------------------------------------------------------------------- /tests/cases/pcre_numbers_001.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.pcre 9 | 10 | #END DEPEND 11 | 12 | grep -P "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/numbers.lst 13 | -------------------------------------------------------------------------------- /tests/cases/pcre_numbers_003.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.pcre 9 | 10 | #END DEPEND 11 | 12 | grep -P "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/reals.lst 13 | -------------------------------------------------------------------------------- /external/README.md: -------------------------------------------------------------------------------- 1 | This directory contains a collection of subdirectories containing documents that are relevant to the OPTIMADE standard. 2 | Please note that the files in these subdirectories are subject to separate licensing agreements that differ from those of other OPTIMADE files. 3 | Please refer to each subdirectory for specific license information. 4 | -------------------------------------------------------------------------------- /tests/cases/ere_numbers_005.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided ERE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.ere 9 | 10 | #END DEPEND 11 | 12 | grep -vE "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/not-numbers.lst 13 | -------------------------------------------------------------------------------- /schemas/src/meta/v1.2/optimade/prefix_definition.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 3 | title: "OPTIMADE prefix definition schema" 4 | description: "Meta-schema for OPTIMADE definitions of prefixes to be used with units." 5 | $$inherit: unit_entity_definition 6 | -------------------------------------------------------------------------------- /tests/cases/ere_identifiers_001.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/identifiers.ere 9 | 10 | #END DEPEND 11 | 12 | grep -E "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/identifiers.lst 13 | -------------------------------------------------------------------------------- /schemas/src/meta/v1.2/optimade/physical_unit_definition.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 3 | title: "OPTIMADE physical unit definition schema" 4 | description: "Meta-schema for OPTIMADE definitions of physical units." 5 | $$inherit: unit_entity_definition 6 | -------------------------------------------------------------------------------- /tests/cases/pcre_identifiers_001.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/identifiers.pcre 9 | 10 | #END DEPEND 11 | 12 | grep -P "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/identifiers.lst 13 | -------------------------------------------------------------------------------- /schemas/src/meta/v1.2/optimade/constant_definition.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.2/optimade/constant_definition" 3 | title: "OPTIMADE constant definition schema" 4 | description: "Meta-schema for OPTIMADE definitions of mathematical and physical constants." 5 | $$inherit: unit_entity_definition 6 | -------------------------------------------------------------------------------- /tests/cases/ere_identifiers_002.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/identifiers.ere 9 | 10 | #END DEPEND 11 | 12 | grep -v -E "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/not-identifiers.lst 13 | -------------------------------------------------------------------------------- /tests/cases/pcre_identifiers_002.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/identifiers.pcre 9 | 10 | #END DEPEND 11 | 12 | grep -v -P "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/not-identifiers.lst 13 | -------------------------------------------------------------------------------- /tests/outputs/ebnf_numbers_001.out: -------------------------------------------------------------------------------- 1 | Parse tree from /dev/fd/62: 2 | Number(9999) 3 | Digits(9999) 4 | Digit(9999) 5 | TOKEN_5(9999): "1", line: 1, col: 1 6 | Digit(9999) 7 | TOKEN_6(9999): "2", line: 1, col: 2 8 | Digit(9999) 9 | TOKEN_7(9999): "3", line: 1, col: 3 10 | Digit(9999) 11 | TOKEN_8(9999): "4", line: 1, col: 4 12 | -------------------------------------------------------------------------------- /tests/outputs/Number_001.out: -------------------------------------------------------------------------------- 1 | Parse tree from tests/cases/Number_001.inp: 2 | Number(9999) 3 | Digits(9999) 4 | Digit(9999) 5 | TOKEN_7(9999): "3", line: 1, col: 1 6 | Digit(9999) 7 | TOKEN_8(9999): "4", line: 1, col: 2 8 | Digit(9999) 9 | TOKEN_9(9999): "5", line: 1, col: 3 10 | Digit(9999) 11 | TOKEN_10(9999): "6", line: 1, col: 4 12 | -------------------------------------------------------------------------------- /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ;; 2 | ;; This file sets editng style for Emacs which is appropriate for the OPTIMADE 3 | ;; .rst file: the Visual Line Mode (the lines are folded dynamically preserving 4 | ;; word boundries) and the (nearly) infinite physical line length 5 | ;; (fill-column). 6 | ;; 7 | ;; S.G 2025-04-22 8 | ;; 9 | ( 10 | (nil . ( 11 | (eval . (visual-line-mode)) 12 | (fill-column . 700000) 13 | ) 14 | ) 15 | ) 16 | -------------------------------------------------------------------------------- /tests/inputs/not-numbers.lst: -------------------------------------------------------------------------------- 1 | ++1.23E-12(3) 2 | --11.1 3 | 11.1A 4 | 1A.X 5 | 1.23E+++ 6 | 1,123(23) 7 | 1...0 8 | .123.E12 9 | 1.234E12(1.2) 10 | 1.234D12((12))) 11 | 1.234D12((12)) 12 | 1.234D12(+-12) 13 | +++ 14 | --- 15 | . 16 | ... 17 | + 18 | +1E 19 | +1EE1 20 | --1E1 21 | -1-E1 22 | 1.1E12(-1) 23 | ? 24 | AAA 25 | (12) 26 | -. 27 | +. 28 | .E1 29 | -.E1 30 | +.E2 31 | -.1E(1) 32 | +2.2E(2) 33 | '1.1' 34 | "2.34E4(3)" 35 | -------------------------------------------------------------------------------- /tests/outputs/ere_numbers_005.out: -------------------------------------------------------------------------------- 1 | ++1.23E-12(3) 2 | --11.1 3 | 11.1A 4 | 1A.X 5 | 1.23E+++ 6 | 1,123(23) 7 | 1...0 8 | .123.E12 9 | 1.234E12(1.2) 10 | 1.234D12((12))) 11 | 1.234D12((12)) 12 | 1.234D12(+-12) 13 | +++ 14 | --- 15 | . 16 | ... 17 | + 18 | +1E 19 | +1EE1 20 | --1E1 21 | -1-E1 22 | 1.1E12(-1) 23 | ? 24 | AAA 25 | (12) 26 | -. 27 | +. 28 | .E1 29 | -.E1 30 | +.E2 31 | -.1E(1) 32 | +2.2E(2) 33 | '1.1' 34 | "2.34E4(3)" 35 | -------------------------------------------------------------------------------- /tests/outputs/pcre_numbers_005.out: -------------------------------------------------------------------------------- 1 | ++1.23E-12(3) 2 | --11.1 3 | 11.1A 4 | 1A.X 5 | 1.23E+++ 6 | 1,123(23) 7 | 1...0 8 | .123.E12 9 | 1.234E12(1.2) 10 | 1.234D12((12))) 11 | 1.234D12((12)) 12 | 1.234D12(+-12) 13 | +++ 14 | --- 15 | . 16 | ... 17 | + 18 | +1E 19 | +1EE1 20 | --1E1 21 | -1-E1 22 | 1.1E12(-1) 23 | ? 24 | AAA 25 | (12) 26 | -. 27 | +. 28 | .E1 29 | -.E1 30 | +.E2 31 | -.1E(1) 32 | +2.2E(2) 33 | '1.1' 34 | "2.34E4(3)" 35 | -------------------------------------------------------------------------------- /tests/cases/ebnf_numbers_001.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Test case: test if a provided EBNF grammar correctly recognises 4 | # integer and real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/Number.ebnf 9 | 10 | #END DEPEND 11 | 12 | tests/tools/grammatiker/BNF/scripts/grammatica-tree \ 13 | <(tests/tools/grammatiker/EBNF/scripts/ebnf2grammatica ${INPUT_GRAMMAR}) \ 14 | <(echo -n 1234) 15 | -------------------------------------------------------------------------------- /tests/cases/ebnf_numbers_002.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Test case: test if a provided EBNF grammar correctly recognises 4 | # integer and real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/Number.ebnf 9 | 10 | #END DEPEND 11 | 12 | tests/tools/grammatiker/BNF/scripts/grammatica-tree \ 13 | <(tests/tools/grammatiker/EBNF/scripts/ebnf2grammatica ${INPUT_GRAMMAR}) \ 14 | <(echo -n +.1E-123) 15 | -------------------------------------------------------------------------------- /tests/cases/pcre_numbers_002.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.pcre 9 | 10 | #END DEPEND 11 | 12 | #grep -P "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/integers.lst 13 | perl -ne "print if /^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$/" tests/inputs/integers.lst 14 | -------------------------------------------------------------------------------- /tests/cases/pcre_numbers_004.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.pcre 9 | 10 | #END DEPEND 11 | 12 | #grep -P "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/not-numbers.lst 13 | perl -ne "print if /^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$/" tests/inputs/not-numbers.lst 14 | -------------------------------------------------------------------------------- /tests/cases/pcre_numbers_005.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises integer and 4 | # real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/numbers.pcre 9 | 10 | #END DEPEND 11 | 12 | #grep -vP "^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$" tests/inputs/not-numbers.lst 13 | perl -ne "print unless /^$(grep -vE '^#|^ *$' ${INPUT_GRAMMAR})\$/" tests/inputs/not-numbers.lst 14 | -------------------------------------------------------------------------------- /dependencies/installers/Debian-10/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | sudo apt-get install -y \ 4 | ant \ 5 | default-jdk \ 6 | docutils-common \ 7 | make \ 8 | patch \ 9 | python3-mdx-math \ 10 | unzip \ 11 | ; 12 | 13 | # Required by the 'optimade-property-tools' submodule 14 | sudo apt-get install -y \ 15 | python3-jsonschema \ 16 | python3-markdown \ 17 | python3-mdx-math \ 18 | python3-pygments \ 19 | python3-yaml \ 20 | ; 21 | -------------------------------------------------------------------------------- /tests/cases/pcre_symops_001.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises symmetry 4 | # operation strings. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_DEFS=tests/generated/symop_definitions.pcre 9 | INPUT_GRAMMAR=tests/generated/symops.pcre 10 | 11 | #END DEPEND 12 | 13 | perl -I. -w -ne " 14 | require '${INPUT_DEFS}'; 15 | print if /$(grep -v '^ *#' ${INPUT_GRAMMAR} | perl -pe 's/ #.*//')/x 16 | " \ 17 | tests/inputs/symops.lst 18 | -------------------------------------------------------------------------------- /tests/cases/pcre_symops_002.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if a provided PCRE correctly recognises symmetry 4 | # operation strings. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_DEFS=tests/generated/symop_definitions.pcre 9 | INPUT_GRAMMAR=tests/generated/symops.pcre 10 | 11 | #END DEPEND 12 | 13 | perl -I. -w -ne " 14 | require '${INPUT_DEFS}'; 15 | print unless /$(grep -v '^ *#' ${INPUT_GRAMMAR} | perl -pe 's/ #.*//')/x 16 | " \ 17 | tests/inputs/symops.lst 18 | -------------------------------------------------------------------------------- /tests/makefiles/Makelocal-spell: -------------------------------------------------------------------------------- 1 | #---*- Makefile -*------------------------------------------------------- 2 | 3 | # Targets related to spellchecking the specification 4 | 5 | .PHONY: fix_spelling 6 | 7 | # Interactively fix spelling errors and add to .words.lst 8 | fix_spelling: 9 | aspell check -x -p ./.words.lst -l en_US ${RST_FILES} 10 | 11 | .PHONY: spell 12 | 13 | # Output all spelling errors to stdout with their line numbers 14 | spell: 15 | ./tests/scripts/check_spelling.sh 16 | -------------------------------------------------------------------------------- /tests/scripts/filter_rsync_itemize_output.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 3 | # Pipe the output of rsync -ni into this script to simplify the output 4 | # so that not all individual files in a new directory show up 5 | # individually (just as a new directory) 6 | 7 | import sys 8 | 9 | pat = None 10 | for line in sys.stdin: 11 | stat,sep,f = line.partition(" ") 12 | f = f.strip() 13 | if pat is not None and f.startswith(pat): 14 | continue 15 | if stat.startswith("cd"): 16 | pat = f 17 | sys.stdout.write(line) 18 | -------------------------------------------------------------------------------- /tests/outputs/Filter_030.out: -------------------------------------------------------------------------------- 1 | Parse tree from tests/cases/Filter_030.inp: 2 | Error: in tests/cases/Filter_030.inp: line 1: 3 | unexpected token "LENGTH", expected one of " ", , 4 | , , , , "NOT", """, 5 | "+", "-", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", 6 | "TRUE", "FALSE", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", 7 | "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", 8 | "x", "y", "z", "_", or "(" 9 | 10 | LENGTH elements 42 11 | ^ 12 | -------------------------------------------------------------------------------- /tests/inputs/reals.lst: -------------------------------------------------------------------------------- 1 | -0.314159E01 2 | +0.314159E01 3 | 0.314159E01 4 | -0.314159E1 5 | -0.314159E+1 6 | +0.314159E1 7 | +0.314159E+1 8 | 0.314159E1 9 | 0.314159E+1 10 | -3.14159 11 | +3.14159 12 | 3.14159 13 | +314159.E-00005 14 | +314159E-00005 15 | -.314159E01 16 | -31.4159E-01 17 | .314159E01 18 | +.314159E01 19 | +31.4159E-01 20 | 31.4159E-01 21 | +314159.E-05 22 | +314159E-05 23 | -.314159E1 24 | -.314159E+1 25 | -31.4159E-1 26 | .314159E1 27 | .314159E+1 28 | +.314159E1 29 | +.314159E+1 30 | +31.4159E-1 31 | 31.4159E-1 32 | +314159.E-5 33 | +314159E-5 34 | -------------------------------------------------------------------------------- /external/GNU_Units/README.md: -------------------------------------------------------------------------------- 1 | This directory contains only the GNU Units database file `definitions.units` referenced in the OPTIMADE standard of this repository. 2 | It has been extracted from the source distribution of the GNU Units software. 3 | 4 | This file is licensed separately from other files in the repository. 5 | It is available under the GNU General Public License (GPL). 6 | Full information on how the file is licensed is available in the [header of the file](definitions.units) and the license file [COPYING](COPYING) included in the same directory as this README.md file. 7 | -------------------------------------------------------------------------------- /tests/cases/pcre_symops_003.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if the PCRE given in the OPTIMADE standard correctly 4 | # recognises symmetry operations from the 'optimade.rst' examples: 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_DEFS=tests/generated/symop_definitions.pcre 9 | INPUT_GRAMMAR=tests/generated/symops.pcre 10 | 11 | #END DEPEND 12 | 13 | perl -I. -w -ne " 14 | require '${INPUT_DEFS}'; 15 | print if /$(grep -v '^ *#' ${INPUT_GRAMMAR} | perl -pe 's/ #.*//')/x 16 | " \ 17 | < \n\r ___beta___\n\n"' 22 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/ctime.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/ctime" 3 | title: "change time" 4 | x-optimade-type: "timestamp" 5 | x-optimade-definition: 6 | label: "ctime_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "ctime" 11 | type: 12 | - "string" 13 | - "null" 14 | format: "date-time" 15 | description: |- 16 | Time of last status change of a file as per POSIX standard. 17 | examples: 18 | - "2007-04-05T14:30:20Z" 19 | x-optimade-unit: "inapplicable" 20 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/publisher.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/publisher" 3 | title: "publisher" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "publisher_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "publisher" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The name of the publisher (the publisher field in the BibTeX specification). 16 | examples: 17 | - "ACM" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/core/last_modified.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/core/last_modified" 3 | title: "last modified" 4 | x-optimade-type: "timestamp" 5 | x-optimade-definition: 6 | label: "last_modified_core" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "last_modified" 11 | type: 12 | - "string" 13 | - "null" 14 | format: "date-time" 15 | description: |- 16 | Date and time representing when the entry was last modified. 17 | examples: 18 | - "2007-04-05T14:30:20Z" 19 | x-optimade-unit: "inapplicable" 20 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/bib_type.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/bib_type" 3 | title: "bibliographic type" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "bib_type_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "bib_type" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Type of the reference (the type field in the BibTeX specification). 16 | examples: 17 | - "Research Note" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/chapter.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/chapter" 3 | title: "chapter" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "chapter_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "chapter" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The chapter, section, or similar part number (the chapter field in the BibTeX specification). 16 | examples: 17 | - "5" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/key.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/key" 3 | title: "key" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "key_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "key" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Used for alphabetizing, cross-referencing, and creating a label (the key field in the BibTeX specification). 16 | examples: 17 | - "smith2022" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/note.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/note" 3 | title: "note" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "note_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "note" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Additional information about the reference (the note field in the BibTeX specification). 16 | examples: 17 | - "Accessed: 2022-11-04" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/volume.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/volume" 3 | title: "volume" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "volume_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "volume" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The volume number of a journal or multivolume book (the volume field in the BibTeX specification). 16 | examples: 17 | - "14" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /tests/makefiles/Makelocal-run: -------------------------------------------------------------------------------- 1 | #--*- Makefile -*-- 2 | 3 | # The 'make run' target for quick testing of grammars: 4 | 5 | # make run 6 | # make run TEXT_TO_PARSE=filter.txt 7 | # make run TEXT_TO_PARSE=filter.txt GRAMMAR=grammars/filters.ebnf 8 | 9 | TOOL_DIR ?= tools/ 10 | 11 | GRAMMAT ?= $(word 1,$(sort ${GRAMMAR_FILES})) 12 | TEXT_TO_PARSE ?= tests/inputs/filter.txt 13 | 14 | .PHONY: run 15 | 16 | run: ${GRAMMAT} 17 | awk '{print}' ${TEXT_TO_PARSE} 18 | ${TOOL_DIR}/grammatiker/BNF/scripts/grammatica-tree $< ${TEXT_TO_PARSE} 19 | 20 | ${GEN_DIR}/%.g: $(dir ${GRAMMAR})/%.ebnf 21 | ${TOOL_DIR}/grammatiker/EBNF/scripts/ebnf2grammatica $< > $@ 22 | 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/journal.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/journal" 3 | title: "journal" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "journal_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "journal" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The name of a journal (the journal field in the BibTeX specification). 16 | examples: 17 | - "Journal of Environmental Science" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /tests/cases/ecma_symops_001.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # Test case: test if the provided ECMA-compatible regular expression correctly 4 | # recognises symmetry operation strings. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/symops.ecma 9 | 10 | #END DEPEND 11 | 12 | 13 | /usr/bin/env python << EOF 14 | import re 15 | import sys 16 | with open("${INPUT_GRAMMAR}") as f: 17 | expression = [line.strip() for line in f.readlines() if line.strip() and not line.strip().startswith("#")][0] 18 | 19 | with open("tests/inputs/symops.lst") as cases: 20 | for case in cases: 21 | if re.match(expression, case): 22 | print(case, end="") 23 | EOF 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/month.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/month" 3 | title: "month" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "month_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "month" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The three-letter abbreviation of the month of publication or writing (the month field in the BibTeX specification). 16 | examples: 17 | - "jul" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/school.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/school" 3 | title: "school" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "school_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "school" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The name of the school where a thesis was written (the school field in the BibTeX specification). 16 | examples: 17 | - "Stanford University" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/series.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/series" 3 | title: "series" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "series_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "series" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The name of a series or set of books (the series field in the BibTeX specification). 16 | examples: 17 | - "Lecture Notes in Computer Science" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/address.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/address" 3 | title: "address" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "address_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "address" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Typically the location of the publisher or institution (the address field in the BibTeX specification). 16 | examples: 17 | - "New York, NY" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/crossref.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/crossref" 3 | title: "crossref" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "crossref_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "crossref" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The database key of the entry being cross referenced (the crossref field in the BibTeX specification). 16 | examples: 17 | - "smith2022" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/number.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/number" 3 | title: "number" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "number_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "number" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The number of a journal, magazine, technical report, or work in a series (the number field in the BibTeX specification). 16 | examples: 17 | - "3" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /tests/makefiles/Makelocal-output: -------------------------------------------------------------------------------- 1 | #---*- Makefile -*------------------------------------------------------- 2 | 3 | # Makelocal-output 4 | 5 | PDF_FILES = ${RST_FILES:%.rst=%.pdf} 6 | 7 | .PHONY: pdf 8 | 9 | pdf: ${PDF_FILES} 10 | 11 | %.pdf: %.rst 12 | pandoc $< -o $@ 13 | 14 | HTML_FILES = ${RST_FILES:%.rst=%.html} 15 | 16 | .PHONY: html 17 | 18 | html: ${HTML_FILES} 19 | 20 | %.html: %.rst ./tests/makefiles/style.css 21 | $(shell which rst2html5.py || which rst2html5 || echo "rst2html5.py") -d --syntax-highlight=none --stylesheet=$(word 2, $^) $< $@ 22 | 23 | .PHONY: clean clean-output 24 | 25 | clean: clean-output 26 | 27 | clean-output: 28 | rm -f $(PDF_FILES) $(HTML_FILES) 29 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/title.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/title" 3 | title: "title" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "title_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "title" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The title of the work (the title field in the BibTeX specification). 16 | examples: 17 | - "A Study on the Effects of Sleep Deprivation on Cognitive Performance" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/annote.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/annote" 3 | title: "annote" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "annote_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "annote" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Additional notes or comments on the reference (the annote field in the BibTeX specification). 16 | examples: 17 | - "This article obtains structures via density-functional theory." 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/howpublished.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/howpublished" 3 | title: "how published" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "howpublished_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "howpublished" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The method of publication (the howpublished field in the BibTeX specification) 16 | examples: 17 | - "\\url{https://www.example.com/papers/example_paper}" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/institution.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/institution" 3 | title: "institution" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "institution_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "institution" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The sponsoring institution of a technical report (the institution field in the BibTeX specification). 16 | examples: 17 | - "Massachusetts Institute of Technology" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/meta/v1.2/common/symbol_list.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.2/common/symbol_list" 3 | title: "symbol list" 4 | description: "A list of dictionaries that associate and id with a symbol" 5 | items: 6 | additionalProperties: False 7 | patternProperties: 8 | "^_": {} 9 | properties: 10 | id: 11 | description: "The IRI of one of the referenced entity." 12 | format: "uri" 13 | type: string 14 | symbol: 15 | description: "The symbol used to reference this entity." 16 | pattern: ^[a-zA-Z_][a-zA-Z_0-9]*$ 17 | type: string 18 | required: 19 | - symbol 20 | - id 21 | type: object 22 | type: array 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/organization.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/organization" 3 | title: "organization" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "organization_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "organization" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The organization sponsoring a conference or publishing a manual (the organization field in the BibTeX specification) 16 | examples: 17 | - "International Association of Engineers" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/common/wyckoff_position.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/common/wyckoff_position" 3 | title: "Wyckoff position" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "wyckoff_position_optimade_common" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.2" 10 | name: "wyckoff_position" 11 | description: |- 12 | The Wyckoff symbol for a site. 13 | x-optimade-unit: inapplicable 14 | type: 15 | - "string" 16 | maxLength: 1 17 | enum: ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "α"] 18 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/booktitle.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/booktitle" 3 | title: "booktitle" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "booktitle_optimade_references" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "booktitle" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The title of a book being cited; for parts of a book, use the title field instead (the booktitle field in the BibTeX specification). 16 | examples: 17 | - "Density-functional Theory of Atoms and Molecules" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/json-ld/v1.2/optimade.yaml: -------------------------------------------------------------------------------- 1 | '@context': 2 | 3 | id: "@id" 4 | type: "@type" 5 | 6 | data: "@graph" 7 | attributes: "@nest" 8 | 9 | structures: 10 | '@id': "https://schemas.optimade.org/json-ld/v1.2/nodetypes/optimade/structures" 11 | '@context': "https://schemas.optimade.org/json-ld/v1.2/nodetypes/optimade/structures.json" 12 | 13 | files: 14 | '@id': "https://schemas.optimade.org/json-ld/v1.2/nodetypes/optimade/files" 15 | '@context': "https://schemas.optimade.org/json-ld/v1.2/nodetypes/optimade/files.json" 16 | 17 | references: 18 | '@id': "https://schemas.optimade.org/json-ld/v1.2/nodetypes/optimade/references" 19 | '@context': "https://schemas.optimade.org/json-ld/v1.2/nodetypes/optimade/references.json" 20 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/media_type.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/media_type" 3 | title: "media type" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "media_type_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "media_type" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Media type identifier (also known as MIME type), for a file as per [RFC 6838 Media Type Specifications and Registration Procedures](https://datatracker.ietf.org/doc/html/rfc6838). 16 | examples: 17 | - "chemical/x-cif" 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /tests/inputs/filters.lst: -------------------------------------------------------------------------------- 1 | filter='a > b AND (a > 0 OR b > 0)' 2 | filter='filter=(NOT a>b AND x>0)' 3 | filter='NOT (a>b) AND x>0'' 4 | filter='aax <= +.1e8 OR c21 >= 10 AND NOT ( x != "Some string" OR NOT a = b)' 5 | filter=a=1 6 | filter='b="kva" AND (10 ) )' 7 | filter='aax <= +.1e8 OR c21 >= "Sąžininga žąsis" AND NOT ( x != "Some \\ \"string\"" )' 8 | filter='((NOT (a>b)) AND x>0)' 9 | filter='aax <= +.1e8 OR c21 >= 10 AND NOT ( x != "Some string" )' 10 | filter='aax <= +.1e8 OR c21 >= 10 AND NOT f = y OR NOT a >= b OR x = t OR ( NOT x != "Some string" OR a = b AND x > v AND NOT v < w)' 11 | filter='((NOT (a>b)) AND NOT ((x>0)))' 12 | filter='a>1 AND (b<10 OR c!=b OR x>100)' 13 | filter='filter=NOT a>b AND x>0' 14 | filter='((NOT (a>b)) AND ((x>0)))' 15 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v5.0.0 4 | hooks: 5 | - id: trailing-whitespace 6 | exclude: &exclude_files > 7 | (?x)^( 8 | tests/inputs/various-whitespace.filter| 9 | tests/inputs/fuzzystring-leading-trailing-spaces.filter| 10 | external/GNU_Units/definitions.units| 11 | units/definitions.units| 12 | .words.lst 13 | )$ 14 | 15 | - repo: https://github.com/Lucas-C/pre-commit-hooks 16 | rev: v1.5.5 17 | hooks: 18 | - id: remove-tabs 19 | args: [ '--whitespaces-count', '2'] 20 | files: \.rst$ 21 | 22 | - repo: https://github.com/rstcheck/rstcheck 23 | rev: v6.2.4 24 | hooks: 25 | - id: rstcheck 26 | args: [ '--config', '.rstcheck.cfg' ] 27 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/core/type.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/core/type" 3 | title: "type" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "type_core" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "type" 11 | type: 12 | - "string" 13 | description: |- 14 | The name of the type of an entry. 15 | 16 | **Requirements/Conventions:** 17 | 18 | - MUST be an existing entry type. 19 | - The entry of type and ID MUST be returned in response to a request for // under the versioned or unversioned base URL serving the API. 20 | examples: 21 | - "structures" 22 | x-optimade-unit: "inapplicable" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/version.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/version" 3 | title: "version" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "version_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "version" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Version information of a file (e.g., commit, revision, timestamp). 16 | 17 | **Requirements/Conventions:** 18 | 19 | - If provided, it MUST be guaranteed that file contents pertaining to the same combination of id and version are the same. 20 | examples: 21 | - "3.2.6" 22 | x-optimade-unit: "inapplicable" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/name.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/name" 3 | title: "name" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "name_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "name" 11 | type: 12 | - "string" 13 | description: |- 14 | Base name of a file. 15 | 16 | **Requirements/Conventions:** 17 | 18 | - File name extension is an integral part of a file name and, if available, MUST be included. 19 | examples: 20 | - "1000000.cif" 21 | x-optimade-unit: "inapplicable" 22 | x-optimade-requirements: 23 | support: "must" 24 | sortable: false 25 | query-support: "none" 26 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/url.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/url" 3 | title: "URL" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "url_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "url" 11 | type: 12 | - "string" 13 | description: |- 14 | The URL to get the contents of a file. 15 | 16 | **Requirements/Conventions:** 17 | 18 | - The URL MUST point to the actual contents of a file (i.e. byte stream), not an intermediate (preview) representation. For example, if referring to a file on GitHub, a link should point to raw contents. 19 | examples: 20 | - "https://example.org/files/cifs/1000000.cif" 21 | x-optimade-unit: "inapplicable" 22 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/unitsystems/optimade/optimade.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/unitsystem_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/unitsystems/optimade/optimade" 3 | title: "OPTIMADE" 4 | description: |- 5 | A combination of SI and non-SI units in common use suitable for use with OPTIMADE. 6 | 7 | This unit system combines SI units (including units accepted for use with the SI), the bit, and the byte unit. 8 | $$inherit: "/v1.2/unitsystems/si/si_general" 9 | x-optimade-definition: 10 | label: "optimade_unitsystem" 11 | kind: "unitsystem" 12 | format: "1.2" 13 | version: "1.2.0" 14 | name: "optimade" 15 | units: 16 | bit: 17 | $$inherit: "/v1.2/units/independent/1948/information/bit" 18 | B: 19 | $$inherit: "/v1.2/units/iso-iec-80000/2008/information_science_and_technology/byte" 20 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/structures/site_coordinate_span_description.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/structures/site_coordinate_span_description" 3 | title: "site coordinate span description" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "site_coordinate_span_description_optimade_structures" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.2" 10 | name: "site_coordinate_span_description" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Human-readable semi-formal characterization of the coordinate span when the `site_coordinate_span` property has value `other`. 16 | examples: 17 | - "Two fullerene molecules with a VdW contact." 18 | x-optimade-unit: "inapplicable" 19 | -------------------------------------------------------------------------------- /schemas/src/meta/v1.2/common/resource_list.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.2/common/resource_list" 3 | title: "resource list" 4 | description: "A list of dictionaries that describe and reference remote resources." 5 | type: array 6 | items: 7 | patternProperties: 8 | "^x-(?!optimade-)": {} 9 | additionalProperties: False 10 | properties: 11 | relation: 12 | description: |- 13 | A human-readable description of the resource and what is being referenced in the resource, e.g., a "natural language description". 14 | type: string 15 | resource-id: 16 | description: |- 17 | An IRI of the external resource (which MAY be a resolvable URL). 18 | type: string 19 | format: "iri" 20 | required: 21 | - relation 22 | - resource-id 23 | type: object 24 | -------------------------------------------------------------------------------- /tests/makefiles/Makelocal-authors: -------------------------------------------------------------------------------- 1 | #---*- Makefile -*------------------------------------------------------- 2 | 3 | # Targets related to handling the AUTHORS file 4 | 5 | .PHONY: test_authors 6 | 7 | test_authors: tests/generated/AUTHORS.sorted 8 | diff -u AUTHORS tests/generated/AUTHORS.sorted || true 9 | 10 | AUTHORS_TAG=Contributors to the development of the OPTIMADE specification and implementation in alphabetical order: 11 | 12 | tests/generated/AUTHORS.sorted: AUTHORS 13 | awk '{print} /${AUTHORS_TAG}/ {exit}' $< > $@ 14 | cat $< \ 15 | | awk 'NAMES {print} /${AUTHORS_TAG}/ {NAMES=1}' \ 16 | | sed 's/Di /Di_/' \ 17 | | awk '{printf("%s:%s\n",$$NF,$$0)}' \ 18 | | sort \ 19 | | awk -F: '{print $$2}' \ 20 | | sed 's/Di_/Di /' \ 21 | >> $@ 22 | 23 | .PHONY: clean clean_authors 24 | 25 | clean: clean_authors 26 | 27 | clean_authors: 28 | rm -f tests/generated/AUTHORS.sorted 29 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/core/id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/core/id" 3 | title: "ID" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "id_core" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "id" 11 | type: 12 | - "string" 13 | description: |- 14 | A unique string referencing a specific entry in the database. 15 | 16 | **Requirements/Conventions:** 17 | 18 | - Taken together, the ID and entry type MUST uniquely identify the entry. 19 | - Reasonably short IDs are encouraged and SHOULD NOT be longer than 255 characters. 20 | - IDs MAY change over time. 21 | examples: 22 | - "db/1234567" 23 | - "cod/2000000" 24 | - "cod/2000000@1234567" 25 | - "nomad/L1234567890" 26 | - "42" 27 | x-optimade-unit: "inapplicable" 28 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/structures/space_group_it_number.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/structures/space_group_it_number" 3 | title: "space group IT number" 4 | x-optimade-type: "integer" 5 | x-optimade-definition: 6 | label: "space_group_it_number_optimade_structures" 7 | kind: "property" 8 | version: "1.2.1" 9 | format: "1.2" 10 | name: "space_group_it_number" 11 | type: 12 | - "integer" 13 | - "null" 14 | description: |- 15 | Space group number for the structure assigned by the International Tables for Crystallography Vol. A. 16 | 17 | **Requirements/Conventions**: 18 | 19 | - The integer value MUST be between 1 and 230. 20 | - MUST be `null` if `nperiodic_dimensions` is not equal to 3. 21 | examples: 22 | - 42 23 | x-optimade-unit: "inapplicable" 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/ronna.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/ronna" 3 | title: "ronna" 4 | symbol: "R" 5 | display-symbol: "R" 6 | description: "The ronna SI prefix defined as a dimensionless multiple of 10²⁷, defined at the 27th CGPM Meeting in 2022, resolution 3." 7 | resources: 8 | - relation: "Definition in the 27th CGPM Meeting in 2022, resolution 3" 9 | resource-id: "https://www.bipm.org/en/cgpm-2022/resolution-3" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 27 17 | x-optimade-definition: 18 | label: "ronna_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "ronna" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/ronto.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/ronto" 3 | title: "ronto" 4 | symbol: "r" 5 | display-symbol: "r" 6 | description: "The ronto SI prefix defined as a dimensionless multiple of 10⁻²⁷, defined at the 27th CGPM Meeting in 2022, resolution 3." 7 | resources: 8 | - relation: "Definition in the 27th CGPM Meeting in 2022, resolution 3" 9 | resource-id: "https://www.bipm.org/en/cgpm-2022/resolution-3" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -27 17 | x-optimade-definition: 18 | label: "ronto_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "ronto" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/exa.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/exa" 3 | title: "exa" 4 | symbol: "E" 5 | display-symbol: "E" 6 | description: "The exa SI prefix defined as a dimensionless multiple of 10¹⁸, defined at the 15th CGPM Meeting in 1975, resolution 10." 7 | resources: 8 | - relation: "Definition in the 15th CGPM Meeting in 1975, resolution 10" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/15-1975/resolution-10" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 18 17 | x-optimade-definition: 18 | label: "exa_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "exa" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/quecto.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/quecto" 3 | title: "quecto" 4 | symbol: "q" 5 | display-symbol: "q" 6 | description: "The quecto SI prefix defined as a dimensionless multiple of 10⁻³⁰, defined at the 27th CGPM Meeting in 2022, resolution 3." 7 | resources: 8 | - relation: "Definition in the 27th CGPM Meeting in 2022, resolution 3" 9 | resource-id: "https://www.bipm.org/en/cgpm-2022/resolution-3" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -30 17 | x-optimade-definition: 18 | label: "quecto_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "quecto" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/quetta.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/quetta" 3 | title: "quetta" 4 | symbol: "Q" 5 | display-symbol: "Q" 6 | description: "The quetta SI prefix defined as a dimensionless multiple of 10³⁰, defined at the 27th CGPM Meeting in 2022, resolution 3." 7 | resources: 8 | - relation: "Definition in the 27th CGPM Meeting in 2022, resolution 3" 9 | resource-id: "https://www.bipm.org/en/cgpm-2022/resolution-3" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 30 17 | x-optimade-definition: 18 | label: "quetta_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "quetta" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/peta.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/peta" 3 | title: "peta" 4 | symbol: "P" 5 | display-symbol: "P" 6 | description: "The peta SI prefix defined as a dimensionless multiple of 10¹⁵, defined at the 15th CGPM Meeting in 1975, resolution 10." 7 | resources: 8 | - relation: "Definition in the 15th CGPM Meeting in 1975, resolution 10" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/15-1975/resolution-10" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 15 17 | x-optimade-definition: 18 | label: "peta_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "peta" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/core/immutable_id.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/core/immutable_id" 3 | title: "immutable ID" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "immutable_id_core" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "immutable_id" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The entry's immutable ID (e.g., a UUID). 16 | 17 | **Requirements/Conventions:** 18 | 19 | - This is important for databases having preferred IDs that point to "the latest version" of a record, but still offer access to older variants. 20 | - This ID maps to the version-specific record, in case it changes in the future. 21 | examples: 22 | - "8bd3e750-b477-41a0-9b11-3a799f21b44f" 23 | - "fjeiwoj,54;@=%<>#32" 24 | x-optimade-unit: "inapplicable" 25 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/atto.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/atto" 3 | title: "atto" 4 | symbol: "a" 5 | display-symbol: "a" 6 | description: "The atto SI prefix defined as a dimensionless multiple of 10⁻¹⁸, defined at the 12th CGPM Meeting in 1964, resolution 8." 7 | resources: 8 | - relation: "Definition in the 12th CGPM Meeting in 1964, resolution 8" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/12-1964/resolution-8" 10 | - relation: "Wikipedia article describing the SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -18 17 | x-optimade-definition: 18 | label: "atto_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "atto" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/femto.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/femto" 3 | title: "femto" 4 | symbol: "f" 5 | display-symbol: "f" 6 | description: "The femto SI prefix defined as a dimensionless multiple of 10⁻¹⁵, defined at the 12th CGPM Meeting in 1964, resolution 8." 7 | resources: 8 | - relation: "Definition in the 12th CGPM Meeting in 1964, resolution 8" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/12-1964/resolution-8" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -15 17 | x-optimade-definition: 18 | label: "femto_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "femto" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/yocto.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/yocto" 3 | title: "yocto" 4 | symbol: "y" 5 | display-symbol: "y" 6 | description: "The yocto SI prefix defined as a dimensionless multiple of 10⁻²⁴, defined at the 19th CGPM Meeting in 1991, resolution 4." 7 | resources: 8 | - relation: "Definition in the 19th CGPM Meeting in 1991, resolution 4" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/19-1991/resolution-4" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -24 17 | x-optimade-definition: 18 | label: "yocto_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "yocto" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/yotta.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/yotta" 3 | title: "yotta" 4 | symbol: "Y" 5 | display-symbol: "Y" 6 | description: "The yotta SI prefix defined as a dimensionless multiple of 10²⁴, defined at the 19th CGPM Meeting in 1991, resolution 4." 7 | resources: 8 | - relation: "Definition in the 19th CGPM Meeting in 1991, resolution 4" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/19-1991/resolution-4" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 24 17 | x-optimade-definition: 18 | label: "yotta_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "yotta" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/zepto.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/zepto" 3 | title: "zepto" 4 | symbol: "z" 5 | display-symbol: "z" 6 | description: "The zepto SI prefix defined as a dimensionless multiple of 10⁻²¹, defined at the 19th CGPM Meeting in 1991, resolution 4." 7 | resources: 8 | - relation: "Definition in the 19th CGPM Meeting in 1991, resolution 4" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/19-1991/resolution-4" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -21 17 | x-optimade-definition: 18 | label: "zepto_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "zepto" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/zetta.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/zetta" 3 | title: "zetta" 4 | symbol: "Z" 5 | display-symbol: "Z" 6 | description: "The zetta SI prefix defined as a dimensionless multiple of 10²¹, defined at the 19th CGPM Meeting in 1991, resolution 4." 7 | resources: 8 | - relation: "Definition in the 19th CGPM Meeting in 1991, resolution 4" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/19-1991/resolution-4" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 21 17 | x-optimade-definition: 18 | label: "zetta_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "zetta" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/deca.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/deca" 3 | title: "deca" 4 | symbol: "da" 5 | display-symbol: "da" 6 | description: "The deca SI prefix defined as a dimensionless multiple of 10, adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Deca-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 1 17 | x-optimade-definition: 18 | label: "deca_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "deca" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/deci.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/deci" 3 | title: "deci" 4 | symbol: "d" 5 | display-symbol: "d" 6 | description: "The deci SI prefix defined as a dimensionless multiple of 10⁻¹, adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Deci-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -1 17 | x-optimade-definition: 18 | label: "deci_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "deci" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/giga.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/giga" 3 | title: "giga" 4 | symbol: "G" 5 | display-symbol: "G" 6 | description: "The giga SI prefix defined as a dimensionless multiple of 10⁹, adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Giga-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 9 17 | x-optimade-definition: 18 | label: "giga_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "giga" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/nano.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/nano" 3 | title: "nano" 4 | symbol: "n" 5 | display-symbol: "n" 6 | description: "The nano SI prefix defined as a dimensionless multiple of 10⁻⁹, adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Nano-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -9 17 | x-optimade-definition: 18 | label: "nano_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "nano" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/structures/chemical_formula_anonymous.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/structures/chemical_formula_anonymous" 3 | title: "anonymous chemical formula" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "chemical_formula_anonymous_optimade_structures" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "chemical_formula_anonymous" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | The anonymous formula is the chemical_formula_reduced, but where the elements are instead first ordered by their chemical proportion number, and then, in order left to right, replaced by anonymous symbols A, B, C, ..., Z, Aa, Ba, ..., Za, Ab, Bb, ... and so on. 16 | examples: 17 | - "A2B" 18 | - "A42B42C16D12E10F9G5" 19 | x-optimade-unit: "inapplicable" 20 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/hecto.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/hecto" 3 | title: "hecto" 4 | symbol: "h" 5 | display-symbol: "h" 6 | description: "The hecto SI prefix defined as a dimensionless multiple of 10², adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Hecto-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 2 17 | x-optimade-definition: 18 | label: "hecto_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "hecto" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/kilo.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/kilo" 3 | title: "kilo" 4 | symbol: "k" 5 | display-symbol: "k" 6 | description: "The kilo SI prefix defined as a dimensionless multiple of 10³, adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Kilo-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 3 17 | x-optimade-definition: 18 | label: "kilo_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "kilo" 23 | 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/mega.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/mega" 3 | title: "mega" 4 | symbol: "M" 5 | display-symbol: "M" 6 | description: "The mega SI prefix defined as a dimensionless multiple of 10⁶, adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Mega-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 6 17 | x-optimade-definition: 18 | label: "mega_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "mega" 23 | 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/centi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/centi" 3 | title: "centi" 4 | symbol: "c" 5 | display-symbol: "c" 6 | description: "The centi SI prefix defined as a dimensionless multiple of 10⁻², adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Centi-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -2 17 | x-optimade-definition: 18 | label: "centi_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "centi" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/milli.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/milli" 3 | title: "milli" 4 | symbol: "m" 5 | display-symbol: "m" 6 | description: "The milli SI prefix defined as a dimensionless multiple of 10⁻³, adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the prefix" 11 | resource-id: "https://en.wikipedia.org/wiki/Milli-" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -3 17 | x-optimade-definition: 18 | label: "milli_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "milli" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/pico.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/pico" 3 | title: "pico" 4 | symbol: "p" 5 | display-symbol: "p" 6 | description: "The pico SI prefix defined as a dimensionless multiple of 10⁻¹², adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: -12 17 | x-optimade-definition: 18 | label: "pico_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "pico" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/tera.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/tera" 3 | title: "tera" 4 | symbol: "T" 5 | display-symbol: "T" 6 | description: "The tera SI prefix defined as a dimensionless multiple of 10¹², adopted into SI at its creation at the 11th CGPM Meeting in 1960, resolution 12." 7 | resources: 8 | - relation: "Definition in the 11th CGPM Meeting in 1960, resolution 12" 9 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 10 | - relation: "Wikipedia article describing the SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | exponent: 12 17 | x-optimade-definition: 18 | label: "tera_prefix_si" 19 | kind: "prefix" 20 | format: "1.2" 21 | version: "1.2.0" 22 | name: "tera" 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/url_stable_until.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/url_stable_until" 3 | title: "URL stable until" 4 | x-optimade-type: "timestamp" 5 | x-optimade-definition: 6 | label: "url_stable_until_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "url_stable_until" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Point in time until which the URL in `url` is guaranteed to stay stable. 16 | 17 | **Requirements/Conventions:** 18 | 19 | - `null` means that there is no stability guarantee for the URL in `url`. 20 | Indefinite support could be communicated by providing a date sufficiently far in the future, for example, 9999-12-31. 21 | examples: 22 | - "2052-04-05T14:30:20Z" 23 | x-optimade-unit: "inapplicable" 24 | format: "date-time" 25 | -------------------------------------------------------------------------------- /schemas/src/json-schema/v1.2/optimade.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $$inherit: "jsonapi.json" 3 | title: "OPTIMADE schema" 4 | description: "This is a schema for responses in the JSON output format from the OPTIMADE API. It is directly based on the schema for JSON:API." 5 | definitions: 6 | resource: 7 | oneOf: 8 | - type: "object" 9 | properties: 10 | type: 11 | const: "structures" 12 | attributes: 13 | $ref: "#endpoints/entrytypes/structures" 14 | - type: "object" 15 | properties: 16 | type: 17 | const: "files" 18 | attributes: 19 | $ref: "#endpoints/entrytypes/files" 20 | - type: "object" 21 | properties: 22 | type: 23 | const: "references" 24 | attributes: 25 | $ref: "#endpoints/entrytypes/references" 26 | endpoints: 27 | $$inherit: "/v1.2/standards/optimade" 28 | -------------------------------------------------------------------------------- /tests/makefiles/Makelocal-audit: -------------------------------------------------------------------------------- 1 | #---*- Makefile -*------------------------------------------------------- 2 | 3 | # Targets for auditing the specification 4 | 5 | .PHONY: audit 6 | 7 | audit: audit_grammars audit_authors audit_spelling audit_schemas 8 | @echo "==============================================" 9 | @echo "Audit of specification completed successfully." 10 | @echo "==============================================" 11 | 12 | 13 | .PHONY: audit_grammars 14 | 15 | audit_grammars: 16 | $(MAKE) tools 17 | $(MAKE) grammars 18 | $(MAKE) tests 19 | (exit $$($(MAKE) -s listdiff | head -n 1 | wc -l)) 20 | 21 | 22 | .PHONY: audit_authors 23 | 24 | audit_authors: test_authors 25 | diff -q AUTHORS tests/generated/AUTHORS.sorted 26 | 27 | 28 | .PHONY: audit audit_spelling 29 | 30 | audit_spelling: 31 | @echo "Spellcheck is not yet part of the audit of the specification." 32 | 33 | 34 | .PHONY: audit_schemas 35 | 36 | audit_schemas: 37 | $(MAKE) validate_schemas 38 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/standards/optimade.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/standard_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/standards/optimade" 3 | title: "OPTIMADE standard" 4 | description: "The OPTIMADE standard node types and properties" 5 | x-optimade-definition: 6 | label: "optimade_standard" 7 | kind: "standard" 8 | format: "1.2" 9 | version: "1.2.1" 10 | name: "optimade" 11 | entrytypes: 12 | structures: 13 | $$inherit: "/v1.2/entrytypes/optimade/structures" 14 | x-optimade-requirements: 15 | support: "must" 16 | calculations: 17 | $$inherit: "/v1.2/entrytypes/optimade/calculations" 18 | x-optimade-requirements: 19 | support: "may" 20 | files: 21 | $$inherit: "/v1.2/entrytypes/optimade/files" 22 | x-optimade-requirements: 23 | support: "may" 24 | references: 25 | $$inherit: "/v1.2/entrytypes/optimade/references" 26 | x-optimade-requirements: 27 | support: "may" 28 | -------------------------------------------------------------------------------- /tests/inputs/numbers.lst: -------------------------------------------------------------------------------- 1 | -1.23e12 2 | -1.23E12 3 | -.23e12 4 | -.23E12 5 | -111 6 | -12 7 | -11.1 8 | -1e1 9 | -1E1 10 | -1.23 11 | -1 12 | -1. 13 | -.1e1 14 | -.1E1 15 | -.23 16 | -.1 17 | -1.23e-12 18 | -1.23E-12 19 | -.23e-12 20 | -.23E-12 21 | -.0 22 | .0 23 | +.0 24 | 0.23e-12 25 | 0.23E-12 26 | .23e-12 27 | +.23e-12 28 | .23E-12 29 | +.23E-12 30 | 1.e-12 31 | 1.E-12 32 | +1.23e-12 33 | +1.23E-12 34 | .123 35 | 0.23 36 | .23 37 | +.23 38 | 1 39 | +1 40 | 1. 41 | .1e1 42 | .1E1 43 | 1.1 44 | 1.2 45 | +1.23 46 | 1.23 47 | 1.234 48 | 2 49 | +2.2 50 | 3 51 | 4 52 | 5 53 | 6 54 | 1e1 55 | +1.e1 56 | 1.e1 57 | 1E1 58 | +1.E1 59 | 1.E1 60 | 11.1 61 | 12 62 | 21 63 | 23 64 | +.23e2 65 | +.23E2 66 | 33 67 | 111 68 | +111 69 | 113 70 | 123 71 | 2.34e4 72 | 2.34E4 73 | +10000000 74 | +10000000. 75 | 0.23e12 76 | 0.23E12 77 | .23e12 78 | .23E12 79 | 1.e12 80 | 1.E12 81 | 1.1e12 82 | 1.1E12 83 | +1.23e12 84 | +1.23E12 85 | 1.234e12 86 | 1.234E12 87 | 1000000000.e1000000000 88 | 1000000000.E1000000000 89 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/structures/nsites.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/structures/nsites" 3 | title: "number of sites" 4 | x-optimade-type: "integer" 5 | x-optimade-definition: 6 | label: "nsites_optimade_structures" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "nsites" 11 | type: 12 | - "integer" 13 | - "null" 14 | description: |- 15 | An integer specifying the length of the `cartesian_site_positions` property. 16 | 17 | **Requirements/Conventions**: 18 | 19 | - MUST be equal to the lengths of the list properties elements and elements_ratios, if they are provided. 20 | 21 | **Query examples**: 22 | 23 | - Match only structures with exactly 4 sites: `nsites=4` 24 | - Match structures that have between 2 and 7 sites: `nsites>=2 AND nsites<=7` 25 | examples: 26 | - 42 27 | x-optimade-unit: "dimensionless" 28 | -------------------------------------------------------------------------------- /tests/outputs/ere_numbers_001.out: -------------------------------------------------------------------------------- 1 | -1.23e12 2 | -1.23E12 3 | -.23e12 4 | -.23E12 5 | -111 6 | -12 7 | -11.1 8 | -1e1 9 | -1E1 10 | -1.23 11 | -1 12 | -1. 13 | -.1e1 14 | -.1E1 15 | -.23 16 | -.1 17 | -1.23e-12 18 | -1.23E-12 19 | -.23e-12 20 | -.23E-12 21 | -.0 22 | .0 23 | +.0 24 | 0.23e-12 25 | 0.23E-12 26 | .23e-12 27 | +.23e-12 28 | .23E-12 29 | +.23E-12 30 | 1.e-12 31 | 1.E-12 32 | +1.23e-12 33 | +1.23E-12 34 | .123 35 | 0.23 36 | .23 37 | +.23 38 | 1 39 | +1 40 | 1. 41 | .1e1 42 | .1E1 43 | 1.1 44 | 1.2 45 | +1.23 46 | 1.23 47 | 1.234 48 | 2 49 | +2.2 50 | 3 51 | 4 52 | 5 53 | 6 54 | 1e1 55 | +1.e1 56 | 1.e1 57 | 1E1 58 | +1.E1 59 | 1.E1 60 | 11.1 61 | 12 62 | 21 63 | 23 64 | +.23e2 65 | +.23E2 66 | 33 67 | 111 68 | +111 69 | 113 70 | 123 71 | 2.34e4 72 | 2.34E4 73 | +10000000 74 | +10000000. 75 | 0.23e12 76 | 0.23E12 77 | .23e12 78 | .23E12 79 | 1.e12 80 | 1.E12 81 | 1.1e12 82 | 1.1E12 83 | +1.23e12 84 | +1.23E12 85 | 1.234e12 86 | 1.234E12 87 | 1000000000.e1000000000 88 | 1000000000.E1000000000 89 | -------------------------------------------------------------------------------- /tests/outputs/pcre_numbers_001.out: -------------------------------------------------------------------------------- 1 | -1.23e12 2 | -1.23E12 3 | -.23e12 4 | -.23E12 5 | -111 6 | -12 7 | -11.1 8 | -1e1 9 | -1E1 10 | -1.23 11 | -1 12 | -1. 13 | -.1e1 14 | -.1E1 15 | -.23 16 | -.1 17 | -1.23e-12 18 | -1.23E-12 19 | -.23e-12 20 | -.23E-12 21 | -.0 22 | .0 23 | +.0 24 | 0.23e-12 25 | 0.23E-12 26 | .23e-12 27 | +.23e-12 28 | .23E-12 29 | +.23E-12 30 | 1.e-12 31 | 1.E-12 32 | +1.23e-12 33 | +1.23E-12 34 | .123 35 | 0.23 36 | .23 37 | +.23 38 | 1 39 | +1 40 | 1. 41 | .1e1 42 | .1E1 43 | 1.1 44 | 1.2 45 | +1.23 46 | 1.23 47 | 1.234 48 | 2 49 | +2.2 50 | 3 51 | 4 52 | 5 53 | 6 54 | 1e1 55 | +1.e1 56 | 1.e1 57 | 1E1 58 | +1.E1 59 | 1.E1 60 | 11.1 61 | 12 62 | 21 63 | 23 64 | +.23e2 65 | +.23E2 66 | 33 67 | 111 68 | +111 69 | 113 70 | 123 71 | 2.34e4 72 | 2.34E4 73 | +10000000 74 | +10000000. 75 | 0.23e12 76 | 0.23E12 77 | .23e12 78 | .23E12 79 | 1.e12 80 | 1.E12 81 | 1.1e12 82 | 1.1E12 83 | +1.23e12 84 | +1.23E12 85 | 1.234e12 86 | 1.234E12 87 | 1000000000.e1000000000 88 | 1000000000.E1000000000 89 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/exbi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/exbi" 3 | title: "exbi" 4 | symbol: "Ei" 5 | display-symbol: "Ei" 6 | description: "The exbi prefix as a dimensionless multiple of 2⁶⁰ is one of a set of recommended prefixes in the International System of Units (SI), 9th Edition for referring to powers of 2." 7 | resources: 8 | - relation: "Definition in the International System of Units (SI), 9th Edition" 9 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | base: 2 17 | exponent: 60 18 | x-optimade-definition: 19 | label: "exbi_prefix_si" 20 | kind: "prefix" 21 | format: "1.2" 22 | version: "1.2.0" 23 | name: "exbi" 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/gibi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/gibi" 3 | title: "gibi" 4 | symbol: "Gi" 5 | display-symbol: "Gi" 6 | description: "The gibi prefix as a dimensionless multiple of 2³⁰ is one of a set of recommended prefixes in the International System of Units (SI), 9th Edition for referring to powers of 2." 7 | resources: 8 | - relation: "Definition in the International System of Units (SI), 9th Edition" 9 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | base: 2 17 | exponent: 30 18 | x-optimade-definition: 19 | label: "gibi_prefix_si" 20 | kind: "prefix" 21 | format: "1.2" 22 | version: "1.2.0" 23 | name: "gibi" 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/mebi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/mebi" 3 | title: "mebi" 4 | symbol: "Mi" 5 | display-symbol: "Mi" 6 | description: "The mebi prefix as a dimensionless multiple of 2²⁰ is one of a set of recommended prefixes in the International System of Units (SI), 9th Edition for referring to powers of 2." 7 | resources: 8 | - relation: "Definition in the International System of Units (SI), 9th Edition" 9 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | base: 2 17 | exponent: 20 18 | x-optimade-definition: 19 | label: "mebi_prefix_si" 20 | kind: "prefix" 21 | format: "1.2" 22 | version: "1.2.0" 23 | name: "mebi" 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/pebi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/pebi" 3 | title: "pebi" 4 | symbol: "Pi" 5 | display-symbol: "Pi" 6 | description: "The pebi prefix as a dimensionless multiple of 2⁵⁰ is one of a set of recommended prefixes in the International System of Units (SI), 9th Edition for referring to powers of 2." 7 | resources: 8 | - relation: "Definition in the International System of Units (SI), 9th Edition" 9 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | base: 2 17 | exponent: 50 18 | x-optimade-definition: 19 | label: "pebi_prefix_si" 20 | kind: "prefix" 21 | format: "1.2" 22 | version: "1.2.0" 23 | name: "pebi" 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/tebi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/tebi" 3 | title: "tebi" 4 | symbol: "Ti" 5 | display-symbol: "Ti" 6 | description: "The tebi prefix as a dimensionless multiple of 2⁴⁰ is one of a set of recommended prefixes in the International System of Units (SI), 9th Edition for referring to powers of 2." 7 | resources: 8 | - relation: "Definition in the International System of Units (SI), 9th Edition" 9 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | base: 2 17 | exponent: 40 18 | x-optimade-definition: 19 | label: "tebi_prefix_si" 20 | kind: "prefix" 21 | format: "1.2" 22 | version: "1.2.0" 23 | name: "tebi" 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/yobi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/yobi" 3 | title: "yobi" 4 | symbol: "Yi" 5 | display-symbol: "Yi" 6 | description: "The yobi prefix as a dimensionless multiple of 2⁸⁰ is one of a set of recommended prefixes in the International System of Units (SI), 9th Edition for referring to powers of 2." 7 | resources: 8 | - relation: "Definition in the International System of Units (SI), 9th Edition" 9 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | base: 2 17 | exponent: 80 18 | x-optimade-definition: 19 | label: "yobi_prefix_si" 20 | kind: "prefix" 21 | format: "1.2" 22 | version: "1.2.0" 23 | name: "yobi" 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/zebi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/zebi" 3 | title: "zebi" 4 | symbol: "Zi" 5 | display-symbol: "Zi" 6 | description: "The zebi prefix as a dimensionless multiple of 2⁷⁰ is one of a set of recommended prefixes in the International System of Units (SI), 9th Edition for referring to powers of 2." 7 | resources: 8 | - relation: "Definition in the International System of Units (SI), 9th Edition" 9 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | base: 2 17 | exponent: 70 18 | x-optimade-definition: 19 | label: "zebi_prefix_si" 20 | kind: "prefix" 21 | format: "1.2" 22 | version: "1.2.0" 23 | name: "zebi" 24 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/modification_timestamp.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/modification_timestamp" 3 | title: "modification timestamp" 4 | x-optimade-type: "timestamp" 5 | x-optimade-definition: 6 | label: "modification_timestamp_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "modification_timestamp" 11 | type: 12 | - "string" 13 | - "null" 14 | description: |- 15 | Timestamp of the last modification of file contents. A modification is understood as an addition, change or deletion of one or more bytes, resulting in file contents different from the previous. 16 | 17 | **Requirements/Conventions:** 18 | 19 | - Timestamps of subsequent file modifications SHOULD be increasing (not earlier than previous timestamps). 20 | examples: 21 | - "2020-04-05T14:30:20Z" 22 | x-optimade-unit: "inapplicable" 23 | -------------------------------------------------------------------------------- /tests/cases/ebnf_numbers_005.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Test case: test if a provided EBNF grammar correctly recognises 4 | # integer and real (floating-point) numbers. 5 | 6 | BASENAME="$(basename $0)" 7 | 8 | #BEGIN DEPEND 9 | 10 | INPUT_GRAMMAR=tests/generated/Number.ebnf 11 | 12 | #END DEPEND 13 | 14 | test -z "${TMP_DIR}" && TMP_DIR="." 15 | TMP_DIR="${TMP_DIR}/tmp-${BASENAME}-$$" 16 | mkdir "${TMP_DIR}" 17 | 18 | # To make the trap portable between bash and dash, we need to trap 19 | # "signal" 0 ("EXIT") and rely on it for the cleanup: 20 | ## trap "rm -rf '${TMP_DIR}'" 0 1 2 3 15 21 | trap "rm -rf '${TMP_DIR}'" EXIT 22 | trap "exit 1" HUP INT QUIT TERM 23 | 24 | TMP_GRAMMAR="${TMP_DIR}/numbers.g" 25 | 26 | tests/tools/grammatiker/EBNF/scripts/ebnf2grammatica ${INPUT_GRAMMAR} \ 27 | > ${TMP_GRAMMAR} 28 | 29 | while read LINE 30 | do 31 | tests/tools/grammatiker/BNF/scripts/grammatica-tree \ 32 | ${TMP_GRAMMAR} \ 33 | <(echo -n ${LINE}) 34 | done < tests/inputs/reals.lst 35 | -------------------------------------------------------------------------------- /tests/cases/ebnf_numbers_003.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Test case: test if a provided EBNF grammar correctly recognises 4 | # integer and real (floating-point) numbers. 5 | 6 | #BEGIN DEPEND 7 | 8 | INPUT_GRAMMAR=tests/generated/Number.ebnf 9 | 10 | #END DEPEND 11 | 12 | BASENAME="$(basename $0)" 13 | 14 | test -z "${TMP_DIR}" && TMP_DIR="." 15 | TMP_DIR="${TMP_DIR}/tmp-${BASENAME}-$$" 16 | mkdir "${TMP_DIR}" 17 | 18 | # To make the trap portable between bash and dash, we need to trap 19 | # "signal" 0 ("EXIT") and rely on it for the cleanup: 20 | ## trap "rm -rf '${TMP_DIR}'" 0 1 2 3 15 21 | trap "rm -rf '${TMP_DIR}'" EXIT 22 | trap "exit 1" HUP INT QUIT TERM 23 | 24 | TMP_GRAMMAR="${TMP_DIR}/numbers.g" 25 | 26 | tests/tools/grammatiker/EBNF/scripts/ebnf2grammatica ${INPUT_GRAMMAR} \ 27 | > ${TMP_GRAMMAR} 28 | 29 | while read LINE 30 | do 31 | tests/tools/grammatiker/BNF/scripts/grammatica-tree \ 32 | ${TMP_GRAMMAR} \ 33 | <(echo -n ${LINE}) 34 | done < tests/inputs/numbers.lst 35 | -------------------------------------------------------------------------------- /tests/cases/ebnf_numbers_004.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Test case: test if a provided EBNF grammar correctly recognises 4 | # integer and real (floating-point) numbers. 5 | 6 | BASENAME="$(basename $0)" 7 | 8 | #BEGIN DEPEND 9 | 10 | INPUT_GRAMMAR=tests/generated/Number.ebnf 11 | 12 | #END DEPEND 13 | 14 | test -z "${TMP_DIR}" && TMP_DIR="." 15 | TMP_DIR="${TMP_DIR}/tmp-${BASENAME}-$$" 16 | mkdir "${TMP_DIR}" 17 | 18 | # To make the trap portable between bash and dash, we need to trap 19 | # "signal" 0 ("EXIT") and rely on it for the cleanup: 20 | ## trap "rm -rf '${TMP_DIR}'" 0 1 2 3 15 21 | trap "rm -rf '${TMP_DIR}'" EXIT 22 | trap "exit 1" HUP INT QUIT TERM 23 | 24 | TMP_GRAMMAR="${TMP_DIR}/numbers.g" 25 | 26 | tests/tools/grammatiker/EBNF/scripts/ebnf2grammatica ${INPUT_GRAMMAR} \ 27 | > ${TMP_GRAMMAR} 28 | 29 | while read LINE 30 | do 31 | tests/tools/grammatiker/BNF/scripts/grammatica-tree \ 32 | ${TMP_GRAMMAR} \ 33 | <(echo -n ${LINE}) 34 | done < tests/inputs/integers.lst 35 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/prefixes/si/kibi.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/prefix_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/prefixes/si/kibi" 3 | title: "kibi" 4 | symbol: "Ki" 5 | display-symbol: "Ki" 6 | description: "The kibi prefix as a dimensionless multiple of 2¹⁰ = 1024 is one of a set of recommended prefixes in the International System of Units (SI), 9th Edition for referring to powers of 2." 7 | resources: 8 | - relation: "Definition in the International System of Units (SI), 9th Edition" 9 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 10 | - relation: "Wikipedia article describing SI prefixes" 11 | resource-id: "https://en.wikipedia.org/wiki/Metric_prefix" 12 | defining-relation: 13 | base-units: [] 14 | base-units-expression: "" 15 | scale: 16 | base: 2 17 | exponent: 10 18 | x-optimade-definition: 19 | label: "kibi_prefix_si" 20 | kind: "prefix" 21 | format: "1.2" 22 | version: "1.2.0" 23 | name: "kibi" 24 | -------------------------------------------------------------------------------- /tests/cases/ebnf_numbers_006.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Test case: test if a provided EBNF grammar correctly recognises 4 | # integer and real (floating-point) numbers. 5 | 6 | BASENAME="$(basename $0)" 7 | 8 | #BEGIN DEPEND 9 | 10 | INPUT_GRAMMAR=tests/generated/Number.ebnf 11 | 12 | #END DEPEND 13 | 14 | test -z "${TMP_DIR}" && TMP_DIR="." 15 | TMP_DIR="${TMP_DIR}/tmp-${BASENAME}-$$" 16 | mkdir "${TMP_DIR}" 17 | 18 | # To make the trap portable between bash and dash, we need to trap 19 | # "signal" 0 ("EXIT") and rely on it for the cleanup: 20 | ## trap "rm -rf '${TMP_DIR}'" 0 1 2 3 15 21 | trap "rm -rf '${TMP_DIR}'" EXIT 22 | trap "exit 1" HUP INT QUIT TERM 23 | 24 | TMP_GRAMMAR="${TMP_DIR}/numbers.g" 25 | 26 | tests/tools/grammatiker/EBNF/scripts/ebnf2grammatica ${INPUT_GRAMMAR} \ 27 | > ${TMP_GRAMMAR} 28 | 29 | while read LINE 30 | do 31 | tests/tools/grammatiker/BNF/scripts/grammatica-tree \ 32 | ${TMP_GRAMMAR} \ 33 | <(echo -n ${LINE}) 34 | done < tests/inputs/not-numbers.lst 35 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/size.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/size" 3 | title: "size" 4 | x-optimade-type: "integer" 5 | x-optimade-definition: 6 | label: "size_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "size" 11 | x-optimade-unit-definitions: 12 | - $$inherit: "/v1.2/units/iso-iec-80000/2008/information_science_and_technology/byte" 13 | type: 14 | - "integer" 15 | - "null" 16 | description: |- 17 | Size of a file in bytes. 18 | 19 | **Requirements/Conventions:** 20 | 21 | - If provided, it MUST be guaranteed that either exact size of a file is given or its upper bound. 22 | This way if a client reserves a static buffer or truncates the download stream after this many bytes the whole file would be received. 23 | Such provision is included to allow the providers to serve on-the-fly compressed files. 24 | examples: 25 | - 4711 26 | x-optimade-unit: "byte" 27 | -------------------------------------------------------------------------------- /tests/outputs/Filter_005.out: -------------------------------------------------------------------------------- 1 | Parse tree from tests/cases/Filter_005.inp: 2 | Filter(9999) 3 | Expression(9999) 4 | ExpressionClause(9999) 5 | ExpressionPhrase(9999) 6 | Comparison(9999) 7 | PropertyFirstComparison(9999) 8 | Property(9999) 9 | Identifier(9999) 10 | LowercaseLetter(9999) 11 | TOKEN_82(9999): "a", line: 1, col: 1 12 | ValueOpRhs(9999) 13 | ValueEqRhs(9999) 14 | EqualityOperator(9999) 15 | TOKEN_29(9999): "=", line: 1, col: 2 16 | Value(9999) 17 | OrderedValue(9999) 18 | OrderedConstant(9999) 19 | Number(9999) 20 | Digits(9999) 21 | Digit(9999) 22 | TOKEN_17(9999): "1", line: 1, col: 3 23 | Spaces(9999) 24 | Space(9999) 25 | nl(9999) 26 | SPECIAL_1(9999): "(...)", line: 1, col: 4 27 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/authors.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/authors" 3 | title: "authors" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "authors_optimade_references" 7 | kind: "property" 8 | version: "1.2.1" 9 | format: "1.2" 10 | name: "authors" 11 | x-optimade-dimensions: 12 | names: ["dim_authors"] 13 | sizes: [null] 14 | type: 15 | - "array" 16 | - "null" 17 | description: |- 18 | A list of dictionaries with names of the authors. 19 | 20 | **Requirements/Conventions**: 21 | 22 | - Each list member MUST be a dictionary with the following keys: 23 | 24 | - **name**: Full name of the person, REQUIRED. 25 | - **firstname**, **lastname**: Parts of the person's name, OPTIONAL. 26 | items: 27 | $$inherit: "/v1.2/properties/optimade/common/person" 28 | examples: 29 | - [{"name": "John Smith"}, {"name": "Arthur Dent", "firstname": "Arthur", "lastname": "Dent"}] 30 | x-optimade-unit: "inapplicable" 31 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/references/editors.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/references/editors" 3 | title: "editors" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "editors_optimade_references" 7 | kind: "property" 8 | version: "1.2.1" 9 | format: "1.2" 10 | name: "editors" 11 | x-optimade-dimensions: 12 | names: ["dim_editors"] 13 | sizes: [null] 14 | type: 15 | - "array" 16 | - "null" 17 | description: |- 18 | A list of dictionaries with names of the editors. 19 | 20 | **Requirements/Conventions**: 21 | 22 | - Each list member MUST be a dictionary with the following keys: 23 | 24 | - **name**: Full name of the person, REQUIRED. 25 | - **firstname**, **lastname**: Parts of the person's name, OPTIONAL. 26 | items: 27 | $$inherit: "/v1.2/properties/optimade/common/person" 28 | examples: 29 | - [{"name": "John Smith"}, {"name": "Arthur Dent", "firstname": "Arthur", "lastname": "Dent"}] 30 | x-optimade-unit: "inapplicable" 31 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/structures/nelements.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/structures/nelements" 3 | title: "number of elements" 4 | x-optimade-type: "integer" 5 | x-optimade-definition: 6 | label: "nelements_optimade_structures" 7 | kind: "property" 8 | version: "1.2.1" 9 | format: "1.2" 10 | name: "nelements" 11 | type: 12 | - "integer" 13 | - "null" 14 | description: |- 15 | Number of different elements in the structure as an integer. 16 | 17 | **Requirements/Conventions**: 18 | 19 | - MUST be equal to the lengths of the list properties elements and elements_ratios, if they are provided. 20 | 21 | **Querying**: 22 | 23 | - Queries on this property can equivalently be formulated using `elements LENGTH`. 24 | - A filter that matches structures that have exactly 4 elements: `nelements=4`. 25 | - A filter that matches structures that have between 2 and 7 elements: `nelements>=2 AND nelements<=7`. 26 | examples: 27 | - 3 28 | x-optimade-unit: "dimensionless" 29 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/standards/optimade.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/standard_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/standards/optimade" 3 | title: "OPTIMADE standard" 4 | description: "The OPTIMADE standard node types and properties" 5 | x-optimade-definition: 6 | label: "optimade_standard" 7 | kind: "standard" 8 | format: "1.3" 9 | version: "1.3.0" 10 | name: "optimade" 11 | entrytypes: 12 | structures: 13 | $$inherit: "/v1.3/entrytypes/optimade/structures" 14 | x-optimade-requirements: 15 | support: "must" 16 | calculations: 17 | $$inherit: "/v1.3/entrytypes/optimade/calculations" 18 | x-optimade-requirements: 19 | support: "may" 20 | files: 21 | $$inherit: "/v1.2/entrytypes/optimade/files" 22 | x-optimade-requirements: 23 | support: "may" 24 | references: 25 | $$inherit: "/v1.2/entrytypes/optimade/references" 26 | x-optimade-requirements: 27 | support: "may" 28 | trajectories: 29 | $$inherit: "/v1.3/entrytypes/optimade/trajectories" 30 | x-optimade-requirements: 31 | support: "may" 32 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/nelements.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/trajectories/nelements" 3 | title: "list of number of elements" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "nelements_optimade_trajectories" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.3" 10 | name: "nelements" 11 | x-optimade-dimensions: 12 | names: ["dim_frames"] 13 | sizes: [null] 14 | compactable: ["constant"] 15 | type: 16 | - "array" 17 | - "null" 18 | description: |- 19 | A list of nelment items. 20 | An nelement item is the number of different elements in a structure as an integer. 21 | 22 | For each nelement item the following applies: 23 | 24 | **Requirements/Conventions**: 25 | 26 | - MUST be equal to the lengths of the list properties elements and elements_ratios, if they are provided. 27 | examples: 28 | - [4, 5, 7, 2] 29 | - [3] 30 | x-optimade-unit: "inapplicable" 31 | items: 32 | $$inherit: "/v1.2/properties/optimade/structures/nelements" 33 | -------------------------------------------------------------------------------- /schemas/src/meta/v1.2/optimade/unitsystem_definition.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.2/optimade/unitsystem_definition" 3 | title: "OPTIMADE unit system definition schema" 4 | type: object 5 | required: ["$id", "$schema", "x-optimade-definition", "title"] 6 | $$inherit: "physical_unit_definition" 7 | $$keep: ["$defs"] 8 | $defs: 9 | id_field: 10 | $$inherit: "/v1.2/common/id_field" 11 | properties: 12 | "$id": 13 | $ref: "#/$defs/id_field" 14 | "$schema": 15 | type: string 16 | type: 17 | type: [string, array] 18 | enum: ["object", ["object"]] 19 | x-optimade-definition: 20 | $$inherit: "x-optimade-definition-field" 21 | properties: 22 | kind: 23 | const: "unitsystem" 24 | title: 25 | type: string 26 | description: 27 | type: string 28 | units: 29 | type: object 30 | additionalProperties: 31 | $ref: "#/$defs/unit_entity_definition_field" 32 | prefixes: 33 | type: object 34 | additionalProperties: 35 | $ref: "#/$defs/unit_entity_definition_field" 36 | additionalProperties: false 37 | -------------------------------------------------------------------------------- /schemas/src/meta/v1.2/optimade/standard_definition.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.2/optimade/standard_definition" 3 | title: "OPTIMADE standard definition schema" 4 | type: object 5 | allOf: 6 | - $ref: "#/$defs/standard_definition_field" 7 | - required: ["$id", "$schema"] 8 | $$inherit: "entrytype_definition" 9 | $$keep: ["$defs"] 10 | $defs: 11 | id_field: 12 | $$inherit: "/v1.2/common/id_field" 13 | standard_definition_field: 14 | type: object 15 | additionalProperties: false 16 | required: ["x-optimade-definition", "title", "entrytypes"] 17 | properties: 18 | "$id": 19 | $ref: "#/$defs/id_field" 20 | "$schema": 21 | type: string 22 | title: 23 | type: string 24 | description: 25 | type: string 26 | x-optimade-definition: 27 | $$inherit: "x-optimade-definition-field" 28 | properties: 29 | kind: 30 | const: "standard" 31 | entrytypes: 32 | type: object 33 | additionalProperties: 34 | $ref: "#/$defs/entrytype_definition_field" 35 | -------------------------------------------------------------------------------- /tests/outputs/ebnf_numbers_004.out: -------------------------------------------------------------------------------- 1 | Parse tree from /dev/fd/63: 2 | Number(9999) 3 | Digits(9999) 4 | Digit(9999) 5 | TOKEN_7(9999): "3", line: 1, col: 1 6 | Digit(9999) 7 | TOKEN_8(9999): "4", line: 1, col: 2 8 | Digit(9999) 9 | TOKEN_9(9999): "5", line: 1, col: 3 10 | Digit(9999) 11 | TOKEN_10(9999): "6", line: 1, col: 4 12 | Parse tree from /dev/fd/63: 13 | Number(9999) 14 | Sign(9999) 15 | TOKEN_2(9999): "-", line: 1, col: 1 16 | Digits(9999) 17 | Digit(9999) 18 | TOKEN_7(9999): "3", line: 1, col: 2 19 | Digit(9999) 20 | TOKEN_8(9999): "4", line: 1, col: 3 21 | Digit(9999) 22 | TOKEN_9(9999): "5", line: 1, col: 4 23 | Digit(9999) 24 | TOKEN_10(9999): "6", line: 1, col: 5 25 | Parse tree from /dev/fd/63: 26 | Number(9999) 27 | Sign(9999) 28 | TOKEN_1(9999): "+", line: 1, col: 1 29 | Digits(9999) 30 | Digit(9999) 31 | TOKEN_7(9999): "3", line: 1, col: 2 32 | Digit(9999) 33 | TOKEN_8(9999): "4", line: 1, col: 3 34 | Digit(9999) 35 | TOKEN_9(9999): "5", line: 1, col: 4 36 | Digit(9999) 37 | TOKEN_10(9999): "6", line: 1, col: 5 38 | -------------------------------------------------------------------------------- /schemas/src/meta/v1.3/optimade/standard_definition.yaml: -------------------------------------------------------------------------------- 1 | $schema: "https://json-schema.org/draft/2020-12/schema" 2 | $id: "https://schemas.optimade.org/meta/v1.3/optimade/standard_definition" 3 | title: "OPTIMADE standard definition schema" 4 | type: object 5 | allOf: 6 | - $ref: "#/$defs/standard_definition_field" 7 | - required: ["$id", "$schema"] 8 | $$inherit: "/v1.3/optimade/entrytype_definition" 9 | $$keep: ["$defs"] 10 | $defs: 11 | id_field: 12 | $$inherit: "/v1.2/common/id_field" 13 | standard_definition_field: 14 | type: object 15 | additionalProperties: false 16 | required: ["x-optimade-definition", "title", "entrytypes"] 17 | properties: 18 | "$id": 19 | $ref: "#/$defs/id_field" 20 | "$schema": 21 | type: string 22 | title: 23 | type: string 24 | description: 25 | type: string 26 | x-optimade-definition: 27 | $$inherit: "/v1.2/optimade/x-optimade-definition-field" 28 | properties: 29 | kind: 30 | const: "standard" 31 | entrytypes: 32 | type: object 33 | additionalProperties: 34 | $ref: "#/$defs/entrytype_definition_field" 35 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/site_coordinate_span_description.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/trajectories/site_coordinate_span_description" 3 | title: "list of site coordinate span description" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "site_coordinate_span_description_optimade_trajectories" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.3" 10 | name: "site_coordinate_span_description" 11 | x-optimade-dimensions: 12 | names: ["dim_frames"] 13 | sizes: [null] 14 | compactable: ["constant"] 15 | type: 16 | - "array" 17 | - "null" 18 | description: |- 19 | A list of site_coordinate_span_description items. 20 | A site_coordinate_span_description item is a human-readable semi-formal characterization of the coordinate span when the `site_coordinate_span` property has value `other`. 21 | examples: 22 | - ["Two fullerene molecules with a VdW contact.", "One fullerene molecule"] 23 | x-optimade-unit: "inapplicable" 24 | items: 25 | $$inherit: "/v1.3/properties/optimade/structures/site_coordinate_span" 26 | -------------------------------------------------------------------------------- /tests/outputs/Filter_077.out: -------------------------------------------------------------------------------- 1 | Parse tree from tests/cases/Filter_077.inp: 2 | Filter(9999) 3 | Expression(9999) 4 | ExpressionClause(9999) 5 | ExpressionPhrase(9999) 6 | Comparison(9999) 7 | PropertyFirstComparison(9999) 8 | Property(9999) 9 | Identifier(9999) 10 | LowercaseLetter(9999) 11 | TOKEN_82(9999): "a", line: 1, col: 1 12 | Spaces(9999) 13 | Space(9999) 14 | TOKEN_1(9999): " ", line: 1, col: 2 15 | AND(9999) 16 | TOKEN_35(9999): "AND", line: 1, col: 3 17 | Spaces(9999) 18 | Space(9999) 19 | TOKEN_1(9999): " ", line: 1, col: 6 20 | ExpressionClause(9999) 21 | ExpressionPhrase(9999) 22 | Comparison(9999) 23 | PropertyFirstComparison(9999) 24 | Property(9999) 25 | Identifier(9999) 26 | LowercaseLetter(9999) 27 | TOKEN_83(9999): "b", line: 1, col: 7 28 | Spaces(9999) 29 | Space(9999) 30 | nl(9999) 31 | SPECIAL_1(9999): "(...)", line: 1, col: 8 32 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/core/features.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/core/features" 3 | title: "features" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "features_core" 7 | kind: "property" 8 | version: "1.2.1" 9 | format: "1.2" 10 | name: "features" 11 | type: 12 | - "array" 13 | x-optimade-dimensions: 14 | names: ["dim_features"] 15 | sizes: [null] 16 | description: |- 17 | A list of strings that flag which special features are used by the entry. 18 | 19 | **Requirements/Conventions:** 20 | 21 | - MUST be an empty list if no special features are used. 22 | - MUST be sorted alphabetically. 23 | - If a feature is used, the list MUST contain the corresponding string. 24 | - If a feature is not used, the list MUST NOT contain the corresponding string. 25 | - This is an abstract definition, meant to be inherited by more specific definitions that define specific strings. 26 | examples: 27 | - ["feature1", "feature2"] 28 | x-optimade-unit: "inapplicable" 29 | items: 30 | type: 31 | - "string" 32 | x-optimade-type: "string" 33 | x-optimade-unit: "inapplicable" 34 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/files/mtime.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/files/mtime" 3 | title: "modification time" 4 | x-optimade-type: "timestamp" 5 | x-optimade-definition: 6 | label: "mtime_optimade_files" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "mtime" 11 | type: 12 | - "string" 13 | - "null" 14 | format: "date-time" 15 | description: |- 16 | Time of last modification of a file as per POSIX standard. 17 | 18 | **Requirements/Conventions:** 19 | 20 | - It should be noted that the values of `last_modified`, `modification_timestamp` and `mtime` do not necessary match. 21 | `last_modified` pertains to the modification of the OPTIMADE metadata, `modification_timestamp` pertains to file contents and `mtime` pertains to the modification of the file (not necessary changing its contents). 22 | For example, appending an empty string to a file would result in the change of `mtime` in some operating systems, but this would not be deemed as a modification of its contents. 23 | examples: 24 | - "2007-04-05T14:30:20Z" 25 | x-optimade-unit: "inapplicable" 26 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/chemical_formula_anonymous.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/trajectories/chemical_formula_anonymous" 3 | title: "anonymous chemical formula" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "chemical_formula_anonymous_optimade_trajectories" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.3" 10 | name: "chemical_formula_anonymous" 11 | type: 12 | - "array" 13 | - "null" 14 | description: |- 15 | A list of chemical_formula_anonymous items. 16 | A chemical_formula_anonymous item is a string with element symbols and integer chemical proportion numbers. 17 | 18 | For each chemical_formula_anonymous item the following applies: 19 | 20 | The anonymous formula is the chemical_formula_reduced, but where the elements are instead first ordered by their chemical proportion number, and then, in order left to right, replaced by anonymous symbols A, B, C, ..., Z, Aa, Ba, ..., Za, Ab, Bb, ... and so on. 21 | examples: 22 | - ["A2B", "A42B42C16D12E10F9G5"] 23 | x-optimade-unit: "inapplicable" 24 | items: 25 | $$inherit: "/v1.2/properties/optimade/structures/chemical_formula_anonymous" 26 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/space_group_it_number.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/trajectories/space_group_it_number" 3 | title: "list of space group IT number" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "space_group_it_number_optimade_trajectories" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.3" 10 | name: "space_group_it_number" 11 | x-optimade-dimensions: 12 | names: ["dim_frames"] 13 | sizes: [null] 14 | compactable: ["constant"] 15 | type: 16 | - "array" 17 | - "null" 18 | description: |- 19 | A list of space_group_it_number items. 20 | A space_group_it_number item is a space group number for the structure assigned by the International Tables for Crystallography Vol. A. 21 | 22 | For each space_group_it_number item the following applies: 23 | 24 | **Requirements/Conventions**: 25 | 26 | - The integer value MUST be between 1 and 230. 27 | - MUST be `null` if `nperiodic_dimensions` is not equal to 3. 28 | examples: 29 | - [42,55,16] 30 | - [230] 31 | x-optimade-unit: "inapplicable" 32 | items: 33 | $$inherit: "/v1.2/properties/optimade/structures/space_group_it_number" 34 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/common/symmetry_operation_xyz.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/common/symmetry_operation_xyz" 3 | title: "symmetry operation" 4 | x-optimade-type: "string" 5 | x-optimade-definition: 6 | label: "symmetry_operation_xyz_optimade_common" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "symmetry_operation_xyz" 11 | description: |- 12 | A symmetry operation given as general position x, y, z coordinates in algebraic form. 13 | 14 | **Requirements/Conventions:** 15 | 16 | - The symmetry operation is described by a string that gives that symmetry operation in Jones' faithful representation (Bradley & Cracknell, 1972: pp. 35-37), adapted for computer string notation. 17 | - The letters `x`, `y` and `z` that are typesetted with overbars in printed text represent coordinate values multiplied by -1 and are encoded as `-x`, `-y` and `-z`, respectively. 18 | - The syntax of the strings representing symmetry operations MUST conform to regular expressions given in appendix `The Symmetry Operation String Regular Expressions`_. 19 | x-optimade-unit: inapplicable 20 | type: 21 | - "string" 22 | maxLength: 3 23 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/reference_frames.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/trajectories/reference_frames" 3 | title: "reference frames" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "reference_frames_optimade_trajectories" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.3" 10 | name: "reference_frames" 11 | x-optimade-dimensions: 12 | names: ["dim_trajectory_reference_frames"] 13 | sizes: [null] 14 | type: 15 | - "array" 16 | - "null" 17 | description: |- 18 | The indices of a set of frames that give a good but very brief overview of the trajectory. 19 | The first reference frame could for example be a starting configuration, the second a transition state and the third the final state. 20 | 21 | **Requirements/Conventions**: 22 | 23 | - The values MUST be larger than or equal to 0 and less than nframes. 24 | examples: 25 | - [0, 397, 1000] 26 | x-optimade-unit: "inapplicable" 27 | items: 28 | x-optimade-type: integer 29 | type: 30 | - "integer" 31 | x-optimade-unit: "inapplicable" 32 | description: "A frame index. It MUST be larger than or equal to 0 and less than nframes." 33 | examples: 34 | - 397 35 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/independent/1948/information/bit.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/independent/1948/information/bit" 3 | title: "bit" 4 | symbol: "bit" 5 | display-symbol: "bit" 6 | description: |- 7 | A basic unit of digital information representing a single logical state with one of two possible values, defined by Shannon in 1948. 8 | 9 | "If the base 2 is used the resulting units may be called binary digits, or more briefly bits, a word suggested by J. W. Tukey. A device with two stable positions, such as a relay or a flip-flop circuit, can store one bit of information." ["A Mathematical Theory of Communication", C. E. Shannon, The Bell System Technical Journal 27, 379 (1948)]. 10 | resources: 11 | - relation: 'Defining paper: "A Mathematical Theory of Communication" by C. E. Shannon, The Bell System Technical Journal, Vol. 27, pp. 379–423 (1948).' 12 | resource-id: "https://doi.org/10.1002/j.1538-7305.1948.tb01338.x" 13 | - relation: "Wikipedia article describing the unit" 14 | resource-id: "https://en.wikipedia.org/wiki/Bit" 15 | x-optimade-definition: 16 | label: "bit_independent_1948_information" 17 | kind: "unit" 18 | format: "1.2" 19 | version: "1.2.0" 20 | name: "bit" 21 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/si/1975/named/becquerel.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/si/1975/named/becquerel" 3 | title: "becquerel" 4 | symbol: "Bq" 5 | display-symbol: "Bq" 6 | description: |- 7 | A derived SI unit for radioactivity, defined as s⁻¹ using the 1967 SI second, defined at the 15th CGPM Meeting in 1975. 8 | 9 | "The 15th Conférence Générale des Poids et Mesures, [...] adopts the following special name for the SI unit of activity: becquerel, symbol Bq, equal to one reciprocal second." [15th CGPM Meeting (1975)] 10 | resources: 11 | - relation: "Definition at the 15th CGPM Meeting (1975)" 12 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/15-1975" 13 | - relation: "Wikipedia article describing the unit" 14 | resource-id: "https://en.wikipedia.org/wiki/Becquerel" 15 | defining-relation: 16 | base-units: 17 | - symbol: "s" 18 | id: "https://schemas.optimade.org/defs/v1.2/units/si/1967/base/second" 19 | base-units-expression: "s^-1" 20 | standard: 21 | name: "si" 22 | year: 1975 23 | category: "named" 24 | symbol: "Bq" 25 | x-optimade-definition: 26 | label: "becquerel_si_1975_named" 27 | kind: "unit" 28 | format: "1.2" 29 | version: "1.2.0" 30 | name: "becquerel" 31 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/si/1964/accepted/litre.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/si/1964/accepted/litre" 3 | title: "litre" 4 | symbol: "l" 5 | display-symbol: "l" 6 | alternate-symbols: 7 | - "L" 8 | - "liter" 9 | description: |- 10 | The litre, or liter is a unit of volume equal to a cubic decimetre (1 dm³), with meter defined according to the 1960 SI units. 11 | 12 | "The 12th Conférence Générale des Poids et Mesures (CGPM) [...] declares that the word 'litre' may be employed as a special name for the cubic decimetre" [12th CGPM meeting (1964), resolution 6]. 13 | resources: 14 | - relation: "Definition at the 12th CGPM meeting (1964), resolution 6" 15 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/12-1964/resolution-6" 16 | - relation: "Wikipedia article describing the unit" 17 | resource-id: "https://en.wikipedia.org/wiki/Litre" 18 | defining-relation: 19 | base-units: 20 | - symbol: "m" 21 | id: "https://schemas.optimade.org/defs/v1.2/units/si/1960/base/metre" 22 | base-units-expression: "m^3" 23 | scale: 24 | exponent: -3 25 | x-optimade-definition: 26 | label: "litre_si_1964_accepted" 27 | kind: "unit" 28 | format: "1.2" 29 | version: "1.2.0" 30 | name: "litre" 31 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/nframes.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/trajectories/nframes" 3 | title: "number of frames" 4 | x-optimade-type: "integer" 5 | x-optimade-definition: 6 | label: "nframes_optimade_trajectories" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.3" 10 | name: "nframes" 11 | type: 12 | - "integer" 13 | - "null" 14 | description: |- 15 | The number of frames in the trajectory. 16 | This value indicates the number of frames stored in the data, and may deviate from the number of steps used to calculate the trajectory. 17 | For example, a 10 ps simulation with calculation steps of 1 fs where data is stored once every 50 fs, nframes will be 200. 18 | 19 | **Requirements/Conventions**: 20 | 21 | - The integer value MUST be equal to the number of frames in the trajectory (i.e., the length of the dim_frames dimension). 22 | - The integer MUST be a positive non-zero value. 23 | 24 | **Querying**: 25 | 26 | - A filter that matches trajectories that have exactly 100 frames: `nframes=100`. 27 | - A filter that matches trajectories that have between 100 and 1000 frames: `nframes>=100 AND nframes<=1000`. 28 | examples: 29 | - 42 30 | x-optimade-unit: "dimensionless" 31 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/properties/optimade/common/person.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/properties/optimade/common/person" 3 | title: "person" 4 | x-optimade-type: "dictionary" 5 | x-optimade-definition: 6 | label: "person_optimade_common" 7 | kind: "property" 8 | version: "1.2.0" 9 | format: "1.2" 10 | name: "person" 11 | type: 12 | - "object" 13 | - "null" 14 | description: |- 15 | A dictionary with name information about a person. 16 | 17 | **Requirements/Conventions**: 18 | 19 | - The dictionary MUST adhere to the following format: 20 | 21 | - **name**: Full name of the person, REQUIRED. 22 | - **firstname**, **lastname**: Parts of the person's name, OPTIONAL. 23 | required: ["name"] 24 | properties: 25 | name: 26 | x-optimade-type: "string" 27 | x-optimade-unit: "inapplicable" 28 | type: 29 | - string 30 | firstname: 31 | x-optimade-type: "string" 32 | x-optimade-unit: "inapplicable" 33 | type: 34 | - string 35 | lastname: 36 | x-optimade-type: "string" 37 | x-optimade-unit: "inapplicable" 38 | type: 39 | - string 40 | examples: 41 | - {"name": "John Smith"} 42 | - {"name": "Arthur Dent", "firstname": "Arthur", "lastname": "Dent"} 43 | x-optimade-unit: "inapplicable" 44 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/si/1960/base/second.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/si/1960/base/second" 3 | title: "second" 4 | symbol: "s" 5 | display-symbol: "s" 6 | description: |- 7 | The SI base unit of time defined as a specific fraction of the tropical year 1900 at the 11th CGPM Meeting in 1960. 8 | 9 | "The second is the fraction 1/31556925.9747 of the tropical year for 1900 January 0 at 12 hours ephemeris time." [11th CGPM Meeting in 1960, resolution 9] 10 | The second was included into SI at the 11th CGPM Meeting in 1960 in resolution 12. 11 | resources: 12 | - relation: "Definition at the 11th CGPM meeting (1960), resolution 6." 13 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-6" 14 | - relation: "Establishment of the SI unit system at the 11th CGPM meeting (1960), resolution 12." 15 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 16 | - relation: "Wikipedia article describing the unit" 17 | resource-id: "https://en.wikipedia.org/wiki/Second" 18 | standard: 19 | name: "si" 20 | year: 1960 21 | category: "base" 22 | symbol: "s" 23 | x-optimade-definition: 24 | label: "second_si_1960_base" 25 | kind: "unit" 26 | format: "1.2" 27 | version: "1.2.0" 28 | name: "second" 29 | 30 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.3/properties/optimade/trajectories/nsites.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.3/optimade/property_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.3/properties/optimade/trajectories/nsites" 3 | title: "list of number of sites" 4 | x-optimade-type: "list" 5 | x-optimade-definition: 6 | label: "nsites_optimade_trajectories" 7 | kind: "property" 8 | version: "1.3.0" 9 | format: "1.3" 10 | name: "nsites" 11 | x-optimade-dimensions: 12 | names: ["dim_frames"] 13 | compactable: ["constant"] 14 | sizes: [null] 15 | type: 16 | - "array" 17 | - "null" 18 | description: |- 19 | A list of nsites items. 20 | An nsites item is an integer specifying the length of a corresponding `cartesian_site_positions` property (usually in reference to a parallel list of other structure properties). 21 | 22 | For each nsites item the following applies: 23 | 24 | **Requirements/Conventions**: 25 | 26 | - MUST be equal to the lengths of the list properties elements and elements_ratios, if they are provided. 27 | 28 | **Query examples**: 29 | 30 | - Match only structures with exactly 4 sites: `nsites=4` 31 | - Match structures that have between 2 and 7 sites: `nsites>=2 AND nsites<=7` 32 | examples: 33 | - [42] 34 | - [42, 4711] 35 | x-optimade-unit: "inapplicable" 36 | items: 37 | $$inherit: "/v1.2/properties/optimade/structures/nsites" 38 | -------------------------------------------------------------------------------- /tests/outputs/Filter_023.out: -------------------------------------------------------------------------------- 1 | Parse tree from tests/cases/Filter_023.inp: 2 | Filter(9999) 3 | Expression(9999) 4 | ExpressionClause(9999) 5 | ExpressionPhrase(9999) 6 | Comparison(9999) 7 | PropertyFirstComparison(9999) 8 | Property(9999) 9 | Identifier(9999) 10 | LowercaseLetter(9999) 11 | TOKEN_84(9999): "c", line: 1, col: 1 12 | LowercaseLetter(9999) 13 | TOKEN_89(9999): "h", line: 1, col: 2 14 | LowercaseLetter(9999) 15 | TOKEN_86(9999): "e", line: 1, col: 3 16 | LowercaseLetter(9999) 17 | TOKEN_94(9999): "m", line: 1, col: 4 18 | LowercaseLetter(9999) 19 | TOKEN_90(9999): "i", line: 1, col: 5 20 | LowercaseLetter(9999) 21 | TOKEN_84(9999): "c", line: 1, col: 6 22 | LowercaseLetter(9999) 23 | TOKEN_82(9999): "a", line: 1, col: 7 24 | LowercaseLetter(9999) 25 | TOKEN_93(9999): "l", line: 1, col: 8 26 | Spaces(9999) 27 | Space(9999) 28 | TOKEN_1(9999): " ", line: 1, col: 9 29 | Error: in tests/cases/Filter_023.inp: line 1: 30 | unexpected token "f", expected 31 | 32 | chemical formula IS KNOWN 42 33 | ^ 34 | -------------------------------------------------------------------------------- /tests/scripts/validate_json_schema.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | This script validates a json file against a JSON Schema file using the jsonschema Python library. 4 | 5 | Usage: 6 | validate_json_schema.py jsonfile schemafile 7 | 8 | Examples: 9 | validate_json_schema.py file.json schema.json 10 | 11 | """ 12 | 13 | import argparse 14 | import json 15 | 16 | import jsonschema 17 | from jsonschema import validate 18 | 19 | arguments = [ 20 | { 21 | 'names': ['infile'], 22 | 'help': 'The JSON file to process.', 23 | 'type': str, 24 | }, 25 | { 26 | 'names': ['schema'], 27 | 'help': 'The JSON Schema file to process.', 28 | 'type': str, 29 | } 30 | ] 31 | 32 | if __name__ == "__main__": 33 | 34 | parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) 35 | for arg in arguments: 36 | names = arg.pop('names') 37 | parser.add_argument(*names, **arg) 38 | 39 | args = parser.parse_args() 40 | 41 | with open(args.infile, "r") as f: 42 | data=json.load(f) 43 | with open(args.schema, "r") as f: 44 | schema=json.load(f) 45 | 46 | validate(instance=data, schema=schema, format_checker=jsonschema.FormatChecker()) 47 | 48 | print("JSON file: "+str(args.infile)+" validated against JSON Schema: "+str(args.schema)+": OK") 49 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/si/1960/named/hertz.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/si/1960/named/hertz" 3 | title: "hertz" 4 | symbol: "Hz" 5 | display-symbol: "Hz" 6 | description: |- 7 | A derived SI unit for frequency equal to s⁻¹ in the 1960 SI base units. 8 | 9 | "The frequency of a periodic phenomenon is expressed in hertz, as the inverse of its period expressed in seconds." [9th CGPM meeting in 1946] 10 | resources: 11 | - relation: "Definition at the 9th CGPM meeting (1948)" 12 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/9-1948" 13 | - relation: "Definition and establishment of the SI unit system at the 11th CGPM meeting (1960), resolution 12." 14 | resource-id: "https://www.bipm.org/en/committees/cg/cgpm/11-1960/resolution-12" 15 | - relation: "Wikipedia article describing the unit" 16 | resource-id: "https://en.wikipedia.org/wiki/Hertz" 17 | defining-relation: 18 | base-units: 19 | - symbol: "s" 20 | id: "https://schemas.optimade.org/defs/v1.2/units/si/1960/base/second" 21 | base-units-expression: "s^-1" 22 | standard: 23 | name: "si" 24 | year: 1960 25 | category: "named" 26 | symbol: "Hz" 27 | x-optimade-definition: 28 | label: "hertz_si_1960_named" 29 | kind: "unit" 30 | format: "1.2" 31 | version: "1.2.0" 32 | name: "hertz" 33 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/iso-iec-80000/2008/information_science_and_technology/byte.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/iso-iec-80000/2008/information_science_and_technology/byte" 3 | title: "byte" 4 | symbol: "B" 5 | display-symbol: "B" 6 | description: |- 7 | A unit of digital information representing eight bits, defined in the International System of Quantities in ISO/IEC 80000-13 (2008). 8 | 9 | "In English, the name byte, symbol B, is used as a synonym for octet. Here byte means an eight-bit byte." [ISO/IEC 80000-13 (2008)] 10 | resources: 11 | - relation: "Defining standard" 12 | resource-id: "https://www.iso.org/standard/31898.html" 13 | - relation: "Wikipedia article describing the unit" 14 | resource-id: "https://en.wikipedia.org/wiki/Byte" 15 | defining-relation: 16 | base-units: 17 | - symbol: "bit" 18 | id: "https://schemas.optimade.org/defs/v1.2/units/independent/1948/information/bit" 19 | base-units-expression: "bit" 20 | scale: 21 | numerator: 8 22 | standard: 23 | name: "iso-iec-80000" 24 | year: 2008 25 | category: "information_science_and_technology" 26 | symbol: "B" 27 | x-optimade-definition: 28 | label: "byte_iso_iec_80000_2008_information_science_and_technology" 29 | kind: "unit" 30 | format: "1.2" 31 | version: "1.2.0" 32 | name: "byte" 33 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/si/1960/named/degcelsius.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/si/1960/named/degcelsius" 3 | title: "degree Celsius" 4 | symbol: "degC" 5 | display-symbol: "°C" 6 | alternate-symbols: 7 | - "degreecelsius" 8 | description: |- 9 | A derived SI unit of temperature, defined as degree kelvin offset with +273.15 in the SI base units adopted at the 11th CGPM Meeting in 1960. 10 | 11 | "If we add to the practical international Celsius temperatures defined above T₀ = 273.15 degrees, we obtain the practical international Kelvin temperatures. By subtracting T₀ from the thermodynamic temperatures, we obtain the thermodynamic Celsius temperatures." [11th CGPM meeting (1960)] 12 | resources: 13 | - relation: "Wikipedia article describing the unit" 14 | resource-id: "https://en.wikipedia.org/wiki/Celsius" 15 | defining-relation: 16 | base-units: 17 | - symbol: "degK" 18 | id: "https://schemas.optimade.org/defs/v1.2/units/si/1960/base/degreekelvin" 19 | base-units-expression: "degK" 20 | offset: 21 | numerator: 27315 22 | denominator: 100 23 | standard: 24 | name: "si" 25 | year: 1960 26 | category: "named" 27 | symbol: "degC" 28 | x-optimade-definition: 29 | label: "degcelsius_si_1960_named" 30 | kind: "unit" 31 | format: "1.2" 32 | version: "1.2.0" 33 | name: "degcelsius" 34 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/si/1970/accepted/hour.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/si/1970/accepted/hour" 3 | title: "hour" 4 | symbol: "h" 5 | display-symbol: "h" 6 | description: |- 7 | A unit of time equal to 60 minutes, or 3600 seconds, using the 1967 base SI units. 8 | 9 | The hour unit appears in the International System of Units (SI), 1st ed. (1970) defined as "1 h = 60 min = 3600 s". 10 | 11 | - The International System of Units (SI), 1st ed. (1970) categorizes the unit as "Units in use with the International System." 12 | - The International System of Units (SI), 7th ed. (1998) changes the categorization to "Non-SI units accepted for use with the International System." 13 | resources: 14 | - relation: "Definition in the International System of Units (SI), 1st Edition" 15 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 16 | - relation: "Wikipedia article describing the unit" 17 | resource-id: "https://en.wikipedia.org/wiki/Hour" 18 | defining-relation: 19 | base-units: 20 | - symbol: "s" 21 | id: "https://schemas.optimade.org/defs/v1.2/units/si/1960/base/second" 22 | base-units-expression: "s" 23 | scale: 24 | numerator: 3600 25 | x-optimade-definition: 26 | label: "hour_si_1970_accepted" 27 | kind: "unit" 28 | format: "1.2" 29 | version: "1.2.0" 30 | name: "hour" 31 | -------------------------------------------------------------------------------- /schemas/src/defs/v1.2/units/si/1970/accepted/minute.yaml: -------------------------------------------------------------------------------- 1 | $$schema: "https://schemas.optimade.org/meta/v1.2/optimade/physical_unit_definition" 2 | $id: "https://schemas.optimade.org/defs/v1.2/units/si/1970/accepted/minute" 3 | title: "minute" 4 | symbol: "min" 5 | display-symbol: "min" 6 | description: |- 7 | A unit of time that is equal to 60 seconds, using the 1967 base SI units. 8 | 9 | The minute unit appears in the International System of Units (SI), 1st ed. (1970) defined as "1 min = 60 s". 10 | 11 | - The International System of Units (SI), 1st ed. (1970) categorizes the unit as "Units in use with the International System." 12 | - The International System of Units (SI), 7th ed. (1998) changes the categorization to "Non-SI units accepted for use with the International System." 13 | resources: 14 | - relation: "Definition in the International System of Units (SI), 1st Edition" 15 | resource-id: "https://www.bipm.org/en/publications/si-brochure" 16 | - relation: "Wikipedia article describing the unit" 17 | resource-id: "https://en.wikipedia.org/wiki/Minute" 18 | defining-relation: 19 | base-units: 20 | - symbol: "s" 21 | id: "https://schemas.optimade.org/defs/v1.2/units/si/1960/base/second" 22 | base-units-expression: "s" 23 | scale: 24 | numerator: 60 25 | x-optimade-definition: 26 | label: "minute_si_1970_accepted" 27 | kind: "unit" 28 | format: "1.2" 29 | version: "1.2.0" 30 | name: "minute" 31 | --------------------------------------------------------------------------------