diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 00000000..6f8bea5b --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 1ca0628eeccfe717aaec490c911c564f +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 4af5eb24..00000000 --- a/.codecov.yml +++ /dev/null @@ -1,14 +0,0 @@ -coverage: - status: - project: # more options at https://docs.codecov.com/docs/commit-status - default: - target: auto # use the coverage from the base commit, fail if coverage is lower - threshold: 0% # allow the coverage to drop by - -comment: - layout: " diff, flags, files" - behavior: default - require_changes: false - require_base: false # [true :: must have a base report to post] - require_head: false # [true :: must have a head report to post] - hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage] diff --git a/.codespell/ignore_lines.txt b/.codespell/ignore_lines.txt deleted file mode 100644 index 07fa7c8c..00000000 --- a/.codespell/ignore_lines.txt +++ /dev/null @@ -1,2 +0,0 @@ -;; Please include filenames and explanations for each ignored line. -;; See https://docs.openverse.org/meta/codespell.html for docs. diff --git a/.codespell/ignore_words.txt b/.codespell/ignore_words.txt deleted file mode 100644 index eccf37a8..00000000 --- a/.codespell/ignore_words.txt +++ /dev/null @@ -1,28 +0,0 @@ -;; Please include explanations for each ignored word (lowercase). -;; See https://docs.openverse.org/meta/codespell.html for docs. - -;; abbreviation for "materials" often used in a journal title -mater - -;; Frobenius norm used in np.linalg.norm -fro - -;; "discus" is the name of a software package -discus -DISCUS - -;; chemical elements -Te -Nd - -;; /src/diffpy/structure/parsers/p_pdb.py:100 -;; pdb identifier -CONECT - -;; /src/diffpy/structure/parsers/p_xcfg.py:452 -;; used in a function -BU - -;; /src/diffpy/structure/parsers/p_vesta.py:452 -;; abbreviation for Structure in vesta -STRUC diff --git a/.flake8 b/.flake8 deleted file mode 100644 index a5105116..00000000 --- a/.flake8 +++ /dev/null @@ -1,13 +0,0 @@ -# As of now, flake8 does not natively support configuration via pyproject.toml -# https://github.com/microsoft/vscode-flake8/issues/135 -[flake8] -exclude = - .git, - __pycache__, - build, - dist, - docs/source/conf.py -max-line-length = 115 -# Ignore some style 'errors' produced while formatting by 'black' -# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings -extend-ignore = E203 diff --git a/.github/ISSUE_TEMPLATE/bug_feature.md b/.github/ISSUE_TEMPLATE/bug_feature.md deleted file mode 100644 index b3454deb..00000000 --- a/.github/ISSUE_TEMPLATE/bug_feature.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Bug Report or Feature Request -about: Report a bug or suggest a new feature! -title: "" -labels: "" -assignees: "" ---- - -### Problem - - - -### Proposed solution diff --git a/.github/ISSUE_TEMPLATE/release_checklist.md b/.github/ISSUE_TEMPLATE/release_checklist.md deleted file mode 100644 index 56c5fca3..00000000 --- a/.github/ISSUE_TEMPLATE/release_checklist.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -name: Release -about: Checklist and communication channel for PyPI and GitHub release -title: "Ready for PyPI/GitHub release" -labels: "release" -assignees: "" ---- - -### PyPI/GitHub rc-release preparation checklist: - -- [ ] All PRs/issues attached to the release are merged. -- [ ] All the badges on the README are passing. -- [ ] License information is verified as correct. If you are unsure, please comment below. -- [ ] Locally rendered documentation contains all appropriate pages, tutorials, and other human-written text is up-to-date with any changes in the code. -- [ ] All API references are included. To check this, run `conda install scikit-package` and then `package build api-doc`. Review any edits made by rerendering the docs locally. -- [ ] Installation instructions in the README, documentation, and the website are updated. -- [ ] Successfully run any tutorial examples or do functional testing with the latest Python version. -- [ ] Grammar and writing quality are checked (no typos). -- [ ] Install `pip install build twine`, run `python -m build` and `twine check dist/*` to ensure that the package can be built and is correctly formatted for PyPI release. -- [ ] Dispatch matrix testing to test the release on all Python versions and systems. If you do not have permission to run this workflow, tag the maintainer and say `@maintainer, please dispatch matrix testing workflow`. - -Please tag the maintainer (e.g., @username) in the comment here when you are ready for the PyPI/GitHub release. Include any additional comments necessary, such as version information and details about the pre-release here: - -### PyPI/GitHub full-release preparation checklist: - -- [ ] Create a new conda environment and install the rc from PyPI (`pip install ==??`) -- [ ] License information on PyPI is correct. -- [ ] Docs are deployed successfully to `https:///`. -- [ ] Successfully run all tests, tutorial examples or do functional testing. - -Please let the maintainer know that all checks are done and the package is ready for full release. - -### conda-forge release preparation checklist: - - - -- [ ] Ensure that the full release has appeared on PyPI successfully. -- [ ] New package dependencies listed in `conda.txt` and `tests.txt` are added to `meta.yaml` in the feedstock. -- [ ] Close any open issues on the feedstock. Reach out to the maintainer if you have questions. -- [ ] Tag the maintainer for conda-forge release. - -### Post-release checklist - - - -- [ ] Run tutorial examples and conduct functional testing using the installation guide in the README. Attach screenshots/results as comments. -- [ ] Documentation (README, tutorials, API references, and websites) is deployed without broken links or missing figures. diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md deleted file mode 100644 index 1099d862..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ /dev/null @@ -1,15 +0,0 @@ -### What problem does this PR address? - - - -### What should the reviewer(s) do? - - - - diff --git a/.github/workflows/build-and-publish-docs-on-dispatch.yml b/.github/workflows/build-and-publish-docs-on-dispatch.yml deleted file mode 100644 index ff9a22b7..00000000 --- a/.github/workflows/build-and-publish-docs-on-dispatch.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build and Publish Docs on Dispatch - -on: - workflow_dispatch: - -jobs: - get-python-version: - uses: scikit-package/release-scripts/.github/workflows/_get-python-version-latest.yml@v0 - with: - python_version: 0 - - docs: - uses: scikit-package/release-scripts/.github/workflows/_release-docs.yml@v0 - with: - project: diffpy.structure - c_extension: false - headless: false - python_version: ${{ fromJSON(needs.get-python-version.outputs.latest_python_version) }} diff --git a/.github/workflows/build-wheel-release-upload.yml b/.github/workflows/build-wheel-release-upload.yml deleted file mode 100644 index 794bf94c..00000000 --- a/.github/workflows/build-wheel-release-upload.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build Wheel, Release on GitHub/PyPI, and Deploy Docs - -on: - workflow_dispatch: - push: - tags: - - "*" # Trigger on all tags initially, but tag and release privilege are verified in _build-wheel-release-upload.yml - -jobs: - build-release: - uses: scikit-package/release-scripts/.github/workflows/_build-wheel-release-upload.yml@v0 - with: - project: diffpy.structure - c_extension: false - maintainer_GITHUB_username: sbillinge - secrets: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - PAT_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/.github/workflows/check-news-item.yml b/.github/workflows/check-news-item.yml deleted file mode 100644 index e5853983..00000000 --- a/.github/workflows/check-news-item.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Check for News - -on: - pull_request_target: - branches: - - main - -jobs: - check-news-item: - uses: scikit-package/release-scripts/.github/workflows/_check-news-item.yml@v0 - with: - project: diffpy.structure diff --git a/.github/workflows/matrix-and-codecov.yml b/.github/workflows/matrix-and-codecov.yml deleted file mode 100644 index aa3ea76f..00000000 --- a/.github/workflows/matrix-and-codecov.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Matrix and Codecov - -on: - # push: - # branches: - # - main - release: - types: - - prereleased - - published - workflow_dispatch: - -jobs: - matrix-coverage: - uses: scikit-package/release-scripts/.github/workflows/_matrix-and-codecov-on-merge-to-main.yml@v0 - with: - project: diffpy.structure - c_extension: false - headless: false - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml deleted file mode 100644 index 1ac611fb..00000000 --- a/.github/workflows/tests-on-pr.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Tests on PR - -on: - pull_request: - workflow_dispatch: - -jobs: - tests-on-pr: - uses: scikit-package/release-scripts/.github/workflows/_tests-on-pr.yml@v0 - with: - project: diffpy.structure - c_extension: false - headless: false - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 099e2948..00000000 --- a/.gitignore +++ /dev/null @@ -1,93 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -_build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -venv/ -*.egg-info/ -.installed.cfg -*.egg -bin/ -temp/ -tags/ -errors.err - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt -MANIFEST - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ - -# Translations -*.mo -*.pot - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject - -# Django stuff: -*.log - -# Sphinx documentation -docs/build/ -docs/source/generated/ - -# pytest -.pytest_cache/ - -# PyBuilder -target/ - -# Editor files -# mac -.DS_Store -*~ - -# vim -*.swp -*.swo - -# pycharm -.idea/ - -# VSCode -.vscode/ - -# Ipython Notebook -.ipynb_checkpoints diff --git a/.isort.cfg b/.isort.cfg deleted file mode 100644 index 7ce0fb1f..00000000 --- a/.isort.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[settings] -# Keep import statement below line_length character limit -line_length = 115 -multi_line_output = 3 -include_trailing_comma = True diff --git a/docs/source/_static/.placeholder b/.nojekyll similarity index 100% rename from docs/source/_static/.placeholder rename to .nojekyll diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 0e4a84d1..00000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,66 +0,0 @@ -default_language_version: - python: python3 -ci: - autofix_commit_msg: | - [pre-commit.ci] auto fixes from pre-commit hooks - autofix_prs: true - autoupdate_branch: "pre-commit-autoupdate" - autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate" - autoupdate_schedule: monthly - skip: [no-commit-to-branch] - submodules: false -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 - hooks: - - id: check-yaml - - id: end-of-file-fixer - - id: trailing-whitespace - - id: check-case-conflict - - id: check-merge-conflict - - id: check-toml - - id: check-added-large-files - - repo: https://github.com/psf/black - rev: 24.4.2 - hooks: - - id: black - - repo: https://github.com/pycqa/flake8 - rev: 7.0.0 - hooks: - - id: flake8 - - repo: https://github.com/pycqa/isort - rev: 5.13.2 - hooks: - - id: isort - args: ["--profile", "black"] - - repo: https://github.com/kynan/nbstripout - rev: 0.7.1 - hooks: - - id: nbstripout - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: no-commit-to-branch - name: Prevent Commit to Main Branch - args: ["--branch", "main"] - stages: [pre-commit] - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - additional_dependencies: - - tomli - # prettier - multi formatter for .json, .yml, and .md files - - repo: https://github.com/pre-commit/mirrors-prettier - rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8 - hooks: - - id: prettier - additional_dependencies: - - "prettier@^3.2.4" - # docformatter - PEP 257 compliant docstring formatter - - repo: https://github.com/s-weigand/docformatter - rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c - hooks: - - id: docformatter - additional_dependencies: [tomli] - args: [--in-place, --config, ./pyproject.toml] diff --git a/.readthedocs.yaml b/.readthedocs.yaml deleted file mode 100644 index aaa88895..00000000 --- a/.readthedocs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2 - -build: - os: "ubuntu-22.04" - tools: - python: "latest" - -python: - install: - - requirements: requirements/docs.txt - -sphinx: - configuration: docs/source/conf.py diff --git a/AUTHORS.rst b/AUTHORS.rst deleted file mode 100644 index 1abf16be..00000000 --- a/AUTHORS.rst +++ /dev/null @@ -1,14 +0,0 @@ -Authors -======= - -Billinge Group and community contributors, -Pavol Juhas, -Christopher L. Farrow, -Xiaohao Yang, -Simon J.L. Billinge - -Contributors ------------- - -For a list of contributors, visit -https://github.com/diffpy/diffpy.structure/graphs/contributors diff --git a/CHANGELOG.rst b/CHANGELOG.rst deleted file mode 100644 index 9a35bf76..00000000 --- a/CHANGELOG.rst +++ /dev/null @@ -1,426 +0,0 @@ -============= -Release notes -============= - -.. current developments - -3.4.0 -===== - -**Added:** - -* Added ``set_latt_parms`` method into ``Lattice`` class -* Added ``set_new_latt_base_vec`` method into ``Lattice`` class -* Added ``parse_lines`` method in ``p_auto.py`` -* Added ``parse_lines`` method in ``p_cif.py`` -* Added ``parse_lines`` method in ``p_discus.py`` -* Added ``parse_lines`` method in ``p_pdb.py`` -* Added ``parse_lines`` method in ``p_pdffit.py`` -* Added ``parse_lines`` method in ``p_rawxyz.py`` -* Added ``parse_lines`` method in ``p_xcfg.py`` -* Added ``parse_lines`` method in ``p_xyz.py`` -* Added ``parse_lines`` method in ``structureparser.py`` -* Added ``_suppress_cif_parser_output`` method in ``p_cif.py`` -* Add deprecation warning for ``diffpy.Structure`` import. -* Added `diffpy.structure.Structure.add_new_atom` in replace of `addNewAtom` -* Added ``load_structure_file`` method in ``apps/anyeye.py`` -* Added ``convert_structure_file`` method in ``apps/anyeye.py`` -* Added ``watch_structure_file`` method in ``apps/anyeye.py`` -* Added ``clean_up`` method in ``apps/anyeye.py`` -* Added ``parse_formula`` method in ``apps/anyeye.py`` -* Added ``signal_handler`` method in ``apps/anyeye.py`` -* Added method ``load_structure`` in ``__init__.py`` -* Added `diffpy.structure.Structure.assign_unique_labels` in replace of `assignUniqueLabels` -* Support for Python 3.14 -* Added ``place_in_lattice`` method to ``Structure`` -* Added ``read_structure`` method to ``Structure`` -* Added ``write_structure`` method to ``Structure`` -* Added ``position_formula`` method in ``GeneratorSite`` class -* Added ``u_formula`` method in ``GeneratorSite`` class -* Added ``eq_index`` method in ``GeneratorSite`` class -* Added ``prune_formula_dictionary`` method in ``symmetryutilities.py`` -* Added ``_link_atom_attribute`` method in ``diffpy.structure.utils`` -* Added ``msd_latt`` method in ``atom.py`` -* Added ``msd_cart`` method in ``atom.py`` -* Added ``_get_uij`` method in ``atom.py`` -* Added ``_set_uij`` method in ``atom.py`` -* Added ``parse_file`` method in ``structureparser.py`` -* Added ``parse_lines`` method in ``p_cif.py`` -* Added ``parse_lines`` method in ``p_auto.py`` -* Added parser for vesta specific files and viewer for vesta -* Added ``atom_bare_symbol`` method in ``utils.py`` -* Added ``_get_ordered_formats`` method in ``p_auto.py`` -* Added ``_wrap_parse_method`` method in ``p_auto.py`` -* Added ``_tr_atom_site_u_iso_or_equiv`` method in ``p_cif.py`` -* Added ``_tr_atom_site_b_iso_or_equiv`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_u_11`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_u_22`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_u_33`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_u_12`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_u_13`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_u_23`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_b_11`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_b_22`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_b_33`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_b_12`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_b_13`` method in ``p_cif.py`` -* Added ``_tr_atom_site_aniso_b_23`` method in ``p_cif.py`` -* Added ``get_symop`` method in ``parsers/p_cif.py`` -* Added ``get_space_group`` method in ``spacegroups.py`` -* Added ``find_space_group`` method in ``spacegroups.py`` -* Added ``is_space_group_identifier`` method in ``spacegroups.py`` -* Added ``_hash_symop_list`` method in ``spacegroups.py`` -* Added ``_build_sg_lookup_table`` method in ``spacegroups.py`` -* Added ``_get_sg_hash_lookup_table`` method in ``spacegroups.py`` -* Added ``read_structure`` method into ``PDFFitStructure`` class -* Added ``cell_parms`` method into ``Lattice`` class -* Added ``_find_constraints`` method in ``SymmetryConstraints`` class -* Added ``pos_parm_symbols`` method in ``SymmetryConstraints`` class -* Added ``pos_parm_values`` method in ``SymmetryConstraints`` class -* Added ``u_parm_symbols`` method in ``SymmetryConstraints`` class -* Added ``u_parm_values`` method in ``SymmetryConstraints`` class -* Added ``u_formulas`` method in ``SymmetryConstraints`` class -* Added `diffpy.structure.Structure.get_last_atom` in replace of `getLastAtom` -* Added ``get_parser`` method in ``p_auto.py`` -* Added ``get_parser`` method in ``p_cif.py`` -* Added ``get_parser`` method in ``p_discus.py`` -* Added ``get_parser`` method in ``p_pdb.py`` -* Added ``get_parser`` method in ``p_pdffit.py`` -* Added ``get_parser`` method in ``p_rawxyz.py`` -* Added ``get_parser`` method in ``p_xcfg.py`` -* Added ``get_parser`` method in ``p_xyz.py`` -* Added ``get_parser`` method in ``parsers/__init__.py`` -* Added ``position_formulas`` method in ``SymmetryConstraints`` class -* Added ``position_formulas_pruned`` method in ``SymmetryConstraints`` class -* Added ``u_formulas_pruned`` method in ``SymmetryConstraints`` class -* Added ``_parse_cif_data_source`` method in ``p_cif.py`` -* Added ``_parse_cif_block`` method in ``p_cif.py`` -* Added ``to_lines`` method in ``p_cif.py`` -* Added ``to_lines`` method in ``p_pdb.py`` -* Added ``to_lines`` method in ``p_rawxyz.py`` -* Added ``to_lines`` method in ``p_xcfg.py`` -* Added ``to_lines`` method in ``p_xyz.py`` -* Added ``to_lines`` method in ``structureparser.py`` -* Added ``_lines_iterator`` method in ``p_discus.py`` -* Added ``to_lines`` method in ``p_discus.py`` -* Added ``is_space_group_latt_parms`` method in ``symmetryutilities.py`` -* Added ``is_constant_formula`` method in ``symmetryutilities.py`` -* Added ``find_center`` method in ``expansion/shapeutils.py`` -* Added ``make_sphere`` method in ``expansion/makeellipsoid.py`` -* Added ``make_ellipsoid`` method in ``expansion/makeellipsoid.py`` -* Added ``position_difference`` method in ``symmetryutilities.py`` -* Added ``nearest_site_index`` method in ``symmetryutilities.py`` -* Added ``_find_invariants`` method in ``symmetryutilities.py`` -* Added ``equal_positions`` method in ``symmetryutilities.py`` -* Added ``expand_position`` method in ``symmetryutilities.py`` -* Added ``null_space`` method in ``symmetryutilities.py`` -* Added ``input_formats`` method in ``parsers/__init__.py`` -* Added ``output_formats`` method in ``parsers/__init__.py`` -* Added ``title_lines`` method in ``p_pdb.py`` -* Added ``cryst1_lines`` method in ``p_pdb.py`` -* Added ``atom_lines`` method in ``p_pdb.py`` -* Added ``convert_fp_num_to_signed_rational`` method in ``GeneratorSite`` class -* Added ``_find_null_space`` method in ``GeneratorSite`` class -* Added ``_find_pos_parameters`` method in ``GeneratorSite`` class -* Added ``_find_u_space`` method in ``GeneratorSite`` class -* Added ``_find_u_parameters`` method in ``GeneratorSite`` class -* Added ``_find_eq_uij`` method in ``GeneratorSite`` class - -**Changed:** - -* Changed private method ``__emptySharedStructure`` to ``__empty_shared_structure`` - -**Deprecated:** - -* Deprecated ``setLatPar`` method in ``Lattice`` class for removal in version 4.0.0 -* Deprecated ``setLatBase`` method in ``Lattice`` class for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``p_auto.py`` for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``p_cif.py`` for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``p_discus.py`` for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``p_pdb.py`` for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``p_pdffit.py`` for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``p_rawxyz.py`` for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``p_xcfg.py`` for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``p_xyz.py`` for removal in version 4.0.0 -* Deprecated ``parseLines`` method in ``structureparser.py`` for removal in version 4.0.0 -* Deprecated `diffpy.structure.Structure.addNewAtom` method for removal in version 4.0.0 -* Deprecated ``loadStructureFile`` method in ``apps/anyeye.py`` for removal in version 4.0.0 -* Deprecated ``convertStructureFile`` method in ``apps/anyeye.py`` for removal in version 4.0.0 -* Deprecated ``watchStructureFile`` method in ``apps/anyeye.py`` for removal in version 4.0.0 -* Deprecated ``cleanUp`` method in ``apps/anyeye.py`` for removal in version 4.0.0 -* Deprecated ``parseFormula`` method in ``apps/anyeye.py`` for removal in version 4.0.0 -* Deprecated ``signalHandler`` method in ``apps/anyeye.py`` for removal in version 4.0.0 -* Deprecated method ``loadStructure`` in ``__init__.py`` for removal in version 4.0.0 -* Deprecated `diffpy.structure.Structure.assignUniqueLabels` for removal in 4.0.0 -* Deprecated ``placeInLattice`` method of ``Structure`` for removal in version 4.0.0 -* Deprecated ``readStr`` method of ``Structure`` for removal in version 4.0.0 -* Deprecated ``writeStr`` method of ``Structure`` for removal in version 4.0.0 -* Deprecated ``positionFormula`` method in ``GeneratorSite`` class for removal in version 4.0.0 -* Deprecated ``UFormula`` method in ``GeneratorSite`` class for removal in version 4.0.0 -* Deprecated ``eqIndex`` method in ``GeneratorSite`` class for removal in version 4.0.0 -* Deprecated ``pruneFormulaDictionary`` method in ``symmetryutilities.py`` for removal in version 4.0.0 -* Derecated ``_linkAtomAttribute`` method in ``diffpy.structure.utils`` for removal in version 4.0.0 -* Deprecated ``msdLat`` method in ``atom.py`` for removal in version 4.0.0 -* Deprecated ``msdCart`` method in ``atom.py`` for removal in version 4.0.0 -* Deprecated ``parse_file`` method in ``structureparser.py`` for removal in version 4.0.0 -* Deprecated ``parse_file`` method in ``p_cif.py`` for removal in version 4.0.0 -* Deprecated ``parse_file`` method in ``p_auto.py`` for removal in version 4.0.0 -* Deprecated ``atomBareSymbol`` method in ``utils.py`` for removal in version 4.0.0 -* Deprecated ``getSymOp`` method in ``parsers/p_cif.py`` for removal in version 4.0.0 -* Deprecated ``GetSpaceGroup`` method in ``spacegroups.py`` for removal in version 4.0.0 -* Deprecated ``IsSpaceGroupIdentifier`` method in ``spacegroups.py`` for removal in version 4.0.0 -* Deprecated ``FindSpaceGroup`` method in ``spacegroups.py`` for removal in version 4.0.0 -* Deprecated ``_hashSymOpList`` method in ``spacegroups.py`` for removal in version 4.0.0 -* Deprecated ``readStr`` method in ``PDFFitStructure`` class for removal in version 4.0.0 -* Deprecated ``abcABG`` method in ``Lattice`` class for removal in version 4.0.0 -* Deprecated ``posparSymbols`` method in ``SymmetryConstraints`` class for removal in version 4.0.0 -* Deprecated ``posparValues`` method in ``SymmetryConstraints`` class for removal in version 4.0.0 -* Deprecated ``UparSymbols`` method in ``SymmetryConstraints`` class for removal in version 4.0.0 -* Deprecated ``UparValues`` method in ``SymmetryConstraints`` class for removal in version 4.0.0 -* Deprecated ``UFormulas`` method in ``SymmetryConstraints`` class for removal in version 4.0.0 -* Deprecated `diffpy.structure.Structure.getLastAtom` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``p_auto.py`` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``p_cif.py`` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``p_discus.py`` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``p_pdb.py`` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``p_pdffit.py`` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``p_rawxyz.py`` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``p_xcfg.py`` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``p_xyz.py`` for removal in version 4.0.0 -* Deprecated ``getParser`` method in ``parsers/__init__.py`` for removal in version 4.0.0 -* Deprecated ``positionFormulas`` method in ``SymmetryConstraints`` class for removal in version 4.0.0 -* Deprecated ``positionFormulasPruned`` method in ``SymmetryConstraints`` class for removal in version 4.0.0 -* Deprecated ``UFormulasPruned`` method in ``SymmetryConstraints`` class for removal in version 4.0.0 -* Deprecated ``toLines`` method in ``p_cif.py`` for removal in version 4.0.0 -* Deprecated ``toLines`` method in ``p_pdb.py`` for removal in version 4.0.0 -* Deprecated ``toLines`` method in ``p_rawxyz.py`` for removal in version 4.0.0 -* Deprecated ``toLines`` method in ``p_xcfg.py`` for removal in version 4.0.0 -* Deprecated ``toLines`` method in ``p_xyz.py`` for removal in version 4.0.0 -* Deprecated ``toLines`` method in ``structureparser.py`` for removal in version 4.0.0 -* Deprecated ``toLines`` method in ``p_discus.py`` for removal in version 4.0.0 -* Deprecated ``isSpaceGroupLatPar`` method in ``symmetryutilities.py`` for removal in version 4.0.0 -* Deprecated ``isconstantFormula`` method in ``symmetryutilities.py`` for removal in version 4.0.0 -* Deprecated ``findCenter`` method in ``expansion/shapeutils.py`` for removal in version 4.0.0 -* Deprecated ``makeSphere`` method in ``expansion/makeellipsoid.py`` for removal in version 4.0.0 -* Deprecated ``makeEllipsoid`` method in ``expansion/makeellipsoid.py`` for removal in version 4.0.0 -* Deprecated ``positionDifference`` method in ``symmetryutilities.py`` for removal in version 4.0.0 -* Deprecated ``nearestSiteIndex`` method in ``symmetryutilities.py`` for removal in version 4.0.0 -* Deprecated ``equalPositions`` method in ``symmetryutilities.py`` for removal in version 4.0.0 -* Deprecated ``expandPosition`` method in ``symmetryutilities.py`` for removal in version 4.0.0 -* Deprecated ``nullSpace`` method in ``symmetryutilities.py`` for removal in version 4.0.0 -* Deprecated ``inputFormats`` method in ``parsers/__init__.py`` for removal in version 4.0.0 -* Deprecated ``outputFormats`` method in ``parsers/__init__.py`` for removal in version 4.0.0 -* Deprecated ``titleLines`` method in ``p_pdb.py`` for removal in version 4.0.0 -* Deprecated ``crystl1Lines`` method in ``p_pdb.py`` for removal in version 4.0.0 -* Deprecated ``atomLines`` method in ``p_pdb.py`` for removal in version 4.0.0 -* Deprecated ``signedRatStr`` method in in ``GeneratorSite`` class for removal in version 4.0.0 - -**Fixed:** - -* Fixed ``load_structure`` with successfully loading `Path` object -* Fix deprecation for open file for Python 3.14 - -**Removed:** - -* Support for Python 3.11 - - -3.3.1 -===== - -**Added:** - -* Spelling check via Codespell in pre-commit -* Coverage report in each PR - -**Changed:** - -* Use the names CODE-OF-CONDUCT.rst, docs and requirements/tests.txt according to the new group standard. - -**Fixed:** - -* Let ``diffpy.structure`` pass the tests with ``pycifrw`` installed from ``PyPI``. - - -3.3.0 -===== - -**Added:** - -* Support for Python 3.13 - -**Deprecated:** - -* Support for Python 3.10 - - -3.2.3 -===== - -**Added:** - -* Use GitHub Actions to build, release, upload to PyPI -* Added issue template for PyPI/GitHub release -* Include GitHub Issues templates for bug report and feature request - -**Fixed:** - -* Add getting started section and re-arrange install success check instructions -* Added terminal script for transtru app in pyproject.toml -* Changed requires-python to align with classifiers - - -3.2.2 -===== - -**Added:** - -* Unit test for version.py -* support for numpy >=2.0 - -**Fixed:** - -* tests folder at the root of the repo -* Add pip dependencies under pip.txt and conda dependencies under conda.txt -* element/label itemsize to 5 in _linkAtomAttribute to support numpy >=2.0 -* Recookiecut package to the group standard - - - -3.2.1 -===== - - - -3.2.0 -===== - -**Changed:** - -* Removed support for Python 2 -* This version only supporting Python 3.10, 3.11, 3.12 -* All docstrings style updated to numpydoc - -**Deprecated:** - -* Deprecated the `diffpy.structure.applications` module. Use - `diffpy.structure.apps` instead - -**Removed:** - -* Removed all `six` compatibility code - -**Fixed:** - -* Repo structure modified to the new diffpy standard - - - -Version 3.1.0 - 2022-12-04 --------------------------- - -**Added** - -- Compatibility with Python 3.10, 3.9, 3.8 - -**Changed** - -**Deprecated** - -**Removed** - -- Remove the support for Python 3.5, 3.6. - -**Fixed** - -Version 3.0.2 - 2022-10-12 --------------------------- - -**Added** - -- A string representation of `SpaceGroup` with key information. - -**Changed** - -- Bumped minimum `PyCifRW` version to `4.4.3`. - -**Deprecated** - -**Removed** - -**Fixed** - -- Handling of paths on Windows when using the `P_cif` parser. - -Version 3.0.1 - 2019-06-27 --------------------------- - -**Added** - -- Function `FindSpaceGroup` for space group lookup from its list - of symmetry operations. - -**Changed** - -- Reuse existing `SpaceGroup` instance when loading a CIF file. -- Improve check of SpaceGroup identifiers in `GetSpaceGroup`. -- When loading CIF file, preset `Atom.anisotropy` according - to symmetry constraints at each site. Adhere to specific - ADP type when specified in the CIF. - -**Removed** - -- Unused attribute `SpaceGroup.alt_name`. - -**Fixed** - -- Fix inconsistent (`Atom`, `Structure`) pickle. Preserve `Atom` - ownership in a `Structure` after pickling and unpickling. -- Spuriously linked array-view values after `stru.xyz = 0`. -- Preserve scalar value type when setting `stru.occupancy = value`. -- Process unknown CIF occupancy "?" as an occupancy of 1. -- Incorrect `SymOp` list for spacegroup "B11m" (number 1008). - - -Version 3.0.0 - 2019-03-11 --------------------------- - -Notable differences from version 1.3.5. - -**Added** - -- Compatibility with Python 3.7, 3.6, 3.5 in addition to 2.7. -- Aliases for 17 non-standard space group names from cctbx. -- Support for intersphinx links to Python and NumPy documentation. -- Dependency and use of the `six` PY2/PY3 compatibility package. -- Documentation hosting at readthedocs.org. - -**Changed** - -- Rename the package and all its module names to lowercase. -- Use UTF-8 encoding when writing structure files. -- Refactor parsing of XCFG format. Avoid use of generated code. -- Refactor all starred imports to explicit so they can be checked. -- Adopt napoleon style for docstrings. -- Update docstrings for `Atom`, `Lattice`, `SymOp`, `SpaceGroup`. -- Switch to platform-independent "noarch" Anaconda package. - -**Deprecated** - -- Old camel case module names such as `diffpy.Structure`. -- Variable `__gitsha__` in the `version` module which was renamed - to `__git_commit__`. - -**Removed** - -- Unused exception `IsotropyError`. -- Unused class `BRAtomsStructure` and associated parser. - -**Fixed** - -- Loading of empty CIF files with no specified sites. -- Parsing of CIFs with `?` value for unknown displacement parameters. -- Symmetry constraint equations for ADPs so they avoid self-reference. -- Use `StructureFormatError` exception for CIF with unknown space group. -- Open files within the `with` context so they get closed when done. -- Invalid escape sequences in string values. diff --git a/CODE-OF-CONDUCT.rst b/CODE-OF-CONDUCT.rst deleted file mode 100644 index 25fafe27..00000000 --- a/CODE-OF-CONDUCT.rst +++ /dev/null @@ -1,133 +0,0 @@ -===================================== - Contributor Covenant Code of Conduct -===================================== - -Our Pledge ----------- - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socioeconomic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -Our Standards -------------- - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of - any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, - without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -Enforcement Responsibilities ----------------------------- - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -Scope ------ - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official email address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -Enforcement ------------ - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -sbillinge@ucsb.edu. All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -Enforcement Guidelines ----------------------- - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -1. Correction -**************** - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -2. Warning -************* - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -3. Temporary Ban -****************** - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -4. Permanent Ban -****************** - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -Attribution ------------ - -This Code of Conduct is adapted from the `Contributor Covenant `_. - -Community Impact Guidelines were inspired by `Mozilla's code of conduct enforcement ladder `_. - -For answers to common questions about this code of conduct, see the `FAQ `_. `Translations are available `_ diff --git a/LICENSE-DANSE.rst b/LICENSE-DANSE.rst deleted file mode 100644 index a650d915..00000000 --- a/LICENSE-DANSE.rst +++ /dev/null @@ -1,47 +0,0 @@ -LICENSE -======= - -This program is part of the DiffPy and DANSE open-source projects -and is available subject to the conditions and terms laid out below. - -Copyright 2006-2007, Board of Trustees of Michigan State University, - -Copyright 2008-2012, The Trustees of Columbia University in the -City of New York. (Copyright holder indicated in each source file). - -For more information please visit the project web-page: - - http://www.diffpy.org/ - -or email Prof. Simon Billinge at sbillinge@ucsb.edu - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -- Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS". COPYRIGHT HOLDER -EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EITHER -EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY, TITLE, FITNESS, ADEQUACY OR SUITABILITY -FOR A PARTICULAR PURPOSE, AND ANY WARRANTIES OF FREEDOM FROM -INFRINGEMENT OF ANY DOMESTIC OR FOREIGN PATENT, COPYRIGHTS, TRADE -SECRETS OR OTHER PROPRIETARY RIGHTS OF ANY PARTY. IN NO EVENT SHALL -COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE OR RELATING TO THIS AGREEMENT, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSE-pymmlib.rst b/LICENSE-pymmlib.rst deleted file mode 100644 index ef484f5a..00000000 --- a/LICENSE-pymmlib.rst +++ /dev/null @@ -1,203 +0,0 @@ -.. code-block:: text - - The Artistic License 2.0 - - Copyright (c) 2000-2006, The Perl Foundation. - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - This license establishes the terms under which a given free software - Package may be copied, modified, distributed, and/or redistributed. - The intent is that the Copyright Holder maintains some artistic - control over the development of that Package while still keeping the - Package available as open source and free software. - - You are always permitted to make arrangements wholly outside of this - license directly with the Copyright Holder of a given Package. If the - terms of this license do not permit the full use that you propose to - make of the Package, you should contact the Copyright Holder and seek - a different licensing arrangement. - - Definitions - - "Copyright Holder" means the individual(s) or organization(s) - named in the copyright notice for the entire Package. - - "Contributor" means any party that has contributed code or other - material to the Package, in accordance with the Copyright Holder's - procedures. - - "You" and "your" means any person who would like to copy, - distribute, or modify the Package. - - "Package" means the collection of files distributed by the - Copyright Holder, and derivatives of that collection and/or of - those files. A given Package may consist of either the Standard - Version, or a Modified Version. - - "Distribute" means providing a copy of the Package or making it - accessible to anyone else, or in the case of a company or - organization, to others outside of your company or organization. - - "Distributor Fee" means any fee that you charge for Distributing - this Package or providing support for this Package to another - party. It does not mean licensing fees. - - "Standard Version" refers to the Package if it has not been - modified, or has been modified only in ways explicitly requested - by the Copyright Holder. - - "Modified Version" means the Package, if it has been changed, and - such changes were not explicitly requested by the Copyright - Holder. - - "Original License" means this Artistic License as Distributed with - the Standard Version of the Package, in its current version or as - it may be modified by The Perl Foundation in the future. - - "Source" form means the source code, documentation source, and - configuration files for the Package. - - "Compiled" form means the compiled bytecode, object code, binary, - or any other form resulting from mechanical transformation or - translation of the Source form. - - - Permission for Use and Modification Without Distribution - - (1) You are permitted to use the Standard Version and create and use - Modified Versions for any purpose without restriction, provided that - you do not Distribute the Modified Version. - - - Permissions for Redistribution of the Standard Version - - (2) You may Distribute verbatim copies of the Source form of the - Standard Version of this Package in any medium without restriction, - either gratis or for a Distributor Fee, provided that you duplicate - all of the original copyright notices and associated disclaimers. At - your discretion, such verbatim copies may or may not include a - Compiled form of the Package. - - (3) You may apply any bug fixes, portability changes, and other - modifications made available from the Copyright Holder. The resulting - Package will still be considered the Standard Version, and as such - will be subject to the Original License. - - - Distribution of Modified Versions of the Package as Source - - (4) You may Distribute your Modified Version as Source (either gratis - or for a Distributor Fee, and with or without a Compiled form of the - Modified Version) provided that you clearly document how it differs - from the Standard Version, including, but not limited to, documenting - any non-standard features, executables, or modules, and provided that - you do at least ONE of the following: - - (a) make the Modified Version available to the Copyright Holder - of the Standard Version, under the Original License, so that the - Copyright Holder may include your modifications in the Standard - Version. - - (b) ensure that installation of your Modified Version does not - prevent the user installing or running the Standard Version. In - addition, the Modified Version must bear a name that is different - from the name of the Standard Version. - - (c) allow anyone who receives a copy of the Modified Version to - make the Source form of the Modified Version available to others - under - - (i) the Original License or - - (ii) a license that permits the licensee to freely copy, - modify and redistribute the Modified Version using the same - licensing terms that apply to the copy that the licensee - received, and requires that the Source form of the Modified - Version, and of any works derived from it, be made freely - available in that license fees are prohibited but Distributor - Fees are allowed. - - - Distribution of Compiled Forms of the Standard Version - or Modified Versions without the Source - - (5) You may Distribute Compiled forms of the Standard Version without - the Source, provided that you include complete instructions on how to - get the Source of the Standard Version. Such instructions must be - valid at the time of your distribution. If these instructions, at any - time while you are carrying out such distribution, become invalid, you - must provide new instructions on demand or cease further distribution. - If you provide valid instructions or cease distribution within thirty - days after you become aware that the instructions are invalid, then - you do not forfeit any of your rights under this license. - - (6) You may Distribute a Modified Version in Compiled form without - the Source, provided that you comply with Section 4 with respect to - the Source of the Modified Version. - - - Aggregating or Linking the Package - - (7) You may aggregate the Package (either the Standard Version or - Modified Version) with other packages and Distribute the resulting - aggregation provided that you do not charge a licensing fee for the - Package. Distributor Fees are permitted, and licensing fees for other - components in the aggregation are permitted. The terms of this license - apply to the use and Distribution of the Standard or Modified Versions - as included in the aggregation. - - (8) You are permitted to link Modified and Standard Versions with - other works, to embed the Package in a larger work of your own, or to - build stand-alone binary or bytecode versions of applications that - include the Package, and Distribute the result without restriction, - provided the result does not expose a direct interface to the Package. - - - Items That are Not Considered Part of a Modified Version - - (9) Works (including, but not limited to, modules and scripts) that - merely extend or make use of the Package, do not, by themselves, cause - the Package to be a Modified Version. In addition, such works are not - considered parts of the Package itself, and are not subject to the - terms of this license. - - - General Provisions - - (10) Any use, modification, and distribution of the Standard or - Modified Versions is governed by this Artistic License. By using, - modifying or distributing the Package, you accept this license. Do not - use, modify, or distribute the Package, if you do not accept this - license. - - (11) If your Modified Version has been derived from a Modified - Version made by someone other than you, you are nevertheless required - to ensure that your Modified Version complies with the requirements of - this license. - - (12) This license does not grant you the right to use any trademark, - service mark, tradename, or logo of the Copyright Holder. - - (13) This license includes the non-exclusive, worldwide, - free-of-charge patent license to make, have made, use, offer to sell, - sell, import and otherwise transfer the Package with respect to any - patent claims licensable by the Copyright Holder that are necessarily - infringed by the Package. If you institute patent litigation - (including a cross-claim or counterclaim) against any party alleging - that the Package constitutes direct or contributory patent - infringement, then this Artistic License to you shall terminate on the - date that such litigation is filed. - - (14) Disclaimer of Warranty: - THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS - IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED - WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR - NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL - LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL - BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL - DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSE.rst b/LICENSE.rst deleted file mode 100644 index c967838d..00000000 --- a/LICENSE.rst +++ /dev/null @@ -1,144 +0,0 @@ -OPEN SOURCE LICENSE AGREEMENT -============================= - -Copyright (c) 1989, 1991 Free Software Foundation, Inc. - -Copyright (c) 2006, The Regents of the University of California through Lawrence Berkeley National Laboratory - -Copyright (c) 2006-2007, Board of Trustees of Michigan State University - -Copyright (c) 2008-2012, The Trustees of Columbia University in the City of New York - -Copyright (c) 2009-2011, University of Tennessee - -Copyright (c) 2014, Australian Synchrotron Research Program Inc., ("ASRP") - -Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National Laboratory - -Copyright (c) 2024-2025, The Trustees of Columbia University in the City of New York. -All rights reserved. - -Copyright (c) 2026-present, The Contributors to the diffpy.structure project. -All rights reserved. - -The "DiffPy-CMI" is distributed subject to the following license conditions: - -.. code-block:: text - - SOFTWARE LICENSE AGREEMENT - - Software: DiffPy-CMI - - - (1) The "Software", below, refers to the aforementioned DiffPy-CMI (in either - source code, or binary form and accompanying documentation). - - Part of the software was derived from the DANSE, ObjCryst++ (with permission), - PyCifRW, Python periodictable, CCTBX, and SasView open source projects, of - which the original Copyrights are contained in each individual file. - - Each licensee is addressed as "you" or "Licensee." - - - (2) The copyright holders shown above and their third-party Licensors hereby - grant licensee a royalty-free nonexclusive license, subject to the limitations - stated herein and U.S. Government license rights. - - - (3) You may modify and make a copy or copies of the software for use within - your organization, if you meet the following conditions: - - (a) Copies in source code must include the copyright notice and this - software license agreement. - - (b) Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other materials - provided with the copy. - - - (4) You may modify a copy or copies of the Software or any portion of it, thus - forming a work based on the Software, and distribute copies of such work - outside your organization, if you meet all of the following conditions: - - (a) Copies in source code must include the copyright notice and this - Software License Agreement; - - (b) Copies in binary form must include the copyright notice and this - Software License Agreement in the documentation and/or other materials - provided with the copy; - - (c) Modified copies and works based on the Software must carry prominent - notices stating that you changed specified portions of the Software. - - (d) Neither the name of Brookhaven Science Associates or Brookhaven - National Laboratory nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - written permission. - - - (5) Portions of the Software resulted from work developed under a U.S. - Government contract and are subject to the following license: - The Government is granted for itself and others acting on its behalf a - paid-up, nonexclusive, irrevocable worldwide license in this computer software - to reproduce, prepare derivative works, and perform publicly and display - publicly. - - - (6) WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT - WARRANTY OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY - LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND - THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING - BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL - LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF - THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT INFRINGE - PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION - UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED. - - - (7) LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR - THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF - ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, - CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, INCLUDING - BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, - WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING - NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS - BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES. - - -Brookhaven National Laboratory Notice -===================================== - -Acknowledgment of sponsorship ------------------------------ - -This software was produced by the Brookhaven National Laboratory, under -Contract DE-AC02-98CH10886 with the Department of Energy. - - -Government disclaimer of liability ----------------------------------- - -Neither the United States nor the United States Department of Energy, nor -any of their employees, makes any warranty, express or implied, or assumes -any legal liability or responsibility for the accuracy, completeness, or -usefulness of any data, apparatus, product, or process disclosed, or -represents that its use would not infringe privately owned rights. - - -Brookhaven disclaimer of liability ----------------------------------- - -Brookhaven National Laboratory makes no representations or warranties, -express or implied, nor assumes any liability for the use of this software. - - -Maintenance of notice ---------------------- - -In the interest of clarity regarding the origin and status of this -software, Brookhaven National Laboratory requests that any recipient of it -maintain this notice affixed to any distribution by the recipient that -contains a copy or derivative of this software. - -END OF LICENSE diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index f1a78eec..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,12 +0,0 @@ -graft src -graft tests -graft requirements - -include AUTHORS.rst LICENSE*.rst README.rst - -# Exclude all bytecode files and __pycache__ directories -global-exclude *.py[cod] # Exclude all .pyc, .pyo, and .pyd files. -global-exclude .DS_Store # Exclude Mac filesystem artifacts. -global-exclude __pycache__ # Exclude Python cache directories. -global-exclude .git* # Exclude git files and directories. -global-exclude .idea # Exclude PyCharm project settings. diff --git a/README.rst b/README.rst deleted file mode 100644 index 3ce08dfa..00000000 --- a/README.rst +++ /dev/null @@ -1,167 +0,0 @@ -|Icon| |title|_ -=============== - -.. |title| replace:: diffpy.structure -.. _title: https://diffpy.github.io/diffpy.structure - -.. |Icon| image:: https://avatars.githubusercontent.com/diffpy - :target: https://diffpy.github.io/diffpy.structure - :height: 100px - -|PyPI| |Forge| |PythonVersion| |PR| - -|CI| |Codecov| |Black| |Tracking| - -.. |Black| image:: https://img.shields.io/badge/code_style-black-black - :target: https://github.com/psf/black - -.. |CI| image:: https://github.com/diffpy/diffpy.structure/actions/workflows/matrix-and-codecov.yml/badge.svg - :target: https://github.com/diffpy/diffpy.structure/actions/workflows/matrix-and-codecov.yml - -.. |Codecov| image:: https://codecov.io/gh/diffpy/diffpy.structure/branch/main/graph/badge.svg - :target: https://codecov.io/gh/diffpy/diffpy.structure - -.. |Forge| image:: https://img.shields.io/conda/vn/conda-forge/diffpy.structure - :target: https://anaconda.org/conda-forge/diffpy.structure - -.. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff - :target: https://github.com/diffpy/diffpy.structure/pulls - -.. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.structure - :target: https://pypi.org/project/diffpy.structure/ - -.. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.structure - :target: https://pypi.org/project/diffpy.structure/ - -.. |Tracking| image:: https://img.shields.io/badge/issue_tracking-github-blue - :target: https://github.com/diffpy/diffpy.structure/issues - -Crystal structure container and parsers for structure formats. - -The diffpy.structure package provides objects for storing atomic -coordinates, displacement parameters and other crystal structure data. -diffpy.structure supports import and export of structure data in several -structure formats such as CIF, PDB, and xyz. It provides conversion -between fractional and absolute Cartesian coordinates, functions for -symmetry expansion of atom sites in the asymmetric unit and generation -of symmetry constraints for atom positions and displacement parameters. -diffpy.structure includes definitions of all space groups in over 500 -symmetry settings. - - -For more information about the diffpy.structure library, please consult our `online documentation `_. - -Citation --------- - -If you use this program for a scientific research that leads -to publication, we ask that you acknowledge use of the program -by citing the following paper in your publication: - - P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge, - `Complex modeling: a strategy and software program for combining - multiple information sources to solve ill posed structure and - nanostructure inverse problems - `__, - *Acta Crystallogr. A* **71**, 562-568 (2015). - -Installation ------------- - -The preferred method is to use `Miniconda Python -`_ -and install from the "conda-forge" channel of Conda packages. - -To add "conda-forge" to the conda channels, run the following in a terminal. :: - - conda config --add channels conda-forge - -We want to install our packages in a suitable conda environment. -The following creates and activates a new environment named ``diffpy.structure_env`` :: - - conda create -n diffpy.structure_env diffpy.structure - conda activate diffpy.structure_env - -To confirm that the installation was successful, type :: - - python -c "import diffpy.structure; print(diffpy.structure.__version__)" - -The output should print the latest version displayed on the badges above. - -If the above does not work, you can use ``pip`` to download and install the latest release from -`Python Package Index `_. -To install using ``pip`` into your ``diffpy.structure_env`` environment, type :: - - pip install diffpy.structure - -If you prefer to install from sources, after installing the dependencies, obtain the source archive from -`GitHub `_. Once installed, ``cd`` into your ``diffpy.structure`` directory -and run the following :: - - pip install . - -This package also provides command-line utilities. To check the software has been installed correctly, type :: - - diffpy.structure --version - -You can also type the following command to verify the installation. :: - - python -c "import diffpy.structure; print(diffpy.structure.__version__)" - - -To view the basic usage and available commands, type :: - - diffpy.structure -h - -Getting Started ---------------- - -You may consult our `online documentation `_ for tutorials and API references. - -Support and Contribute ----------------------- - -`Diffpy user group `_ is the discussion forum for general questions and discussions about the use of diffpy.structure. Please join the diffpy.structure users community by joining the Google group. The diffpy.structure project welcomes your expertise and enthusiasm! - -If you see a bug or want to request a feature, please `report it as an issue `_ and/or `submit a fix as a PR `_. You can also post it to the `Diffpy user group `_. - -Feel free to fork the project and contribute. To install diffpy.structure -in a development mode, with its sources being directly used by Python -rather than copied to a package directory, use the following in the root -directory :: - - pip install -e . - -To ensure code quality and to prevent accidental commits into the default branch, please set up the use of our pre-commit -hooks. - -1. Install pre-commit in your working environment by running ``conda install pre-commit``. - -2. Initialize pre-commit (one time only) ``pre-commit install``. - -Thereafter your code will be linted by black and isort and checked against flake8 before you can commit. -If it fails by black or isort, just rerun and it should pass (black and isort will modify the files so should -pass after they are modified). If the flake8 test fails please see the error messages and fix them manually before -trying to commit again. - -Improvements and fixes are always appreciated. - -Before contributing, please read our `Code of Conduct `_. - -Contact -------- - -For more information on diffpy.structure please visit the project `web-page `_ or email the maintainer``Simon Billinge(sbillinge@ucsb.edu)``. - -Acknowledgements ----------------- - -``diffpy.structure`` is built and maintained with `scikit-package `_. - -Space group codes in *spacegroupmod.py* and *mmlibspacegroups.py* -originate from the `pymmlib project `_. - -Less common settings of space groups were generating using the -`Computational Crystallography Toolbox `_. - -``diffpy.structure`` is built and maintained with `scikit-package `_. diff --git a/_modules/diffpy/structure.html b/_modules/diffpy/structure.html new file mode 100644 index 00000000..5c71f938 --- /dev/null +++ b/_modules/diffpy/structure.html @@ -0,0 +1,246 @@ + + + + + + + + diffpy.structure — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure

+#!/usr/bin/env python
+##############################################################################
+#
+# (c) 2024-2026 The Trustees of Columbia University in the City of New York.
+# All rights reserved.
+#
+# File coded by: Chris Farrow, Pavol Juhas,  Simon Billinge, Billinge Group members.
+#
+# See GitHub contributions for a more detailed list of contributors.
+# https://github.com/diffpy/diffpy.structure/graphs/contributors
+#
+# See LICENSE.rst for license information.
+#
+##############################################################################
+"""Crystal structure container and parsers for structure formats.
+
+Classes related to the structure of materials:
+    * Atom
+    * Lattice
+    * Structure
+    * PDFFitStructure
+
+Other classes:
+    * SpaceGroup
+    * SymOp
+    * ExpandAsymmetricUnit
+    * GeneratorSite
+    * SymmetryConstraints
+
+Exceptions:
+    * StructureFormatError
+    * LatticeError
+    * SymmetryError
+"""
+
+
+import os
+import sys
+
+import diffpy.structure as _structure
+from diffpy.structure.atom import Atom
+from diffpy.structure.lattice import Lattice
+from diffpy.structure.parsers import get_parser
+from diffpy.structure.pdffitstructure import PDFFitStructure
+from diffpy.structure.structure import Structure
+from diffpy.structure.structureerrors import LatticeError, StructureFormatError, SymmetryError
+
+# package version
+from diffpy.structure.version import __version__
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+# Deprecations -------------------------------------------------------
+base = "diffpy.structure"
+removal_version = "4.0.0"
+loadStructure_deprecation_msg = build_deprecation_message(
+    base,
+    "loadStructure",
+    "load_structure",
+    removal_version,
+)
+
+
+# @deprecated
+# custom deprecator for diffpy.Structure module
+
+[docs] +class DeprecatedStructureModule: + """Proxy for backward compatibility of diffpy.Structure.""" + + def __getattr__(self, name): + import warnings + + warnings.warn( + "Module 'diffpy.Structure' is deprecated and will be removed in version 4.0. " + "Use 'diffpy.structure' instead.", + DeprecationWarning, + stacklevel=2, + ) + return getattr(_structure, name)
+ + + +sys.modules["diffpy.Structure"] = DeprecatedStructureModule() + +# top level routines + + +@deprecated(loadStructure_deprecation_msg) +def loadStructure(filename, fmt="auto", **kw): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.load_structure instead. + """ + return load_structure(filename, fmt, **kw) + + +
+[docs] +def load_structure(filename, fmt="auto", **kw): + """Load new structure object from the specified file. + + Parameters + ---------- + + filename : str + Path to the file to be loaded. + fmt : str, Optional + Format of the structure file such as 'cif' or 'xyz'. Must be + one of the formats listed by the `parsers.inputFormats` function. + When 'auto', all supported formats are tried in a sequence. + kw : Optional + Extra keyword arguments that are passed to `parsers.getParser` + function. These configure the dedicated Parser object that + is used to read content in filename. + + Returns + ------- + stru : `Structure`, `PDFFitStructure` + The new Structure object loaded from the specified file. + Return a more specific PDFFitStructure type for 'pdffit' + and 'discus' formats. + """ + filename = os.fspath(filename) + p = get_parser(fmt, **kw) + rv = p.parse_file(filename) + return rv
+ + + +# silence pyflakes checker +assert StructureFormatError and LatticeError and SymmetryError +assert Atom +assert Lattice +assert Structure +assert PDFFitStructure + +# silence the pyflakes syntax checker +assert __version__ or True + +# End of file +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/_legacy_importer.html b/_modules/diffpy/structure/_legacy_importer.html new file mode 100644 index 00000000..d423ebe1 --- /dev/null +++ b/_modules/diffpy/structure/_legacy_importer.html @@ -0,0 +1,213 @@ + + + + + + + + diffpy.structure._legacy_importer — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure._legacy_importer

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  Complex Modeling Initiative
+#                   (c) 2017 Brookhaven Science Associates,
+#                   Brookhaven National Laboratory.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE.txt for license information.
+#
+##############################################################################
+"""Support import of old camel-case module names with
+DeprecationWarning.
+
+The imported camel-case modules are aliases for the current module
+instances. Their `__name__` attributes are thus all in lower-case.
+
+Note
+----
+this module must be only imported from `diffpy.Structure`.
+
+Warning
+-------
+This module is deprecated and will be removed in the future.
+"""
+
+
+import importlib.abc
+import sys
+from warnings import warn
+
+WMSG = "Module {!r} is deprecated. Use {!r} instead."
+
+# ----------------------------------------------------------------------------
+
+
+
+[docs] +class FindRenamedStructureModule(importlib.abc.MetaPathFinder): + + prefix = "diffpy.Structure." + +
+[docs] + def find_spec(self, fullname, path=None, target=None): + # only handle submodules of diffpy.Structure + if not fullname.startswith(self.prefix): + return None + lcname = fullname.lower() + spec = importlib.util.find_spec(lcname) + if spec is not None: + spec.name = fullname + spec.loader = MapRenamedStructureModule() + return spec
+
+ + + +# end of class FindRenamedStructureModule + +# ---------------------------------------------------------------------------- + + +
+[docs] +class MapRenamedStructureModule(importlib.abc.Loader): + """Loader for old camel-case module names. + + Import the current module and alias it under the old name. + """ + +
+[docs] + def create_module(self, spec): + lcname = spec.name.lower() + mod = importlib.import_module(lcname) + sys.modules[spec.name] = mod + warn(WMSG.format(spec.name, lcname), DeprecationWarning, stacklevel=2) + return mod
+ + +
+[docs] + def exec_module(self, module): + return
+
+ + + +# end of class MapRenamedStructureModule + +# ---------------------------------------------------------------------------- + +# show deprecation warning for diffpy.Structure +warn( + WMSG.format("diffpy.Structure", "diffpy.structure"), + DeprecationWarning, + stacklevel=2, +) + +# install meta path finder for diffpy.Structure submodules +sys.meta_path.append(FindRenamedStructureModule()) + +# End of file +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/apps/anyeye.html b/_modules/diffpy/structure/apps/anyeye.html new file mode 100644 index 00000000..ee037bc2 --- /dev/null +++ b/_modules/diffpy/structure/apps/anyeye.html @@ -0,0 +1,511 @@ + + + + + + + + diffpy.structure.apps.anyeye — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.apps.anyeye

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2006 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Anyeye view structure file in atomeye.
+
+Usage: ``anyeye [options] strufile``
+
+Anyeye understands more `Structure` formats than atomeye. It converts `strufile`
+to a temporary XCFG file which is opened in atomeye. See supported file formats:
+``inputFormats``
+
+Options:
+  -f, --formula
+      Override chemical formula in `strufile`. The formula defines
+      elements in the same order as in `strufile`, e.g., ``Na4Cl4``.
+
+  -w, --watch
+      Watch input file for changes.
+
+  --viewer=VIEWER
+      The structure viewer program, by default "atomeye".
+      The program will be executed as "VIEWER structurefile".
+
+  --formats=FORMATS
+      Comma-separated list of file formats that are understood
+      by the VIEWER, by default ``"xcfg,pdb"``. Files of other
+      formats will be converted to the first listed format.
+
+  -h, --help
+      Display this message and exit.
+
+  -V, --version
+      Show script version and exit.
+"""
+
+from __future__ import print_function
+
+import os
+import re
+import signal
+import sys
+
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure"
+removal_version = "4.0.0"
+loadStructureFile_deprecation_msg = build_deprecation_message(
+    base,
+    "loadStructureFile",
+    "load_structure_file",
+    removal_version,
+)
+convertStructureFile_deprecation_msg = build_deprecation_message(
+    base,
+    "loadStructureFile",
+    "load_structure_file",
+    removal_version,
+)
+watchStructureFile_deprecation_msg = build_deprecation_message(
+    base,
+    "watchStructureFile",
+    "watch_structure_file",
+    removal_version,
+)
+cleanUp_deprecation_msg = build_deprecation_message(
+    base,
+    "cleanUp",
+    "clean_up",
+    removal_version,
+)
+parseFormula_deprecation_msg = build_deprecation_message(
+    base,
+    "parseFormula",
+    "parse_formula",
+    removal_version,
+)
+signalHandler_deprecation_msg = build_deprecation_message(
+    base,
+    "signalHandler",
+    "signal_handler",
+    removal_version,
+)
+
+# parameter dictionary
+pd = {
+    "formula": None,
+    "watch": False,
+    "viewer": "atomeye",
+    "formats": ["xcfg", "pdb"],
+}
+
+
+
+[docs] +def usage(style=None): + """Show usage info, for ``style=="brief"`` show only first 2 + lines.""" + import os.path + + myname = os.path.basename(sys.argv[0]) + msg = __doc__.replace("anyeye", myname) + if style == "brief": + msg = msg.split("\n")[1] + "\n" + "Try `%s --help' for more information." % myname + else: + from diffpy.structure.parsers import input_formats + + fmts = [f for f in input_formats() if f != "auto"] + msg = msg.replace("inputFormats", " ".join(fmts)) + print(msg) + return
+ + + +
+[docs] +def version(): + from diffpy.structure import __version__ + + print("anyeye", __version__) + return
+ + + +@deprecated(loadStructureFile_deprecation_msg) +def loadStructureFile(filename, format="auto"): + """Load structure from specified file. + + Parameters + ---------- + filename : str + Path to the structure file. + format : str, Optional + File format, by default "auto". + + Returns + ------- + tuple + A tuple of (Structure, fileformat). + """ + return load_structure_file(filename, format) + + +
+[docs] +def load_structure_file(filename, format="auto"): + """Load structure from specified file. + + Parameters + ---------- + filename : str + Path to the structure file. + format : str, Optional + File format, by default "auto". + + Returns + ------- + tuple + A tuple of (Structure, fileformat). + """ + from diffpy.structure import Structure + + stru = Structure() + p = stru.read(filename, format) + fileformat = p.format + return (stru, fileformat)
+ + + +@deprecated(convertStructureFile_deprecation_msg) +def convertStructureFile(pd): + return convert_structure_file(pd) + + +
+[docs] +def convert_structure_file(pd): + # make temporary directory on the first pass + if "tmpdir" not in pd: + from tempfile import mkdtemp + + pd["tmpdir"] = mkdtemp() + strufile = pd["strufile"] + tmpfile = os.path.join(pd["tmpdir"], os.path.basename(strufile)) + pd["tmpfile"] = tmpfile + # speed up file processing in the watch mode + fmt = pd.get("format", "auto") + stru = None + if fmt == "auto": + stru, fmt = loadStructureFile(strufile) + pd["fmt"] = fmt + # if fmt is recognized by the viewer, use as is + if fmt in pd["formats"] and pd["formula"] is None: + import shutil + + shutil.copyfile(strufile, tmpfile + ".tmp") + os.rename(tmpfile + ".tmp", tmpfile) + return + # otherwise convert to the first recognized viewer format + if stru is None: + stru = load_structure_file(strufile, fmt)[0] + if pd["formula"]: + formula = pd["formula"] + if len(formula) != len(stru): + emsg = "Formula has %i atoms while structure %i" % ( + len(formula), + len(stru), + ) + raise RuntimeError(emsg) + for a, el in zip(stru, formula): + a.element = el + elif format == "rawxyz": + for a in stru: + if a.element == "": + a.element = "C" + stru.write(tmpfile + ".tmp", pd["formats"][0]) + os.rename(tmpfile + ".tmp", tmpfile) + return
+ + + +@deprecated(watchStructureFile_deprecation_msg) +def watchStructureFile(pd): + return watch_structure_file(pd) + + +
+[docs] +def watch_structure_file(pd): + from time import sleep + + strufile = pd["strufile"] + tmpfile = pd["tmpfile"] + while pd["watch"]: + if os.path.getmtime(tmpfile) < os.path.getmtime(strufile): + convert_structure_file(pd) + sleep(1) + return
+ + + +@deprecated(cleanUp_deprecation_msg) +def cleanUp(pd): + return clean_up(pd) + + +
+[docs] +def clean_up(pd): + if "tmpfile" in pd: + os.remove(pd["tmpfile"]) + del pd["tmpfile"] + if "tmpdir" in pd: + os.rmdir(pd["tmpdir"]) + del pd["tmpdir"] + return
+ + + +@deprecated(parseFormula_deprecation_msg) +def parseFormula(formula): + """Parse chemical formula and return a list of elements.""" + # remove all blanks + return parse_formula(formula) + + +
+[docs] +def parse_formula(formula): + """Parse chemical formula and return a list of elements.""" + # remove all blanks + formula = re.sub(r"\s", "", formula) + if not re.match("^[A-Z]", formula): + raise RuntimeError("InvalidFormula '%s'" % formula) + elcnt = re.split("([A-Z][a-z]?)", formula)[1:] + ellst = [] + try: + for i in range(0, len(elcnt), 2): + el = elcnt[i] + cnt = elcnt[i + 1] + cnt = (cnt == "") and 1 or int(cnt) + ellst.extend(cnt * [el]) + except ValueError: + emsg = "Invalid formula, %r is not valid count" % elcnt[i + 1] + raise RuntimeError(emsg) + return ellst
+ + + +
+[docs] +def die(exit_status=0, pd={}): + clean_up(pd) + sys.exit(exit_status)
+ + + +@deprecated(signalHandler_deprecation_msg) +def signalHandler(signum, stackframe): + # revert to default handler + return signal_handler(signum, stackframe) + + +
+[docs] +def signal_handler(signum, stackframe): + # revert to default handler + signal.signal(signum, signal.SIG_DFL) + if signum == signal.SIGCHLD: + pid, exit_status = os.wait() + exit_status = (exit_status >> 8) + (exit_status & 0x00FF) + die(exit_status, pd) + else: + die(1, pd) + return
+ + + +
+[docs] +def main(): + import getopt + + # default parameters + pd["watch"] = False + try: + opts, args = getopt.getopt( + sys.argv[1:], + "f:whV", + ["formula=", "watch", "viewer=", "formats=", "help", "version"], + ) + except getopt.GetoptError as errmsg: + print(errmsg, file=sys.stderr) + die(2) + # process options + for o, a in opts: + if o in ("-f", "--formula"): + try: + pd["formula"] = parse_formula(a) + except RuntimeError as msg: + print(msg, file=sys.stderr) + die(2) + elif o in ("-w", "--watch"): + pd["watch"] = True + elif o == "--viewer": + pd["viewer"] = a + elif o == "--formats": + pd["formats"] = [w.strip() for w in a.split(",")] + elif o in ("-h", "--help"): + usage() + die() + elif o in ("-V", "--version"): + version() + die() + if len(args) < 1: + usage("brief") + die() + elif len(args) > 1: + print("too many structure files", file=sys.stderr) + die(2) + pd["strufile"] = args[0] + # trap the following signals + signal.signal(signal.SIGHUP, signal_handler) + signal.signal(signal.SIGQUIT, signal_handler) + signal.signal(signal.SIGSEGV, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + signal.signal(signal.SIGINT, signal_handler) + env = os.environ.copy() + if os.path.basename(pd["viewer"]).startswith("atomeye"): + env["XLIB_SKIP_ARGB_VISUALS"] = "1" + # try to run the thing: + try: + convert_structure_file(pd) + spawnargs = (pd["viewer"], pd["viewer"], pd["tmpfile"], env) + # load strufile in atomeye + if pd["watch"]: + signal.signal(signal.SIGCHLD, signal_handler) + os.spawnlpe(os.P_NOWAIT, *spawnargs) + watch_structure_file(pd) + else: + status = os.spawnlpe(os.P_WAIT, *spawnargs) + die(status, pd) + except IOError as e: + print("%s: %s" % (args[0], e.strerror), file=sys.stderr) + die(1, pd) + except StructureFormatError as e: + print("%s: %s" % (args[0], e), file=sys.stderr) + die(1, pd) + return
+ + + +if __name__ == "__main__": + main() +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/apps/transtru.html b/_modules/diffpy/structure/apps/transtru.html new file mode 100644 index 00000000..7e0cbeb1 --- /dev/null +++ b/_modules/diffpy/structure/apps/transtru.html @@ -0,0 +1,244 @@ + + + + + + + + diffpy.structure.apps.transtru — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.apps.transtru

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2006 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Translate structure file to different format.
+
+Usage: ``transtru INFMT..OUTFMT strufile``
+
+Translates structure file strufile from `INFMT` to `OUTFMT` format and prints it
+to the screen. Use "-" as `strufile` to read from standard input. To save the
+translated file, use
+
+    ``transtru INFMT..OUTFMT strufile > strufile.out``
+
+Supported input and output structure formats are
+    * `INFMT`: ``inputFormats``
+    * `OUTFMT`: ``outputFormats``
+
+Options:
+  -h, --help
+    Display this message.
+
+  -V, --version
+    Show script version.
+"""
+
+from __future__ import print_function
+
+import sys
+
+from diffpy.structure import Structure
+from diffpy.structure.structureerrors import StructureFormatError
+
+
+
+[docs] +def usage(style=None): + """Show usage info, for ``style=="brief"`` show only first 2 + lines.""" + import os.path + + myname = os.path.basename(sys.argv[0]) + msg = __doc__.replace("transtru", myname) + if style == "brief": + msg = msg.split("\n")[1] + "\n" + "Try `%s --help' for more information." % myname + else: + from diffpy.structure.parsers import input_formats, output_formats + + msg = msg.replace("inputFormats", " ".join(input_formats())) + msg = msg.replace("outputFormats", " ".join(output_formats())) + print(msg) + return
+ + + +
+[docs] +def version(): + from diffpy.structure import __version__ + + print("diffpy.structure", __version__) + return
+ + + +
+[docs] +def main(): + import getopt + + # default parameters + try: + opts, args = getopt.getopt(sys.argv[1:], "hV", ["help", "version"]) + except getopt.GetoptError as errmsg: + print(errmsg, file=sys.stderr) + sys.exit(2) + # process options + for o, a in opts: + if o in ("-h", "--help"): + usage() + sys.exit() + elif o in ("-V", "--version"): + version() + sys.exit() + if len(args) < 1: + usage("brief") + sys.exit() + # process arguments + from diffpy.structure.parsers import input_formats, output_formats + + try: + infmt, outfmt = args[0].split("..", 1) + if infmt not in input_formats(): + print("'%s' is not valid input format" % infmt, file=sys.stderr) + sys.exit(2) + if outfmt not in output_formats(): + print("'%s' is not valid output format" % outfmt, file=sys.stderr) + sys.exit(2) + except ValueError: + print( + "invalid format specification '%s' does not contain .." % args[0], + file=sys.stderr, + ) + sys.exit(2) + # ready to do some real work + try: + strufile = args[1] + stru = Structure() + if args[1] == "-": + stru.read_structure(sys.stdin.read(), infmt) + else: + stru.read(strufile, infmt) + sys.stdout.write(stru.write_structure(outfmt)) + except IndexError: + print("strufile not specified", file=sys.stderr) + sys.exit(2) + except IOError as e: + print("%s: %s" % (strufile, e.strerror), file=sys.stderr) + sys.exit(1) + except StructureFormatError as e: + print("%s: %s" % (strufile, e), file=sys.stderr) + sys.exit(1) + return
+ + + +if __name__ == "__main__": + main() +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/apps/vesta_viewer.html b/_modules/diffpy/structure/apps/vesta_viewer.html new file mode 100644 index 00000000..7d14087d --- /dev/null +++ b/_modules/diffpy/structure/apps/vesta_viewer.html @@ -0,0 +1,502 @@ + + + + + + + + diffpy.structure.apps.vesta_viewer — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.apps.vesta_viewer

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2026 University of California, Santa Barbara.
+#                   All rights reserved.
+#
+# File coded by:    Simon J. L. Billinge, Rundong Hua
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""View structure file in VESTA.
+
+Usage: ``vestaview [options] strufile``
+
+Vestaview understands more `Structure` formats than VESTA. It converts
+`strufile` to a temporary VESTA or CIF file which is opened in VESTA.
+See supported file formats: ``inputFormats``
+
+Options:
+  -f, --formula
+      Override chemical formula in `strufile`. The formula defines
+      elements in the same order as in `strufile`, e.g., ``Na4Cl4``.
+
+  -w, --watch
+      Watch input file for changes.
+
+  --viewer=VIEWER
+      The structure viewer program, by default "vesta".
+      The program will be executed as "VIEWER structurefile".
+
+  --formats=FORMATS
+      Comma-separated list of file formats that are understood
+      by the VIEWER, by default ``"vesta,cif"``. Files of other
+      formats will be converted to the first listed format.
+
+  -h, --help
+      Display this message and exit.
+
+  -V, --version
+      Show script version and exit.
+
+Notes
+-----
+VESTA is the actively maintained successor to AtomEye. Unlike AtomEye,
+VESTA natively reads CIF, its own ``.vesta`` format, and several other
+crystallographic file types, so format conversion is only required for
+formats not in that set.
+
+AtomEye XCFG format is no longer a default target format but the XCFG
+parser (``P_xcfg``) remains available in ``diffpy.structure.parsers``
+for backward compatibility.
+"""
+
+import os
+import re
+import signal
+import sys
+from pathlib import Path
+
+from diffpy.structure.structureerrors import StructureFormatError
+
+pd = {
+    "formula": None,
+    "watch": False,
+    "viewer": "vesta",
+    "formats": ["vesta", "cif"],
+}
+
+
+
+[docs] +def usage(style=None): + """Show usage info. for ``style=="brief"`` show only first 2 lines. + + Parameters + ---------- + style : str, optional + The usage display style. + """ + myname = Path(sys.argv[0]).name + msg = __doc__.replace("vestaview", myname) + if style == "brief": + msg = f"{msg.splitlines()[1]}\n" f"Try `{myname} --help' for more information." + else: + from diffpy.structure.parsers import input_formats + + fmts = [fmt for fmt in input_formats() if fmt != "auto"] + msg = msg.replace("inputFormats", " ".join(fmts)) + print(msg)
+ + + +
+[docs] +def version(): + """Print the script version.""" + from diffpy.structure import __version__ + + print(f"vestaview {__version__}")
+ + + +
+[docs] +def load_structure_file(filename, format="auto"): + """Load structure from the specified file. + + Parameters + ---------- + filename : str or Path + The path to the structure file. + format : str, optional + The file format, by default ``"auto"``. + + Returns + ------- + tuple + The loaded ``(Structure, fileformat)`` pair. + """ + from diffpy.structure import Structure + + stru = Structure() + parser = stru.read(str(filename), format) + return stru, parser.format
+ + + +
+[docs] +def convert_structure_file(pd): + """Convert ``strufile`` to a temporary file understood by the + viewer. + + On the first call, a temporary directory is created and stored in + ``pd``. Subsequent calls in watch mode reuse the directory. + + The VESTA viewer natively reads ``.vesta`` and ``.cif`` files, so if + the source is already in one of the formats listed in + ``pd["formats"]`` and no formula override is requested, the file is + copied unchanged. Otherwise the structure is loaded and re-written in + the first format listed in ``pd["formats"]``. + + Parameters + ---------- + pd : dict + The parameter dictionary containing at minimum ``"strufile"`` + and ``"formats"`` keys. It is modified in place to add + ``"tmpdir"`` and ``"tmpfile"`` on the first call. + """ + if "tmpdir" not in pd: + from tempfile import mkdtemp + + pd["tmpdir"] = Path(mkdtemp()) + strufile = Path(pd["strufile"]) + tmpfile = pd["tmpdir"] / strufile.name + tmpfile_tmp = Path(f"{tmpfile}.tmp") + pd["tmpfile"] = tmpfile + stru = None + fmt = pd.get("fmt", "auto") + if fmt == "auto": + stru, fmt = load_structure_file(strufile) + pd["fmt"] = fmt + if fmt in pd["formats"] and pd["formula"] is None: + import shutil + + shutil.copyfile(strufile, tmpfile_tmp) + tmpfile_tmp.replace(tmpfile) + return + if stru is None: + stru = load_structure_file(strufile, fmt)[0] + if pd["formula"]: + formula = pd["formula"] + if len(formula) != len(stru): + emsg = f"Formula has {len(formula)} atoms while structure has " f"{len(stru)}" + raise RuntimeError(emsg) + for atom, element in zip(stru, formula): + atom.element = element + elif fmt == "rawxyz": + for atom in stru: + if atom.element == "": + atom.element = "C" + stru.write(str(tmpfile_tmp), pd["formats"][0]) + tmpfile_tmp.replace(tmpfile)
+ + + +
+[docs] +def watch_structure_file(pd): + """Watch ``strufile`` for modifications and reconvert when changed. + + Polls the modification timestamps of ``pd["strufile"]`` and + ``pd["tmpfile"]`` once per second. When the source is newer, the + file is reconverted via :func:`convert_structure_file`. + + Parameters + ---------- + pd : dict + The parameter dictionary as used by + :func:`convert_structure_file`. + """ + from time import sleep + + strufile = Path(pd["strufile"]) + tmpfile = Path(pd["tmpfile"]) + while pd["watch"]: + if tmpfile.stat().st_mtime < strufile.stat().st_mtime: + convert_structure_file(pd) + sleep(1)
+ + + +
+[docs] +def clean_up(pd): + """Remove temporary file and directory created during conversion. + + Parameters + ---------- + pd : dict + The parameter dictionary that may contain ``"tmpfile"`` and + ``"tmpdir"`` entries to be removed. + """ + tmpfile = pd.pop("tmpfile", None) + if tmpfile is not None and Path(tmpfile).exists(): + Path(tmpfile).unlink() + tmpdir = pd.pop("tmpdir", None) + if tmpdir is not None and Path(tmpdir).exists(): + Path(tmpdir).rmdir()
+ + + +
+[docs] +def parse_formula(formula): + """Parse chemical formula and return a list of elements. + + Parameters + ---------- + formula : str + The chemical formula string such as ``"Na4Cl4"`` or ``"H2O"``. + + Returns + ------- + list of str + The ordered list of element symbols with repetition matching the + formula. + + Raises + ------ + RuntimeError + Raised when ``formula`` does not start with an uppercase letter + or contains a non-integer count. + """ + formula = re.sub(r"\s", "", formula) + if not re.match(r"^[A-Z]", formula): + raise RuntimeError(f"InvalidFormula '{formula}'") + + elcnt = re.split(r"([A-Z][a-z]?)", formula)[1:] + ellst = [] + try: + for i in range(0, len(elcnt), 2): + element = elcnt[i] + count = int(elcnt[i + 1]) if elcnt[i + 1] else 1 + ellst.extend([element] * count) + except ValueError: + emsg = f"Invalid formula, {elcnt[i + 1]!r} is not valid count" + raise RuntimeError(emsg) + return ellst
+ + + +
+[docs] +def die(exit_status=0, pd=None): + """Clean up temporary files and exit with ``exit_status``. + + Parameters + ---------- + exit_status : int, optional + The exit code passed to :func:`sys.exit`, by default 0. + pd : dict, optional + The parameter dictionary forwarded to :func:`clean_up`. + """ + clean_up({} if pd is None else pd) + sys.exit(exit_status)
+ + + +
+[docs] +def signal_handler(signum, stackframe): + """Handle OS signals by reverting to the default handler and + exiting. + + On ``SIGCHLD`` the child exit status is harvested via + :func:`os.wait`; on all other signals :func:`die` is called with + exit status 1. + + Parameters + ---------- + signum : int + The signal number. + stackframe : frame + The current stack frame. Unused. + """ + del stackframe + signal.signal(signum, signal.SIG_DFL) + if signum == signal.SIGCHLD: + _, exit_status = os.wait() + exit_status = (exit_status >> 8) + (exit_status & 0x00FF) + die(exit_status, pd) + else: + die(1, pd)
+ + + +
+[docs] +def main(): + """Entry point for the ``vestaview`` command-line tool.""" + import getopt + + pd["watch"] = False + try: + opts, args = getopt.getopt( + sys.argv[1:], + "f:whV", + ["formula=", "watch", "viewer=", "formats=", "help", "version"], + ) + except getopt.GetoptError as errmsg: + print(errmsg, file=sys.stderr) + die(2) + + for option, argument in opts: + if option in ("-f", "--formula"): + try: + pd["formula"] = parse_formula(argument) + except RuntimeError as err: + print(err, file=sys.stderr) + die(2) + elif option in ("-w", "--watch"): + pd["watch"] = True + elif option == "--viewer": + pd["viewer"] = argument + elif option == "--formats": + pd["formats"] = [word.strip() for word in argument.split(",")] + elif option in ("-h", "--help"): + usage() + die() + elif option in ("-V", "--version"): + version() + die() + if len(args) < 1: + usage("brief") + die() + if len(args) > 1: + print("too many structure files", file=sys.stderr) + die(2) + pd["strufile"] = Path(args[0]) + signal.signal(signal.SIGHUP, signal_handler) + signal.signal(signal.SIGQUIT, signal_handler) + signal.signal(signal.SIGSEGV, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + signal.signal(signal.SIGINT, signal_handler) + env = os.environ.copy() + try: + convert_structure_file(pd) + spawnargs = ( + pd["viewer"], + pd["viewer"], + str(pd["tmpfile"]), + env, + ) + if pd["watch"]: + signal.signal(signal.SIGCHLD, signal_handler) + os.spawnlpe(os.P_NOWAIT, *spawnargs) + watch_structure_file(pd) + else: + status = os.spawnlpe(os.P_WAIT, *spawnargs) + die(status, pd) + except IOError as err: + print(f"{args[0]}: {err.strerror}", file=sys.stderr) + die(1, pd) + except StructureFormatError as err: + print(f"{args[0]}: {err}", file=sys.stderr) + die(1, pd)
+ + + +if __name__ == "__main__": + main() +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/atom.html b/_modules/diffpy/structure/atom.html new file mode 100644 index 00000000..a63ee6ac --- /dev/null +++ b/_modules/diffpy/structure/atom.html @@ -0,0 +1,712 @@ + + + + + + + + diffpy.structure.atom — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.atom

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2006 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Provide class Atom for managing properties of an atom in structure
+model."""
+
+import numpy
+
+from diffpy.structure.lattice import cartesian as cartesian_lattice
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+# conversion constants
+_BtoU = 1.0 / (8 * numpy.pi**2)
+_UtoB = 1.0 / _BtoU
+
+# ----------------------------------------------------------------------------
+base = "diffpy.structure.Atom"
+removal_version = "4.0.0"
+msdLat_deprecation_msg = build_deprecation_message(
+    base,
+    "msdLat",
+    "msd_latt",
+    removal_version,
+)
+msdCart_deprecation_msg = build_deprecation_message(
+    base,
+    "msdCart",
+    "msd_cart",
+    removal_version,
+)
+
+
+
+[docs] +class Atom(object): + """Storage of structure information relevant for a single atom. + + This class manages atom information such as element symbol, position + in fractional and Cartesian coordinates, atomic displacement parameters + and so forth. + + Parameters + ---------- + atype : str or Atom, Optional + The string atom type to be set as the `element` attribute. + By default an empty string. When of the `Atom` type, create + a copy of `atype` and adjust it per other arguments. + xyz : numpy.ndarray, Optional + Fractional coordinates within the associated `lattice`. + By default ``[0, 0, 0]``. + label : str, Optional + A unique string `label` for referring to this `Atom`. + By default an empty string. + occupancy : float, Optional + The initial `occupancy` of this atom, by default ``1``. + anisotropy : bool, Optional + The flag for anisotropic thermal displacements parameters. + This overrides `anisotropy` implied by presence of the + *U* or *Uisoequiv* arguments. Defaults to ``False`` + when not set in any other way. + U : numpy.ndarray, Optional + The 3x3 matrix of anisotropic thermal displacement parameters. + When present `anisotropy` defaults to ``True``. + Uisoequiv: float, Optional + The isotropic atomic displacement parameter. The `anisotropy` + defaults to ``False`` when present. Only one of the *U* and + *Uisoequiv* arguments may be provided at the same time. Assume + zero atomic displacements when *U* and *Uisoequiv* are unset. + lattice : Lattice, Optional + Coordinate system for the fractional coordinates `xyz`. + Use the absolute Cartesian system when ``None``. + + Attributes + ---------- + element : str + The string type of the atom. An element or ion symbol. + xyz : numpy.ndarray + The fractional coordinates in the associated `lattice`. + label : str + A unique string label referring to this atom, for example, "C_1". + The *label* can be used to reference this atom when contained in + a `Structure` object. + occupancy : float + The fractional occupancy of this atom. + lattice : Lattice + Coordinate system for the fractional coordinates `xyz` and + the tensor of atomic displacement parameters `U`. + Use the absolute Cartesian coordinates when ``None``. + + Note + ---- + Cannot use both U and Uisoequiv arguments at the same time. + """ + + # Private attributes + # + # _U : 3-by-3 ndarray + # Internal storage of the displacement parameters. + + # instance attributes that have immutable default values + element = "" + """str: Default values of `element`.""" + + label = "" + """str: Default values of `label`.""" + + occupancy = 1.0 + """float: Default values of `occupancy`.""" + + _anisotropy = False + lattice = None + """None: Default values of `lattice`.""" + + def __init__( + self, + atype=None, + xyz=None, + label=None, + occupancy=None, + anisotropy=None, + U=None, + Uisoequiv=None, + lattice=None, + ): + # check arguments + if U is not None and Uisoequiv is not None: + emsg = "Cannot use both U and Uisoequiv arguments." + raise ValueError(emsg) + # declare data members + self.xyz = numpy.zeros(3, dtype=float) + self._U = numpy.zeros((3, 3), dtype=float) + # assign them as needed + if isinstance(atype, Atom): + atype.__copy__(target=self) + elif atype is not None: + self.element = atype + # take care of remaining arguments + if xyz is not None: + self.xyz[:] = xyz + if label is not None: + self.label = label + if occupancy is not None: + self.occupancy = float(occupancy) + if U is not None: + self.anisotropy = True + self._U[:] = U + if Uisoequiv is not None: + self.anisotropy = False + self.Uisoequiv = Uisoequiv + # lattice needs to be set before anisotropy + if lattice is not None: + self.lattice = lattice + # process anisotropy after U, Uisoequiv and lattice. + if anisotropy is not None: + self.anisotropy = bool(anisotropy) + return + + @deprecated(msdLat_deprecation_msg) + def msdLat(self, vl): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Atom.msd_latt instead. + """ + return self.msd_latt(vl) + +
+[docs] + def msd_latt(self, vl): + """Calculate mean square displacement along the lattice vector. + + Parameters + ---------- + vl : array_like + The vector in lattice coordinates. + + Returns + ------- + float + The mean square displacement along *vl*. + """ + if not self.anisotropy: + return self.Uisoequiv + # here we need to calculate msd + lat = self.lattice or cartesian_lattice + vln = numpy.array(vl, dtype=float) / lat.norm(vl) + G = lat.metrics + rhs = numpy.array([G[0] * lat.ar, G[1] * lat.br, G[2] * lat.cr], dtype=float) + rhs = numpy.dot(rhs, vln) + msd = numpy.dot(rhs, numpy.dot(self.U, rhs)) + return msd
+ + + @deprecated(msdLat_deprecation_msg) + def msdCart(self, vc): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Atom.msd_cart instead. + """ + return self.msd_cart(vc) + +
+[docs] + def msd_cart(self, vc): + """Calculate mean square displacement along the Cartesian + vector. + + Parameters + ---------- + vc : array_like + Vector in Cartesian coordinates. + + Returns + ------- + float + The mean square displacement along *vc*. + """ + if not self.anisotropy: + return self.Uisoequiv + # here we need to calculate msd + lat = self.lattice or cartesian_lattice + vcn = numpy.array(vc, dtype=float) + vcn /= numpy.sqrt(numpy.sum(vcn**2)) + F1 = lat.normbase + Uc = numpy.dot(numpy.transpose(F1), numpy.dot(self._U, F1)) + msd = numpy.dot(vcn, numpy.dot(Uc, vcn)) + return msd
+ + + def __repr__(self): + """String representation of this Atom.""" + xyz = self.xyz + s = "%-4s %8.6f %8.6f %8.6f %6.4f" % ( + self.element, + xyz[0], + xyz[1], + xyz[2], + self.occupancy, + ) + return s + + def __copy__(self, target=None): + """Create a copy of this instance. + + Parameters + ---------- + target : Atom, Optional + An already existing `Atom` object to be updated to a duplicate + of this `Atom`. Create a new Atom object when not specified. + This facilitates extension of the `__copy__` method + in a derived class. + + Returns + ------- + Atom + The copy of this object. + """ + if target is None: + target = Atom() + elif target is self: + return target + target.__dict__.update(self.__dict__) + target.xyz = numpy.copy(self.xyz) + target._U = numpy.copy(self._U) + return target + + # property handlers ------------------------------------------------------ + + x = property( + lambda self: self.xyz[0], + lambda self, val: self.xyz.__setitem__(0, val), + doc="float : fractional coordinate *x*, same as ``xyz[0]``.", + ) + y = property( + lambda self: self.xyz[1], + lambda self, val: self.xyz.__setitem__(1, val), + doc="float : fractional coordinate *y*, same as ``xyz[1]``.", + ) + z = property( + lambda self: self.xyz[2], + lambda self, val: self.xyz.__setitem__(2, val), + doc="float : fractional coordinate *z*, same as ``xyz[2]``.", + ) + + # xyz_cartn + + @property + def xyz_cartn(self): + """numpy.ndarray: Atom position in absolute Cartesian + coordinates. + + This is computed from fractional coordinates `xyz` and the + current `lattice` setup. Assignment to *xyz_cartn* or + its components is applied on fractional coordinates `xyz`. + """ + if not self.lattice: + rv = self.xyz + else: + rv = _AtomCartesianCoordinates(self) + return rv + + @xyz_cartn.setter + def xyz_cartn(self, value): + if not self.lattice: + self.xyz[:] = value + else: + self.xyz[:] = self.lattice.fractional(value) + return + + # anisotropy + + @property + def anisotropy(self): + """bool : Flag for allowing anisotropic displacement parameters. + + When ``False`` the tensor of thermal displacement parameters `U` + must be isotropic and only its diagonal elements are taken into + account. + """ + return self._anisotropy + + @anisotropy.setter + def anisotropy(self, value): + if bool(value) is self._anisotropy: + return + # convert from isotropic to anisotropic + if value: + self._U = self.U + # otherwise convert from anisotropic to isotropic + else: + self._U[0, 0] = self.Uisoequiv + self._anisotropy = bool(value) + return + + # U + + @property + def U(self): + """numpy.ndarray : The 3x3 matrix of anisotropic atomic + displacements. + + For isotropic displacements (when `anisotropy` is ``False``) + assignment to *U* uses only the first ``Unew[0, 0]`` element + and the remaining components of *U* are adjusted to obtain + isotropic tensor in the active `lattice`. + + Note + ---- + Elements of the *U* tensor such as ``U[0, 1]`` should be + considered read-only as setting them directly leads to + undefined behavior. Use the `U11`, `U22`, ..., or `B11`, + `B22`, ..., descriptors to set only some *U* components. + """ + if not self.anisotropy: + # for isotropic displacements assume first element + # to be equal to the displacement value + lat = self.lattice or cartesian_lattice + numpy.multiply(self._U[0, 0], lat.isotropicunit, out=self._U) + return self._U + + @U.setter + def U(self, value): + self._U[:] = value + return + + # Uij elements + + def _get_uij(self, i, j): + """The getter function for the `U11`, `U22`, ..., properties.""" + if self.anisotropy: + return self._U[i, j] + lat = self.lattice or cartesian_lattice + return self._U[0, 0] * lat.isotropicunit[i, j] + + def _set_uij(self, i, j, value): + """The setter function for the `U11`, `U22`, ..., properties.""" + self._U[i, j] = value + self._U[j, i] = value + if not self._anisotropy and i == j != 0: + self._U[0, 0] = value + return + + # _doc_uii, _doc_uij are temporary local variables. + + _doc_uii = """ + float : The ``U[{0}, {0}]`` component of the displacement tensor `U`. + + When `anisotropy` is ``False`` setting a new value updates entire + tensor *U*. + """ + + U11 = property( + lambda self: self._get_uij(0, 0), + lambda self, value: self._set_uij(0, 0, value), + doc=_doc_uii.format(0), + ) + U22 = property( + lambda self: self._get_uij(1, 1), + lambda self, value: self._set_uij(1, 1, value), + doc=_doc_uii.format(1), + ) + U33 = property( + lambda self: self._get_uij(2, 2), + lambda self, value: self._set_uij(2, 2, value), + doc=_doc_uii.format(2), + ) + + _doc_uij = """ + float : The ``U[{0}, {1}]`` element of the displacement tensor `U`. + + Sets ``U[{1}, {0}]`` together with ``U[{0}, {1}]``. Assignment + has no effect when `anisotropy` is ``False``. + """ + + U12 = property( + lambda self: self._get_uij(0, 1), + lambda self, value: self._set_uij(0, 1, value), + doc=_doc_uij.format(0, 1), + ) + U13 = property( + lambda self: self._get_uij(0, 2), + lambda self, value: self._set_uij(0, 2, value), + doc=_doc_uij.format(0, 2), + ) + U23 = property( + lambda self: self._get_uij(1, 2), + lambda self, value: self._set_uij(1, 2, value), + doc=_doc_uij.format(1, 2), + ) + + # clean local variables + del _doc_uii, _doc_uij + + # Uisoequiv + + @property + def Uisoequiv(self): + """float : The isotropic displacement parameter or an equivalent value. + + Setting a new value rescales tensor `U` so it yields equivalent + direction-averaged displacements. + """ + if not self.anisotropy: + return self._U[0, 0] + if self.lattice is None: + return numpy.trace(self._U) / 3.0 + lat = self.lattice + rv = ( + 1.0 + / 3.0 + * ( + self._U[0, 0] * lat.ar * lat.ar * lat.a * lat.a + + self._U[1, 1] * lat.br * lat.br * lat.b * lat.b + + self._U[2, 2] * lat.cr * lat.cr * lat.c * lat.c + + 2 * self._U[0, 1] * lat.ar * lat.br * lat.a * lat.b * lat.cg + + 2 * self._U[0, 2] * lat.ar * lat.cr * lat.a * lat.c * lat.cb + + 2 * self._U[1, 2] * lat.br * lat.cr * lat.b * lat.c * lat.ca + ) + ) + return rv + + @Uisoequiv.setter + def Uisoequiv(self, value): + if self.anisotropy: + lat = self.lattice or cartesian_lattice + uequiv = self.Uisoequiv + if abs(uequiv) < lat._epsilon: + self._U = value * lat.isotropicunit + else: + self._U *= value / uequiv + else: + self._U[0, 0] = value + return + + # Bij elements + + # _doc_bii, _doc_bij are local variables. + + _doc_bii = """ + float : The ``B{0}{0}`` element of the Debye-Waller matrix. + + This is equivalent to ``8 * pi**2 * U{0}{0}``. When `anisotropy` + is ``False`` setting a new value updates entire tensor `U`. + """ + + _doc_bij = """ + float : The ``B{0}{1}`` element of the Debye-Waller matrix. + + This is equivalent to ``8 * pi**2 * U{0}{1}``. Setting a new + value updates `U` in a symmetric way. Assignment has no effect + when `anisotropy` is ``False``. + """ + + B11 = property( + lambda self: _UtoB * self._get_uij(0, 0), + lambda self, value: self._set_uij(0, 0, _BtoU * value), + doc=_doc_bii.format(1), + ) + B22 = property( + lambda self: _UtoB * self._get_uij(1, 1), + lambda self, value: self._set_uij(1, 1, _BtoU * value), + doc=_doc_bii.format(2), + ) + B33 = property( + lambda self: _UtoB * self._get_uij(2, 2), + lambda self, value: self._set_uij(2, 2, _BtoU * value), + doc=_doc_bii.format(3), + ) + B12 = property( + lambda self: _UtoB * self._get_uij(0, 1), + lambda self, value: self._set_uij(0, 1, _BtoU * value), + doc=_doc_bij.format(1, 2), + ) + B13 = property( + lambda self: _UtoB * self._get_uij(0, 2), + lambda self, value: self._set_uij(0, 2, _BtoU * value), + doc=_doc_bij.format(1, 3), + ) + B23 = property( + lambda self: _UtoB * self._get_uij(1, 2), + lambda self, value: self._set_uij(1, 2, _BtoU * value), + doc=_doc_bij.format(2, 3), + ) + + # clean local variables + del _doc_bii, _doc_bij + + # Bisoequiv + + @property + def Bisoequiv(self): + """float : The Debye-Waller isotropic displacement or an equivalent value. + + This equals ``8 * pi**2 * Uisoequiv``. Setting a new value + rescales `U` tensor to yield equivalent direction-average of + Debye-Waller displacements. + """ + return _UtoB * self.Uisoequiv + + @Bisoequiv.setter + def Bisoequiv(self, value): + self.Uisoequiv = _BtoU * value + return
+ + + +# End of class Atom + +# Local Helpers -------------------------------------------------------------- + + +class _AtomCartesianCoordinates(numpy.ndarray): + """Specialized `numpy.ndarray` for accessing Cartesian coordinates. + + Inplace assignments to this array are applied on the *xyz* position + position of owner `Atom` as per the associated `Atom.lattice`. + + Parameters + ---------- + atom : Atom + `Atom` instance to be linked to these coordinate array. + """ + + def __new__(self, atom): + """Create the underlying numpy array base object.""" + return numpy.empty(3, dtype=float).view(self) + + def __init__(self, atom): + self._atom = atom + self.asarray[:] = atom.lattice.cartesian(atom.xyz) + return + + @property + def asarray(self): + """ndarray : This array viewed as standard numpy array.""" + return self.view(numpy.ndarray) + + def __setitem__(self, idx, value): + """Set some element or slice of this Cartesian coordinates. + + This overrides inplace array assignment to update the + *xyz* fractional coordinate of the linked `Atom`. + """ + self.asarray[idx] = value + self._atom.xyz[:] = self._atom.lattice.fractional(self) + return + + def __array_wrap__(self, out_arr, context=None, return_scalar=None): + """Ensure math operations on this type yield standard numpy + array.""" + return out_arr.view(numpy.ndarray) + + +# End of _AtomCartesianCoordinates +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/expansion/makeellipsoid.html b/_modules/diffpy/structure/expansion/makeellipsoid.html new file mode 100644 index 00000000..93428bca --- /dev/null +++ b/_modules/diffpy/structure/expansion/makeellipsoid.html @@ -0,0 +1,275 @@ + + + + + + + + diffpy.structure.expansion.makeellipsoid — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.expansion.makeellipsoid

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2008 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Chris Farrow
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Make a spheroid nanoparticle from a template structure."""
+
+from math import ceil
+
+from numpy import array
+
+from diffpy.structure import Structure
+from diffpy.structure.expansion.shapeutils import find_center
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure"
+removal_version = "4.0.0"
+makeSphere_deprecation_msg = build_deprecation_message(
+    base,
+    "makeSphere",
+    "make_sphere",
+    removal_version,
+)
+makeEllipsoid_deprecation_msg = build_deprecation_message(
+    base,
+    "makeEllipsoid",
+    "make_ellipsoid",
+    removal_version,
+)
+
+
+@deprecated(makeSphere_deprecation_msg)
+def makeSphere(S, radius):
+    """This function has been deprecated and will be removed in version
+    4.0.0.
+
+    Please use diffpy.structure.make_sphere instead.
+    """
+    return make_sphere(S, radius)
+
+
+
+[docs] +def make_sphere(S, radius): + """Create a spherical nanoparticle. + + Parameters + ---------- + S : Structure + A `Structure` instance. + radius : float + Primary equatorial radius (along x-axis). + + Returns + ------- + Structure + A new `Structure` instance. + """ + return make_ellipsoid(S, radius)
+ + + +@deprecated(makeEllipsoid_deprecation_msg) +def makeEllipsoid(S, a, b=None, c=None): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.make_ellipsoid instead. + """ + return make_ellipsoid(S, a, b, c) + + +
+[docs] +def make_ellipsoid(S, a, b=None, c=None): + """Cut a `Structure` out of another one. + + Parameters + ---------- + S : Structure + A `Structure` instance. + a : float + Primary equatorial radius (along x-axis). + b : float, Optional + Secondary equatorial radius (along y-axis). If `b` is ``None`` + (default), then it is set equal to `a`. + c : float, Optional + Polar radius (along z-axis). If `c` is ``None`` (default), then it is + set equal to `a`. + + Returns + ------- + Structure : + A new `Structure` instance. + """ + if b is None: + b = a + if c is None: + c = a + sabc = array([a, b, c]) + + # Create a supercell large enough for the ellipsoid + frac = S.lattice.fractional(sabc) + # FIXME - this looks fishy for non-orthogonal lattices + mno = max(ceil(2 * xi) for xi in frac) * array([1, 1, 1]) + # Make the supercell + from diffpy.structure.expansion import supercell + + newS = supercell(S, mno) + lat = newS.lattice + + # Find the central atom + ncenter = find_center(newS) + + cxyz = lat.cartesian(newS[ncenter].xyz) + + delList = [] + N = len(newS) + j = N + for i in range(N): + j -= 1 + + # Calculate (x/a)**2 + (y/b)**2 + (z/c)**2 + xyz = lat.cartesian(newS[j].xyz) + darray = ((xyz - cxyz) / sabc) ** 2 + d = sum(darray) ** 0.5 + + # Discard atom if (x/a)**2 + (y/b)**2 + (z/c)**2 > 1 + if d > 1: + delList.append(j) + + for i in delList: + newS.pop(i) + + return newS
+ + + +# ---------------------------------------------------------------------------- + +if __name__ == "__main__": + import os.path + + datadir = "../../tests/testdata" + S = Structure() + S.read(os.path.join(datadir, "CdSe_bulk.stru"), "pdffit") + newS = make_ellipsoid(S, 12) + newS.write("CdSe_d24.stru", "pdffit") + newS = make_ellipsoid(S, 20, 10, 10) + newS.write("CdSe_a20_b10_c10.stru", "pdffit") + newS = make_ellipsoid(S, 20, 15, 10) + newS.write("CdSe_a20_b15_c10.stru", "pdffit") + S = Structure() + S.read(os.path.join(datadir, "Ni.stru"), "pdffit") + newS = make_ellipsoid(S, 10) + newS.write("Ni_d20.stru", "pdffit") + newS = make_ellipsoid(S, 20, 4) + newS.write("Ni_a20_b4_c20.stru", "pdffit") + newS = make_ellipsoid(S, 20, 15, 10) + newS.write("Ni_a20_b15_c10.stru", "pdffit") +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/expansion/shapeutils.html b/_modules/diffpy/structure/expansion/shapeutils.html new file mode 100644 index 00000000..41a8bd30 --- /dev/null +++ b/_modules/diffpy/structure/expansion/shapeutils.html @@ -0,0 +1,172 @@ + + + + + + + + diffpy.structure.expansion.shapeutils — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.expansion.shapeutils

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2008 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Chris Farrow
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure"
+removal_version = "4.0.0"
+findCenter_deprecation_msg = build_deprecation_message(
+    base,
+    "findCenter",
+    "find_center",
+    removal_version,
+)
+"""Utilities for making shapes."""
+
+
+@deprecated(findCenter_deprecation_msg)
+def findCenter(S):
+    """This function has been deprecated and will be removed in version
+    4.0.0.
+
+    Please use diffpy.structure.find_center instead.
+    """
+    return find_center(S)
+
+
+
+[docs] +def find_center(S): + """Find the approximate center `Atom` of a `Structure`. + + The center of the `Structure` is the `Atom` closest to ``(0.5, 0.5, 0.5)``. + + Parameters + ---------- + S : Structure + A `Structure` instance. + + Returns + ------- + int + The index of the center `Atom`. + """ + best = -1 + bestd = len(S) + center = [0.5, 0.5, 0.5] # the canonical center + + for i in range(len(S)): + d = S.lattice.dist(S[i].xyz, center) + if d < bestd: + bestd = d + best = i + + return best
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/expansion/supercell_mod.html b/_modules/diffpy/structure/expansion/supercell_mod.html new file mode 100644 index 00000000..e01c2cd9 --- /dev/null +++ b/_modules/diffpy/structure/expansion/supercell_mod.html @@ -0,0 +1,198 @@ + + + + + + + + diffpy.structure.expansion.supercell_mod — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.expansion.supercell_mod

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2008 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Chris Farrow, Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""This module contains functions for simple `Structure`
+manipulation."""
+
+import numpy
+
+from diffpy.structure import Atom, Structure
+
+
+
+[docs] +def supercell(S, mno): + """Perform supercell expansion for a `Structure`. + + New `lattice` parameters are multiplied and fractional coordinates + divided by corresponding multiplier. New `Atoms` are grouped with + their source in the original cell. + + Parameters + ---------- + S : Structure + An instance of `Structure` from `diffpy.structure`. + mno : array_like + Sequence of 3 integers for cell multipliers along + the `a`, `b` and `c` axes. + + Returns + ------- + Structure + A new `Structure` instance representing the expanded supercell. + + Raises + ------ + TypeError + `S` is not a `Structure` instance. + ValueError + Invalid `mno` argument. + """ + # check arguments + if len(mno) != 3: + emsg = "Argument mno must contain 3 numbers." + raise ValueError(emsg) + elif min(mno) < 1: + emsg = "Multipliers must be greater or equal 1" + raise ValueError(emsg) + if not isinstance(S, Structure): + emsg = "The first argument must be a Structure instance." + raise TypeError(emsg) + + # convert mno to a tuple of integers so it can be used as range limit. + mno = (int(mno[0]), int(mno[1]), int(mno[2])) + + # create return instance + newS = Structure(S) + if mno == (1, 1, 1): + return newS + + # back to business + ijklist = [(i, j, k) for i in range(mno[0]) for j in range(mno[1]) for k in range(mno[2])] + # numpy.floor returns float array + mnofloats = numpy.array(mno, dtype=float) + + # build a list of new atoms + newAtoms = [] + for a in S: + for ijk in ijklist: + adup = Atom(a) + adup.xyz = (a.xyz + ijk) / mnofloats + newAtoms.append(adup) + # newS can own references in newAtoms, no need to make copies + newS.__setitem__(slice(None), newAtoms, copy=False) + + # take care of lattice parameters + newS.lattice.set_latt_parms(a=mno[0] * S.lattice.a, b=mno[1] * S.lattice.b, c=mno[2] * S.lattice.c) + return newS
+ + + +# End of supercell +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/lattice.html b/_modules/diffpy/structure/lattice.html new file mode 100644 index 00000000..9133f079 --- /dev/null +++ b/_modules/diffpy/structure/lattice.html @@ -0,0 +1,950 @@ + + + + + + + + diffpy.structure.lattice — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.lattice

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2008 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Class Lattice stores properties and provides simple operations in
+lattice coordinate system.
+
+Attributes
+----------
+cartesian : Lattice
+    Constant instance of Lattice, default Cartesian system.
+"""
+
+import math
+
+import numpy
+import numpy.linalg as numalg
+
+from diffpy.structure.structureerrors import LatticeError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.Lattice"
+removal_version = "4.0.0"
+setLatPar_deprecation_msg = build_deprecation_message(
+    base,
+    "setLatPar",
+    "set_latt_parms",
+    removal_version,
+)
+setLatBase_deprecation_msg = build_deprecation_message(
+    base,
+    "setLatBase",
+    "set_new_latt_base_vec",
+    removal_version,
+)
+abcABG_deprecation_msg = build_deprecation_message(
+    base,
+    "abcABG",
+    "cell_parms",
+    removal_version,
+)
+
+# Helper Functions -----------------------------------------------------------
+
+# exact values of cosd
+_EXACT_COSD = {
+    0.0: +1.0,
+    60.0: +0.5,
+    90.0: 0.0,
+    120.0: -0.5,
+    180.0: -1.0,
+    240.0: -0.5,
+    270.0: 0.0,
+    300.0: +0.5,
+}
+
+
+
+[docs] +def cosd(x): + """Return the cosine of *x* (measured in degrees). + + Avoid round-off errors for exact cosine values. + + Parameters + ---------- + x : float + The angle in degrees. + + Returns + ------- + float + The cosine of the angle *x*. + """ + rv = _EXACT_COSD.get(x % 360.0) + if rv is None: + rv = math.cos(math.radians(x)) + return rv
+ + + +
+[docs] +def sind(x): + """Return the sine of *x* (measured in degrees). + + Avoid round-off errors for exact sine values. + + Parameters + ---------- + x : float + The angle in degrees. + + Returns + ------- + float + The sine of the angle *x*. + """ + return cosd(90.0 - x)
+ + + +# ---------------------------------------------------------------------------- + + +
+[docs] +class Lattice(object): + """General coordinate system and associated operations. + + Parameters + ---------- + a : float or Lattice, Optional + The cell length *a*. When present, other cell parameters + must be also specified. When of the *Lattice* type, create + a duplicate Lattice. + b : float + The cell length *b*. + c : float + The cell length *c*. + alpha : float + The angle between the *b* and *c* axes in degrees. + beta : float + The angle between the *b* and *c* axes in degrees. + gamma : float + The angle between the *a* and *b* axes in degrees. + baserot : array_like, Optional + The 3x3 rotation matrix of the base vectors with respect + to their standard setting. + base : array_like, Optional + The 3x3 array of row base vectors. This must be the + only argument when present. + + Attributes + ---------- + metrics : numpy.ndarray + The metrics tensor. + base : numpy.ndarray + The 3x3 matrix of row base vectors in Cartesian coordinates, + which may be rotated, i.e., ``base = stdbase @ baserot``. + stdbase : numpy.ndarray + The 3x3 matrix of row base vectors in standard orientation. + baserot : numpy.ndarray + The rotation matrix for the `base`. + recbase : numpy.ndarray + The inverse of the `base` matrix, where the columns give + reciprocal vectors in Cartesian coordinates. + normbase : numpy.ndarray + The `base` vectors scaled by magnitudes of reciprocal cell lengths. + recnormbase : numpy.ndarray + The inverse of the `normbase` matrix. + isotropicunit : numpy.ndarray + The 3x3 tensor for a unit isotropic displacement parameters in this + coordinate system. This is an identity matrix when this Lattice + is orthonormal. + + Note + ---- + The array attributes are read-only. They get updated by changing + some lattice parameters or by calling the `setLatPar()` or + `setLatBase()` methods. + + Examples + -------- + Create a Cartesian coordinate system: + + >>> Lattice() + + Create coordinate system with the cell lengths `a`, `b`, `c` + and cell angles `alpha`, `beta`, `gamma` in degrees: + + >>> Lattice(a, b, c, alpha, beta, gamma) + + Create a duplicate of an existing Lattice `lat`: + + >>> Lattice(lat) + + Create coordinate system with the base vectors given by rows + of the `abc` matrix: + + >>> Lattice(base=abc) + """ + + # round-off tolerance + _epsilon = 1.0e-8 + + # properties ------------------------------------------------------------- + + a = property( + lambda self: self._a, + lambda self, value: self.set_latt_parms(a=value), + doc="The unit cell length *a*.", + ) + + b = property( + lambda self: self._b, + lambda self, value: self.set_latt_parms(b=value), + doc="The unit cell length *b*.", + ) + + c = property( + lambda self: self._c, + lambda self, value: self.set_latt_parms(c=value), + doc="The unit cell length *c*.", + ) + + alpha = property( + lambda self: self._alpha, + lambda self, value: self.set_latt_parms(alpha=value), + doc="The cell angle *alpha* in degrees.", + ) + + beta = property( + lambda self: self._beta, + lambda self, value: self.set_latt_parms(beta=value), + doc="The cell angle *beta* in degrees.", + ) + + gamma = property( + lambda self: self._gamma, + lambda self, value: self.set_latt_parms(gamma=value), + doc="The cell angle *gamma* in degrees.", + ) + + # read-only derived properties + + @property + def unitvolume(self): + """The unit cell volume when `a = b = c = 1`.""" + # Recalculate lattice cosines to ensure this is right + # even if ca, cb, cg data were not yet updated. + ca = cosd(self.alpha) + cb = cosd(self.beta) + cg = cosd(self.gamma) + rv = math.sqrt(1.0 + 2.0 * ca * cb * cg - ca * ca - cb * cb - cg * cg) + return rv + + volume = property( + lambda self: self.a * self.b * self.c * self.unitvolume, + doc="The unit cell volume.", + ) + + ar = property( + lambda self: self._ar, + doc="The cell length *a* of the reciprocal lattice.", + ) + + br = property( + lambda self: self._br, + doc="The cell length *b* of the reciprocal lattice.", + ) + + cr = property( + lambda self: self._cr, + doc="The cell length *c* of the reciprocal lattice.", + ) + + alphar = property( + lambda self: self._alphar, + doc="The reciprocal cell angle *alpha* in degrees.", + ) + + betar = property( + lambda self: self._betar, + doc="The reciprocal cell angle *beta* in degrees", + ) + + gammar = property( + lambda self: self._gammar, + doc="The reciprocal cell angle *gamma* in degrees", + ) + + ca = property(lambda self: self._ca, doc="The cosine of the cell angle *alpha*.") + + cb = property(lambda self: self._cb, doc="The cosine of the cell angle *beta*.") + + cg = property(lambda self: self._cg, doc="The cosine of the cell angle *gamma*.") + + sa = property(lambda self: self._sa, doc="The sine of the cell angle *alpha*.") + + sb = property(lambda self: self._sb, doc="The sine of the cell angle *beta*.") + + sg = property(lambda self: self._sg, doc="The sine of the cell angle *gamma*.") + + car = property( + lambda self: self._car, + doc="The cosine of the reciprocal angle *alpha*.", + ) + + cbr = property( + lambda self: self._cbr, + doc="The cosine of the reciprocal angle *beta*.", + ) + + cgr = property( + lambda self: self._cgr, + doc="The cosine of the reciprocal angle *gamma*.", + ) + + sar = property(lambda self: self._sar, doc="The sine of the reciprocal angle *alpha*.") + + sbr = property(lambda self: self._sbr, doc="The sine of the reciprocal angle *beta*.") + + sgr = property(lambda self: self._sgr, doc="The sine of the reciprocal angle *gamma*.") + + # done with properties --------------------------------------------------- + + def __init__( + self, + a=None, + b=None, + c=None, + alpha=None, + beta=None, + gamma=None, + baserot=None, + base=None, + ): + # build a set of provided argument names for later use. + apairs = ( + ("a", a), + ("b", b), + ("c", c), + ("alpha", alpha), + ("beta", beta), + ("gamma", gamma), + ("baserot", baserot), + ("base", base), + ) + argset = set(n for n, v in apairs if v is not None) + # initialize data members, they values will be set by setLatPar() + self._a = self._b = self._c = None + self._alpha = self._beta = self._gamma = None + self._ca = self._cb = self._cg = None + self._sa = self._sb = self._sg = None + self._ar = self._br = self._cr = None + self._alphar = self._betar = self._gammar = None + self._car = self._cbr = self._cgr = None + self._sar = self._sbr = self._sgr = None + self.baserot = numpy.identity(3) + self.base = self.recbase = None + self.normbase = self.recnormbase = None + # work out argument variants + # Lattice() + if not argset: + self.set_latt_parms(1.0, 1.0, 1.0, 90.0, 90.0, 90.0, baserot) + # Lattice(base=abc) + elif base is not None: + if len(argset) > 1: + raise ValueError("'base' must be the only argument.") + self.set_new_latt_base_vec(base) + # Lattice(lat) + elif isinstance(a, Lattice): + if len(argset) > 1: + raise ValueError("Lattice object must be the only argument.") + self.__dict__.update(a.__dict__) + # otherwise do default Lattice(a, b, c, alpha, beta, gamma) + else: + abcabg = ("a", "b", "c", "alpha", "beta", "gamma") + if not argset.issuperset(abcabg): + raise ValueError("Provide all 6 cell parameters.") + self.set_latt_parms(a, b, c, alpha, beta, gamma, baserot=baserot) + return + +
+[docs] + def set_latt_parms( + self, + a=None, + b=None, + c=None, + alpha=None, + beta=None, + gamma=None, + baserot=None, + ): + """Set one or more lattice parameters. + + This updates all attributes that depend on the lattice parameters. + + Parameters + ---------- + a : float, Optional + The new value of the cell length *a*. + b : float, Optional + The new value of the cell length *b*. + c : float, Optional + The new value of the cell length *c*. + alpha : float, Optional + The new value of the cell angle *alpha* in degrees. + beta : float, Optional + The new value of the cell angle *beta* in degrees. + gamma : float, Optional + The new value of the cell angle *gamma* in degrees. + baserot : array_like, Optional + The new 3x3 rotation matrix of the base vectors with respect + to their standard setting in Cartesian coordinates. + + Note + ---- + Parameters that are not specified will keep their initial + values. + """ + if a is not None: + self._a = float(a) + if b is not None: + self._b = float(b) + if c is not None: + self._c = float(c) + if alpha is not None: + self._alpha = float(alpha) + if beta is not None: + self._beta = float(beta) + if gamma is not None: + self._gamma = float(gamma) + if baserot is not None: + self.baserot = numpy.array(baserot) + self._ca = ca = cosd(self.alpha) + self._cb = cb = cosd(self.beta) + self._cg = cg = cosd(self.gamma) + self._sa = sa = sind(self.alpha) + self._sb = sb = sind(self.beta) + self._sg = sg = sind(self.gamma) + # cache the unit volume value + Vunit = self.unitvolume + # reciprocal lattice + self._ar = ar = sa / (self.a * Vunit) + self._br = br = sb / (self.b * Vunit) + self._cr = cr = sg / (self.c * Vunit) + self._car = car = (cb * cg - ca) / (sb * sg) + self._cbr = cbr = (ca * cg - cb) / (sa * sg) + self._cgr = cgr = (ca * cb - cg) / (sa * sb) + self._sar = math.sqrt(1.0 - car * car) + self._sbr = math.sqrt(1.0 - cbr * cbr) + self._sgr = sgr = math.sqrt(1.0 - cgr * cgr) + self._alphar = math.degrees(math.acos(car)) + self._betar = math.degrees(math.acos(cbr)) + self._gammar = math.degrees(math.acos(cgr)) + # metrics tensor + self.metrics = numpy.array( + [ + [self.a * self.a, self.a * self.b * cg, self.a * self.c * cb], + [self.b * self.a * cg, self.b * self.b, self.b * self.c * ca], + [self.c * self.a * cb, self.c * self.b * ca, self.c * self.c], + ], + dtype=float, + ) + # standard Cartesian coordinates of lattice vectors + self.stdbase = numpy.array( + [ + [1.0 / ar, -cgr / sgr / ar, cb * self.a], + [0.0, self.b * sa, self.b * ca], + [0.0, 0.0, self.c], + ], + dtype=float, + ) + # Cartesian coordinates of lattice vectors + self.base = numpy.dot(self.stdbase, self.baserot) + self.recbase = numalg.inv(self.base) + # bases normalized to unit reciprocal vectors + self.normbase = self.base * [[ar], [br], [cr]] + self.recnormbase = self.recbase / [ar, br, cr] + self.isotropicunit = _isotropicunit(self.recnormbase) + return
+ + + @deprecated(setLatPar_deprecation_msg) + def setLatPar( + self, + a=None, + b=None, + c=None, + alpha=None, + beta=None, + gamma=None, + baserot=None, + ): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Lattice.set_lat_par instead. + """ + return self.set_latt_parms(a, b, c, alpha, beta, gamma, baserot) + + @deprecated(setLatBase_deprecation_msg) + def setLatBase(self, base): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Lattice.set_lat_base instead. + """ + return self.set_new_latt_base_vec(base) + +
+[docs] + def set_new_latt_base_vec(self, base): + """Set new base vectors for this lattice. + + This updates the cell lengths and cell angles according to the + new base. The `stdbase`, `baserot`, and `metrics` attributes + are also updated. + + Parameters + ---------- + base : array_like + The 3x3 matrix of row base vectors expressed + in Cartesian coordinates. + """ + self.base = numpy.array(base) + detbase = numalg.det(self.base) + if abs(detbase) < 1.0e-8: + emsg = "base vectors are degenerate" + raise LatticeError(emsg) + elif detbase < 0.0: + emsg = "base is not right-handed" + raise LatticeError(emsg) + self._a = a = math.sqrt(numpy.dot(self.base[0, :], self.base[0, :])) + self._b = b = math.sqrt(numpy.dot(self.base[1, :], self.base[1, :])) + self._c = c = math.sqrt(numpy.dot(self.base[2, :], self.base[2, :])) + self._ca = ca = numpy.dot(self.base[1, :], self.base[2, :]) / (b * c) + self._cb = cb = numpy.dot(self.base[0, :], self.base[2, :]) / (a * c) + self._cg = cg = numpy.dot(self.base[0, :], self.base[1, :]) / (a * b) + self._sa = sa = math.sqrt(1.0 - ca**2) + self._sb = sb = math.sqrt(1.0 - cb**2) + self._sg = sg = math.sqrt(1.0 - cg**2) + self._alpha = math.degrees(math.acos(ca)) + self._beta = math.degrees(math.acos(cb)) + self._gamma = math.degrees(math.acos(cg)) + # cache the unit volume value + Vunit = self.unitvolume + # reciprocal lattice + self._ar = ar = sa / (self.a * Vunit) + self._br = br = sb / (self.b * Vunit) + self._cr = cr = sg / (self.c * Vunit) + self._car = car = (cb * cg - ca) / (sb * sg) + self._cbr = cbr = (ca * cg - cb) / (sa * sg) + self._cgr = cgr = (ca * cb - cg) / (sa * sb) + self._sar = math.sqrt(1.0 - car**2) + self._sbr = math.sqrt(1.0 - cbr**2) + self._sgr = sgr = math.sqrt(1.0 - cgr**2) + self._alphar = math.degrees(math.acos(car)) + self._betar = math.degrees(math.acos(cbr)) + self._gammar = math.degrees(math.acos(cgr)) + # standard orientation of lattice vectors + self.stdbase = numpy.array( + [ + [1.0 / ar, -cgr / sgr / ar, cb * a], + [0.0, b * sa, b * ca], + [0.0, 0.0, c], + ], + dtype=float, + ) + # calculate unit cell rotation matrix, base = stdbase @ baserot + self.baserot = numpy.dot(numalg.inv(self.stdbase), self.base) + self.recbase = numalg.inv(self.base) + # bases normalized to unit reciprocal vectors + self.normbase = self.base * [[ar], [br], [cr]] + self.recnormbase = self.recbase / [ar, br, cr] + self.isotropicunit = _isotropicunit(self.recnormbase) + # update metrics tensor + self.metrics = numpy.array( + [ + [a * a, a * b * cg, a * c * cb], + [b * a * cg, b * b, b * c * ca], + [c * a * cb, c * b * ca, c * c], + ], + dtype=float, + ) + return
+ + + @deprecated(abcABG_deprecation_msg) + def abcABG(self): + """'diffpy.structure.Lattice.abcABG' is deprecated and will be + removed in version 4.0.0. + + Please use 'diffpy.structure.Lattice.cell_parms' instead. + """ + return self.cell_parms() + +
+[docs] + def cell_parms(self): + """Return the cell parameters in the standard setting. + + Returns + ------- + tuple : + A tuple of ``(a, b, c, alpha, beta, gamma)``. + """ + rv = (self.a, self.b, self.c, self.alpha, self.beta, self.gamma) + return rv
+ + +
+[docs] + def reciprocal(self): + """Return the reciprocal lattice of the current lattice. + + Returns + ------- + Lattice + The reciprocal lattice of the current lattice. + """ + rv = Lattice(base=numpy.transpose(self.recbase)) + return rv
+ + +
+[docs] + def cartesian(self, u): + """Transform lattice vector to Cartesian coordinates. + + Parameters + ---------- + u : array_like + Vector of lattice coordinates or an Nx3 array + of lattice vectors. + + Returns + ------- + rc : numpy.ndarray + Cartesian coordinates of the *u* vector. + """ + rc = numpy.dot(u, self.base) + return rc
+ + +
+[docs] + def fractional(self, rc): + """Transform Cartesian vector to fractional lattice coordinates. + + Parameters + ---------- + rc : array_like + A vector of Cartesian coordinates or an Nx3 array of + Cartesian vectors. + + Returns + ------- + u : numpy.ndarray + Fractional coordinates of the Cartesian vector *rc*. + """ + u = numpy.dot(rc, self.recbase) + return u
+ + +
+[docs] + def dot(self, u, v): + """Calculate dot product of 2 lattice vectors. + + Parameters + ---------- + u : array_like + The first lattice vector or an Nx3 array. + v : array_like + The second lattice vector or an array of + the same shape as *u*. + + Returns + ------- + float or numpy.ndarray + The dot product of lattice vectors *u*, *v*. + """ + dp = (u * numpy.dot(v, self.metrics)).sum(axis=-1) + return dp
+ + +
+[docs] + def norm(self, xyz): + """Calculate norm of a lattice vector. + + Parameters + ---------- + xyz : array_like + A vector or an Nx3 array of fractional coordinates. + + Returns + ------- + float or numpy.ndarray + The magnitude of the lattice vector *xyz*. + """ + # this is a few percent faster than sqrt(dot(u, u)). + return numpy.sqrt((self.cartesian(xyz) ** 2).sum(axis=-1))
+ + +
+[docs] + def rnorm(self, hkl): + """Calculate norm of a reciprocal vector. + + Parameters + ---------- + hkl : array_like + A vector or an Nx3 array of reciprocal coordinates. + + Returns + ------- + float or numpy.ndarray + The magnitude of the reciprocal vector *hkl*. + """ + hklcartn = numpy.dot(hkl, self.recbase.T) + return numpy.sqrt((hklcartn**2).sum(axis=-1))
+ + +
+[docs] + def dist(self, u, v): + """Calculate distance between 2 points in lattice coordinates. + + Parameters + ---------- + u : array_like + A vector or an Nx3 matrix of fractional coordinates. + v : numpy.ndarray + A vector or an Nx3 matrix of fractional coordinates. + + Note + ---- + *u* and *v* must be of the same shape when matrices. + + Returns + ------- + float or numpy.ndarray + The distance between lattice points *u* and *v*. + """ + duv = numpy.asarray(u) - v + return self.norm(duv)
+ + +
+[docs] + def angle(self, u, v): + """Calculate angle between 2 lattice vectors in degrees. + + Parameters + ---------- + u : array_like + The first lattice vector. + v : array_like + The second lattice vector. + + Returns + ------- + float + The angle between lattice vectors *u* and *v* in degrees. + """ + ca = self.dot(u, v) / (self.norm(u) * self.norm(v)) + # avoid round-off errors that would make abs(ca) greater than 1 + if numpy.isscalar(ca): + ca = max(min(ca, 1), -1) + rv = math.degrees(math.acos(ca)) + else: + ca[ca < -1] = -1 + ca[ca > +1] = +1 + rv = numpy.degrees(numpy.arccos(ca)) + return rv
+ + +
+[docs] + def isanisotropic(self, umx): + """True if displacement parameter matrix is anisotropic. + + This checks if the specified matrix of anisotropic displacement + parameters (ADP) differs from isotropic values for this lattice + by more than a small round-off error. + + Parameters + ---------- + umx : array_like + The 3x3 matrix of displacement parameters. + + Returns + ------- + bool + True when *umx* is anisotropic by more than a round-off error. + """ + umx = numpy.asarray(umx) + utr = numpy.trace(umx) / umx.shape[0] + udmax = numpy.fabs(umx - utr * self.isotropicunit).max() + rv = udmax > self._epsilon + return rv
+ + + def __repr__(self): + """String representation of this lattice.""" + I3 = numpy.identity(3, dtype=float) + rotbaseI3diff = max(numpy.reshape(numpy.fabs(self.baserot - I3), 9)) + cartlatpar = numpy.array([1.0, 1.0, 1.0, 90.0, 90.0, 90.0]) + latpardiff = cartlatpar - self.abcABG() + if rotbaseI3diff > self._epsilon: + s = "Lattice(base=%r)" % self.base + elif numpy.fabs(latpardiff).max() < self._epsilon: + s = "Lattice()" + else: + s = "Lattice(a=%g, b=%g, c=%g, alpha=%g, beta=%g, gamma=%g)" % self.abcABG() + return s
+ + + +# End of class Lattice + +# Local Helpers -------------------------------------------------------------- + + +def _isotropicunit(recnormbase): + """Calculate tensor of unit isotropic displacement parameters. + + Parameters + ---------- + recnormbase : numpy.ndarray + The inverse of normalized base vectors of some lattice. + + Returns + ------- + numpy.ndarray + The 3x3 matrix of displacement parameters corresponding to + a unit isotropic displacements. + """ + isounit = numpy.dot(recnormbase.T, recnormbase) + # ensure there are no round-off deviations on the diagonal + isounit[0, 0] = 1 + isounit[1, 1] = 1 + isounit[2, 2] = 1 + return isounit + + +# Module Constants ----------------------------------------------------------- + +cartesian = Lattice() +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers.html b/_modules/diffpy/structure/parsers.html new file mode 100644 index 00000000..a6851a90 --- /dev/null +++ b/_modules/diffpy/structure/parsers.html @@ -0,0 +1,249 @@ + + + + + + + + diffpy.structure.parsers — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Conversion plugins for various structure formats.
+
+The recognized structure formats are defined by subclassing `StructureParser`,
+by convention these classes are named `P_<format>.py`. The parser classes should
+to override the `parseLines()` and `toLines()` methods of `StructureParser`.
+Any structure parser needs to be registered in `parser_index` module.
+
+For normal usage it should be sufficient to use the routines provided
+in this module.
+
+Content:
+    * StructureParser: base class for a concrete Parser
+    * parser_index: dictionary of known structure formats
+    * getParser: factory for Parser at given format
+    * inputFormats: list of available input formats
+    * outputFormats: list of available output formats
+"""
+
+from diffpy.structure.parsers.parser_index_mod import parser_index
+from diffpy.structure.parsers.structureparser import StructureParser
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+# silence pyflakes checker
+assert StructureParser
+
+parsers_base = "diffpy.structure"
+removal_version = "4.0.0"
+getParser_deprecation_msg = build_deprecation_message(
+    parsers_base,
+    "getParser",
+    "get_parser",
+    removal_version,
+)
+inputFormats_deprecation_msg = build_deprecation_message(
+    parsers_base,
+    "inputFormats",
+    "input_formats",
+    removal_version,
+)
+outputFormats_deprecation_msg = build_deprecation_message(
+    parsers_base,
+    "outputFormats",
+    "output_formats",
+    removal_version,
+)
+
+
+@deprecated(getParser_deprecation_msg)
+def getParser(format, **kw):
+    """This function has been deprecated and will be removed in version
+    4.0.0.
+
+    Please use diffpy.structure.get_parser instead.
+    """
+    return get_parser(format, **kw)
+
+
+
+[docs] +def get_parser(format, **kw): + """Return Parser instance for a given structure format. + + Parameters + ---------- + format : str + String with the format name, see `parser_index_mod`. + **kw : dict + Keyword arguments passed to the Parser init function. + + Returns + ------- + Parser + Parser instance for the given format. + + Raises + ------ + StructureFormatError + When the format is not defined. + """ + if format not in parser_index: + emsg = "no parser for '%s' format" % format + raise StructureFormatError(emsg) + pmod = parser_index[format]["module"] + ns = {} + import_cmd = "from diffpy.structure.parsers import %s as pm" % pmod + exec(import_cmd, ns) + return ns["pm"].get_parser(**kw)
+ + + +@deprecated(inputFormats_deprecation_msg) +def inputFormats(): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.input_formats instead. + """ + return input_formats() + + +
+[docs] +def input_formats(): + """Return list of implemented input structure formats.""" + input_formats = [fmt for fmt, prop in parser_index.items() if prop["has_input"]] + input_formats.sort() + return input_formats
+ + + +@deprecated(outputFormats_deprecation_msg) +def outputFormats(): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.output_formats instead. + """ + return output_formats() + + +
+[docs] +def output_formats(): + """Return list of implemented output structure formats.""" + output_formats = [fmt for fmt, prop in parser_index.items() if prop["has_output"]] + output_formats.sort() + return output_formats
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_auto.html b/_modules/diffpy/structure/parsers/p_auto.html new file mode 100644 index 00000000..1cd1bc63 --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_auto.html @@ -0,0 +1,398 @@ + + + + + + + + diffpy.structure.parsers.p_auto — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_auto

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Parser for automatic file format detection.
+
+This Parser does not provide the the `toLines()` method.
+"""
+
+import os
+from typing import Any
+
+from diffpy.structure.parsers import StructureParser, parser_index
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.P_auto"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+parseFile_deprecation_msg = build_deprecation_message(
+    base,
+    "parseFile",
+    "parse_file",
+    removal_version,
+)
+
+
+
+[docs] +class P_auto(StructureParser): + """Parser with automatic detection of structure format. + + This parser attempts to automatically detect the format of a given + structure file and parse it accordingly. When successful, it sets + its `format` attribute to the detected structure format. + + Parameters + ---------- + **kw : dict + Keyword arguments for the structure parser. + + Attributes + ---------- + format : str + Detected structure format. Initially set to "auto" and updated + after successful detection of the structure format. + pkw : dict + Keyword arguments passed to the parser. + """ + + def __init__(self, **kw): + StructureParser.__init__(self) + self.format = "auto" + self.pkw = kw + return + + # parseLines helpers + def _get_ordered_formats(self): + """Build a list of relevance ordered structure formats. + + This only works when `self.filename` has a known extension. + """ + from diffpy.structure.parsers import input_formats + + ofmts = [fmt for fmt in input_formats() if fmt != "auto"] + if not self.filename: + return ofmts + # filename is defined here + filebase = os.path.basename(self.filename) + from fnmatch import fnmatch + + # loop over copy of ofmts + for fmt in list(ofmts): + pattern = parser_index[fmt]["file_pattern"] + if pattern in ("*.*", "*"): + continue + anymatch = [1 for p in pattern.split("|") if fnmatch(filebase, p)] + if anymatch: + ofmts.remove(fmt) + ofmts.insert(0, fmt) + return ofmts + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_auto.parse_lines instead. + """ + return self.parse_lines(lines) + +
+[docs] + def parse_lines(self, lines): + """Detect format and create `Structure` instance from a list of + lines. + + Set format attribute to the detected file format. + + Parameters + ---------- + lines : list + List of lines with structure data. + + Returns + ------- + Structure + `Structure` object. + + Raises + ------ + StructureFormatError + """ + return self._wrap_parse_method("parse_lines", lines)
+ + +
+[docs] + def parse(self, s): + """Detect format and create `Structure` instance from a string. + + Set format attribute to the detected file format. + + Parameters + ---------- + s : str + String with structure data. + + Returns + ------- + Structure + `Structure` object. + + Raises + ------ + StructureFormatError + """ + return self._wrap_parse_method("parse", s)
+ + + @deprecated(parseFile_deprecation_msg) + def parseFile(self, filename): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_auto.parse_file instead. + """ + return self.parse_file(filename) + +
+[docs] + def parse_file(self, filename): + """Detect format and create Structure instance from an existing + file. + + Set format attribute to the detected file format. + + Parameters + ---------- + filename : str + Path to structure file. + + Returns + ------- + Structure + `Structure` object. + + Raises + ------ + StructureFormatError + If the structure format is unknown or invalid. + IOError + If the file cannot be read. + """ + self.filename = filename + return self._wrap_parse_method("parse_file", filename)
+ + + def _wrap_parse_method(self, method: object, *args: object, **kwargs: object) -> Any: + """A helper evaluator method that try the specified parse method + with each registered structure parser and return the first + successful result. + + Structure parsers that match structure file extension are + tried first. + + Parameters + ---------- + method : str + Name of the parse method to call. + *args : tuple + Positional arguments for the parse method. + **kwargs : dict + Keyword arguments for the parse method. + + Returns + ------- + Structure + `Structure` object. + + Raises + ------ + StructureFormatError + """ + from diffpy.structure.parsers import get_parser + + ofmts = self._get_ordered_formats() + stru = None + # try all parsers in sequence + parsers_emsgs = [] + for fmt in ofmts: + p = get_parser(fmt, **self.pkw) + try: + pmethod = getattr(p, method) + stru = pmethod(*args, **kwargs) + self.format = fmt + break + except StructureFormatError as err: + parsers_emsgs.append("%s: %s" % (fmt, err)) + except NotImplementedError: + pass + if stru is None: + emsg = "\n".join( + [ + "Unknown or invalid structure format.", + "Errors per each tested structure format:", + ] + + parsers_emsgs + ) + raise StructureFormatError(emsg) + self.__dict__.update(p.__dict__) + return stru
+ + + +# End of class P_auto + +# Routines ------------------------------------------------------------------- + +parsers_base = "diffpy.structure" +removal_version = "4.0.0" +getParser_deprecation_msg = build_deprecation_message( + parsers_base, + "getParser", + "get_parser", + removal_version, +) + + +@deprecated(getParser_deprecation_msg) +def getParser(**kw): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.P_auto.get_parser instead. + """ + return get_parser(**kw) + + +
+[docs] +def get_parser(**kw): + """Return a new instance of the automatic parser. + + Parameters + ---------- + **kw : dict + Keyword arguments for the structure parser + + Returns + ------- + P_auto + Instance of `P_auto`. + """ + return P_auto(**kw)
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_cif.html b/_modules/diffpy/structure/parsers/p_cif.html new file mode 100644 index 00000000..bea71d15 --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_cif.html @@ -0,0 +1,1103 @@ + + + + + + + + diffpy.structure.parsers.p_cif — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_cif

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Parser for basic CIF file format.
+
+Attributes
+----------
+rx_float : re.Pattern
+    Constant regular expression for `leading_float()`.
+symvec : dict
+    Helper dictionary for `getSymOp()`.
+
+Note
+----
+References: https://www.iucr.org/resources/cif
+"""
+
+import io
+import re
+import sys
+from contextlib import contextmanager
+
+import numpy
+from CifFile.yapps3_compiled_rt import YappsSyntaxError
+
+from diffpy.structure import Atom, Lattice, Structure
+from diffpy.structure.parsers import StructureParser
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+# ----------------------------------------------------------------------------
+
+
+base = "diffpy.structure.P_cif"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+parseFile_deprecation_msg = build_deprecation_message(
+    base,
+    "parseFile",
+    "parse_file",
+    removal_version,
+)
+toLines_deprecation_msg = build_deprecation_message(
+    base,
+    "toLines",
+    "to_lines",
+    removal_version,
+)
+
+
+
+[docs] +class P_cif(StructureParser): + """Simple parser for CIF structure format. + + Reads Structure from the first block containing _atom_site_label key. + Following blocks, if any, are ignored. + + Parameters + ---------- + eps : float, Optional + Fractional coordinates cutoff for duplicate positions. + When ``None`` use the default for `ExpandAsymmetricUnit`: ``1.0e-5``. + + Attributes + ---------- + format : str + Structure format name. + ciffile : CifFile + Instance of `CifFile` from `PyCifRW`. + stru : Structure + `Structure` instance used for CIF input or output. + spacegroup : SpaceGroup + Instance of `SpaceGroup` used for symmetry expansion. + eps : float + Resolution in fractional coordinates for non-equal positions. + Used for expansion of asymmetric unit. + eau : ExpandAsymmetricUnit + Instance of `ExpandAsymmetricUnit` from `SymmetryUtilities`. + asymmetric_unit : list + List of `Atom` instances for the original asymmetric unit in the CIF file. + labelindex : dict + Dictionary mapping unique atom label to index of `Atom` in `self.asymmetric_unit`. + anisotropy : dict + Dictionary mapping unique atom label to displacement anisotropy resolved at that site. + cif_sgname : str or None + Space group name obtained by looking up the value of + `_space_group_name_Hall`, + `_symmetry_space_group_name_Hall`, + `_space_group_name_H-M_alt`, + `_symmetry_space_group_name_H-M` + items. ``None`` when neither is defined. + """ + + # static data and methods ------------------------------------------------ + + # dictionary set of class methods for translating CIF values + # to Atom attributes + + # static data and methods ------------------------------------------------ + + # dictionary set of class methods for translating CIF values + # to Atom attributes + + _atom_setters = dict.fromkeys( + ( + "_tr_ignore", + "_tr_atom_site_label", + "_tr_atom_site_type_symbol", + "_tr_atom_site_fract_x", + "_tr_atom_site_fract_y", + "_tr_atom_site_fract_z", + "_tr_atom_site_cartn_x", + "_tr_atom_site_cartn_y", + "_tr_atom_site_cartn_z", + "_tr_atom_site_u_iso_or_equiv", + "_tr_atom_site_b_iso_or_equiv", + "_tr_atom_site_adp_type", + "_tr_atom_site_thermal_displace_type", + "_tr_atom_site_occupancy", + "_tr_atom_site_aniso_u_11", + "_tr_atom_site_aniso_u_22", + "_tr_atom_site_aniso_u_33", + "_tr_atom_site_aniso_u_12", + "_tr_atom_site_aniso_u_13", + "_tr_atom_site_aniso_u_23", + "_tr_atom_site_aniso_b_11", + "_tr_atom_site_aniso_b_22", + "_tr_atom_site_aniso_b_33", + "_tr_atom_site_aniso_b_12", + "_tr_atom_site_aniso_b_13", + "_tr_atom_site_aniso_b_23", + ) + ) + # make _atom_setters case insensitive + for k in list(_atom_setters.keys()): + _atom_setters[k] = _atom_setters[k.lower()] = k + del k + + BtoU = 1.0 / (8 * numpy.pi**2) + """float: Conversion factor from B values to U values.""" + + def _tr_ignore(a, value): + return + + _tr_ignore = staticmethod(_tr_ignore) + + def _tr_atom_site_label(a, value): + a.label = str(value) + # set element when not specified by _atom_site_type_symbol + if not a.element: + P_cif._tr_atom_site_type_symbol(a, value) + + _tr_atom_site_label = staticmethod(_tr_atom_site_label) + + # 3 regexp groups for nucleon number, atom symbol, and oxidation state + _psymb = re.compile(r"(\d+-)?([a-zA-Z]+)(\d[+-])?") + + def _tr_atom_site_type_symbol(a, value): + rx = P_cif._psymb.match(value) + smbl = rx and rx.group(0) or value + smbl = str(smbl) + a.element = smbl[:1].upper() + smbl[1:].lower() + + _tr_atom_site_type_symbol = staticmethod(_tr_atom_site_type_symbol) + + def _tr_atom_site_fract_x(a, value): + a.xyz[0] = leading_float(value) + + _tr_atom_site_fract_x = staticmethod(_tr_atom_site_fract_x) + + def _tr_atom_site_fract_y(a, value): + a.xyz[1] = leading_float(value) + + _tr_atom_site_fract_y = staticmethod(_tr_atom_site_fract_y) + + def _tr_atom_site_fract_z(a, value): + a.xyz[2] = leading_float(value) + + _tr_atom_site_fract_z = staticmethod(_tr_atom_site_fract_z) + + def _tr_atom_site_cartn_x(a, value): + a.xyz_cartn[0] = leading_float(value) + + _tr_atom_site_cartn_x = staticmethod(_tr_atom_site_cartn_x) + + def _tr_atom_site_cartn_y(a, value): + a.xyz_cartn[1] = leading_float(value) + + _tr_atom_site_cartn_y = staticmethod(_tr_atom_site_cartn_y) + + def _tr_atom_site_cartn_z(a, value): + a.xyz_cartn[2] = leading_float(value) + + _tr_atom_site_cartn_z = staticmethod(_tr_atom_site_cartn_z) + + def _tr_atom_site_u_iso_or_equiv(a, value): + a.Uisoequiv = leading_float(value) + + _tr_atom_site_u_iso_or_equiv = staticmethod(_tr_atom_site_u_iso_or_equiv) + + def _tr_atom_site_b_iso_or_equiv(a, value): + a.Uisoequiv = P_cif.BtoU * leading_float(value) + + _tr_atom_site_b_iso_or_equiv = staticmethod(_tr_atom_site_b_iso_or_equiv) + + def _tr_atom_site_adp_type(a, value): + a.anisotropy = value not in ("Uiso", "Biso") + + _tr_atom_site_adp_type = staticmethod(_tr_atom_site_adp_type) + _tr_atom_site_thermal_displace_type = _tr_atom_site_adp_type + + def _tr_atom_site_occupancy(a, value): + a.occupancy = leading_float(value, 1.0) + + _tr_atom_site_occupancy = staticmethod(_tr_atom_site_occupancy) + + def _tr_atom_site_aniso_u_11(a, value): + a.U11 = leading_float(value) + + _tr_atom_site_aniso_u_11 = staticmethod(_tr_atom_site_aniso_u_11) + + def _tr_atom_site_aniso_u_22(a, value): + a.U22 = leading_float(value) + + _tr_atom_site_aniso_u_22 = staticmethod(_tr_atom_site_aniso_u_22) + + def _tr_atom_site_aniso_u_33(a, value): + a.U33 = leading_float(value) + + _tr_atom_site_aniso_u_33 = staticmethod(_tr_atom_site_aniso_u_33) + + def _tr_atom_site_aniso_u_12(a, value): + a.U12 = leading_float(value) + + _tr_atom_site_aniso_u_12 = staticmethod(_tr_atom_site_aniso_u_12) + + def _tr_atom_site_aniso_u_13(a, value): + a.U13 = leading_float(value) + + _tr_atom_site_aniso_u_13 = staticmethod(_tr_atom_site_aniso_u_13) + + def _tr_atom_site_aniso_u_23(a, value): + a.U23 = leading_float(value) + + _tr_atom_site_aniso_u_23 = staticmethod(_tr_atom_site_aniso_u_23) + + def _tr_atom_site_aniso_b_11(a, value): + a.U11 = P_cif.BtoU * leading_float(value) + + _tr_atom_site_aniso_b_11 = staticmethod(_tr_atom_site_aniso_b_11) + + def _tr_atom_site_aniso_b_22(a, value): + a.U22 = P_cif.BtoU * leading_float(value) + + _tr_atom_site_aniso_b_22 = staticmethod(_tr_atom_site_aniso_b_22) + + def _tr_atom_site_aniso_b_33(a, value): + a.U33 = P_cif.BtoU * leading_float(value) + + _tr_atom_site_aniso_b_33 = staticmethod(_tr_atom_site_aniso_b_33) + + def _tr_atom_site_aniso_b_12(a, value): + a.U12 = P_cif.BtoU * leading_float(value) + + _tr_atom_site_aniso_b_12 = staticmethod(_tr_atom_site_aniso_b_12) + + def _tr_atom_site_aniso_b_13(a, value): + a.U13 = P_cif.BtoU * leading_float(value) + + _tr_atom_site_aniso_b_13 = staticmethod(_tr_atom_site_aniso_b_13) + + def _tr_atom_site_aniso_b_23(a, value): + a.U23 = P_cif.BtoU * leading_float(value) + + _tr_atom_site_aniso_b_23 = staticmethod(_tr_atom_site_aniso_b_23) + + def _get_atom_setters(cifloop): + """Static method for finding translators of CifLoop items to + data in `Atom` instance. + + Parameters + ---------- + cifloop : CifLoop + Instance of `CifLoop`. + + Returns + ------- + list + List of setter functions in the order of `cifloop.keys()`. + """ + rv = [] + for p in cifloop.keys(): + lcname = "_tr" + p.lower() + fncname = P_cif._atom_setters.get(lcname, "_tr_ignore") + f = getattr(P_cif, fncname) + rv.append(f) + return rv + + _get_atom_setters = staticmethod(_get_atom_setters) + + # normal methods --------------------------------------------------------- + + def __init__(self, eps=None): + StructureParser.__init__(self) + self.format = "cif" + self.ciffile = None + self.stru = None + self.spacegroup = None + self.eps = eps + self.eau = None + self.asymmetric_unit = None + self.labelindex = {} + self.anisotropy = {} + self.cif_sgname = None + pass + +
+[docs] + def parse(self, s): + """Create `Structure` instance from a string in CIF format. + + Parameters + ---------- + s : str + A string in CIF format. + + Returns + ------- + Structure + `Structure` instance. + + Raises + ------ + StructureFormatError + When the data do not constitute a valid CIF format. + """ + self.ciffile = None + self.filename = "" + fp = io.StringIO(s) + rv = self._parse_cif_data_source(fp) + return rv
+ + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_cif.parse_lines instead. + """ + return self.parse_lines(lines) + + @deprecated(parseLines_deprecation_msg) + def parse_lines(self, lines): + """Parse list of lines in CIF format. + + Parameters + ---------- + lines : list + List of strings stripped of line terminator. + + Returns + ------- + Structure + `Structure` instance. + + Raises + ------ + StructureFormatError + When the data do not constitute a valid CIF format. + """ + s = "\n".join(lines) + "\n" + return self.parse(s) + + @deprecated(parseFile_deprecation_msg) + def parseFile(self, filename): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_cif.parse_file instead. + """ + return self.parse_file(filename) + +
+[docs] + def parse_file(self, filename): + """Create Structure from an existing CIF file. + + Parameters + ---------- + filename : str + Path to structure file. + + Returns + ------- + Structure + `Structure` instance. + + Raises + ------ + StructureFormatError + When the data do not constitute a valid CIF format. + IOError + When the file cannot be opened. + """ + self.ciffile = None + self.filename = filename + rv = self._parse_cif_data_source(filename) + # all good here + return rv
+ + + def _parse_cif_data_source(self, datasource): + """Open and process CIF data from the specified `datasource`. + + Parameters + ---------- + datasource : str or a file-like object + This is used as an argument to the `CifFile` class. The `CifFile` + instance is stored in `ciffile` attribute of this Parser. + + Returns + ------- + Structure + The `Structure` object loaded from the specified data source. + + Raises + ------ + StructureFormatError + When the data do not constitute a valid CIF format. + """ + from CifFile import CifFile, StarError + + self.stru = None + try: + with _suppress_cif_parser_output(): + # Use `grammar` option to digest values with curly-brackets. + # Ref: https://bitbucket.org/jamesrhester/pycifrw/issues/19 + self.ciffile = CifFile(datasource, grammar="auto") + for blockname in self.ciffile.keys(): + self._parse_cif_block(blockname) + # stop after reading the first structure + if self.stru is not None: + break + except (YappsSyntaxError, StarError, ValueError, IndexError) as err: + exc_type, exc_value, exc_traceback = sys.exc_info() + emsg = str(err).strip() + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + return self.stru + + def _parse_cif_block(self, blockname): + """Translate CIF file block, skip blocks without + `_atom_site_label`. Updates data members `stru`, `eau`. + + Parameters + ---------- + blockname : str + Name of top level block in `self.ciffile`. + """ + block = self.ciffile[blockname] + if "_atom_site_label" not in block: + return + # here block contains structure, initialize output data + self.stru = Structure() + self.labelindex.clear() + self.anisotropy.clear() + # execute specialized block parsers + self._parse_lattice(block) + self._parse_atom_site_label(block) + self._parse_atom_site_aniso_label(block) + self._parse_space_group_symop_operation_xyz(block) + return + + def _parse_lattice(self, block): + """Obtain `lattice` parameters from a `CifBlock`. + + This method updates `self.stru.lattic`e. + + Parameters + ---------- + block : CifBlock + Instance of CifBlock. + """ + if "_cell_length_a" not in block: + return + # obtain lattice parameters + try: + latpars = ( + leading_float(block["_cell_length_a"]), + leading_float(block["_cell_length_b"]), + leading_float(block["_cell_length_c"]), + leading_float(block["_cell_angle_alpha"]), + leading_float(block["_cell_angle_beta"]), + leading_float(block["_cell_angle_gamma"]), + ) + except KeyError as err: + exc_type, exc_value, exc_traceback = sys.exc_info() + emsg = str(err) + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + self.stru.lattice = Lattice(*latpars) + return + + def _parse_atom_site_label(self, block): + """Obtain atoms in asymmetric unit from a `CifBlock`. + + This method inserts `Atom` instances to `self.stru` and + updates `labelindex` dictionary. + + Parameters + ---------- + block : CifBlock + Instance of `CifBlock`. + """ + # process _atom_site_label + atom_site_loop = block.GetLoop("_atom_site_label") + does_adp_type = ( + "_atom_site_adp_type" in atom_site_loop or "_atom_site_thermal_displace_type" in atom_site_loop + ) + # get a list of setters for atom_site values + prop_setters = P_cif._get_atom_setters(atom_site_loop) + # index of the _atom_site_label item for the labelindex dictionary + ilb = atom_site_loop.keys().index("_atom_site_label") + # loop through the values and pass them to the setters + sitedatalist = zip(*atom_site_loop.values()) + for values in sitedatalist: + curlabel = values[ilb] + # skip entries that have invalid label + if curlabel == "?": + continue + self.labelindex[curlabel] = len(self.stru) + self.stru.add_new_atom() + a = self.stru.get_last_atom() + for fset, val in zip(prop_setters, values): + fset(a, val) + if does_adp_type: + self.anisotropy[curlabel] = a.anisotropy + return + + def _parse_atom_site_aniso_label(self, block): + """Obtain value of anisotropic thermal displacements from a + `CifBlock`. + + This method updates `U` members of `Atom` instances in `self.stru`. + The `labelindex` dictionary has to be defined beforehand. + + Parameters + ---------- + block : CifBlock + Instance of `CifBlock`. + """ + if "_atom_site_aniso_label" not in block: + return + # something to do here: + adp_loop = block.GetLoop("_atom_site_aniso_label") + # index of the _atom_site_label column + ilb = adp_loop.keys().index("_atom_site_aniso_label") + # get a list of setters for this loop + prop_setters = P_cif._get_atom_setters(adp_loop) + sitedatalist = zip(*adp_loop.values()) + for values in sitedatalist: + lb = values[ilb] + if lb == "?": + break + idx = self.labelindex[lb] + a = self.stru[idx] + if lb not in self.anisotropy: + a.anisotropy = True + self.anisotropy[lb] = True + for fset, val in zip(prop_setters, values): + fset(a, val) + return + + def _parse_space_group_symop_operation_xyz(self, block): + """Process symmetry operations from a CifBlock. + + The method updates `spacegroup` and `eau` data according to symmetry + operations defined in `_space_group_symop_operation_xyz` or + `_symmetry_equiv_pos_as_xyz` items in `CifBlock`. + + Parameters + ---------- + block : CifBlock + Instance of `CifBlock`. + """ + from diffpy.structure.spacegroups import ( + SpaceGroup, + find_space_group, + get_space_group, + is_space_group_identifier, + ) + + self.asymmetric_unit = list(self.stru) + sym_synonyms = ( + "_space_group_symop_operation_xyz", + "_symmetry_equiv_pos_as_xyz", + ) + sym_loop_name = [n for n in sym_synonyms if n in block] + # recover explicit list of symmetry operations + symop_list = [] + if sym_loop_name: + # sym_loop exists here and we know its cif name + sym_loop_name = sym_loop_name[0] + sym_loop = block.GetLoop(sym_loop_name) + for eqxyz in sym_loop[sym_loop_name]: + opcif = get_symop(eqxyz) + symop_list.append(opcif) + # determine space group number + sg_nameHall = block.get("_space_group_name_Hall", "") or block.get("_symmetry_space_group_name_Hall", "") + sg_nameHM = ( + block.get("_space_group_name_H-M_alt", "") + or block.get("_space_group_name_H-M_ref", "") + or block.get("_symmetry_space_group_name_H-M", "") + ) + self.cif_sgname = sg_nameHall or sg_nameHM or None + sgid = block.get("_space_group_IT_number", "") or block.get("_symmetry_Int_Tables_number", "") or sg_nameHM + self.spacegroup = None + # try to reuse existing space group from symmetry operations + if symop_list: + try: + self.spacegroup = find_space_group(symop_list) + except ValueError: + pass + # otherwise lookup the space group from its identifier + if self.spacegroup is None and sgid and is_space_group_identifier(sgid): + self.spacegroup = get_space_group(sgid) + # define new spacegroup when symmetry operations were listed, but + # there is no match to an existing definition + if symop_list and self.spacegroup is None: + new_short_name = "CIF " + (sg_nameHall or "data") + new_crystal_system = ( + block.get("_space_group_crystal_system") or block.get("_symmetry_cell_setting") or "TRICLINIC" + ).upper() + self.spacegroup = SpaceGroup( + short_name=new_short_name, + crystal_system=new_crystal_system, + symop_list=symop_list, + ) + if self.spacegroup is None: + emsg = "CIF file has unknown space group identifier {!r}." + raise StructureFormatError(emsg.format(sgid)) + self._expand_asymmetric_unit(block) + return + + def _expand_asymmetric_unit(self, block): + """Perform symmetry expansion of `self.stru` using + `self.spacegroup`. + + This method updates data in `stru` and `eau`. + + Parameters + ---------- + block : CifBlock + The top-level block containing crystal structure data. + """ + from diffpy.structure.symmetryutilities import ExpandAsymmetricUnit + + corepos = [a.xyz for a in self.stru] + coreUijs = [a.U for a in self.stru] + self.eau = ExpandAsymmetricUnit(self.spacegroup, corepos, coreUijs, eps=self.eps) + # setup anisotropy according to symmetry requirements + # unless it was already explicitly set + for ca, uisotropy in zip(self.stru, self.eau.Uisotropy): + if ca.label not in self.anisotropy: + ca.anisotropy = not uisotropy + self.anisotropy[ca.label] = ca.anisotropy + # build a nested list of new atoms: + newatoms = [] + for i, ca in enumerate(self.stru): + eca = [] # expanded core atom + for j in range(self.eau.multiplicity[i]): + a = Atom(ca) + a.xyz = self.eau.expandedpos[i][j] + if j > 0: + a.label += "_" + str(j + 1) + if a.anisotropy: + a.U = self.eau.expandedUijs[i][j] + eca.append(a) + newatoms.append(eca) + # insert new atoms where they belong + self.stru[:] = sum(newatoms, []) + return + + # conversion to CIF ------------------------------------------------------ + + @deprecated(toLines_deprecation_msg) + def toLines(self, stru): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_cif.to_lines instead. + """ + return self.to_lines(stru) + +
+[docs] + def to_lines(self, stru): + """Convert `Structure` to a list of lines in basic CIF format. + + Parameters + ---------- + stru : Structure + The structure to be converted. + + Returns + ------- + list + List of lines in basic CIF format. + """ + import time + + lines = [] + # may be replaced with filtered Structure.title + # for now, we can add the title as a comment + if stru.title.strip() != "": + title_lines = stru.title.split("\n") + lines.extend(["# " + line.strip() for line in title_lines]) + lines.append("") + lines.append("data_3D") + iso_date = "%04i-%02i-%02i" % time.gmtime()[:3] + lines.extend( + [ + "%-31s %s" % ("_audit_creation_date", iso_date), + "%-31s %s" % ("_audit_creation_method", "P_cif.py"), + "", + "%-31s %s" % ("_symmetry_space_group_name_H-M", "'P1'"), + "%-31s %s" % ("_symmetry_Int_Tables_number", "1"), + "%-31s %s" % ("_symmetry_cell_setting", "triclinic"), + "", + ] + ) + # there should be no need to specify equivalent positions for P1 + # _symmetry_equiv_posi_as_xyz x,y,z + lines.extend( + [ + "%-31s %.6g" % ("_cell_length_a", stru.lattice.a), + "%-31s %.6g" % ("_cell_length_b", stru.lattice.b), + "%-31s %.6g" % ("_cell_length_c", stru.lattice.c), + "%-31s %.6g" % ("_cell_angle_alpha", stru.lattice.alpha), + "%-31s %.6g" % ("_cell_angle_beta", stru.lattice.beta), + "%-31s %.6g" % ("_cell_angle_gamma", stru.lattice.gamma), + "", + ] + ) + # build a list of site labels and adp (displacement factor) types + element_count = {} + a_site_label = [] + a_adp_type = [] + for a in stru: + cnt = element_count[a.element] = element_count.get(a.element, 0) + 1 + a_site_label.append("%s%i" % (a.element, cnt)) + if numpy.all(a.U == a.U[0, 0] * numpy.identity(3)): + a_adp_type.append("Uiso") + else: + a_adp_type.append("Uani") + # list all atoms + lines.extend( + [ + "loop_", + " _atom_site_label", + " _atom_site_type_symbol", + " _atom_site_fract_x", + " _atom_site_fract_y", + " _atom_site_fract_z", + " _atom_site_U_iso_or_equiv", + " _atom_site_adp_type", + " _atom_site_occupancy", + ] + ) + for i in range(len(stru)): + a = stru[i] + line = " %-5s %-3s %11.6f %11.6f %11.6f %11.6f %-5s %.4f" % ( + a_site_label[i], + a.element, + a.xyz[0], + a.xyz[1], + a.xyz[2], + a.Uisoequiv, + a_adp_type[i], + a.occupancy, + ) + lines.append(line) + # find anisotropic atoms + idx_aniso = [i for i in range(len(stru)) if a_adp_type[i] != "Uiso"] + if idx_aniso != []: + lines.extend( + [ + "loop_", + " _atom_site_aniso_label", + " _atom_site_aniso_U_11", + " _atom_site_aniso_U_22", + " _atom_site_aniso_U_33", + " _atom_site_aniso_U_12", + " _atom_site_aniso_U_13", + " _atom_site_aniso_U_23", + ] + ) + for i in idx_aniso: + a = stru[i] + line = " %-5s %9.6f %9.6f %9.6f %9.6f %9.6f %9.6f" % ( + a_site_label[i], + a.U[0, 0], + a.U[1, 1], + a.U[2, 2], + a.U[0, 1], + a.U[0, 2], + a.U[1, 2], + ) + lines.append(line) + return lines
+
+ + + +# End of class P_cif + +# Routines ------------------------------------------------------------------- + +parsers_base = "diffpy.structure" +getParser_deprecation_msg = build_deprecation_message( + parsers_base, + "getParser", + "get_parser", + removal_version, +) +getSymOp_deprecation_msg = build_deprecation_message( + parsers_base, + "getSymOp", + "get_symop", + removal_version, +) +# constant regular expression for leading_float() +rx_float = re.compile(r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?") + + +
+[docs] +def leading_float(s, d=0.0): + """Extract the first float from a string and ignore trailing + characters. + + Useful for extracting values from "value(std)" syntax. + + Parameters + ---------- + s : str + The string to be scanned for floating point value. + d : float, Optional + The default value when `s` is "." or "?", which in CIF + format stands for inapplicable and unknown, respectively. + + Returns + ------- + float + The extracted floating point value. + + Raises + ------ + ValueError + When string does not start with a float. + """ + sbare = s.strip() + mx = rx_float.match(sbare) + if mx: + rv = float(mx.group()) + elif sbare == "." or sbare == "?": + # CIF files may contain "." or "?" for unknown values + rv = d + else: + rv = float(sbare) + return rv
+ + + +# helper dictionary for getSymOp() +symvec = { + "x": numpy.array([1, 0, 0], dtype=float), + "y": numpy.array([0, 1, 0], dtype=float), + "z": numpy.array([0, 0, 1], dtype=float), + "-x": numpy.array([-1, 0, 0], dtype=float), + "-y": numpy.array([0, -1, 0], dtype=float), + "-z": numpy.array([0, 0, -1], dtype=float), +} +symvec["+x"] = symvec["x"] +symvec["+y"] = symvec["y"] +symvec["+z"] = symvec["z"] + + +@deprecated(getSymOp_deprecation_msg) +def getSymOp(s): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.get_symop instead. + """ + return get_symop(s) + + +
+[docs] +def get_symop(s): + """Create `SpaceGroups.SymOp` instance from a string. + + Parameters + ---------- + s : str + Formula for equivalent coordinates, for example ``'x,1/2-y,1/2+z'``. + + Returns + ------- + SymOp + Instance of `SymOp`. + """ + from diffpy.structure.spacegroups import SymOp + + snoblanks = s.replace(" ", "") + eqlist = snoblanks.split(",") + R = numpy.zeros((3, 3), dtype=float) + t = numpy.zeros(3, dtype=float) + for i in (0, 1, 2): + eqparts = re.split("(?i)([+-]?[xyz])", eqlist[i]) + for Rpart in eqparts[1::2]: + R[i, :] += symvec[Rpart.lower()] + for tpart in eqparts[::2]: + t[i] += eval("1.0*%s+0" % tpart) + t -= numpy.floor(t) + rv = SymOp(R, t) + return rv
+ + + +@deprecated(getParser_deprecation_msg) +def getParser(eps=None): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.get_parser instead. + """ + return get_parser(eps) + + +
+[docs] +def get_parser(eps=None): + """Return new `parser` object for CIF format. + + Parameters + ---------- + eps : float, Optional + fractional coordinates cutoff for duplicate positions. + When ``None`` use the default for `ExpandAsymmetricUnit`: ``1.0e-5``. + + Returns + ------- + P_cif + Instance of `P_cif`. + """ + return P_cif(eps=eps)
+ + + +# Local Helpers -------------------------------------------------------------- + + +@contextmanager +def _suppress_cif_parser_output(): + """Context manager which suppresses diagnostic messages from CIF + parser.""" + from CifFile import yapps3_compiled_rt + + print_error = yapps3_compiled_rt.print_error + # replace the print_error function with no-operation + yapps3_compiled_rt.print_error = lambda *a, **kw: None + try: + yield print_error + finally: + yapps3_compiled_rt.print_error = print_error + pass +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_discus.html b/_modules/diffpy/structure/parsers/p_discus.html new file mode 100644 index 00000000..160d72e1 --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_discus.html @@ -0,0 +1,562 @@ + + + + + + + + diffpy.structure.parsers.p_discus — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_discus

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Parser for DISCUS structure format."""
+
+import sys
+from functools import reduce
+
+from diffpy.structure import Lattice, PDFFitStructure
+from diffpy.structure.parsers import StructureParser
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.P_discus"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+toLines_deprecation_msg = build_deprecation_message(
+    base,
+    "toLines",
+    "to_lines",
+    removal_version,
+)
+
+
+
+[docs] +class P_discus(StructureParser): + """Parser for DISCUS structure format. The parser chokes on molecule + and generator records. + + Attributes + ---------- + format : str + File format name, default "discus". + nl : int + Line number of the current line being parsed. + lines : list of str + List of lines from the input file. + line : str + Current line being parsed. + stru : PDFFitStructure + Structure being parsed. + ignored_lines : list of str + List of lines that were ignored during parsing. + cell_read : bool + ``True`` if cell record processed. + ncell_read : bool + ``True`` if ncell record processed. + """ + + def __init__(self): + StructureParser.__init__(self) + self.format = "discus" + # helper variables + self.nl = None + self.lines = None + self.line = None + self.stru = None + self.ignored_lines = [] + self.cell_read = False + self.ncell_read = False + return + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """Parse list of lines in DISCUS format. + + Parameters + ---------- + lines : list of str + List of lines from the input file. + + Returns + ------- + PDFFitStructure + Parsed `PDFFitStructure` instance. + + Raises + ------ + StructureFormatError + If the file is not in DISCUS format. + """ + self.lines = lines + ilines = self._lines_iterator() + self.stru = PDFFitStructure() + record_parsers = { + "cell": self._parse_cell, + "format": self._parse_format, + "generator": self._parse_not_implemented, + "molecule": self._parse_not_implemented, + "ncell": self._parse_ncell, + "spcgr": self._parse_spcgr, + "symmetry": self._parse_not_implemented, + "title": self._parse_title, + "shape": self._parse_shape, + } + try: + # parse header + for self.line in ilines: + words = self.line.split() + if not words or words[0][0] == "#": + continue + if words[0] == "atoms": + break + rp = record_parsers.get(words[0], self._parse_unknown_record) + rp(words) + # check if cell has been defined + if not self.cell_read: + emsg = "%d: unit cell not defined" % self.nl + raise StructureFormatError(emsg) + # parse atoms + for self.line in ilines: + words = self.line.replace(",", " ").split() + if not words or words[0][0] == "#": + continue + self._parse_atom(words) + # self consistency check + exp_natoms = reduce(lambda x, y: x * y, self.stru.pdffit["ncell"]) + # only check if ncell record exists + if self.ncell_read and exp_natoms != len(self.stru): + emsg = "Expected %d atoms, read %d." % ( + exp_natoms, + len(self.stru), + ) + raise StructureFormatError(emsg) + # take care of superlattice + if self.stru.pdffit["ncell"][:3] != [1, 1, 1]: + latpars = list(self.stru.lattice.abcABG()) + superlatpars = [latpars[i] * self.stru.pdffit["ncell"][i] for i in range(3)] + latpars[3:] + superlattice = Lattice(*superlatpars) + self.stru.place_in_lattice(superlattice) + self.stru.pdffit["ncell"] = [1, 1, 1, exp_natoms] + except (ValueError, IndexError): + exc_type, exc_value, exc_traceback = sys.exc_info() + emsg = "%d: file is not in DISCUS format" % self.nl + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + return self.stru + +
+[docs] + def parse_lines(self, lines): + """Parse list of lines in DISCUS format. + + Parameters + ---------- + lines : list of str + List of lines from the input file. + + Returns + ------- + PDFFitStructure + Parsed `PDFFitStructure` instance. + + Raises + ------ + StructureFormatError + If the file is not in DISCUS format. + """ + self.lines = lines + ilines = self._lines_iterator() + self.stru = PDFFitStructure() + record_parsers = { + "cell": self._parse_cell, + "format": self._parse_format, + "generator": self._parse_not_implemented, + "molecule": self._parse_not_implemented, + "ncell": self._parse_ncell, + "spcgr": self._parse_spcgr, + "symmetry": self._parse_not_implemented, + "title": self._parse_title, + "shape": self._parse_shape, + } + try: + # parse header + for self.line in ilines: + words = self.line.split() + if not words or words[0][0] == "#": + continue + if words[0] == "atoms": + break + rp = record_parsers.get(words[0], self._parse_unknown_record) + rp(words) + # check if cell has been defined + if not self.cell_read: + emsg = "%d: unit cell not defined" % self.nl + raise StructureFormatError(emsg) + # parse atoms + for self.line in ilines: + words = self.line.replace(",", " ").split() + if not words or words[0][0] == "#": + continue + self._parse_atom(words) + # self consistency check + exp_natoms = reduce(lambda x, y: x * y, self.stru.pdffit["ncell"]) + # only check if ncell record exists + if self.ncell_read and exp_natoms != len(self.stru): + emsg = "Expected %d atoms, read %d." % ( + exp_natoms, + len(self.stru), + ) + raise StructureFormatError(emsg) + # take care of superlattice + if self.stru.pdffit["ncell"][:3] != [1, 1, 1]: + latpars = list(self.stru.lattice.abcABG()) + superlatpars = [latpars[i] * self.stru.pdffit["ncell"][i] for i in range(3)] + latpars[3:] + superlattice = Lattice(*superlatpars) + self.stru.place_in_lattice(superlattice) + self.stru.pdffit["ncell"] = [1, 1, 1, exp_natoms] + except (ValueError, IndexError): + exc_type, exc_value, exc_traceback = sys.exc_info() + emsg = "%d: file is not in DISCUS format" % self.nl + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + return self.stru
+ + + @deprecated(toLines_deprecation_msg) + def toLines(self, stru): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_discus.to_lines instead. + """ + return self.to_lines(stru) + +
+[docs] + def to_lines(self, stru): + """Convert `Structure` stru to a list of lines in DISCUS format. + + Parameters + ---------- + stru : Structure + Structure to be converted. + + Returns + ------- + list of str + List of lines in DISCUS format. + """ + self.stru = stru + # if necessary, convert self.stru to PDFFitStructure + if not isinstance(stru, PDFFitStructure): + self.stru = PDFFitStructure(stru) + # build the stru_pdffit dictionary initialized from the defaults + # in PDFFitStructure + stru_pdffit = PDFFitStructure().pdffit + if stru.pdffit: + stru_pdffit.update(stru.pdffit) + # here we can start + self.lines = lines = [] + lines.append(("title " + self.stru.title).strip()) + lines.append("spcgr " + stru_pdffit["spcgr"]) + if stru_pdffit.get("spdiameter", 0.0) > 0.0: + line = "shape sphere, %g" % stru_pdffit["spdiameter"] + lines.append(line) + if stru_pdffit.get("stepcut", 0.0) > 0.0: + line = "shape stepcut, %g" % stru_pdffit["stepcut"] + lines.append(line) + lines.append("cell %9.6f, %9.6f, %9.6f, %9.6f, %9.6f, %9.6f" % self.stru.lattice.abcABG()) + lines.append("ncell %9i, %9i, %9i, %9i" % (1, 1, 1, len(self.stru))) + lines.append("atoms") + for a in self.stru: + lines.append( + "%-4s %17.8f %17.8f %17.8f %12.4f" + % ( + a.element.upper(), + a.xyz[0], + a.xyz[1], + a.xyz[2], + a.Bisoequiv, + ) + ) + return lines
+ + + def _lines_iterator(self): + """Iterator over `self.lines`, which increments `self.nl`""" + # ignore trailing empty lines + stop = len(self.lines) + while stop > 0 and self.lines[stop - 1].strip() == "": + stop -= 1 + self.nl = 0 + # read header of PDFFit file + for self.line in self.lines[:stop]: + self.nl += 1 + yield self.line + pass + + def _parse_cell(self, words): + """Process the cell record from DISCUS structure file.""" + # split again on spaces or commas + words = self.line.replace(",", " ").split() + latpars = [float(w) for w in words[1:7]] + try: + self.stru.lattice.set_latt_parms(*latpars) + except ZeroDivisionError: + emsg = "%d: Invalid lattice parameters - zero cell volume" % self.nl + raise StructureFormatError(emsg) + self.cell_read = True + return + + def _parse_format(self, words): + """Process the format record from DISCUS structure file.""" + if words[1] == "pdffit": + emsg = "%d: file is not in DISCUS format" % self.nl + raise StructureFormatError(emsg) + return + + def _parse_ncell(self, words): + """Process the ncell record from DISCUS structure file.""" + # split again on spaces or commas + words = self.line.replace(",", " ").split() + self.stru.pdffit["ncell"] = [int(w) for w in words[1:5]] + self.ncell_read = True + return + + def _parse_spcgr(self, words): + """Process the spcgr record from DISCUS structure file.""" + self.stru.pdffit["spcgr"] = "".join(words[1:]) + return + + def _parse_title(self, words): + """Process the title record from DISCUS structure file.""" + self.stru.title = self.line.lstrip()[5:].strip() + return + + def _parse_shape(self, words): + """Process the shape record from DISCUS structure file. + + Parameters + ---------- + words : list of str + List of words in the line. + + Raises + ------ + StructureFormatError + Invalid type of particle shape correction. + """ + # strip away any commas + linefixed = " ".join(words).replace(",", " ") + wordsfixed = linefixed.split() + shapetype = wordsfixed[1] + if shapetype == "sphere": + self.stru.pdffit["spdiameter"] = float(words[2]) + elif shapetype == "stepcut": + self.stru.pdffit["stepcut"] = float(words[2]) + else: + emsg = "Invalid type of particle shape correction %r" % shapetype + raise StructureFormatError(emsg) + return + + def _parse_atom(self, words): + """Process atom records in DISCUS structure file.""" + element = words[0][0:1].upper() + words[0][1:].lower() + xyz = [float(w) for w in words[1:4]] + Biso = float(words[4]) + self.stru.add_new_atom(element, xyz) + a = self.stru.get_last_atom() + a.Bisoequiv = Biso + return + + def _parse_unknown_record(self, words): + """Process unknown record in DISCUS structure file. + + Silently ignores the line and adds it to `self.ignored_lines`. + + Parameters + ---------- + words : list of str + List of words in the line. + + Raises + ------ + StructureFormatError + Unknown record. + """ + self.ignored_lines.append(self.line) + return + + def _parse_not_implemented(self, words): + """Process the unimplemented records from DISCUS structure file. + + Parameters + ---------- + words : list of str + List of words in the line. + + Raises + ------ + NotImplementedError + If the record is not implemented. + """ + emsg = "%d: reading of DISCUS record %r is not implemented." % ( + self.nl, + words[0], + ) + raise NotImplementedError(emsg)
+ + + +# End of class P_pdffit + +# Routines ------------------------------------------------------------------- + +parsers_base = "diffpy.structure" +removal_version = "4.0.0" +getParser_deprecation_msg = build_deprecation_message( + parsers_base, + "getParser", + "get_parser", + removal_version, +) + + +@deprecated(getParser_deprecation_msg) +def getParser(): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.P_discus.get_parser instead. + """ + return get_parser() + + +
+[docs] +def get_parser(): + """Return new `parser` object for DISCUS format. + + Returns + ------- + P_discus + Instance of `P_discus`. + """ + return P_discus()
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_pdb.html b/_modules/diffpy/structure/parsers/p_pdb.html new file mode 100644 index 00000000..68f96a98 --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_pdb.html @@ -0,0 +1,648 @@ + + + + + + + + diffpy.structure.parsers.p_pdb — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_pdb

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2008 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Basic parser for PDB structure format.
+
+Note
+----
+References:
+    https://www.wwpdb.org/documentation/file-format-content/format23/v2.3.html
+    https://www.wwpdb.org/documentation/file-format-content/format30/index.html
+"""
+
+import sys
+
+import numpy
+from numpy import pi
+
+from diffpy.structure import Structure
+from diffpy.structure.parsers import StructureParser
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.P_pdb"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+toLines_deprecation_msg = build_deprecation_message(
+    base,
+    "toLines",
+    "to_lines",
+    removal_version,
+)
+titleLines_deprecation_msg = build_deprecation_message(
+    base,
+    "titleLines",
+    "title_lines",
+    removal_version,
+)
+cryst1Lines_deprecation_msg = build_deprecation_message(
+    base,
+    "cryst1Lines",
+    "cryst1_lines",
+    removal_version,
+)
+atomLines_deprecation_msg = build_deprecation_message(
+    base,
+    "atomLines",
+    "atom_lines",
+    removal_version,
+)
+
+
+
+[docs] +class P_pdb(StructureParser): + """Simple parser for PDB format. + + The parser understands following PDB records: `TITLE, CRYST1, SCALE1, + SCALE2, SCALE3, ATOM, SIGATM, ANISOU, SIGUIJ, TER, HETATM, END`. + + Attributes + ---------- + format : str + Format name, default "pdb". + """ + + # Static data members + orderOfRecords = [ + "HEADER", + "OBSLTE", + "TITLE", + "CAVEAT", + "COMPND", + "SOURCE", + "KEYWDS", + "EXPDTA", + "AUTHOR", + "REVDAT", + "SPRSDE", + "JRNL", + "REMARK", + "REMARK", + "REMARK", + "REMARK", + "DBREF", + "SEQADV", + "SEQRES", + "MODRES", + "HET", + "HETNAM", + "HETSYN", + "FORMUL", + "HELIX", + "SHEET", + "TURN", + "SSBOND", + "LINK", + "HYDBND", + "SLTBRG", + "CISPEP", + "SITE", + "CRYST1", + "ORIGX1", + "ORIGX2", + "ORIGX3", + "SCALE1", + "SCALE2", + "SCALE3", + "MTRIX1", + "MTRIX2", + "MTRIX3", + "TVECT", + "MODEL", + "ATOM", + "SIGATM", + "ANISOU", + "SIGUIJ", + "TER", + "HETATM", + "ENDMDL", + "CONECT", + "MASTER", + "END", + ] + """list: Ordered list of PDB record labels.""" + + validRecords = dict.fromkeys(orderOfRecords) + """dict: Dictionary of PDB record labels.""" + + def __init__(self): + StructureParser.__init__(self) + self.format = "pdb" + return + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_pdb.parse_lines instead. + """ + return self.parse_lines(lines) + +
+[docs] + def parse_lines(self, lines): + """Parse list of lines in PDB format. + + Parameters + ---------- + lines : list of str + List of lines in PDB format. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + Invalid PDB record. + """ + try: + stru = Structure() + scale = numpy.identity(3, dtype=float) + scaleU = numpy.zeros(3, dtype=float) + p_nl = 0 + for line in lines: + p_nl += 1 + # skip blank lines + if not line.strip(): + continue + # make sure line has 80 characters + if len(line) < 80: + line = "%-80s" % line + words = line.split() + record = words[0] + if record == "TITLE": + continuation = line[8:10] + if continuation.strip(): + stru.title += line[10:].rstrip() + else: + stru.title = line[10:].rstrip() + elif record == "CRYST1": + a = float(line[7:15]) + b = float(line[15:24]) + c = float(line[24:33]) + alpha = float(line[33:40]) + beta = float(line[40:47]) + gamma = float(line[47:54]) + stru.lattice.set_latt_parms(a, b, c, alpha, beta, gamma) + scale = numpy.transpose(stru.lattice.recbase) + elif record == "SCALE1": + sc = numpy.zeros((3, 3), dtype=float) + sc[0, :] = [float(x) for x in line[10:40].split()] + scaleU[0] = float(line[45:55]) + elif record == "SCALE2": + sc[1, :] = [float(x) for x in line[10:40].split()] + scaleU[1] = float(line[45:55]) + elif record == "SCALE3": + sc[2, :] = [float(x) for x in line[10:40].split()] + scaleU[2] = float(line[45:55]) + base = numpy.transpose(numpy.linalg.inv(sc)) + abcABGcryst = numpy.array(stru.lattice.abcABG()) + stru.lattice.set_new_latt_base_vec(base) + abcABGscale = numpy.array(stru.lattice.abcABG()) + reldiff = numpy.fabs(1.0 - abcABGscale / abcABGcryst) + if not numpy.all(reldiff < 1.0e-4): + emsg = "%d: " % p_nl + "SCALE and CRYST1 are not consistent." + raise StructureFormatError(emsg) + if numpy.any(scaleU != 0.0): + emsg = "Origin offset not yet implemented." + raise NotImplementedError(emsg) + elif record in ("ATOM", "HETATM"): + name = line[12:16].strip() + rc = [float(x) for x in line[30:54].split()] + try: + occupancy = float(line[54:60]) + except ValueError: + occupancy = 1.0 + try: + B = float(line[60:66]) + uiso = B / (8 * pi**2) + except ValueError: + uiso = 0.0 + element = line[76:78].strip() + if element == "": + # get element from the first 2 characters of name + element = line[12:14].strip() + element = element[0].upper() + element[1:].lower() + stru.add_new_atom(element, occupancy=occupancy, label=name) + last_atom = stru.get_last_atom() + last_atom.xyz_cartn = rc + last_atom.Uisoequiv = uiso + elif record == "SIGATM": + sigrc = [float(x) for x in line[30:54].split()] + sigxyz = numpy.dot(scale, sigrc) + try: + sigo = float(line[54:60]) + except ValueError: + sigo = 0.0 + try: + sigB = float(line[60:66]) + sigU = numpy.identity(3) * sigB / (8 * pi**2) + except ValueError: + sigU = numpy.zeros((3, 3), dtype=float) + last_atom.sigxyz = sigxyz + last_atom.sigo = sigo + last_atom.sigU = sigU + elif record == "ANISOU": + last_atom.anisotropy = True + Uij = [float(x) * 1.0e-4 for x in line[28:70].split()] + Ua = last_atom.U + for i in range(3): + Ua[i, i] = Uij[i] + Ua[0, 1] = Ua[1, 0] = Uij[3] + Ua[0, 2] = Ua[2, 0] = Uij[4] + Ua[1, 2] = Ua[2, 1] = Uij[5] + elif record == "SIGUIJ": + sigUij = [float(x) * 1.0e-4 for x in line[28:70].split()] + for i in range(3): + last_atom.sigU[i, i] = sigUij[i] + last_atom.sigU[0, 1] = last_atom.sigU[1, 0] = sigUij[3] + last_atom.sigU[0, 2] = last_atom.sigU[2, 0] = sigUij[4] + last_atom.sigU[1, 2] = last_atom.sigU[2, 1] = sigUij[5] + elif record in P_pdb.validRecords: + pass + else: + emsg = "%d: invalid record name '%r'" % (p_nl, record) + raise StructureFormatError(emsg) + except (ValueError, IndexError): + emsg = "%d: invalid PDB record" % p_nl + exc_type, exc_value, exc_traceback = sys.exc_info() + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + return stru
+ + + @deprecated(titleLines_deprecation_msg) + def titleLines(self, stru): + """Build lines corresponding to `TITLE` record.""" + return self.title_lines(stru) + +
+[docs] + def title_lines(self, stru): + """Build lines corresponding to `TITLE` record.""" + lines = [] + title = stru.title + while title != "": + stop = len(title) + # maximum length of title record is 60 + if stop > 60: + stop = title.rfind(" ", 10, 60) + if stop < 0: + stop = 60 + if len(lines) == 0: + continuation = " " + else: + continuation = "%2i" % (len(lines) + 1) + lines.append("%-80s" % ("TITLE " + continuation + title[0:stop])) + title = title[stop:] + return lines
+ + + @deprecated(cryst1Lines_deprecation_msg) + def cryst1Lines(self, stru): + """Build lines corresponding to `CRYST1` record.""" + return self.cryst1_lines(stru) + +
+[docs] + def cryst1_lines(self, stru): + """Build lines corresponding to `CRYST1` record.""" + lines = [] + latpar = ( + stru.lattice.a, + stru.lattice.b, + stru.lattice.c, + stru.lattice.alpha, + stru.lattice.beta, + stru.lattice.gamma, + ) + if latpar != (1.0, 1.0, 1.0, 90.0, 90.0, 90.0): + line = "CRYST1%9.3f%9.3f%9.3f%7.2f%7.2f%7.2f" % latpar + lines.append("%-80s" % line) + return lines
+ + + @deprecated(atomLines_deprecation_msg) + def atomLines(self, stru, idx): + """Build `ATOM` records and possibly `SIGATM`, `ANISOU` or + `SIGUIJ` records for `structure` stru `atom` number aidx.""" + return self.atom_lines(stru, idx) + +
+[docs] + def atom_lines(self, stru, idx): + """Build `ATOM` records and possibly `SIGATM`, `ANISOU` or + `SIGUIJ` records for `structure` stru `atom` number aidx.""" + lines = [] + a = stru[idx] + ad = a.__dict__ + rc = a.xyz_cartn + B = a.Bisoequiv + atomline = ( + "ATOM " # 1-6 + + "%(serial)5i " # 7-11, 12 + + "%(name)-4s" # 13-16 + + "%(altLoc)c" # 17 + + "%(resName)-3s " # 18-20, 21 + + "%(chainID)c" # 22 + + "%(resSeq)4i" # 23-26 + + "%(iCode)c " # 27, 28-30 + + "%(x)8.3f%(y)8.3f%(z)8.3f" # 31-54 + + "%(occupancy)6.2f" # 55-60 + + "%(tempFactor)6.2f " # 61-66, 67-72 + + "%(segID)-4s" # 73-76 + + "%(element)2s" # 77-78 + + "%(charge)-2s" # 79-80 + ) % { + "serial": idx + 1, + "name": a.label or a.element, + "altLoc": " ", + "resName": "", + "chainID": " ", + "resSeq": 1, + "iCode": " ", + "x": rc[0], + "y": rc[1], + "z": rc[2], + "occupancy": a.occupancy, + "tempFactor": B, + "segID": "", + "element": a.element, + "charge": "", + } + lines.append(atomline) + isotropic = numpy.all(a.U == a.U[0, 0] * numpy.identity(3)) + if not isotropic: + mid = " %7i%7i%7i%7i%7i%7i " % tuple( + numpy.around( + 1e4 + * numpy.array( + [ + a.U[0, 0], + a.U[1, 1], + a.U[2, 2], + a.U[0, 1], + a.U[0, 2], + a.U[1, 2], + ] + ) + ) + ) + line = "ANISOU" + atomline[6:27] + mid + atomline[72:80] + lines.append(line) + # default values of standard deviations + d_sigxyz = numpy.zeros(3, dtype=float) + d_sigo = 0.0 + d_sigU = numpy.zeros((3, 3), dtype=float) + sigxyz = ad.get("sigxyz", d_sigxyz) + sigo = [ad.get("sigo", d_sigo)] + sigU = ad.get("sigU", d_sigU) + sigB = [8 * pi**2 * numpy.average([sigU[i, i] for i in range(3)])] + sigmas = numpy.concatenate((sigxyz, sigo, sigB)) + # no need to print sigmas if they all round to zero + hassigmas = numpy.any(numpy.fabs(sigmas) >= numpy.array(3 * [5e-4] + 2 * [5e-3])) or numpy.any( + numpy.fabs(sigU) > 5.0e-5 + ) + if hassigmas: + mid = " %8.3f%8.3f%8.3f%6.2f%6.2f " % tuple(sigmas) + line = "SIGATM" + atomline[6:27] + mid + atomline[72:80] + lines.append(line) + # do we need SIGUIJ record? + if not numpy.all(sigU == sigU[0, 0] * numpy.identity(3)): + mid = " %7i%7i%7i%7i%7i%7i " % tuple( + numpy.around( + 1e4 + * numpy.array( + [ + sigU[0, 0], + sigU[1, 1], + sigU[2, 2], + sigU[0, 1], + sigU[0, 2], + sigU[1, 2], + ] + ) + ) + ) + line = "SIGUIJ" + atomline[6:27] + mid + atomline[72:80] + lines.append(line) + return lines
+ + + @deprecated(toLines_deprecation_msg) + def toLines(self, stru): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_pdb.to_lines instead. + """ + return self.to_lines(stru) + +
+[docs] + def to_lines(self, stru): + """Convert `Structure` stru to a list of lines in PDB format. + + Parameters + ---------- + stru : Structure + Structure to be converted. + + Returns + ------- + list of str + List of lines in PDB format. + """ + lines = [] + lines.extend(self.title_lines(stru)) + lines.extend(self.cryst1_lines(stru)) + for idx in range(len(stru)): + lines.extend(self.atom_lines(stru, idx)) + line = ( + "TER " # 1-6 + + "%(serial)5i " # 7-11, 12-17 + + "%(resName)-3s " # 18-20, 21 + + "%(chainID)c" # 22 + + "%(resSeq)4i" # 23-26 + + "%(iCode)c" # 27 + + "%(blank)53s" # 28-80 + ) % { + "serial": len(stru) + 1, + "resName": "", + "chainID": " ", + "resSeq": 1, + "iCode": " ", + "blank": " ", + } + lines.append(line) + lines.append("%-80s" % "END") + return lines
+
+ + + +# End of class P_pdb + +# Routines ------------------------------------------------------------------- + +parsers_base = "diffpy.structure" +getParser_deprecation_msg = build_deprecation_message( + parsers_base, + "getParser", + "get_parser", + removal_version, +) + + +@deprecated(getParser_deprecation_msg) +def getParser(): + """Return new `parser` object for PDB format. + + Returns + ------- + P_pdb + Instance of `P_pdb`. + """ + return get_parser() + + +
+[docs] +def get_parser(): + """Return new `parser` object for PDB format. + + Returns + ------- + P_pdb + Instance of `P_pdb`. + """ + return P_pdb()
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_pdffit.html b/_modules/diffpy/structure/parsers/p_pdffit.html new file mode 100644 index 00000000..95f80018 --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_pdffit.html @@ -0,0 +1,461 @@ + + + + + + + + diffpy.structure.parsers.p_pdffit — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_pdffit

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Parser for PDFfit structure format."""
+
+import sys
+from functools import reduce
+
+import numpy
+
+from diffpy.structure import Lattice, PDFFitStructure
+from diffpy.structure.parsers import StructureParser
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.P_pdffit"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+
+
+
+[docs] +class P_pdffit(StructureParser): + """Parser for PDFfit structure format. + + Attributes + ---------- + format : str + Format name, default "pdffit". + ignored_lines : list + List of lines ignored during parsing. + stru : PDFFitStructure + Structure instance used for cif input or output. + """ + + def __init__(self): + StructureParser.__init__(self) + self.format = "pdffit" + self.ignored_lines = [] + self.stru = None + return + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_pdffit.parse_lines instead. + """ + return self.parse_lines(lines) + +
+[docs] + def parse_lines(self, lines): + """Parse list of lines in PDFfit format. + + Parameters + ---------- + lines : list of str + List of lines in PDB format. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + File not in PDFfit format. + """ + p_nl = 0 + try: + self.stru = PDFFitStructure() + stru = self.stru + cell_line_read = False + stop = len(lines) + while stop > 0 and lines[stop - 1].strip() == "": + stop -= 1 + ilines = iter(lines[:stop]) + # read header of PDFFit file + for line in ilines: + p_nl += 1 + words = line.split() + if len(words) == 0 or words[0][0] == "#": + continue + elif words[0] == "title": + stru.title = line.lstrip()[5:].strip() + elif words[0] == "scale": + stru.pdffit["scale"] = float(words[1]) + elif words[0] == "sharp": + l1 = line.replace(",", " ") + sharp_pars = [float(w) for w in l1.split()[1:]] + if len(sharp_pars) < 4: + stru.pdffit["delta2"] = sharp_pars[0] + stru.pdffit["sratio"] = sharp_pars[1] + stru.pdffit["rcut"] = sharp_pars[2] + else: + stru.pdffit["delta2"] = sharp_pars[0] + stru.pdffit["delta1"] = sharp_pars[1] + stru.pdffit["sratio"] = sharp_pars[2] + stru.pdffit["rcut"] = sharp_pars[3] + elif words[0] == "spcgr": + key = "spcgr" + start = line.find(key) + len(key) + value = line[start:].strip() + stru.pdffit["spcgr"] = value + elif words[0] == "shape": + self._parse_shape(line) + elif words[0] == "cell": + cell_line_read = True + l1 = line.replace(",", " ") + latpars = [float(w) for w in l1.split()[1:7]] + stru.lattice = Lattice(*latpars) + elif words[0] == "dcell": + l1 = line.replace(",", " ") + stru.pdffit["dcell"] = [float(w) for w in l1.split()[1:7]] + elif words[0] == "ncell": + l1 = line.replace(",", " ") + stru.pdffit["ncell"] = [int(w) for w in l1.split()[1:5]] + elif words[0] == "format": + if words[1] != "pdffit": + emsg = "%d: file is not in PDFfit format" % p_nl + raise StructureFormatError(emsg) + elif words[0] == "atoms" and cell_line_read: + break + else: + self.ignored_lines.append(line) + # Header reading finished, check if required lines were present. + if not cell_line_read: + emsg = "%d: file is not in PDFfit format" % p_nl + raise StructureFormatError(emsg) + # Load data from atom entries. + p_natoms = reduce(lambda x, y: x * y, stru.pdffit["ncell"]) + # we are now inside data block + for line in ilines: + p_nl += 1 + wl1 = line.split() + element = wl1[0][0].upper() + wl1[0][1:].lower() + xyz = [float(w) for w in wl1[1:4]] + occ = float(wl1[4]) + stru.add_new_atom(element, xyz=xyz, occupancy=occ) + a = stru.get_last_atom() + p_nl += 1 + wl2 = next(ilines).split() + a.sigxyz = [float(w) for w in wl2[0:3]] + a.sigo = float(wl2[3]) + p_nl += 1 + wl3 = next(ilines).split() + p_nl += 1 + wl4 = next(ilines).split() + p_nl += 1 + wl5 = next(ilines).split() + p_nl += 1 + wl6 = next(ilines).split() + U = numpy.zeros((3, 3), dtype=float) + sigU = numpy.zeros((3, 3), dtype=float) + U[0, 0] = float(wl3[0]) + U[1, 1] = float(wl3[1]) + U[2, 2] = float(wl3[2]) + sigU[0, 0] = float(wl4[0]) + sigU[1, 1] = float(wl4[1]) + sigU[2, 2] = float(wl4[2]) + U[0, 1] = U[1, 0] = float(wl5[0]) + U[0, 2] = U[2, 0] = float(wl5[1]) + U[1, 2] = U[2, 1] = float(wl5[2]) + sigU[0, 1] = sigU[1, 0] = float(wl6[0]) + sigU[0, 2] = sigU[2, 0] = float(wl6[1]) + sigU[1, 2] = sigU[2, 1] = float(wl6[2]) + a.anisotropy = stru.lattice.isanisotropic(U) + a.U = U + a.sigU = sigU + if len(stru) != p_natoms: + emsg = "expected %d atoms, read %d" % (p_natoms, len(stru)) + raise StructureFormatError(emsg) + if stru.pdffit["ncell"][:3] != [1, 1, 1]: + superlatpars = [latpars[i] * stru.pdffit["ncell"][i] for i in range(3)] + latpars[3:] + superlattice = Lattice(*superlatpars) + stru.place_in_lattice(superlattice) + stru.pdffit["ncell"] = [1, 1, 1, p_natoms] + except (ValueError, IndexError): + emsg = "%d: file is not in PDFfit format" % p_nl + exc_type, exc_value, exc_traceback = sys.exc_info() + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + return stru
+ + +
+[docs] + def toLines(self, stru): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_pdffit.toLines instead. + """ + return self.to_lines(stru)
+ + +
+[docs] + def to_lines(self, stru): + """Convert `Structure` stru to a list of lines in PDFfit format. + + Parameters + ---------- + stru : Structure + Structure to be converted. + + Returns + ------- + list of str + List of lines in PDFfit format. + """ + # build the stru_pdffit dictionary initialized from the defaults + # in PDFFitStructure + stru_pdffit = PDFFitStructure().pdffit + if stru.pdffit: + stru_pdffit.update(stru.pdffit) + lines = [] + # default values of standard deviations + d_sigxyz = numpy.zeros(3, dtype=float) + d_sigo = 0.0 + d_sigU = numpy.zeros((3, 3), dtype=float) + # here we can start + line = "title " + stru.title + lines.append(line.strip()) + lines.append("format pdffit") + lines.append("scale %9.6f" % stru_pdffit["scale"]) + lines.append( + "sharp %9.6f, %9.6f, %9.6f, %9.6f" + % ( + stru_pdffit["delta2"], + stru_pdffit["delta1"], + stru_pdffit["sratio"], + stru_pdffit["rcut"], + ) + ) + lines.append("spcgr " + stru_pdffit["spcgr"]) + if stru_pdffit.get("spdiameter", 0.0) > 0.0: + line = "shape sphere, %g" % stru_pdffit["spdiameter"] + lines.append(line) + if stru_pdffit.get("stepcut", 0.0) > 0.0: + line = "shape stepcut, %g" % stru_pdffit["stepcut"] + lines.append(line) + lat = stru.lattice + lines.append( + "cell %9.6f, %9.6f, %9.6f, %9.6f, %9.6f, %9.6f" + % (lat.a, lat.b, lat.c, lat.alpha, lat.beta, lat.gamma) + ) + lines.append("dcell %9.6f, %9.6f, %9.6f, %9.6f, %9.6f, %9.6f" % tuple(stru_pdffit["dcell"])) + lines.append("ncell %9i, %9i, %9i, %9i" % (1, 1, 1, len(stru))) + lines.append("atoms") + for a in stru: + ad = a.__dict__ + lines.append( + "%-4s %17.8f %17.8f %17.8f %12.4f" + % ( + a.element.upper(), + a.xyz[0], + a.xyz[1], + a.xyz[2], + a.occupancy, + ) + ) + sigmas = numpy.concatenate((ad.get("sigxyz", d_sigxyz), [ad.get("sigo", d_sigo)])) + lines.append(" %18.8f %17.8f %17.8f %12.4f" % tuple(sigmas)) + sigU = ad.get("sigU", d_sigU) + Uii = (a.U[0][0], a.U[1][1], a.U[2][2]) + Uij = (a.U[0][1], a.U[0][2], a.U[1][2]) + sigUii = (sigU[0][0], sigU[1][1], sigU[2][2]) + sigUij = (sigU[0][1], sigU[0][2], sigU[1][2]) + lines.append(" %18.8f %17.8f %17.8f" % Uii) + lines.append(" %18.8f %17.8f %17.8f" % sigUii) + lines.append(" %18.8f %17.8f %17.8f" % Uij) + lines.append(" %18.8f %17.8f %17.8f" % sigUij) + return lines
+ + + # Protected methods ------------------------------------------------------ + + def _parse_shape(self, line): + """Process shape line from PDFfit file and update self.stru. + + Parameters + ---------- + line : str + Line containing data for particle shape correction. + + Raises + ------ + StructureFormatError + Invalid type of particle shape correction. + """ + line_nocommas = line.replace(",", " ") + words = line_nocommas.split() + assert words[0] == "shape" + shapetype = words[1] + if shapetype == "sphere": + self.stru.pdffit["spdiameter"] = float(words[2]) + elif shapetype == "stepcut": + self.stru.pdffit["stepcut"] = float(words[2]) + else: + emsg = "Invalid type of particle shape correction %r" % shapetype + raise StructureFormatError(emsg) + return
+ + + +# End of class P_pdffit + +# Routines ------------------------------------------------------------------- + + +
+[docs] +def getParser(): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.P_pdffit.get_parser instead. + """ + return get_parser()
+ + + +
+[docs] +def get_parser(): + """Return new `parser` object for PDFfit format. + + Returns + ------- + P_pdffit + Instance of `P_pdffit`. + """ + return P_pdffit()
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_rawxyz.html b/_modules/diffpy/structure/parsers/p_rawxyz.html new file mode 100644 index 00000000..f9f3987b --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_rawxyz.html @@ -0,0 +1,319 @@ + + + + + + + + diffpy.structure.parsers.p_rawxyz — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_rawxyz

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Parser for raw XYZ file format.
+
+Raw XYZ is a 3 or 4 column text file with cartesian coordinates of atoms
+and an optional first column for atom types.
+"""
+
+import sys
+
+from diffpy.structure import Structure
+from diffpy.structure.parsers import StructureParser
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.structure.utils import isfloat
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.P_rawxyz"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+toLines_deprecation_msg = build_deprecation_message(
+    base,
+    "toLines",
+    "to_lines",
+    removal_version,
+)
+
+
+
+[docs] +class P_rawxyz(StructureParser): + """Parser --> StructureParser subclass for RAWXYZ format. + + Attributes + ---------- + format : str + Format name, default "rawxyz". + """ + + def __init__(self): + StructureParser.__init__(self) + self.format = "rawxyz" + return + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_rawxyz.parse_lines instead. + """ + return self.parse_lines(lines) + +
+[docs] + def parse_lines(self, lines): + """Parse list of lines in RAWXYZ format. + + Parameters + ---------- + lines : list of str + List of lines in RAWXYZ format. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + Invalid RAWXYZ format. + """ + linefields = [line.split() for line in lines] + # prepare output structure + stru = Structure() + # find first valid record + start = 0 + for field in linefields: + if len(field) == 0 or field[0] == "#": + start += 1 + else: + break + # find the last valid record + stop = len(lines) + while stop > start and len(linefields[stop - 1]) == 0: + stop -= 1 + # get out for empty structure + if start >= stop: + return stru + # here we have at least one valid record line + # figure out xyz layout from the first line for plain and raw formats + floatfields = [isfloat(f) for f in linefields[start]] + nfields = len(linefields[start]) + if nfields not in (3, 4): + emsg = "%d: invalid RAWXYZ format, expected 3 or 4 columns" % (start + 1) + raise StructureFormatError(emsg) + if floatfields[:3] == [True, True, True]: + el_idx, x_idx = (None, 0) + elif floatfields[:4] == [False, True, True, True]: + el_idx, x_idx = (0, 1) + else: + emsg = "%d: invalid RAWXYZ format" % (start + 1) + raise StructureFormatError(emsg) + # now try to read all record lines + try: + p_nl = start + for fields in linefields[start:]: + p_nl += 1 + if fields == []: + continue + elif len(fields) != nfields: + emsg = ("%d: all lines must have " + "the same number of columns") % p_nl + raise StructureFormatError(emsg) + element = el_idx is not None and fields[el_idx] or "" + xyz = [float(f) for f in fields[x_idx : x_idx + 3]] + if len(xyz) == 2: + xyz.append(0.0) + stru.add_new_atom(element, xyz=xyz) + except ValueError: + emsg = "%d: invalid number" % p_nl + exc_type, exc_value, exc_traceback = sys.exc_info() + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + return stru
+ + + @deprecated(toLines_deprecation_msg) + def toLines(self, stru): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_rawxyz.to_lines instead. + """ + return self.to_lines(stru) + +
+[docs] + def to_lines(self, stru): + """Convert Structure stru to a list of lines in RAWXYZ format. + + Parameters + ---------- + stru : Structure + Structure to be converted. + + Returns + ------- + list of str + List of lines in RAWXYZ format. + """ + lines = [] + for a in stru: + rc = a.xyz_cartn + s = "%s %g %g %g" % (a.element, rc[0], rc[1], rc[2]) + lines.append(s.lstrip()) + return lines
+
+ + + +# End of class P_rawxyz + +# Routines ------------------------------------------------------------------- + +parsers_base = "diffpy.structure" +getParser_deprecation_msg = build_deprecation_message( + parsers_base, + "getParser", + "get_parser", + removal_version, +) + + +@deprecated(getParser_deprecation_msg) +def getParser(): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.P_rawxyz.get_parser instead. + """ + return get_parser() + + +
+[docs] +def get_parser(): + """Return new `parser` object for RAWXYZ format. + + Returns + ------- + P_rawxyz + Instance of `P_rawxyz`. + """ + return P_rawxyz()
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_vesta.html b/_modules/diffpy/structure/parsers/p_vesta.html new file mode 100644 index 00000000..8afeed90 --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_vesta.html @@ -0,0 +1,489 @@ + + + + + + + + diffpy.structure.parsers.p_vesta — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_vesta

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2026 University of California, Santa Barbara.
+#                   All rights reserved.
+#
+# File coded by:    Simon J. L. Billinge, Rundong Hua
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Parser for VESTA format used by VESTA (Visualization for Electronic
+and Structural Analysis).
+
+This module replaces the AtomEye XCFG parser (P_xcfg). The XCFG parser and
+all its original attributes are preserved for backward compatibility.
+VESTA is the actively maintained successor viewer.
+
+Attributes
+----------
+AtomicMass : dict
+    Dictionary of atomic masses for elements.
+"""
+
+import re
+import sys
+
+import numpy
+
+from diffpy.structure import Structure
+from diffpy.structure.parsers import StructureParser
+from diffpy.structure.parsers.p_xcfg import AtomicMass
+from diffpy.structure.structureerrors import StructureFormatError
+
+
+# Constants ------------------------------------------------------------------
+
+[docs] +class P_vesta(StructureParser): + """Parser for VESTA native structure format (.vesta). + + VESTA (Visualization for Electronic and Structural Analysis) is the + actively maintained successor to AtomEye. This parser writes the + native VESTA format understood by VESTA 3.x and later. + + Attributes + ---------- + format : str + Format name, default "vesta". + + Notes + ----- + The ``cluster_boundary`` attribute is retained from the original + AtomEye/XCFG parser for API compatibility; it is not used by VESTA + because VESTA handles periodicity natively. + """ + + cluster_boundary = 2 + """int: Width of boundary around corners of non-periodic cluster. + Retained from the original AtomEye/XCFG parser for API compatibility. + VESTA handles periodicity natively so this value has no effect on output. + """ + + def __init__(self): + StructureParser.__init__(self) + self.format = "vesta" + return + +
+[docs] + def parse_lines(self, lines): + """Parse list of lines in VESTA format. + + Reads the ``STRUC``, ``ATOMT``, and ``COORD`` sections of a + ``.vesta`` file to reconstruct a :class:`~diffpy.structure.Structure`. + + Parameters + ---------- + lines : list of str + Lines of a VESTA format file. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + When the file does not conform to the VESTA format. + """ + stru = Structure() + p_nl = 0 + + # Strip trailing blank lines for a clean iteration boundary. + stop = len(lines) + for line in reversed(lines): + if line.strip(): + break + stop -= 1 + ilines = iter(lines[:stop]) + + try: + # Lattice parameters parsed from STRUC block: + # a b c alpha beta gamma + latt_abc = None + latt_abg = None + atom_types = {} + + # Raw fractional coordinates collected from COORD block: + # list of (atom_type_index, x, y, z, occupancy) + raw_coords = [] + + section = None # tracks current block keyword + + for line in ilines: + p_nl += 1 + stripped = line.strip() + if not stripped or stripped.startswith("#"): + continue + + # Detect section transitions. + upper = stripped.split()[0].upper() + if upper in ( + "CRYSTAL", + "TITLE", + "GROUP", + "STRUC", + "ATOMT", + "COORD", + "BOUND", + "SBOND", + "VECTR", + "VECTS", + "STYLE", + "SCENE", + "EOF", + ): + section = upper + continue + + # ---- STRUC section: lattice parameters ----------------- + if section == "STRUC": + words = stripped.split() + # First data line: a b c alpha beta gamma space_group + if latt_abc is None and len(words) >= 6: + try: + latt_abc = [float(w) for w in words[:3]] + latt_abg = [float(w) for w in words[3:6]] + except ValueError: + pass + continue + + # ---- ATOMT section: atom-type definitions --------------- + if section == "ATOMT": + # Format: index Symbol radius r g b style # mass=<value> + words = stripped.split() + if len(words) >= 2: + try: + idx = int(words[0]) + symbol = words[1] + atom_types[idx] = {"symbol": symbol, "mass": None} + # Recover mass from the trailing comment if present. + mass_match = re.search(r"#\s*mass\s*=\s*([0-9.eE+\-]+)", stripped) + if mass_match: + atom_types[idx]["mass"] = float(mass_match.group(1)) + else: + # Fall back to the built-in lookup table. + atom_types[idx]["mass"] = AtomicMass.get(symbol, 0.0) + except ValueError: + pass + continue + + # ---- COORD section: atomic coordinates ----------------- + if section == "COORD": + # Format: seq type_index x y z occupancy ... + words = stripped.split() + if len(words) >= 6: + try: + type_idx = int(words[1]) + x, y, z = float(words[2]), float(words[3]), float(words[4]) + occ = float(words[5]) + raw_coords.append((type_idx, x, y, z, occ)) + except ValueError: + pass + continue + if latt_abc is None: + emsg = "VESTA file is missing STRUC lattice parameters" + raise StructureFormatError(emsg) + + stru.lattice.setLatPar( + a=latt_abc[0], + b=latt_abc[1], + c=latt_abc[2], + alpha=latt_abg[0], + beta=latt_abg[1], + gamma=latt_abg[2], + ) + for type_idx, x, y, z, occ in raw_coords: + type_info = atom_types.get(type_idx, {"symbol": "X", "mass": 0.0}) + element = type_info["symbol"] + mass = type_info["mass"] + stru.add_new_atom(element, xyz=[x, y, z]) + stru[-1].occupancy = occ + if mass is None: + mass = AtomicMass.get(element, 0.0) + stru[-1].mass = mass + + except (ValueError, IndexError): + emsg = "%d: file is not in VESTA format" % p_nl + exc_type, exc_value, exc_traceback = sys.exc_info() + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + + return stru
+ + +
+[docs] + def to_lines(self, stru): + """Convert Structure *stru* to a list of lines in VESTA format. + + Produces a ``.vesta`` file readable by VESTA 3.x and later, + containing ``STRUC``, ``ATOMT``, and ``COORD`` sections derived + from the structure's lattice and atomic data. + + Parameters + ---------- + stru : Structure + Structure to be converted. + + Returns + ------- + list of str + Lines of a VESTA format file. + + Raises + ------ + StructureFormatError + Cannot convert empty structure to VESTA format. + """ + if len(stru) == 0: + emsg = "cannot convert empty structure to VESTA format" + raise StructureFormatError(emsg) + + lines = [] + lines.append("#VESTA_FORMAT_VERSION 3.5.0") + lines.append("") + lines.append("CRYSTAL") + lines.append("") + lines.append("TITLE") + title = getattr(stru, "title", "") or "Structure" + lines.append(title) + lines.append("") + latt = stru.lattice + a, b, c, alpha, beta, gamma = latt.cell_parms() + lines.append("STRUC") + # Line 1: a b c alpha beta gamma space_group_number + lines.append(" %.8g %.8g %.8g %.8g %.8g %.8g 1" % (a, b, c, alpha, beta, gamma)) + # Line 2: origin shift (0 0 0) followed by space-group symbol placeholder + lines.append(" 0.000000 0.000000 0.000000") + lines.append("") + element_order = [] + seen = set() + for a_obj in stru: + el = a_obj.element + if el not in seen: + seen.add(el) + element_order.append(el) + type_index = {el: i + 1 for i, el in enumerate(element_order)} + lines.append("ATOMT") + for el in element_order: + idx = type_index[el] + mass = AtomicMass.get(el, 0.0) + lines.append(" %d %s %.4f 1.0000 1.0000 1.0000 204 # mass=%.7g" % (idx, el, 0.5, mass)) + lines.append("") + lines.append("COORD") + for seq, a_obj in enumerate(stru, start=1): + el = a_obj.element + tidx = type_index[el] + x, y, z = a_obj.xyz + occ = getattr(a_obj, "occupancy", 1.0) + # Isotropic displacement parameter (Uiso), defaulting to 0. + uiso = _get_uiso(a_obj) + lines.append(" %d %d %.8g %.8g %.8g %.4f %.4f" % (seq, tidx, x, y, z, occ, uiso)) + lines.append(" 0 0 0 0 0") + lines.append("") + lines.append("BOUND") + lines.append(" 0.0 1.0 0.0 1.0 0.0 1.0") + lines.append(" 0 0 0 0 0") + lines.append("") + lines.append("EOF") + return lines
+
+ + + +# End of class P_vesta + + +# Routines ------------------------------------------------------------------- + + +
+[docs] +def get_parser(): + """Return new parser object for VESTA format. + + Returns + ------- + P_vesta + Instance of :class:`P_vesta`. + """ + return P_vesta()
+ + + +# Local Helpers -------------------------------------------------------------- + + +def _get_uiso(a): + """Return isotropic displacement parameter for atom *a*. + + Tries ``Uisoequiv`` first, then falls back to the mean of the + diagonal of the anisotropic U tensor, then to zero. + + Parameters + ---------- + a : Atom + Atom instance. + + Returns + ------- + float + Isotropic U value in Ų. + """ + if hasattr(a, "Uisoequiv"): + return float(a.Uisoequiv) + try: + return float(numpy.trace(a.U) / 3.0) + except Exception: + return 0.0 + + +def _assign_auxiliaries(a, fields, auxiliaries, no_velocity): + """Assign auxiliary properties for an + :class:`~diffpy.structure.Atom` object. + + Retained from the original AtomEye/XCFG parser for backward + compatibility with code that calls this helper directly. + + Parameters + ---------- + a : Atom + The Atom instance for which auxiliary properties need to be set. + fields : list + Floating-point values for the current row of the processed file. + auxiliaries : dict + Dictionary of zero-based indices and names of auxiliary properties. + no_velocity : bool + When ``False``, set atom velocity ``a.v`` to ``fields[3:6]``. + Use ``fields[3:6]`` for auxiliary values otherwise. + """ + if not no_velocity: + a.v = numpy.asarray(fields[3:6], dtype=float) + auxfirst = 3 if no_velocity else 6 + for i, prop in auxiliaries.items(): + value = fields[auxfirst + i] + if prop == "Uiso": + a.Uisoequiv = value + elif prop == "Biso": + a.Bisoequiv = value + elif prop[0] in "BU" and all(d in "123" for d in prop[1:]): + nm = prop if prop[1] <= prop[2] else prop[0] + prop[2] + prop[1] + a.anisotropy = True + setattr(a, nm, value) + else: + setattr(a, prop, value) + return +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_xcfg.html b/_modules/diffpy/structure/parsers/p_xcfg.html new file mode 100644 index 00000000..d9d53617 --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_xcfg.html @@ -0,0 +1,634 @@ + + + + + + + + diffpy.structure.parsers.p_xcfg — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_xcfg

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Parser for extended CFG format used by atomeye.
+
+Attributes
+----------
+AtomicMass : dict
+    Dictionary of atomic masses for elements.
+"""
+
+import re
+import sys
+
+import numpy
+
+from diffpy.structure import Structure
+from diffpy.structure.parsers import StructureParser
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.structure.utils import isfloat
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+# Constants ------------------------------------------------------------------
+
+# Atomic Mass of elements
+# This can be later when PeriodicTable package becomes available.
+
+AtomicMass = {
+    "H": 1.007947,  # 1 H hydrogen 1.007947
+    "He": 4.0026022,  # 2 He helium 4.0026022
+    "Li": 6.9412,  # 3 Li lithium 6.9412
+    "Be": 9.0121823,  # 4 Be beryllium 9.0121823
+    "B": 10.8117,  # 5 B boron 10.8117
+    "C": 12.01078,  # 6 C carbon 12.01078
+    "N": 14.00672,  # 7 N nitrogen 14.00672
+    "O": 15.99943,  # 8 O oxygen 15.99943
+    "F": 18.99840325,  # 9 F fluorine 18.99840325
+    "Ne": 20.17976,  # 10 Ne neon 20.17976
+    "Na": 22.9897702,  # 11 Na sodium 22.9897702
+    "Mg": 24.30506,  # 12 Mg magnesium 24.30506
+    "Al": 26.9815382,  # 13 Al aluminium 26.9815382
+    "Si": 28.08553,  # 14 Si silicon 28.08553
+    "P": 30.9737612,  # 15 P phosphorus 30.9737612
+    "S": 32.0655,  # 16 S sulfur 32.0655
+    "Cl": 35.4532,  # 17 Cl chlorine 35.4532
+    "Ar": 39.9481,  # 18 Ar argon 39.9481
+    "K": 39.09831,  # 19 K potassium 39.09831
+    "Ca": 40.0784,  # 20 Ca calcium 40.0784
+    "Sc": 44.9559108,  # 21 Sc scandium 44.9559108
+    "Ti": 47.8671,  # 22 Ti titanium 47.8671
+    "V": 50.94151,  # 23 V vanadium 50.94151
+    "Cr": 51.99616,  # 24 Cr chromium 51.99616
+    "Mn": 54.9380499,  # 25 Mn manganese 54.9380499
+    "Fe": 55.8452,  # 26 Fe iron 55.8452
+    "Co": 58.9332009,  # 27 Co cobalt 58.9332009
+    "Ni": 58.69342,  # 28 Ni nickel 58.69342
+    "Cu": 63.5463,  # 29 Cu copper 63.5463
+    "Zn": 65.4094,  # 30 Zn zinc 65.4094
+    "Ga": 69.7231,  # 31 Ga gallium 69.7231
+    "Ge": 72.641,  # 32 Ge germanium 72.641
+    "As": 74.921602,  # 33 As arsenic 74.921602
+    "Se": 78.963,  # 34 Se selenium 78.963
+    "Br": 79.9041,  # 35 Br bromine 79.9041
+    "Kr": 83.7982,  # 36 Kr krypton 83.7982
+    "Rb": 85.46783,  # 37 Rb rubidium 85.46783
+    "Sr": 87.621,  # 38 Sr strontium 87.621
+    "Y": 88.905852,  # 39 Y yttrium 88.905852
+    "Zr": 91.2242,  # 40 Zr zirconium 91.2242
+    "Nb": 92.906382,  # 41 Nb niobium 92.906382
+    "Mo": 95.942,  # 42 Mo molybdenum 95.942
+    "Tc": 98.0,  # 43 Tc technetium 98
+    "Ru": 101.072,  # 44 Ru ruthenium 101.072
+    "Rh": 102.905502,  # 45 Rh rhodium 102.905502
+    "Pd": 106.421,  # 46 Pd palladium 106.421
+    "Ag": 107.86822,  # 47 Ag silver 107.86822
+    "Cd": 112.4118,  # 48 Cd cadmium 112.4118
+    "In": 114.8183,  # 49 In indium 114.8183
+    "Sn": 118.7107,  # 50 Sn tin 118.7107
+    "Sb": 121.7601,  # 51 Sb antimony 121.7601
+    "Te": 127.603,  # 52 Te tellurium 127.603
+    "I": 126.904473,  # 53 I iodine 126.904473
+    "Xe": 131.2936,  # 54 Xe xenon 131.2936
+    "Cs": 132.905452,  # 55 Cs caesium 132.905452
+    "Ba": 137.3277,  # 56 Ba barium 137.3277
+    "La": 138.90552,  # 57 La lanthanum 138.90552
+    "Ce": 140.1161,  # 58 Ce cerium 140.1161
+    "Pr": 140.907652,  # 59 Pr praseodymium 140.907652
+    "Nd": 144.243,  # 60 Nd neodymium 144.243
+    "Pm": 145.0,  # 61 Pm promethium 145
+    "Sm": 150.363,  # 62 Sm samarium 150.363
+    "Eu": 151.9641,  # 63 Eu europium 151.9641
+    "Gd": 157.253,  # 64 Gd gadolinium 157.253
+    "Tb": 158.925342,  # 65 Tb terbium 158.925342
+    "Dy": 162.5001,  # 66 Dy dysprosium 162.5001
+    "Ho": 164.930322,  # 67 Ho holmium 164.930322
+    "Er": 167.2593,  # 68 Er erbium 167.2593
+    "Tm": 168.934212,  # 69 Tm thulium 168.934212
+    "Yb": 173.043,  # 70 Yb ytterbium 173.043
+    "Lu": 174.9671,  # 71 Lu lutetium 174.9671
+    "Hf": 178.492,  # 72 Hf hafnium 178.492
+    "Ta": 180.94791,  # 73 Ta tantalum 180.94791
+    "W": 183.841,  # 74 W tungsten 183.841
+    "Re": 186.2071,  # 75 Re rhenium 186.2071
+    "Os": 190.233,  # 76 Os osmium 190.233
+    "Ir": 192.2173,  # 77 Ir iridium 192.2173
+    "Pt": 195.0782,  # 78 Pt platinum 195.0782
+    "Au": 196.966552,  # 79 Au gold 196.966552
+    "Hg": 200.592,  # 80 Hg mercury 200.592
+    "Tl": 204.38332,  # 81 Tl thallium 204.38332
+    "Pb": 207.21,  # 82 Pb lead 207.21
+    "Bi": 208.980382,  # 83 Bi bismuth 208.980382
+    "Po": 209.0,  # 84 Po polonium 209
+    "At": 210.0,  # 85 At astatine 210
+    "Rn": 222.0,  # 86 Rn radon 222
+    "Fr": 223.0,  # 87 Fr francium 223
+    "Ra": 226.0,  # 88 Ra radium 226
+    "Ac": 227.0,  # 89 Ac actinium 227
+    "Th": 232.03811,  # 90 Th thorium 232.03811
+    "Pa": 231.035882,  # 91 Pa protactinium 231.035882
+    "U": 238.028913,  # 92 U uranium 238.028913
+    "Np": 237.0,  # 93 Np neptunium 237
+    "Pu": 244.0,  # 94 Pu plutonium 244
+    "Am": 243.0,  # 95 Am americium 243
+    "Cm": 247.0,  # 96 Cm curium 247
+    "Bk": 247.0,  # 97 Bk berkelium 247
+    "Cf": 251.0,  # 98 Cf californium 251
+    "Es": 252.0,  # 99 Es einsteinium 252
+    "Fm": 257.0,  # 100 Fm fermium 257
+    "Md": 258.0,  # 101 Md mendelevium 258
+    "No": 259.0,  # 102 No nobelium 259
+    "Lr": 262.0,  # 103 Lr lawrencium 262
+    "Rf": 261.0,  # 104 Rf rutherfordium 261
+    "Db": 262.0,  # 105 Db dubnium 262
+    "Sg": 266.0,  # 106 Sg seaborgium 266
+    "Bh": 264.0,  # 107 Bh bohrium 264
+    "Hs": 277.0,  # 108 Hs hassium 277
+    "Mt": 268.0,  # 109 Mt meitnerium 268
+    "Ds": 281.0,  # 110 Ds darmstadtium 281
+    "Rg": 272.0,  # 111 Rg roentgenium 272
+}
+
+# ----------------------------------------------------------------------------
+
+base = "diffpy.structure.P_xcfg"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+toLines_deprecation_msg = build_deprecation_message(
+    base,
+    "toLines",
+    "to_lines",
+    removal_version,
+)
+
+
+
+[docs] +class P_xcfg(StructureParser): + """Parser for AtomEye extended CFG format. + + Attributes + ---------- + format : str + Format name, default "xcfg". + """ + + cluster_boundary = 2 + """int: Width of boundary around corners of non-periodic + cluster to avoid PBC effects in atomeye. + """ + + def __init__(self): + StructureParser.__init__(self) + self.format = "xcfg" + return + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_xcfg.parse_lines instead. + """ + return self.parse_lines(lines) + +
+[docs] + def parse_lines(self, lines): + """Parse list of lines in XCFG format. + + Parameters + ---------- + lines : list of str + List of lines in XCFG format. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + Invalid XCFG format. + """ + xcfg_Number_of_particles = None + xcfg_A = None + xcfg_H0 = numpy.zeros((3, 3), dtype=float) + xcfg_H0_set = numpy.zeros((3, 3), dtype=bool) + xcfg_NO_VELOCITY = False + xcfg_entry_count = None + p_nl = 0 + p_auxiliary_re = re.compile(r"^auxiliary\[(\d+)\] =") + p_auxiliary = {} + stru = Structure() + # ignore trailing blank lines + stop = len(lines) + for line in reversed(lines): + if line.strip(): + break + stop -= 1 + # iterator over the valid data lines + ilines = iter(lines[:stop]) + try: + # read XCFG header + for line in ilines: + p_nl += 1 + stripped_line = line.strip() + # blank lines and lines starting with # are ignored + if stripped_line == "" or line[0] == "#": + continue + elif xcfg_Number_of_particles is None: + if line.find("Number of particles =") != 0: + emsg = ("%d: first line must " + "contain 'Number of particles ='") % p_nl + raise StructureFormatError(emsg) + xcfg_Number_of_particles = int(line[21:].split(None, 1)[0]) + p_natoms = xcfg_Number_of_particles + elif line.find("A =") == 0: + xcfg_A = float(line[3:].split(None, 1)[0]) + elif line.find("H0(") == 0: + i, j = (int(line[3]) - 1, int(line[5]) - 1) + xcfg_H0[i, j] = float(line[10:].split(None, 1)[0]) + xcfg_H0_set[i, j] = True + elif line.find(".NO_VELOCITY.") == 0: + xcfg_NO_VELOCITY = True + elif line.find("entry_count =") == 0: + xcfg_entry_count = int(line[13:].split(None, 1)[0]) + elif p_auxiliary_re.match(line): + m = p_auxiliary_re.match(line) + idx = int(m.group(1)) + p_auxiliary[idx] = line[m.end() :].split(None, 1)[0] + else: + break + # check header for consistency + if not numpy.all(xcfg_H0_set): + emsg = "H0 tensor is not properly defined" + raise StructureFormatError(emsg) + p_auxnum = len(p_auxiliary) and max(p_auxiliary.keys()) + 1 + for i in range(p_auxnum): + if i not in p_auxiliary: + p_auxiliary[i] = "aux%d" % i + sorted_aux_keys = sorted(p_auxiliary.keys()) + if p_auxnum != 0: + stru.xcfg = {"auxiliaries": [p_auxiliary[k] for k in sorted_aux_keys]} + ecnt = len(p_auxiliary) + (3 if xcfg_NO_VELOCITY else 6) + if ecnt != xcfg_entry_count: + emsg = ("%d: auxiliary fields are " "not consistent with entry_count") % p_nl + raise StructureFormatError(emsg) + # define proper lattice + stru.lattice.set_new_latt_base_vec(xcfg_H0) + # here we are inside the data block + p_element = None + for line in ilines: + p_nl += 1 + words = line.split() + # ignore atom mass + if len(words) == 1 and isfloat(words[0]): + continue + # parse element allowing empty symbol + elif len(words) <= 1: + w = line.strip() + p_element = w[:1].upper() + w[1:].lower() + elif len(words) == xcfg_entry_count and p_element is not None: + fields = [float(w) for w in words] + xyz = [xcfg_A * xi for xi in fields[:3]] + stru.add_new_atom(p_element, xyz=xyz) + a = stru[-1] + _assign_auxiliaries( + a, + fields, + auxiliaries=p_auxiliary, + no_velocity=xcfg_NO_VELOCITY, + ) + else: + emsg = "%d: invalid record" % p_nl + raise StructureFormatError(emsg) + if len(stru) != p_natoms: + emsg = "expected %d atoms, read %d" % (p_natoms, len(stru)) + raise StructureFormatError(emsg) + except (ValueError, IndexError): + emsg = "%d: file is not in XCFG format" % p_nl + exc_type, exc_value, exc_traceback = sys.exc_info() + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + return stru
+ + + @deprecated(toLines_deprecation_msg) + def toLines(self, stru): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_xcfg.to_lines instead. + """ + return self.to_lines(stru) + +
+[docs] + def to_lines(self, stru): + """Convert Structure stru to a list of lines in XCFG atomeye + format. + + Parameters + ---------- + stru : Structure + Structure to be converted. + + Returns + ------- + list of str + List of lines in XCFG format. + + Raises + ------ + StructureFormatError + Cannot convert empty structure to XCFG format. + """ + if len(stru) == 0: + emsg = "cannot convert empty structure to XCFG format" + raise StructureFormatError(emsg) + lines = [] + lines.append("Number of particles = %i" % len(stru)) + # figure out length unit A + allxyz = numpy.array([a.xyz for a in stru]) + lo_xyz = allxyz.min(axis=0) + hi_xyz = allxyz.max(axis=0) + max_range_xyz = (hi_xyz - lo_xyz).max() + if numpy.allclose(stru.lattice.cell_parms(), (1, 1, 1, 90, 90, 90)): + max_range_xyz += self.cluster_boundary + # range of CFG coordinates must be less than 1 + p_A = numpy.ceil(max_range_xyz + 1.0e-13) + # atomeye draws rubbish when boxsize is less than 3.5 + hi_ucvect = max([numpy.sqrt(numpy.dot(v, v)) for v in stru.lattice.base]) + if hi_ucvect * p_A < 3.5: + p_A = numpy.ceil(3.5 / hi_ucvect) + lines.append("A = %.8g Angstrom" % p_A) + # how much do we need to shift the coordinates? + p_dxyz = numpy.zeros(3, dtype=float) + for i in range(3): + if lo_xyz[i] / p_A < 0.0 or hi_xyz[i] / p_A >= 1.0 or (lo_xyz[i] == hi_xyz[i] and lo_xyz[i] == 0.0): + p_dxyz[i] = 0.5 - (hi_xyz[i] + lo_xyz[i]) / 2.0 / p_A + # H0 tensor + for i in range(3): + for j in range(3): + lines.append("H0(%i,%i) = %.8g A" % (i + 1, j + 1, stru.lattice.base[i, j])) + # get out for empty structure + if len(stru) == 0: + return lines + a_first = stru[0] + p_NO_VELOCITY = "v" not in a_first.__dict__ + if p_NO_VELOCITY: + lines.append(".NO_VELOCITY.") + # build a p_auxiliaries list of (aux_name,atom_expression) tuples + # if stru came from xcfg file, it would store original auxiliaries in + # xcfg dictionary + try: + p_auxiliaries = [(aux, "a." + aux) for aux in stru.xcfg["auxiliaries"]] + except AttributeError: + p_auxiliaries = [] + # add occupancy if any atom has nonunit occupancy + for a in stru: + if a.occupancy != 1.0: + p_auxiliaries.append(("occupancy", "a.occupancy")) + break + # add temperature factor with as many terms as needed + # check whether all temperature factors are zero or isotropic + p_allUzero = True + p_allUiso = True + for a in stru: + if p_allUzero and numpy.any(a.U != 0.0): + p_allUzero = False + if not numpy.all(a.U == a.U[0, 0] * numpy.identity(3)): + p_allUiso = False + # here p_allUzero must be false + break + if p_allUzero: + pass + elif p_allUiso: + p_auxiliaries.append(("Uiso", "uflat[0]")) + else: + p_auxiliaries.extend([("U11", "uflat[0]"), ("U22", "uflat[4]"), ("U33", "uflat[8]")]) + # check if there are off-diagonal elements + allU = numpy.array([a.U for a in stru]) + if numpy.any(allU[:, 0, 1] != 0.0): + p_auxiliaries.append(("U12", "uflat[1]")) + if numpy.any(allU[:, 0, 2] != 0.0): + p_auxiliaries.append(("U13", "uflat[2]")) + if numpy.any(allU[:, 1, 2] != 0.0): + p_auxiliaries.append(("U23", "uflat[5]")) + # count entries + p_entry_count = (3 if p_NO_VELOCITY else 6) + len(p_auxiliaries) + lines.append("entry_count = %d" % p_entry_count) + # add auxiliaries + for i in range(len(p_auxiliaries)): + lines.append("auxiliary[%d] = %s [au]" % (i, p_auxiliaries[i][0])) + # now define entry format efmt for representing atom properties + fmwords = ["{pos[0]:.8g}", "{pos[1]:.8g}", "{pos[2]:.8g}"] + if not p_NO_VELOCITY: + fmwords += ["{v[0]:.8g}", "{v[1]:.8g}", "{v[2]:.8g}"] + fmwords += (("{" + e + ":.8g}") for p, e in p_auxiliaries) + efmt = " ".join(fmwords) + # we are ready to output atoms: + lines.append("") + p_element = None + for a in stru: + if a.element != p_element: + p_element = a.element + lines.append("%.4f" % AtomicMass.get(p_element, 0.0)) + lines.append(p_element) + pos = a.xyz / p_A + p_dxyz + v = None if p_NO_VELOCITY else a.v + uflat = numpy.ravel(a.U) + entry = efmt.format(pos=pos, v=v, uflat=uflat, a=a) + lines.append(entry) + return lines
+
+ + + +# End of class P_xcfg + +# Routines ------------------------------------------------------------------- + +parsers_base = "diffpy.structure" +getParser_deprecation_msg = build_deprecation_message( + parsers_base, + "getParser", + "get_parser", + removal_version, +) + + +@deprecated(getParser_deprecation_msg) +def getParser(): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.P_xcfg.get_parser instead. + """ + return get_parser() + + +
+[docs] +def get_parser(): + """Return new `parser` object for XCFG format. + + Returns + ------- + P_xcfg + Instance of `P_xcfg`. + """ + return P_xcfg()
+ + + +# Local Helpers -------------------------------------------------------------- + + +def _assign_auxiliaries(a, fields, auxiliaries, no_velocity): + """Assign auxiliary properties for `Atom` object when reading CFG + format. + + Parameters + ---------- + a : Atom + The `Atom` instance for which the auxiliary properties need to be set. + fields : list + Floating point values for the current row of the processed CFG file. + auxiliaries : dict + Dictionary of zero-based indices and names of auxiliary properties + defined in the CFG format. + no_velocity : bool + When `False` set atom velocity `a.v` to `fields[3:6]`. + Use `fields[3:6]` for auxiliary values otherwise. + """ + if not no_velocity: + a.v = numpy.asarray(fields[3:6], dtype=float) + auxfirst = 3 if no_velocity else 6 + for i, prop in auxiliaries.items(): + value = fields[auxfirst + i] + if prop == "Uiso": + a.Uisoequiv = value + elif prop == "Biso": + a.Bisoequiv = value + elif prop[0] in "BU" and all(d in "123" for d in prop[1:]): + nm = prop if prop[1] <= prop[2] else prop[0] + prop[2] + prop[1] + a.anisotropy = True + setattr(a, nm, value) + else: + setattr(a, prop, value) + return +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/p_xyz.html b/_modules/diffpy/structure/parsers/p_xyz.html new file mode 100644 index 00000000..bf0dfb51 --- /dev/null +++ b/_modules/diffpy/structure/parsers/p_xyz.html @@ -0,0 +1,331 @@ + + + + + + + + diffpy.structure.parsers.p_xyz — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.p_xyz

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Parser for XYZ file format, where.
+
+* First line gives number of atoms.
+* Second line has optional title.
+* Remaining lines contain element, `x, y, z`.
+"""
+
+import sys
+
+from diffpy.structure import Structure
+from diffpy.structure.parsers import StructureParser
+from diffpy.structure.structureerrors import StructureFormatError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.P_xyz"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+toLines_deprecation_msg = build_deprecation_message(
+    base,
+    "toLines",
+    "to_lines",
+    removal_version,
+)
+
+
+
+[docs] +class P_xyz(StructureParser): + """Parser for standard XYZ structure format. + + Attributes + ---------- + format : str + Format name, default "xyz". + """ + + def __init__(self): + StructureParser.__init__(self) + self.format = "xyz" + return + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_xyz.parse_lines instead. + """ + return self.parse_lines(lines) + +
+[docs] + def parse_lines(self, lines): + """Parse list of lines in XYZ format. + + Parameters + ---------- + lines : list of str + List of lines in XYZ format. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + Invalid XYZ format. + """ + linefields = [line.split() for line in lines] + # prepare output structure + stru = Structure() + # find first valid record + start = 0 + for field in linefields: + if len(field) == 0 or field[0] == "#": + start += 1 + else: + break + # first valid line gives number of atoms + try: + lfs = linefields[start] + w1 = linefields[start][0] + if len(lfs) == 1 and str(int(w1)) == w1: + p_natoms = int(w1) + stru.title = lines[start + 1].strip() + start += 2 + else: + emsg = "%d: invalid XYZ format, missing number of atoms" % (start + 1) + raise StructureFormatError(emsg) + except (IndexError, ValueError): + exc_type, exc_value, exc_traceback = sys.exc_info() + emsg = "%d: invalid XYZ format, missing number of atoms" % (start + 1) + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + # find the last valid record + stop = len(lines) + while stop > start and len(linefields[stop - 1]) == 0: + stop -= 1 + # get out for empty structure + if p_natoms == 0 or start >= stop: + return stru + # here we have at least one valid record line + nfields = len(linefields[start]) + if nfields != 4: + emsg = "%d: invalid XYZ format, expected 4 columns" % (start + 1) + raise StructureFormatError(emsg) + # now try to read all record lines + try: + p_nl = start + for fields in linefields[start:]: + p_nl += 1 + if fields == []: + continue + elif len(fields) != nfields: + emsg = ("%d: all lines must have " + "the same number of columns") % p_nl + raise StructureFormatError(emsg) + element = fields[0] + element = element[0].upper() + element[1:].lower() + xyz = [float(f) for f in fields[1:4]] + stru.add_new_atom(element, xyz=xyz) + except ValueError: + exc_type, exc_value, exc_traceback = sys.exc_info() + emsg = "%d: invalid number format" % p_nl + e = StructureFormatError(emsg) + raise e.with_traceback(exc_traceback) + # finally check if all the atoms have been read + if p_natoms is not None and len(stru) != p_natoms: + emsg = "expected %d atoms, read %d" % (p_natoms, len(stru)) + raise StructureFormatError(emsg) + return stru
+ + + @deprecated(toLines_deprecation_msg) + def toLines(self, stru): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.P_xyz.to_lines instead. + """ + return self.to_lines(stru) + +
+[docs] + def to_lines(self, stru): + """Convert Structure stru to a list of lines in XYZ format. + + Parameters + ---------- + stru : Structure + Structure to be converted. + + Returns + ------- + list of str + List of lines in XYZ format. + """ + lines = [] + lines.append(str(len(stru))) + lines.append(stru.title) + for a in stru: + rc = a.xyz_cartn + s = "%-3s %g %g %g" % (a.element, rc[0], rc[1], rc[2]) + lines.append(s) + return lines
+
+ + + +# End of class P_xyz + +# Routines ------------------------------------------------------------------- + +parsers_base = "diffpy.structure" +getParser_deprecation_msg = build_deprecation_message( + parsers_base, + "getParser", + "get_parser", + removal_version, +) + + +@deprecated(getParser_deprecation_msg) +def getParser(): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.P_xyz.get_parser instead. + """ + return get_parser() + + +
+[docs] +def get_parser(): + """Return new `parser` object for XYZ format. + + Returns + ------- + P_xcfg + Instance of `P_xyz`. + """ + return P_xyz()
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/parsers/structureparser.html b/_modules/diffpy/structure/parsers/structureparser.html new file mode 100644 index 00000000..f775e0be --- /dev/null +++ b/_modules/diffpy/structure/parsers/structureparser.html @@ -0,0 +1,253 @@ + + + + + + + + diffpy.structure.parsers.structureparser — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.parsers.structureparser

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2008 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Definition of StructureParser, a base class for specific parsers."""
+
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.StructureParser"
+removal_version = "4.0.0"
+parseLines_deprecation_msg = build_deprecation_message(
+    base,
+    "parseLines",
+    "parse_lines",
+    removal_version,
+)
+parseFile_deprecation_msg = build_deprecation_message(
+    base,
+    "parseFile",
+    "parse_file",
+    removal_version,
+)
+toLines_deprecation_msg = build_deprecation_message(
+    base,
+    "toLines",
+    "to_lines",
+    removal_version,
+)
+
+
+
+[docs] +class StructureParser(object): + """Base class for all structure parsers. + + Attributes + ---------- + format : str + Format name of particular parser. + filename : str + Path to structure file that is read or written. + """ + + def __init__(self): + self.format = None + self.filename = None + return + + @deprecated(parseLines_deprecation_msg) + def parseLines(self, lines): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.StructureParser.parse_lines instead. + """ + return self.parse_lines(lines) + +
+[docs] + def parse_lines(self, lines): + """Create Structure instance from a list of lines. + + Return Structure object or raise StructureFormatError exception. + + Note + ---- + This method has to be overloaded in derived class. + """ + raise NotImplementedError("parse lines not defined for '%s' format" % self.format) + return
+ + + @deprecated(toLines_deprecation_msg) + def toLines(self, stru): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.StructureParser.to_lines instead. + """ + return self.to_lines(stru) + +
+[docs] + def to_lines(self, stru): + """Convert Structure stru to a list of lines. + + Return list of strings. + + Note + ---- + This method has to be overloaded in derived class. + """ + raise NotImplementedError("to_lines not defined for '%s' format" % self.format)
+ + +
+[docs] + def parse(self, s): + """Create `Structure` instance from a string.""" + lines = s.rstrip("\r\n").split("\n") + stru = self.parseLines(lines) + return stru
+ + +
+[docs] + def tostring(self, stru): + """Convert `Structure` instance to a string.""" + lines = self.to_lines(stru) + s = "\n".join(lines) + "\n" + return s
+ + + @deprecated(parseFile_deprecation_msg) + def parseFile(self, filename): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.StructureParser.parse_file instead. + """ + return self.parse_file(filename) + +
+[docs] + def parse_file(self, filename): + """Create Structure instance from an existing file.""" + self.filename = filename + with open(filename) as fp: + s = fp.read() + stru = self.parse(s) + return stru
+
+ + + +# End of class StructureParser +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/pdffitstructure.html b/_modules/diffpy/structure/pdffitstructure.html new file mode 100644 index 00000000..7fcc3ac6 --- /dev/null +++ b/_modules/diffpy/structure/pdffitstructure.html @@ -0,0 +1,242 @@ + + + + + + + + diffpy.structure.pdffitstructure — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.pdffitstructure

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2006 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Definition of PDFFitStructure class derived from Structure."""
+
+
+from diffpy.structure.structure import Structure
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure.PDFFitStructure"
+removal_version = "4.0.0"
+readStr_deprecation_msg = build_deprecation_message(
+    base,
+    "readStr",
+    "read_structure",
+    removal_version,
+)
+
+# ----------------------------------------------------------------------------
+
+
+
+[docs] +class PDFFitStructure(Structure): + """PDFFitStructure --> Structure with extra pdffit member. + + Parameters + ---------- + *args, **kwargs : + See `Structure` class constructor. + + Attributes + ---------- + pdffit : dict + Dictionary for storing following extra parameters from + PDFFit structure files: + `'scale', 'delta1', 'delta2', 'sratio', + 'rcut', 'spcgr', 'dcell', 'ncell'` + """ + + def __init__(self, *args, **kwargs): + self.pdffit = { + "scale": 1.0, + "delta1": 0.0, + "delta2": 0.0, + "sratio": 1.0, + "rcut": 0.0, + "spcgr": "P1", + "spdiameter": 0.0, + "stepcut": 0.0, + "dcell": 6 * [0.0], + "ncell": [1, 1, 1, 0], + } + Structure.__init__(self, *args, **kwargs) + return + +
+[docs] + def read(self, filename, format="auto"): + """Same as `Structure.read`, but update `spcgr` value in + `self.pdffit` when parser can get spacegroup. + + See `Structure.read()` for more info. + + Parameters + ---------- + filename : str + File to be loaded. + format : str, Optional + All structure formats are defined in parsers submodule, + when ``format == 'auto'`` all parsers are tried one by one. + + Return + ------ + StructureParser + Instance of StructureParser used to load the data. + """ + p = Structure.read(self, filename, format) + sg = getattr(p, "spacegroup", None) + if sg: + self.pdffit["spcgr"] = sg.short_name + return p
+ + + @deprecated(readStr_deprecation_msg) + def readStr(self, s, format="auto"): + """'diffpy.structure.PDFFitStructure.readStr' is deprecated and + will be removed in version 4.0.0. + + Please use 'diffpy.structure.PDFFitStructure.read_structure' + instead. + """ + return self.read_structure(s, format) + +
+[docs] + def read_structure(self, s, format="auto"): + """Same as `Structure.readStr`, but update `spcgr` value in + `self.pdffit` when parser can get spacegroup. + + See `Structure.readStr()` for more info. + + Parameters + ---------- + s : str + String with structure definition. + format : str, Optional + All structure formats are defined in parsers submodule. When ``format == 'auto'``, + all parsers are tried one by one. + + Return + ------ + StructureParser + Instance of `StructureParser` used to load the data. + """ + p = Structure.read_structure(self, s, format) + sg = getattr(p, "spacegroup", None) + if sg: + self.pdffit["spcgr"] = sg.short_name + return p
+
+ + + +# End of class PDFFitStructure +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/spacegroupmod.html b/_modules/diffpy/structure/spacegroupmod.html new file mode 100644 index 00000000..35ab4526 --- /dev/null +++ b/_modules/diffpy/structure/spacegroupmod.html @@ -0,0 +1,475 @@ + + + + + + + + diffpy.structure.spacegroupmod — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.spacegroupmod

+#!/usr/bin/env python
+# Copyright 2002 by PyMMLib Development Group, http://pymmlib.sourceforge.net/
+# This code is part of the PyMMLib distribution and governed by
+# its license. Please see the LICENSE_pymmlib file that should have been
+# included as part of this package.
+"""Symmetry operations as functions on vectors or arrays."""
+
+import numpy
+
+# 64 unique rotation matrices
+Rot_Z_mY_X = numpy.array([[0.0, 0.0, 1.0], [0.0, -1.0, 0.0], [1.0, 0.0, 0.0]], float)
+Rot_Y_mX_mZ = numpy.array([[0.0, 1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_XmY_X_mZ = numpy.array([[1.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_mX_Y_mZ = numpy.array([[-1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_X_mZ_Y = numpy.array([[1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, 1.0, 0.0]], float)
+Rot_Y_mXY_Z = numpy.array([[0.0, 1.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_Y_mX_Z = numpy.array([[0.0, 1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_XmY_X_Z = numpy.array([[1.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_mX_mXY_mZ = numpy.array([[-1.0, 0.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_Y_Z_X = numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, 1.0], [1.0, 0.0, 0.0]], float)
+Rot_mY_mZ_X = numpy.array([[0.0, -1.0, 0.0], [0.0, 0.0, -1.0], [1.0, 0.0, 0.0]], float)
+Rot_X_Z_mY = numpy.array([[1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, -1.0, 0.0]], float)
+Rot_XmY_mY_Z = numpy.array([[1.0, -1.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_Y_X_mZ = numpy.array([[0.0, 1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_Y_mZ_X = numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, -1.0], [1.0, 0.0, 0.0]], float)
+Rot_mXY_Y_Z = numpy.array([[-1.0, 1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_mX_mY_mZ = numpy.array([[-1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_X_Y_mZ = numpy.array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_mXY_mX_Z = numpy.array([[-1.0, 1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_mZ_mY_mX = numpy.array([[0.0, 0.0, -1.0], [0.0, -1.0, 0.0], [-1.0, 0.0, 0.0]], float)
+Rot_X_mZ_mY = numpy.array([[1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, -1.0, 0.0]], float)
+Rot_X_Y_Z = numpy.array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_mY_mX_mZ = numpy.array([[0.0, -1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_mY_X_Z = numpy.array([[0.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_Z_X_Y = numpy.array([[0.0, 0.0, 1.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], float)
+Rot_X_XmY_Z = numpy.array([[1.0, 0.0, 0.0], [1.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_mY_X_mZ = numpy.array([[0.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_mY_Z_mX = numpy.array([[0.0, -1.0, 0.0], [0.0, 0.0, 1.0], [-1.0, 0.0, 0.0]], float)
+Rot_mY_Z_X = numpy.array([[0.0, -1.0, 0.0], [0.0, 0.0, 1.0], [1.0, 0.0, 0.0]], float)
+Rot_mX_mZ_mY = numpy.array([[-1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, -1.0, 0.0]], float)
+Rot_mX_Z_Y = numpy.array([[-1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 1.0, 0.0]], float)
+Rot_mZ_mX_mY = numpy.array([[0.0, 0.0, -1.0], [-1.0, 0.0, 0.0], [0.0, -1.0, 0.0]], float)
+Rot_X_XmY_mZ = numpy.array([[1.0, 0.0, 0.0], [1.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_mY_XmY_mZ = numpy.array([[0.0, -1.0, 0.0], [1.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_Z_X_mY = numpy.array([[0.0, 0.0, 1.0], [1.0, 0.0, 0.0], [0.0, -1.0, 0.0]], float)
+Rot_mZ_mY_X = numpy.array([[0.0, 0.0, -1.0], [0.0, -1.0, 0.0], [1.0, 0.0, 0.0]], float)
+Rot_X_Z_Y = numpy.array([[1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 1.0, 0.0]], float)
+Rot_Z_mX_mY = numpy.array([[0.0, 0.0, 1.0], [-1.0, 0.0, 0.0], [0.0, -1.0, 0.0]], float)
+Rot_mX_Z_mY = numpy.array([[-1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, -1.0, 0.0]], float)
+Rot_X_mY_Z = numpy.array([[1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_mY_mX_Z = numpy.array([[0.0, -1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_Z_mY_mX = numpy.array([[0.0, 0.0, 1.0], [0.0, -1.0, 0.0], [-1.0, 0.0, 0.0]], float)
+Rot_mX_mY_Z = numpy.array([[-1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_Z_Y_X = numpy.array([[0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [1.0, 0.0, 0.0]], float)
+Rot_mZ_Y_mX = numpy.array([[0.0, 0.0, -1.0], [0.0, 1.0, 0.0], [-1.0, 0.0, 0.0]], float)
+Rot_Y_Z_mX = numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, 1.0], [-1.0, 0.0, 0.0]], float)
+Rot_mY_XmY_Z = numpy.array([[0.0, -1.0, 0.0], [1.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_mXY_Y_mZ = numpy.array([[-1.0, 1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_mZ_mX_Y = numpy.array([[0.0, 0.0, -1.0], [-1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], float)
+Rot_mX_mZ_Y = numpy.array([[-1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, 1.0, 0.0]], float)
+Rot_mX_Y_Z = numpy.array([[-1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_X_mY_mZ = numpy.array([[1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_mZ_X_Y = numpy.array([[0.0, 0.0, -1.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], float)
+Rot_Y_mZ_mX = numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, -1.0], [-1.0, 0.0, 0.0]], float)
+Rot_mY_mZ_mX = numpy.array([[0.0, -1.0, 0.0], [0.0, 0.0, -1.0], [-1.0, 0.0, 0.0]], float)
+Rot_mZ_Y_X = numpy.array([[0.0, 0.0, -1.0], [0.0, 1.0, 0.0], [1.0, 0.0, 0.0]], float)
+Rot_Z_Y_mX = numpy.array([[0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [-1.0, 0.0, 0.0]], float)
+Rot_mXY_mX_mZ = numpy.array([[-1.0, 1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_XmY_mY_mZ = numpy.array([[1.0, -1.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_Z_mX_Y = numpy.array([[0.0, 0.0, 1.0], [-1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], float)
+Rot_mX_mXY_Z = numpy.array([[-1.0, 0.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float)
+Rot_Y_mXY_mZ = numpy.array([[0.0, 1.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float)
+Rot_mZ_X_mY = numpy.array([[0.0, 0.0, -1.0], [1.0, 0.0, 0.0], [0.0, -1.0, 0.0]], float)
+Rot_Y_X_Z = numpy.array([[0.0, 1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float)
+
+# 32 unique translation vectors
+Tr_0_0_34 = numpy.array([0.0, 0.0, 3.0 / 4.0], float)
+Tr_12_0_34 = numpy.array([1.0 / 2.0, 0.0, 3.0 / 4.0], float)
+Tr_0_0_56 = numpy.array([0.0, 0.0, 5.0 / 6.0], float)
+Tr_12_0_12 = numpy.array([1.0 / 2.0, 0.0, 1.0 / 2.0], float)
+Tr_0_12_12 = numpy.array([0.0, 1.0 / 2.0, 1.0 / 2.0], float)
+Tr_12_0_14 = numpy.array([1.0 / 2.0, 0.0, 1.0 / 4.0], float)
+Tr_0_12_14 = numpy.array([0.0, 1.0 / 2.0, 1.0 / 4.0], float)
+Tr_14_14_14 = numpy.array([1.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0], float)
+Tr_0_12_34 = numpy.array([0.0, 1.0 / 2.0, 3.0 / 4.0], float)
+Tr_34_14_14 = numpy.array([3.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0], float)
+Tr_0_0_0 = numpy.array([0.0, 0.0, 0.0], float)
+Tr_23_13_56 = numpy.array([2.0 / 3.0, 1.0 / 3.0, 5.0 / 6.0], float)
+Tr_14_14_34 = numpy.array([1.0 / 4.0, 1.0 / 4.0, 3.0 / 4.0], float)
+Tr_12_12_0 = numpy.array([1.0 / 2.0, 1.0 / 2.0, 0.0], float)
+Tr_23_13_13 = numpy.array([2.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0], float)
+Tr_13_23_23 = numpy.array([1.0 / 3.0, 2.0 / 3.0, 2.0 / 3.0], float)
+Tr_12_12_12 = numpy.array([1.0 / 2.0, 1.0 / 2.0, 1.0 / 2.0], float)
+Tr_12_12_14 = numpy.array([1.0 / 2.0, 1.0 / 2.0, 1.0 / 4.0], float)
+Tr_14_34_14 = numpy.array([1.0 / 4.0, 3.0 / 4.0, 1.0 / 4.0], float)
+Tr_12_12_34 = numpy.array([1.0 / 2.0, 1.0 / 2.0, 3.0 / 4.0], float)
+Tr_0_0_23 = numpy.array([0.0, 0.0, 2.0 / 3.0], float)
+Tr_0_12_0 = numpy.array([0.0, 1.0 / 2.0, 0.0], float)
+Tr_14_34_34 = numpy.array([1.0 / 4.0, 3.0 / 4.0, 3.0 / 4.0], float)
+Tr_34_34_14 = numpy.array([3.0 / 4.0, 3.0 / 4.0, 1.0 / 4.0], float)
+Tr_12_0_0 = numpy.array([1.0 / 2.0, 0.0, 0.0], float)
+Tr_34_34_34 = numpy.array([3.0 / 4.0, 3.0 / 4.0, 3.0 / 4.0], float)
+Tr_0_0_13 = numpy.array([0.0, 0.0, 1.0 / 3.0], float)
+Tr_0_0_12 = numpy.array([0.0, 0.0, 1.0 / 2.0], float)
+Tr_13_23_16 = numpy.array([1.0 / 3.0, 2.0 / 3.0, 1.0 / 6.0], float)
+Tr_0_0_14 = numpy.array([0.0, 0.0, 1.0 / 4.0], float)
+Tr_0_0_16 = numpy.array([0.0, 0.0, 1.0 / 6.0], float)
+Tr_34_14_34 = numpy.array([3.0 / 4.0, 1.0 / 4.0, 3.0 / 4.0], float)
+
+
+
+[docs] +class SymOp(object): + """The transformation of coordinates to a symmetry-related position. + + The SymOp operation involves rotation and translation in cell coordinates. + + Parameters + ---------- + R : numpy.ndarray + The 3x3 matrix of rotation for this symmetry operation. + t : numpy.ndarray + The vector of translation in this symmetry operation. + + Attributes + ---------- + R : numpy.ndarray + The 3x3 matrix of rotation pertaining to unit cell coordinates. + This may be identity, simple rotation, improper rotation, mirror + or inversion. The determinant of *R* is either +1 or -1. + t : numpy.ndarray + The translation of cell coordinates applied after rotation *R*. + """ + + def __init__(self, R, t): + self.R = R + self.t = t + return + + def __str__(self): + """Printable representation of this SymOp object.""" + x = "[%6.3f %6.3f %6.3f %6.3f]\n" % ( + self.R[0, 0], + self.R[0, 1], + self.R[0, 2], + self.t[0], + ) + x += "[%6.3f %6.3f %6.3f %6.3f]\n" % ( + self.R[1, 0], + self.R[1, 1], + self.R[1, 2], + self.t[1], + ) + x += "[%6.3f %6.3f %6.3f %6.3f]\n" % ( + self.R[2, 0], + self.R[2, 1], + self.R[2, 2], + self.t[2], + ) + return x + +
+[docs] + def __call__(self, vec): + """Return symmetry-related position for the specified + coordinates. + + Parameters + ---------- + vec : numpy.ndarray + The initial position in fractional cell coordinates. + + Returns + ------- + numpy.ndarray + The transformed position after this symmetry operation. + """ + return numpy.dot(self.R, vec) + self.t
+ + +
+[docs] + def __eq__(self, symop): + """Implement the ``self == symop`` test of equality. + + Return ``True`` when *self* and *symop* difference is within + tiny round-off errors. + """ + return numpy.allclose(self.R, symop.R) and numpy.allclose(self.t, symop.t)
+ + +
+[docs] + def is_identity(self): + """Check if this SymOp is an identity operation. + + Returns + ------- + bool + ``True`` if this is an identity operation within a small round-off. + Return ``False`` otherwise. + """ + rv = numpy.allclose(self.R, numpy.identity(3, float)) and numpy.allclose(self.t, numpy.zeros(3, float)) + return rv
+
+ + + +# End of class SymOp + + +
+[docs] +class SpaceGroup(object): + """Definition and basic operations for a specific space group. + + Provide standard names and all symmetry operations contained in + one space group. + + Parameters + ---------- + number : int + The space group number. + num_sym_equiv : int + The number of symmetry equivalent sites for a general position. + num_primitive_sym_equiv : int + The number of symmetry equivalent sites in a primitive unit cell. + short_name : str + The short Hermann-Mauguin symbol of the space group. + point_group_name : str + The point group of this space group. + crystal_system : str + The crystal system of this space group. + pdb_name : str + The full Hermann-Mauguin symbol of the space group. + symop_list : list of SymOp + The symmetry operations contained in this space group. + + Attributes + ---------- + number : int + A unique space group number. This may be incremented by + several thousands to facilitate unique values for multiple + settings of the same space group. Use ``number % 1000`` + to get the standard space group number from International + Tables. + num_sym_equiv : int + The number of symmetry equivalent sites for a general position. + num_primitive_sym_equiv : int + The number of symmetry equivalent sites in a primitive unit cell. + short_name : str + The short Hermann-Mauguin symbol of the space group. + point_group_name : str + The point group to which this space group belongs to. + crystal_system : str + The crystal system of this space group. The possible values are + ``"TRICLINIC", "MONOCLINIC", "ORTHORHOMBIC", "TETRAGONAL", + "TRIGONAL" "HEXAGONAL", "CUBIC"``. + pdb_name : str + The full Hermann-Mauguin symbol of the space group. + symop_list : list of SymOp + A list of `SymOp` objects for all symmetry operations + in this space group. + """ + + def __init__( + self, + number=None, + num_sym_equiv=None, + num_primitive_sym_equiv=None, + short_name=None, + point_group_name=None, + crystal_system=None, + pdb_name=None, + symop_list=None, + ): + + self.number = number + self.num_sym_equiv = num_sym_equiv + self.num_primitive_sym_equiv = num_primitive_sym_equiv + self.short_name = short_name + self.point_group_name = point_group_name + self.crystal_system = crystal_system + self.pdb_name = pdb_name + self.symop_list = symop_list + + def __repr__(self): + """Return a string representation of the space group.""" + return ("SpaceGroup #%i (%s, %s). Symmetry matrices: %i, " "point sym. matr.: %i") % ( + self.number, + self.short_name, + self.crystal_system[0] + self.crystal_system[1:].lower(), + self.num_sym_equiv, + self.num_primitive_sym_equiv, + ) + +
+[docs] + def iter_symops(self): + """Iterate over all symmetry operations in the space group. + + Yields + ------ + SymOp + Generate all symmetry operations for this space group. + """ + return iter(self.symop_list)
+ + +
+[docs] + def check_group_name(self, name): + """Check if given name matches this space group. + + Parameters + ---------- + name : str or int + The space group identifier, a string name or number. + + Returns + ------- + bool + ``True`` if the specified name matches one of the recognized + names of this space group or if it equals its `number`. + Return ``False`` otherwise. + """ + + if name == self.short_name: + return True + if name == self.pdb_name: + return True + if name == self.point_group_name: + return True + if name == self.number: + return True + return False
+ + +
+[docs] + def iter_equivalent_positions(self, vec): + """Generate symmetry equivalent positions for the specified + position. + + The initial position must be in fractional coordinates and so + are the symmetry equivalent positions yielded by iteration. + This generates `num_sym_equiv` positions regardless of initial + coordinates being a special symmetry position or not. + + Parameters + ---------- + vec : numpy.ndarray + The initial position in fractional coordinates. + + Yields + ------ + numpy.ndarray + The symmetry equivalent positions in fractional coordinates. + The positions may be duplicate or outside of the ``0 <= x < 1`` + unit cell bounds. + """ + for symop in self.symop_list: + yield symop(vec) + pass
+
+ + + +# End of class SpaceGroup +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/spacegroups.html b/_modules/diffpy/structure/spacegroups.html new file mode 100644 index 00000000..c3fefcb5 --- /dev/null +++ b/_modules/diffpy/structure/spacegroups.html @@ -0,0 +1,1626 @@ + + + + + + + + diffpy.structure.spacegroups — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.spacegroups

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2011 Trustees of the Columbia University
+#                   in the City of New York.  All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Space group classes and definitions from mmLib and sgtbx.
+
+Attributes
+----------
+SpaceGroupList : list
+    List of all spacegroup definitions.
+"""
+
+import copy
+from itertools import zip_longest
+
+from diffpy.structure.mmlibspacegroups import (
+    mmLibSpaceGroupList,
+    sg1,
+    sg2,
+    sg3,
+    sg4,
+    sg5,
+    sg6,
+    sg7,
+    sg8,
+    sg9,
+    sg10,
+    sg11,
+    sg12,
+    sg13,
+    sg14,
+    sg15,
+    sg16,
+    sg17,
+    sg18,
+    sg19,
+    sg20,
+    sg21,
+    sg22,
+    sg23,
+    sg24,
+    sg25,
+    sg26,
+    sg27,
+    sg28,
+    sg29,
+    sg30,
+    sg31,
+    sg32,
+    sg33,
+    sg34,
+    sg35,
+    sg36,
+    sg37,
+    sg38,
+    sg39,
+    sg40,
+    sg41,
+    sg42,
+    sg43,
+    sg44,
+    sg45,
+    sg46,
+    sg47,
+    sg48,
+    sg49,
+    sg50,
+    sg51,
+    sg52,
+    sg53,
+    sg54,
+    sg55,
+    sg56,
+    sg57,
+    sg58,
+    sg59,
+    sg60,
+    sg61,
+    sg62,
+    sg63,
+    sg64,
+    sg65,
+    sg66,
+    sg67,
+    sg68,
+    sg69,
+    sg70,
+    sg71,
+    sg72,
+    sg73,
+    sg74,
+    sg75,
+    sg76,
+    sg77,
+    sg78,
+    sg79,
+    sg80,
+    sg81,
+    sg82,
+    sg83,
+    sg84,
+    sg85,
+    sg86,
+    sg87,
+    sg88,
+    sg89,
+    sg90,
+    sg91,
+    sg92,
+    sg93,
+    sg94,
+    sg95,
+    sg96,
+    sg97,
+    sg98,
+    sg99,
+    sg100,
+    sg101,
+    sg102,
+    sg103,
+    sg104,
+    sg105,
+    sg106,
+    sg107,
+    sg108,
+    sg109,
+    sg110,
+    sg111,
+    sg112,
+    sg113,
+    sg114,
+    sg115,
+    sg116,
+    sg117,
+    sg118,
+    sg119,
+    sg120,
+    sg121,
+    sg122,
+    sg123,
+    sg124,
+    sg125,
+    sg126,
+    sg127,
+    sg128,
+    sg129,
+    sg130,
+    sg131,
+    sg132,
+    sg133,
+    sg134,
+    sg135,
+    sg136,
+    sg137,
+    sg138,
+    sg139,
+    sg140,
+    sg141,
+    sg142,
+    sg143,
+    sg144,
+    sg145,
+    sg146,
+    sg147,
+    sg148,
+    sg149,
+    sg150,
+    sg151,
+    sg152,
+    sg153,
+    sg154,
+    sg155,
+    sg156,
+    sg157,
+    sg158,
+    sg159,
+    sg160,
+    sg161,
+    sg162,
+    sg163,
+    sg164,
+    sg165,
+    sg166,
+    sg167,
+    sg168,
+    sg169,
+    sg170,
+    sg171,
+    sg172,
+    sg173,
+    sg174,
+    sg175,
+    sg176,
+    sg177,
+    sg178,
+    sg179,
+    sg180,
+    sg181,
+    sg182,
+    sg183,
+    sg184,
+    sg185,
+    sg186,
+    sg187,
+    sg188,
+    sg189,
+    sg190,
+    sg191,
+    sg192,
+    sg193,
+    sg194,
+    sg195,
+    sg196,
+    sg197,
+    sg198,
+    sg199,
+    sg200,
+    sg201,
+    sg202,
+    sg203,
+    sg204,
+    sg205,
+    sg206,
+    sg207,
+    sg208,
+    sg209,
+    sg210,
+    sg211,
+    sg212,
+    sg213,
+    sg214,
+    sg215,
+    sg216,
+    sg217,
+    sg218,
+    sg219,
+    sg220,
+    sg221,
+    sg222,
+    sg223,
+    sg224,
+    sg225,
+    sg226,
+    sg227,
+    sg228,
+    sg229,
+    sg230,
+    sg1003,
+    sg1004,
+    sg1005,
+    sg1006,
+    sg1007,
+    sg1008,
+    sg1009,
+    sg1010,
+    sg1011,
+    sg1012,
+    sg1013,
+    sg1014,
+    sg1015,
+    sg1017,
+    sg1018,
+    sg1020,
+    sg1021,
+    sg1022,
+    sg1023,
+    sg1059,
+    sg1094,
+    sg1146,
+    sg1148,
+    sg1155,
+    sg1160,
+    sg1161,
+    sg1166,
+    sg1167,
+    sg1197,
+    sg2005,
+    sg2017,
+    sg2018,
+    sg3004,
+    sg3005,
+    sg3018,
+)
+from diffpy.structure.sgtbxspacegroups import (
+    sg1025,
+    sg1026,
+    sg1027,
+    sg1028,
+    sg1029,
+    sg1030,
+    sg1031,
+    sg1032,
+    sg1033,
+    sg1034,
+    sg1035,
+    sg1036,
+    sg1037,
+    sg1038,
+    sg1039,
+    sg1040,
+    sg1041,
+    sg1042,
+    sg1043,
+    sg1044,
+    sg1045,
+    sg1046,
+    sg1049,
+    sg1050,
+    sg1051,
+    sg1052,
+    sg1053,
+    sg1054,
+    sg1055,
+    sg1056,
+    sg1057,
+    sg1058,
+    sg1060,
+    sg1061,
+    sg1062,
+    sg1063,
+    sg1064,
+    sg1065,
+    sg1066,
+    sg1067,
+    sg1068,
+    sg1072,
+    sg1073,
+    sg1074,
+    sg2003,
+    sg2004,
+    sg2006,
+    sg2007,
+    sg2008,
+    sg2009,
+    sg2010,
+    sg2011,
+    sg2012,
+    sg2013,
+    sg2014,
+    sg2015,
+    sg2020,
+    sg2021,
+    sg2025,
+    sg2026,
+    sg2027,
+    sg2028,
+    sg2029,
+    sg2030,
+    sg2031,
+    sg2032,
+    sg2033,
+    sg2034,
+    sg2035,
+    sg2036,
+    sg2037,
+    sg2038,
+    sg2039,
+    sg2040,
+    sg2041,
+    sg2042,
+    sg2043,
+    sg2044,
+    sg2045,
+    sg2046,
+    sg2049,
+    sg2050,
+    sg2051,
+    sg2052,
+    sg2053,
+    sg2054,
+    sg2055,
+    sg2056,
+    sg2057,
+    sg2058,
+    sg2059,
+    sg2060,
+    sg2062,
+    sg2063,
+    sg2064,
+    sg2065,
+    sg2066,
+    sg2067,
+    sg2068,
+    sg2072,
+    sg2074,
+    sg3007,
+    sg3008,
+    sg3009,
+    sg3012,
+    sg3013,
+    sg3014,
+    sg3015,
+    sg3020,
+    sg3021,
+    sg3026,
+    sg3028,
+    sg3029,
+    sg3030,
+    sg3031,
+    sg3033,
+    sg3036,
+    sg3038,
+    sg3039,
+    sg3040,
+    sg3041,
+    sg3046,
+    sg3050,
+    sg3051,
+    sg3052,
+    sg3053,
+    sg3054,
+    sg3057,
+    sg3059,
+    sg3060,
+    sg3062,
+    sg3063,
+    sg3064,
+    sg3067,
+    sg3068,
+    sg3074,
+    sg4005,
+    sg4007,
+    sg4008,
+    sg4009,
+    sg4012,
+    sg4013,
+    sg4014,
+    sg4015,
+    sg4026,
+    sg4028,
+    sg4029,
+    sg4030,
+    sg4031,
+    sg4033,
+    sg4036,
+    sg4038,
+    sg4039,
+    sg4040,
+    sg4041,
+    sg4046,
+    sg4050,
+    sg4051,
+    sg4052,
+    sg4053,
+    sg4054,
+    sg4057,
+    sg4059,
+    sg4060,
+    sg4062,
+    sg4063,
+    sg4064,
+    sg4067,
+    sg4068,
+    sg4074,
+    sg5005,
+    sg5007,
+    sg5008,
+    sg5009,
+    sg5012,
+    sg5013,
+    sg5014,
+    sg5015,
+    sg5026,
+    sg5028,
+    sg5029,
+    sg5030,
+    sg5031,
+    sg5033,
+    sg5036,
+    sg5038,
+    sg5039,
+    sg5040,
+    sg5041,
+    sg5046,
+    sg5051,
+    sg5052,
+    sg5053,
+    sg5054,
+    sg5057,
+    sg5059,
+    sg5060,
+    sg5062,
+    sg5063,
+    sg5064,
+    sg5067,
+    sg5068,
+    sg5074,
+    sg6005,
+    sg6007,
+    sg6008,
+    sg6009,
+    sg6012,
+    sg6013,
+    sg6014,
+    sg6015,
+    sg6068,
+    sg7005,
+    sg7007,
+    sg7008,
+    sg7009,
+    sg7012,
+    sg7013,
+    sg7014,
+    sg7015,
+    sg7068,
+    sg8005,
+    sg8007,
+    sg8008,
+    sg8009,
+    sg8012,
+    sg8013,
+    sg8014,
+    sg8015,
+    sg9005,
+    sg9009,
+    sg9015,
+    sg10005,
+    sg10009,
+    sg10015,
+    sg11009,
+    sg11015,
+    sg12009,
+    sg12015,
+    sg13009,
+    sg13015,
+    sg14009,
+    sg14015,
+    sg15009,
+    sg15015,
+    sg16009,
+    sg16015,
+    sg17009,
+    sg17015,
+    sgtbxSpaceGroupList,
+)
+from diffpy.structure.spacegroupmod import (
+    Rot_mX_mXY_mZ,
+    Rot_mX_mXY_Z,
+    Rot_mX_mY_mZ,
+    Rot_mX_mY_Z,
+    Rot_mX_mZ_mY,
+    Rot_mX_mZ_Y,
+    Rot_mX_Y_mZ,
+    Rot_mX_Y_Z,
+    Rot_mX_Z_mY,
+    Rot_mX_Z_Y,
+    Rot_mXY_mX_mZ,
+    Rot_mXY_mX_Z,
+    Rot_mXY_Y_mZ,
+    Rot_mXY_Y_Z,
+    Rot_mY_mX_mZ,
+    Rot_mY_mX_Z,
+    Rot_mY_mZ_mX,
+    Rot_mY_mZ_X,
+    Rot_mY_X_mZ,
+    Rot_mY_X_Z,
+    Rot_mY_XmY_mZ,
+    Rot_mY_XmY_Z,
+    Rot_mY_Z_mX,
+    Rot_mY_Z_X,
+    Rot_mZ_mX_mY,
+    Rot_mZ_mX_Y,
+    Rot_mZ_mY_mX,
+    Rot_mZ_mY_X,
+    Rot_mZ_X_mY,
+    Rot_mZ_X_Y,
+    Rot_mZ_Y_mX,
+    Rot_mZ_Y_X,
+    Rot_X_mY_mZ,
+    Rot_X_mY_Z,
+    Rot_X_mZ_mY,
+    Rot_X_mZ_Y,
+    Rot_X_XmY_mZ,
+    Rot_X_XmY_Z,
+    Rot_X_Y_mZ,
+    Rot_X_Y_Z,
+    Rot_X_Z_mY,
+    Rot_X_Z_Y,
+    Rot_XmY_mY_mZ,
+    Rot_XmY_mY_Z,
+    Rot_XmY_X_mZ,
+    Rot_XmY_X_Z,
+    Rot_Y_mX_mZ,
+    Rot_Y_mX_Z,
+    Rot_Y_mXY_mZ,
+    Rot_Y_mXY_Z,
+    Rot_Y_mZ_mX,
+    Rot_Y_mZ_X,
+    Rot_Y_X_mZ,
+    Rot_Y_X_Z,
+    Rot_Y_Z_mX,
+    Rot_Y_Z_X,
+    Rot_Z_mX_mY,
+    Rot_Z_mX_Y,
+    Rot_Z_mY_mX,
+    Rot_Z_mY_X,
+    Rot_Z_X_mY,
+    Rot_Z_X_Y,
+    Rot_Z_Y_mX,
+    Rot_Z_Y_X,
+    SpaceGroup,
+    SymOp,
+    Tr_0_0_0,
+    Tr_0_0_12,
+    Tr_0_0_13,
+    Tr_0_0_14,
+    Tr_0_0_16,
+    Tr_0_0_23,
+    Tr_0_0_34,
+    Tr_0_0_56,
+    Tr_0_12_0,
+    Tr_0_12_12,
+    Tr_0_12_14,
+    Tr_0_12_34,
+    Tr_12_0_0,
+    Tr_12_0_12,
+    Tr_12_0_14,
+    Tr_12_0_34,
+    Tr_12_12_0,
+    Tr_12_12_12,
+    Tr_12_12_14,
+    Tr_12_12_34,
+    Tr_13_23_16,
+    Tr_13_23_23,
+    Tr_14_14_14,
+    Tr_14_14_34,
+    Tr_14_34_14,
+    Tr_14_34_34,
+    Tr_23_13_13,
+    Tr_23_13_56,
+    Tr_34_14_14,
+    Tr_34_14_34,
+    Tr_34_34_14,
+    Tr_34_34_34,
+)
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+# Import SpaceGroup objects --------------------------------------------------
+base = "diffpy.structure"
+removal_version = "4.0.0"
+GetSpaceGroup_deprecation_msg = build_deprecation_message(
+    base,
+    "GetSpaceGroup",
+    "get_space_group",
+    removal_version,
+)
+FindSpaceGroup_deprecation_msg = build_deprecation_message(
+    base,
+    "FindSpaceGroup",
+    "find_space_group",
+    removal_version,
+)
+IsSpaceGroupIdentifier_deprecation_msg = build_deprecation_message(
+    base,
+    "IsSpaceGroupIdentifier",
+    "is_space_group_identifier",
+    removal_version,
+)
+_hashSymOpList_deprecation_msg = build_deprecation_message(
+    base,
+    "_hashSymOpList",
+    "_hash_symop_list",
+    removal_version,
+)
+
+SpaceGroupList = mmLibSpaceGroupList + sgtbxSpaceGroupList
+
+
+@deprecated(GetSpaceGroup_deprecation_msg)
+def GetSpaceGroup(sgid):
+    """This function has been deprecated and will be removed in version
+    4.0.0.
+
+    Please use diffpy.structure.get_space_group instead.
+    """
+    return get_space_group(sgid)
+
+
+
+[docs] +def get_space_group(sgid): + """Returns the SpaceGroup instance for the given identifier. + + Parameters + ---------- + sgid : str, int + space group symbol, either `short_name` or `pdb_name`, + whatever it means in mmlib. Can be also an integer. + + Returns + ------- + SpaceGroup + The SpaceGroup object for the given identifier. + + Raises + ------ + ValueError + When the identifier is not found. + """ + if not _sg_lookup_table: + _build_sg_lookup_table() + if sgid in _sg_lookup_table: + return _sg_lookup_table[sgid] + # Try different versions of sgid, first make sure it is a string + emsg = "Unknown space group identifier %r" % sgid + if not isinstance(sgid, str): + raise ValueError(emsg) + sgbare = sgid.strip() + # short_name case adjusted + sgkey = sgbare.replace(" ", "") + sgkey = sgkey[:1].upper() + sgkey[1:].lower() + if sgkey in _sg_lookup_table: + return _sg_lookup_table[sgkey] + # pdb_name case adjusted + sgkey = sgbare[:1].upper() + sgbare[1:].lower() + if sgkey in _sg_lookup_table: + return _sg_lookup_table[sgkey] + # nothing worked, sgid is unknown identifier + raise ValueError(emsg)
+ + + +@deprecated(IsSpaceGroupIdentifier_deprecation_msg) +def IsSpaceGroupIdentifier(sgid): + """Check if identifier can be used as an argument to + `GetSpaceGroup`. + + Returns + ------- + bool + """ + return is_space_group_identifier(sgid) + + +
+[docs] +def is_space_group_identifier(sgid): + """Check if identifier can be used as an argument to + `GetSpaceGroup`. + + Returns + ------- + bool + """ + try: + GetSpaceGroup(sgid) + rv = True + except ValueError: + rv = False + return rv
+ + + +@deprecated(FindSpaceGroup_deprecation_msg) +def FindSpaceGroup(symops, shuffle=False): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.find_space_group instead. + """ + return find_space_group(symops, shuffle=shuffle) + + +
+[docs] +def find_space_group(symops, shuffle=False): + """Lookup SpaceGroup from a given list of symmetry operations. + + Parameters + ---------- + symops : list + The list of `SymOp` objects for which to find SpaceGroup. + shuffle : bool, Optional + Flag for allowing different order of symops in the returned + SpaceGroup. The default is ``False``. + + Returns + ------- + SpaceGroup + The SpaceGroup object with equivalent list of symmetry + operations. Return predefined SpaceGroup instance when + symmetry operations have the same order or when the + `shuffle` flag is set. + + Raises + ------ + ValueError + When `symops` do not match any known SpaceGroup. + """ + + tb = _get_sg_hash_lookup_table() + hh = _hash_symop_list(symops) + if hh not in tb: + raise ValueError("Cannot find SpaceGroup for the specified symops.") + rv = tb[hh] + if not shuffle: + zz = zip_longest(rv.iter_symops(), symops, fillvalue="") + sameorder = all(str(o0) == str(o1) for o0, o1 in zz) + if not sameorder: + rv = copy.copy(rv) + rv.symop_list = symops + return rv
+ + + +@deprecated(_hashSymOpList_deprecation_msg) +def _hashSymOpList(symops): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure._hash_symop_list instead. + """ + return _hash_symop_list(symops) + + +def _hash_symop_list(symops): + """Return hash value for a sequence of `SymOp` objects. + + The symops are sorted so the results is independent of symops order. + + Parameters + ---------- + symops : sequence + The sequence of `SymOp` objects to be hashed + + Returns + ------- + int + The hash value. + """ + ssop = sorted(str(o) for o in symops) + rv = hash(tuple(ssop)) + return rv + + +def _build_sg_lookup_table(): + """Rebuild space group lookup table from the `SpaceGroupList` data. + + This routine updates the global `_sg_lookup_table` dictionary. + """ + _sg_lookup_table.clear() + for sg in SpaceGroupList: + _sg_lookup_table.setdefault(sg.number, sg) + _sg_lookup_table.setdefault(str(sg.number), sg) + _sg_lookup_table.setdefault(sg.short_name, sg) + _sg_lookup_table.setdefault(sg.pdb_name, sg) + # extra aliases obtained from matching code in + # cctbx::sgtbx::symbols::find_main_symbol_dict_entry + alias_hmname = [ + ("Pm3", "P m -3"), + ("Pn3", "P n -3"), + ("Fm3", "F m -3"), + ("Fd3", "F d -3"), + ("Im3", "I m -3"), + ("Pa3", "P a -3"), + ("Ia3", "I a -3"), + ("Pm3m", "P m -3 m"), + ("Pn3n", "P n -3 n"), + ("Pm3n", "P m -3 n"), + ("Pn3m", "P n -3 m"), + ("Fm3m", "F m -3 m"), + ("Fm3c", "F m -3 c"), + ("Fd3m", "F d -3 m"), + ("Fd3c", "F d -3 c"), + ("Im3m", "I m -3 m"), + ("Ia3d", "I a -3 d"), + ] + for a, hm in alias_hmname: + hmbare = hm.replace(" ", "") + _sg_lookup_table.setdefault(a, _sg_lookup_table[hmbare]) + # make sure None does not sneak into the dictionary + assert None not in _sg_lookup_table + return + + +_sg_lookup_table = {} + + +def _get_sg_hash_lookup_table(): + """Return lookup table of symop hashes to standard `SpaceGroup` + objects.""" + if _sg_hash_lookup_table: + return _sg_hash_lookup_table + for sg in SpaceGroupList: + h = _hash_symop_list(sg.symop_list) + _sg_hash_lookup_table[h] = sg + assert len(_sg_hash_lookup_table) == len(SpaceGroupList) + return _get_sg_hash_lookup_table() + + +_sg_hash_lookup_table = {} + +# silence pyflakes checker +assert all( + o is not None + for o in ( + SpaceGroup, + SymOp, + Rot_X_Y_Z, + Rot_mX_mY_mZ, + Rot_mX_Y_mZ, + Rot_X_mY_Z, + Rot_mX_mY_Z, + Rot_X_mY_mZ, + Rot_mX_Y_Z, + Rot_X_Y_mZ, + Rot_mY_X_Z, + Rot_Y_mX_Z, + Rot_Y_mX_mZ, + Rot_mY_X_mZ, + Rot_Y_X_mZ, + Rot_mY_mX_mZ, + Rot_mY_mX_Z, + Rot_Y_X_Z, + Rot_mY_XmY_Z, + Rot_mXY_mX_Z, + Rot_Z_X_Y, + Rot_Y_Z_X, + Rot_Y_mXY_mZ, + Rot_XmY_X_mZ, + Rot_mZ_mX_mY, + Rot_mY_mZ_mX, + Rot_mXY_Y_mZ, + Rot_X_XmY_mZ, + Rot_XmY_mY_mZ, + Rot_mX_mXY_mZ, + Rot_mX_mZ_mY, + Rot_mZ_mY_mX, + Rot_mXY_Y_Z, + Rot_X_XmY_Z, + Rot_XmY_mY_Z, + Rot_mX_mXY_Z, + Rot_X_Z_Y, + Rot_Z_Y_X, + Rot_Y_mXY_Z, + Rot_XmY_X_Z, + Rot_mY_XmY_mZ, + Rot_mXY_mX_mZ, + Rot_Z_mX_mY, + Rot_mZ_mX_Y, + Rot_mZ_X_mY, + Rot_mY_Z_mX, + Rot_Y_mZ_mX, + Rot_mY_mZ_X, + Rot_mZ_X_Y, + Rot_Z_X_mY, + Rot_Z_mX_Y, + Rot_Y_mZ_X, + Rot_mY_Z_X, + Rot_Y_Z_mX, + Rot_X_Z_mY, + Rot_mX_Z_Y, + Rot_X_mZ_Y, + Rot_Z_Y_mX, + Rot_Z_mY_X, + Rot_mZ_Y_X, + Rot_mX_Z_mY, + Rot_mX_mZ_Y, + Rot_X_mZ_mY, + Rot_Z_mY_mX, + Rot_mZ_Y_mX, + Rot_mZ_mY_X, + Tr_0_0_0, + Tr_0_12_0, + Tr_12_12_0, + Tr_0_0_12, + Tr_12_12_12, + Tr_0_12_12, + Tr_12_0_12, + Tr_12_0_0, + Tr_14_14_14, + Tr_14_34_34, + Tr_34_14_34, + Tr_34_34_14, + Tr_0_0_14, + Tr_0_0_34, + Tr_0_12_14, + Tr_12_0_34, + Tr_12_12_14, + Tr_12_12_34, + Tr_0_12_34, + Tr_12_0_14, + Tr_0_0_13, + Tr_0_0_23, + Tr_23_13_13, + Tr_13_23_23, + Tr_23_13_56, + Tr_13_23_16, + Tr_0_0_56, + Tr_0_0_16, + Tr_34_14_14, + Tr_34_34_34, + Tr_14_14_34, + Tr_14_34_14, + sg1, + sg2, + sg3, + sg4, + sg5, + sg6, + sg7, + sg8, + sg9, + sg10, + sg11, + sg12, + sg13, + sg14, + sg15, + sg16, + sg17, + sg18, + sg19, + sg20, + sg21, + sg22, + sg23, + sg24, + sg25, + sg26, + sg27, + sg28, + sg29, + sg30, + sg31, + sg32, + sg33, + sg34, + sg35, + sg36, + sg37, + sg38, + sg39, + sg40, + sg41, + sg42, + sg43, + sg44, + sg45, + sg46, + sg47, + sg48, + sg49, + sg50, + sg51, + sg52, + sg53, + sg54, + sg55, + sg56, + sg57, + sg58, + sg59, + sg60, + sg61, + sg62, + sg63, + sg64, + sg65, + sg66, + sg67, + sg68, + sg69, + sg70, + sg71, + sg72, + sg73, + sg74, + sg75, + sg76, + sg77, + sg78, + sg79, + sg80, + sg81, + sg82, + sg83, + sg84, + sg85, + sg86, + sg87, + sg88, + sg89, + sg90, + sg91, + sg92, + sg93, + sg94, + sg95, + sg96, + sg97, + sg98, + sg99, + sg100, + sg101, + sg102, + sg103, + sg104, + sg105, + sg106, + sg107, + sg108, + sg109, + sg110, + sg111, + sg112, + sg113, + sg114, + sg115, + sg116, + sg117, + sg118, + sg119, + sg120, + sg121, + sg122, + sg123, + sg124, + sg125, + sg126, + sg127, + sg128, + sg129, + sg130, + sg131, + sg132, + sg133, + sg134, + sg135, + sg136, + sg137, + sg138, + sg139, + sg140, + sg141, + sg142, + sg143, + sg144, + sg145, + sg146, + sg1146, + sg147, + sg148, + sg1148, + sg149, + sg150, + sg151, + sg152, + sg153, + sg154, + sg155, + sg1155, + sg156, + sg157, + sg158, + sg159, + sg160, + sg1160, + sg161, + sg1161, + sg162, + sg163, + sg164, + sg165, + sg166, + sg1166, + sg167, + sg1167, + sg168, + sg169, + sg170, + sg171, + sg172, + sg173, + sg174, + sg175, + sg176, + sg177, + sg178, + sg179, + sg180, + sg181, + sg182, + sg183, + sg184, + sg185, + sg186, + sg187, + sg188, + sg189, + sg190, + sg191, + sg192, + sg193, + sg194, + sg195, + sg196, + sg197, + sg198, + sg199, + sg200, + sg201, + sg202, + sg203, + sg204, + sg205, + sg206, + sg207, + sg208, + sg209, + sg210, + sg211, + sg212, + sg213, + sg214, + sg215, + sg216, + sg217, + sg218, + sg219, + sg220, + sg221, + sg222, + sg223, + sg224, + sg225, + sg226, + sg227, + sg228, + sg229, + sg230, + sg1003, + sg1004, + sg3004, + sg1005, + sg2005, + sg3005, + sg1006, + sg1007, + sg1008, + sg1009, + sg1010, + sg1011, + sg1012, + sg1013, + sg1014, + sg1015, + sg1017, + sg2017, + sg1018, + sg2018, + sg3018, + sg1020, + sg1021, + sg1022, + sg1023, + sg1059, + sg1094, + sg1197, + sg2003, + sg2004, + sg4005, + sg5005, + sg6005, + sg7005, + sg8005, + sg9005, + sg10005, + sg2006, + sg2007, + sg3007, + sg4007, + sg5007, + sg6007, + sg7007, + sg8007, + sg2008, + sg3008, + sg4008, + sg5008, + sg6008, + sg7008, + sg8008, + sg2009, + sg3009, + sg4009, + sg5009, + sg6009, + sg7009, + sg8009, + sg9009, + sg10009, + sg11009, + sg12009, + sg13009, + sg14009, + sg15009, + sg16009, + sg17009, + sg2010, + sg2011, + sg2012, + sg3012, + sg4012, + sg5012, + sg6012, + sg7012, + sg8012, + sg2013, + sg3013, + sg4013, + sg5013, + sg6013, + sg7013, + sg8013, + sg2014, + sg3014, + sg4014, + sg5014, + sg6014, + sg7014, + sg8014, + sg2015, + sg3015, + sg4015, + sg5015, + sg6015, + sg7015, + sg8015, + sg9015, + sg10015, + sg11015, + sg12015, + sg13015, + sg14015, + sg15015, + sg16015, + sg17015, + sg2020, + sg3020, + sg2021, + sg3021, + sg1025, + sg2025, + sg1026, + sg2026, + sg3026, + sg4026, + sg5026, + sg1027, + sg2027, + sg1028, + sg2028, + sg3028, + sg4028, + sg5028, + sg1029, + sg2029, + sg3029, + sg4029, + sg5029, + sg1030, + sg2030, + sg3030, + sg4030, + sg5030, + sg1031, + sg2031, + sg3031, + sg4031, + sg5031, + sg1032, + sg2032, + sg1033, + sg2033, + sg3033, + sg4033, + sg5033, + sg1034, + sg2034, + sg1035, + sg2035, + sg1036, + sg2036, + sg3036, + sg4036, + sg5036, + sg1037, + sg2037, + sg1038, + sg2038, + sg3038, + sg4038, + sg5038, + sg1039, + sg2039, + sg3039, + sg4039, + sg5039, + sg1040, + sg2040, + sg3040, + sg4040, + sg5040, + sg1041, + sg2041, + sg3041, + sg4041, + sg5041, + sg1042, + sg2042, + sg1043, + sg2043, + sg1044, + sg2044, + sg1045, + sg2045, + sg1046, + sg2046, + sg3046, + sg4046, + sg5046, + sg1049, + sg2049, + sg1050, + sg2050, + sg3050, + sg4050, + sg1051, + sg2051, + sg3051, + sg4051, + sg5051, + sg1052, + sg2052, + sg3052, + sg4052, + sg5052, + sg1053, + sg2053, + sg3053, + sg4053, + sg5053, + sg1054, + sg2054, + sg3054, + sg4054, + sg5054, + sg1055, + sg2055, + sg1056, + sg2056, + sg1057, + sg2057, + sg3057, + sg4057, + sg5057, + sg1058, + sg2058, + sg2059, + sg3059, + sg4059, + sg5059, + sg1060, + sg2060, + sg3060, + sg4060, + sg5060, + sg1061, + sg1062, + sg2062, + sg3062, + sg4062, + sg5062, + sg1063, + sg2063, + sg3063, + sg4063, + sg5063, + sg1064, + sg2064, + sg3064, + sg4064, + sg5064, + sg1065, + sg2065, + sg1066, + sg2066, + sg1067, + sg2067, + sg3067, + sg4067, + sg5067, + sg1068, + sg2068, + sg3068, + sg4068, + sg5068, + sg6068, + sg7068, + sg1072, + sg2072, + sg1073, + sg1074, + sg2074, + sg3074, + sg4074, + sg5074, + ) +) +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/structure.html b/_modules/diffpy/structure/structure.html new file mode 100644 index 00000000..1cfb7976 --- /dev/null +++ b/_modules/diffpy/structure/structure.html @@ -0,0 +1,1143 @@ + + + + + + + + diffpy.structure.structure — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.structure

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2007 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""This module defines class `Structure`."""
+
+import copy as copymod
+import warnings
+
+import numpy
+
+from diffpy.structure.atom import Atom
+from diffpy.structure.lattice import Lattice
+from diffpy.structure.utils import _link_atom_attribute, atom_bare_symbol, isiterable
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+# ----------------------------------------------------------------------------
+
+base = "diffpy.structure.Structure"
+removal_version = "4.0.0"
+assignUniqueLabels_deprecation_msg = build_deprecation_message(
+    base,
+    "assignUniqueLabels",
+    "assign_unique_labels",
+    removal_version,
+)
+addNewAtom_deprecation_msg = build_deprecation_message(
+    base,
+    "addNewAtom",
+    "add_new_atom",
+    removal_version,
+)
+getLastAtom_deprecation_msg = build_deprecation_message(
+    base,
+    "getLastAtom",
+    "get_last_atom",
+    removal_version,
+)
+placeInLattice_deprecation_msg = build_deprecation_message(
+    base,
+    "placeInLattice",
+    "place_in_lattice",
+    removal_version,
+)
+readStr_deprecation_msg = build_deprecation_message(
+    base,
+    "readStr",
+    "read_structure",
+    removal_version,
+)
+writeStr_deprecation_msg = build_deprecation_message(
+    base,
+    "writeStr",
+    "write_structure",
+    removal_version,
+)
+
+
+
+[docs] +class Structure(list): + """Define group of atoms in a specified lattice. Structure --> group + of atoms. + + `Structure` class is inherited from Python `list`. It contains + a list of `Atom` instances. `Structure` overloads `setitem` and `setslice` + methods so that the `lattice` attribute of atoms get set to `lattice`. + + Parameters + ---------- + atoms : list of Atom or Structure, Optional + List of `Atom` instances to be included in this `Structure`. + When `atoms` argument is an existing `Structure` instance, + the new structure is its copy. + lattice : Lattice, Optional + Instance of `Lattice` defining coordinate systems, property. + title : str, Optional + String description of the structure. + filename : str, Optional + Name of a file to load the structure from. + format : str, Optional + `Structure` format of the loaded `filename`. By default + all structure formats are tried one by one. Ignored when + `filename` has not been specified. + + Note + ---- + Cannot use `filename` and `atoms` arguments together. Overrides `atoms` argument + when `filename` is specified. + + Attributes + ---------- + title : str + String description of the structure. + lattice : Lattice + Instance of `Lattice` defining coordinate systems. + pdffit : None or dict + Dictionary of PDFFit-related metadata. + + Examples + -------- + ``Structure(stru)`` create a copy of `Structure` instance stru. + + >>> stru = Structure() + >>> copystru = Structure(stru) + + `Structure` is inherited from a list it can use list expansions. + + >>> oxygen_atoms = [a for a in stru if a.element == "O" ] + >>> oxygen_stru = Structure(oxygen_atoms, lattice=stru.lattice) + """ + + # default values for instance attributes + title = "" + """str: default values for `title`.""" + + _lattice = None + pdffit = None + """None: default values for `pdffit`.""" + + def __init__(self, atoms=None, lattice=None, title=None, filename=None, format=None): + # if filename is specified load it and return + if filename is not None: + if any((atoms, lattice, title)): + emsg = "Cannot use filename and atoms arguments together." + raise ValueError(emsg) + readkwargs = (format is not None) and {"format": format} or {} + self.read(filename, **readkwargs) + return + # copy initialization, must be first to allow lattice, title override + if isinstance(atoms, Structure): + Structure.__copy__(atoms, self) + # assign arguments: + if title is not None: + self.title = title + if lattice is not None: + self.lattice = lattice + elif self.lattice is None: + self.lattice = Lattice() + # insert atoms unless already done by __copy__ + if not len(self) and atoms is not None: + self.extend(atoms) + return + +
+[docs] + def copy(self): + """Return a copy of this `Structure` object.""" + return copymod.copy(self)
+ + + def __copy__(self, target=None): + """Create a deep copy of this instance. + + Parameters + ---------- + target : + Optional target instance for copying, useful for + copying a derived class. Defaults to new instance + of the same type as self. + + Returns + ------- + A duplicate instance of this object. + """ + if target is None: + target = Structure() + elif target is self: + return target + # copy attributes as appropriate: + target.title = self.title + target.lattice = Lattice(self.lattice) + target.pdffit = copymod.deepcopy(self.pdffit) + # copy all atoms to the target + target[:] = self + return target + + def __str__(self): + """Simple string representation.""" + s_lattice = "lattice=%s" % self.lattice + s_atoms = "\n".join([str(a) for a in self]) + return s_lattice + "\n" + s_atoms + + @deprecated(addNewAtom_deprecation_msg) + def addNewAtom(self, *args, **kwargs): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Structure.add_new_atom instead. + """ + self.add_new_atom(*args, **kwargs) + return + +
+[docs] + def add_new_atom(self, *args, **kwargs): + """Add new `Atom` instance to the end of this `Structure`. + + Parameters + ---------- + *args, **kwargs : + See `Atom` class constructor. + + Raises + ------ + UserWarning + If an atom with the same element/type and coordinates already exists. + """ + kwargs["lattice"] = self.lattice + atom = Atom(*args, **kwargs) + for existing in self: + if existing.element == atom.element and numpy.allclose(existing.xyz, atom.xyz): + warnings.warn( + f"Duplicate atom {atom.element} already exists at {atom.xyz!r}", + category=UserWarning, + stacklevel=2, + ) + break + self.append(atom, copy=False) + return
+ + + @deprecated(getLastAtom_deprecation_msg) + def getLastAtom(self): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Structure.get_last_atom instead. + """ + return self.get_last_atom() + +
+[docs] + def get_last_atom(self): + """Return Reference to the last `Atom` in this structure.""" + last_atom = self[-1] + return last_atom
+ + +
+[docs] + def assign_unique_labels(self): + """Set a unique label string for each `Atom` in this structure. + + The label strings are formatted as "%(baresymbol)s%(index)i", + where baresymbol is the element right-stripped of "[0-9][+-]". + """ + elnum = {} + # support duplicate atom instances + islabeled = set() + for a in self: + if a in islabeled: + continue + baresmbl = atom_bare_symbol(a.element) + elnum[baresmbl] = elnum.get(baresmbl, 0) + 1 + a.label = baresmbl + str(elnum[baresmbl]) + islabeled.add(a) + return
+ + + @deprecated(assignUniqueLabels_deprecation_msg) + def assignUniqueLabels(self): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Structure.assign_unique_labels + instead. + """ + return self.assign_unique_labels() + +
+[docs] + def distance(self, aid0, aid1): + """Calculate distance between 2 `Atoms`, no periodic boundary + conditions. + + Parameters + ---------- + aid0 : int or str + Zero based index of the first `Atom` or a string label. + aid1 : int or str + Zero based index or string label of the second atom. + + Returns + ------- + float + Distance between the two `Atoms` in Angstroms. + + Raises + ------ + IndexError + If any of the `Atom` indices or labels are invalid. + """ + # lookup by labels + a0, a1 = self[aid0, aid1] + return self.lattice.dist(a0.xyz, a1.xyz)
+ + +
+[docs] + def angle(self, aid0, aid1, aid2): + """The bond angle at the second of three `Atoms` in degrees. + + Parameters + ---------- + aid0 : int or str + Zero based index of the first `Atom` or a string label. + aid1 : int or str + Index or string label for the second atom, where the angle is formed. + aid2 : int or str + Index or string label for the third atom. + + Returns + ------- + float + The bond angle in degrees. + + Raises + ------ + IndexError + If any of the arguments are invalid. + """ + a0, a1, a2 = self[aid0, aid1, aid2] + u10 = a0.xyz - a1.xyz + u12 = a2.xyz - a1.xyz + return self.lattice.angle(u10, u12)
+ + + @deprecated(placeInLattice_deprecation_msg) + def placeInLattice(self, new_lattice): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Structure.place_in_lattice instead. + """ + return self.place_in_lattice(new_lattice) + +
+[docs] + def place_in_lattice(self, new_lattice): + """Place structure into `new_lattice` coordinate system. + + Sets `lattice` to `new_lattice` and recalculate fractional coordinates + of all `Atoms` so their absolute positions remain the same. + + Parameters + ---------- + new_lattice : Lattice + New `lattice` to place the structure into. + + Returns + ------- + Structure + Reference to this `Structure` object. The `lattice` attribute + is updated to `new_lattice`. + """ + Tx = numpy.dot(self.lattice.base, new_lattice.recbase) + Tu = numpy.dot(self.lattice.normbase, new_lattice.recnormbase) + for a in self: + a.xyz = numpy.dot(a.xyz, Tx) + if a.anisotropy: + a.U = numpy.dot(numpy.transpose(Tu), numpy.dot(a.U, Tu)) + self.lattice = new_lattice + return self
+ + +
+[docs] + def read(self, filename, format="auto"): + """Load structure from a file, any original data become lost. + + Parameters + ---------- + filename : str + File to be loaded. + format : str, Optional + All structure formats are defined in parsers submodule, + when ``format == 'auto'`` all parsers are tried one by one. + + Returns + ------- + Parser + Return instance of data Parser used to process input string. This + can be inspected for information related to particular format. + """ + import diffpy.structure + import diffpy.structure.parsers + + get_parser = diffpy.structure.parsers.get_parser + p = get_parser(format) + new_structure = p.parse_file(filename) + # reinitialize data after successful parsing + # avoid calling __init__ from a derived class + Structure.__init__(self) + if new_structure is not None: + self.__dict__.update(new_structure.__dict__) + self[:] = new_structure + if not self.title: + import os.path + + tailname = os.path.basename(filename) + tailbase = os.path.splitext(tailname)[0] + self.title = tailbase + return p
+ + + @deprecated(readStr_deprecation_msg) + def readStr(self, s, format="auto"): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Structure.read_structure instead. + """ + return self.read_structure(s, format) + +
+[docs] + def read_structure(self, s, format="auto"): + """Read structure from a string. + + Parameters + ---------- + s : str + String with structure definition. + format : str, Optional + All structure formats are defined in parsers submodule. When ``format == 'auto'``, + all parsers are tried one by one. + + Returns + ------- + Parser + Return instance of data Parser used to process input string. This + can be inspected for information related to particular format. + """ + from diffpy.structure.parsers import get_parser + + p = get_parser(format) + new_structure = p.parse(s) + # reinitialize data after successful parsing + # avoid calling __init__ from a derived class + Structure.__init__(self) + if new_structure is not None: + self.__dict__.update(new_structure.__dict__) + self[:] = new_structure + return p
+ + +
+[docs] + def write(self, filename, format): + """Save structure to file in the specified format. + + Parameters + ---------- + filename : str + File to save the structure to. + format : str + `Structure` format to use for saving. + + Note + ---- + Available structure formats can be obtained by: + + ``from parsers import formats`` + """ + from diffpy.structure.parsers import get_parser + + p = get_parser(format) + p.filename = filename + s = p.tostring(self) + with open(filename, "w", encoding="utf-8", newline="") as fp: + fp.write(s) + return
+ + + @deprecated(writeStr_deprecation_msg) + def writeStr(self, format): + """This function has been deprecated and will be removed in + version 4.0.0. + + Please use diffpy.structure.Structure.write_structure instead. + """ + return self.write_structure(format) + +
+[docs] + def write_structure(self, format): + """Return string representation of the structure in specified + format. + + Note + ---- + Available structure formats can be obtained by: + + ``from parsers import formats`` + """ + from diffpy.structure.parsers import get_parser + + p = get_parser(format) + s = p.tostring(self) + return s
+ + +
+[docs] + def tolist(self): + """Return `Atoms` in this `Structure` as a standard Python + list.""" + rv = [a for a in self] + return rv
+ + + # Overloaded list Methods and Operators ---------------------------------- + +
+[docs] + def append(self, a, copy=True): + """Append `Atom` to a structure and update its `lattice` + attribute. + + Parameters + ---------- + a : Atom + Instance of `Atom` to be appended. + copy : bool, Optional + Flag for appending a copy of `a`. When ``False``, append `a` and update `a.lattice`. + """ + adup = copy and Atom(a) or a + adup.lattice = self.lattice + super(Structure, self).append(adup) + return
+ + +
+[docs] + def insert(self, idx, a, copy=True): + """Insert `Atom` a before position idx in this `Structure`. + + Parameters + ---------- + idx : int + Position in `Atom` list. + a : Atom + Instance of `Atom` to be inserted. + copy : bool, Optional + Flag for inserting a copy of `a`. When ``False``, append `a` and update `a.lattice`. + """ + adup = copy and copymod.copy(a) or a + adup.lattice = self.lattice + super(Structure, self).insert(idx, adup) + return
+ + +
+[docs] + def extend(self, atoms, copy=None): + """Extend `Structure` with an iterable of `atoms`. + + Update the `lattice` attribute of all added `atoms`. + + Parameters + ---------- + atoms : Iterable + The `Atom` objects to be appended to this `Structure`. + copy : bool, Optional + Flag for adding copies of `Atom` objects. + Make copies when ``True``, append `atoms` unchanged when ``False``. + The default behavior is to make copies when `atoms` are of + `Structure` type or if new atoms introduce repeated objects. + """ + adups = (copymod.copy(a) for a in atoms) + if copy is None: + if isinstance(atoms, Structure): + newatoms = adups + else: + memo = set(id(a) for a in self) + + def nextatom(a): + return a if id(a) not in memo else copymod.copy(a) + + def mark(a): + return (memo.add(id(a)), a)[-1] + + newatoms = (mark(nextatom(a)) for a in atoms) + elif copy: + newatoms = adups + else: + newatoms = atoms + + def setlat(a): + return (setattr(a, "lattice", self.lattice), a)[-1] + + super(Structure, self).extend(setlat(a) for a in newatoms) + return
+ + + def __getitem__(self, idx): + """Get one or more `Atoms` in this structure. + + Parameters + ---------- + idx : int or str or Iterable + `Atom` identifier. When integer use standard list lookup. + For iterables use numpy lookup, this supports integer or + boolean flag arrays. For string or string-containing iterables + lookup the `Atoms` by string label. + + Returns + ------- + Atom or Structure + An `Atom` instance for integer or string index or a substructure + in all other cases. + + Raises + ------ + IndexError + If the index is invalid or the `Atom` label is not unique. + + Examples + -------- + First `Atom` in the `Structure`: + + >>> stru[0] + + Substructure of all ``'Na'`` `Atoms`: + + >>> stru[stru.element == 'Na'] + + `Atom` with a unique label ``'Na3'``: + >>> stru['Na3'] + + Substructure of three `Atoms`, lookup by label is more efficient + when done for several `Atoms` at once. + + >>> stru['Na3', 2, 'Cl2'] + """ + if isinstance(idx, slice): + rv = self.__empty_shared_structure() + lst = super(Structure, self).__getitem__(idx) + rv.extend(lst, copy=False) + return rv + try: + rv = super(Structure, self).__getitem__(idx) + return rv + except TypeError: + pass + # check if there is any string label that should be resolved + scalarstringlabel = isinstance(idx, str) + hasstringlabel = scalarstringlabel or (isiterable(idx) and any(isinstance(ii, str) for ii in idx)) + # if not, use numpy indexing to resolve idx + if not hasstringlabel: + idx1 = idx + if type(idx) is tuple: + idx1 = numpy.r_[idx] + indices = numpy.arange(len(self))[idx1] + rhs = [list.__getitem__(self, i) for i in indices] + rv = self.__empty_shared_structure() + rv.extend(rhs, copy=False) + return rv + # here we need to resolve at least one string label + # build a map of labels to indices and mark duplicate labels + duplicate = object() + labeltoindex = {} + for i, a in enumerate(self): + labeltoindex[a.label] = duplicate if a.label in labeltoindex else i + + def _resolveindex(aid): + aid1 = aid + if type(aid) is str: + aid1 = labeltoindex.get(aid, None) + if aid1 is None: + raise IndexError("Invalid atom label %r." % aid) + if aid1 is duplicate: + raise IndexError("Atom label %r is not unique." % aid) + return aid1 + + # generate new index object that has no strings + if scalarstringlabel: + idx2 = _resolveindex(idx) + # for iterables preserve the tuple object type + else: + idx2 = [_resolveindex(i) for i in idx] + if type(idx) is tuple: + idx2 = tuple(idx2) + # call this function again and hope there is no recursion loop + rv = self[idx2] + return rv + + def __setitem__(self, idx, value, copy=True): + """Assign `self[idx]` `Atom` to value. + + Parameters + ---------- + idx : int or slice + Index of `Atom` in this `Structure` or a slice. + value : Atom or Iterable + Instance of `Atom` or an iterable. + copy : bool, Optional + Flag for making a copy of the value. When ``False``, update + the `lattice` attribute of `Atom` objects present in value. + Default is ``True``. + """ + # handle slice assignment + if isinstance(idx, slice): + + def _fixlat(a): + a.lattice = self.lattice + return a + + v1 = value + if copy: + keep = set(super(Structure, self).__getitem__(idx)) + v1 = (a if a in keep else Atom(a) for a in value) + vfinal = filter(_fixlat, v1) + # handle scalar assignment + else: + vfinal = Atom(value) if copy else value + vfinal.lattice = self.lattice + super(Structure, self).__setitem__(idx, vfinal) + return + + def __add__(self, other): + """Return new `Structure` object with appended `Atoms` from + other. + + Parameters + ---------- + other : sequence of Atom + Sequence of `Atom` instances. + + Returns + ------- + Structure + New `Structure` with a copy of `Atom` instances. + """ + rv = copymod.copy(self) + rv += other + return rv + + def __iadd__(self, other): + """Extend this `Structure` with `Atoms` from other. + + Parameters + ---------- + other : sequence of Atom + Sequence of `Atom` instances. + + Returns + ------- + Structure + Reference to this `Structure` object. + """ + self.extend(other, copy=True) + return self + + def __sub__(self, other): + """Return new `Structure` that has `Atoms` from the other + removed. + + Parameters + ---------- + other : sequence of Atom + Sequence of `Atom` instances. + + Returns + ------- + Structure + New `Structure` with a copy of `Atom` instances. + """ + otherset = set(other) + keepindices = [i for i, a in enumerate(self) if a not in otherset] + rv = copymod.copy(self[keepindices]) + return rv + + def __isub__(self, other): + """Remove other `Atoms` if present in this structure. + + Parameters + ---------- + other : sequence of Atom + Sequence of `Atom` instances. + + Returns + ------- + Structure + Reference to this `Structure` object. + """ + otherset = set(other) + self[:] = [a for a in self if a not in otherset] + return self + + def __mul__(self, n): + """Return new `Structure` with n-times concatenated `Atoms` from + self. `Atoms` and `lattice` in the new structure are all copies. + + Parameters + ---------- + n : int + Integer multiple. + + Returns + ------- + Structure + New `Structure` with n-times concatenated `Atoms`. + """ + rv = copymod.copy(self[:0]) + rv += n * self.tolist() + return rv + + # right-side multiplication is the same as left-side + __rmul__ = __mul__ + + def __imul__(self, n): + """Concatenate this `Structure` to n-times more `Atoms`. For + positive multiple the current `Atom` objects remain at the + beginning of this `Structure`. + + Parameters + ---------- + n : int + Integer multiple. + + Returns + ------- + Structure + Reference to this `Structure` object. + """ + if n <= 0: + self[:] = [] + else: + self.extend((n - 1) * self.tolist(), copy=True) + return self + + # Properties ------------------------------------------------------------- + + # lattice + + def _get_lattice(self): + return self._lattice + + def _set_lattice(self, value): + for a in self: + a.lattice = value + self._lattice = value + return + + lattice = property( + _get_lattice, + _set_lattice, + doc="Coordinate system for this `Structure`.", + ) + + # composition + + def _get_composition(self): + rv = {} + for a in self: + rv[a.element] = rv.get(a.element, 0.0) + a.occupancy + return rv + + composition = property( + _get_composition, + doc="Dictionary of chemical symbols and their total occupancies.", + ) + + # linked atom attributes + + element = _link_atom_attribute( + "element", + """Character array of `Atom` types. Assignment updates + the element attribute of the respective `Atoms`. + Set the maximum length of the element string to 5 characters.""", + toarray=lambda items: numpy.char.array(items, itemsize=5), + ) + + xyz = _link_atom_attribute( + "xyz", + """Array of fractional coordinates of all `Atoms`. + Assignment updates `xyz` attribute of all `Atoms`.""", + ) + + x = _link_atom_attribute( + "x", + """Array of all fractional coordinates `x`. + Assignment updates `xyz` attribute of all `Atoms`.""", + ) + + y = _link_atom_attribute( + "y", + """Array of all fractional coordinates `y`. + Assignment updates `xyz` attribute of all `Atoms`.""", + ) + + z = _link_atom_attribute( + "z", + """Array of all fractional coordinates `z`. + Assignment updates `xyz` attribute of all `Atoms`.""", + ) + + label = _link_atom_attribute( + "label", + """Character array of `Atom` names. Assignment updates + the label attribute of all `Atoms`. + Set the maximum length of the label string to 5 characters.""", + toarray=lambda items: numpy.char.array(items, itemsize=5), + ) + + occupancy = _link_atom_attribute( + "occupancy", + """Array of `Atom` occupancies. Assignment updates the + occupancy attribute of all `Atoms`.""", + ) + + xyz_cartn = _link_atom_attribute( + "xyz_cartn", + """Array of absolute Cartesian coordinates of all `Atoms`. + Assignment updates the `xyz` attribute of all `Atoms`.""", + ) + + anisotropy = _link_atom_attribute( + "anisotropy", + """Boolean array for anisotropic thermal displacement flags. + Assignment updates the anisotropy attribute of all `Atoms`.""", + ) + + U = _link_atom_attribute( + "U", + """Array of anisotropic thermal displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + Uisoequiv = _link_atom_attribute( + "Uisoequiv", + """Array of isotropic thermal displacement or equivalent values. + Assignment updates the U attribute of all `Atoms`.""", + ) + + U11 = _link_atom_attribute( + "U11", + """Array of `U11` elements of the anisotropic displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + U22 = _link_atom_attribute( + "U22", + """Array of `U22` elements of the anisotropic displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + U33 = _link_atom_attribute( + "U33", + """Array of `U33` elements of the anisotropic displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + U12 = _link_atom_attribute( + "U12", + """Array of `U12` elements of the anisotropic displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + U13 = _link_atom_attribute( + "U13", + """Array of `U13` elements of the anisotropic displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + U23 = _link_atom_attribute( + "U23", + """Array of `U23` elements of the anisotropic displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + Bisoequiv = _link_atom_attribute( + "Bisoequiv", + """Array of Debye-Waller isotropic thermal displacement or equivalent + values. Assignment updates the U attribute of all `Atoms`.""", + ) + + B11 = _link_atom_attribute( + "B11", + """Array of `B11` elements of the Debye-Waller displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + B22 = _link_atom_attribute( + "B22", + """Array of `B22` elements of the Debye-Waller displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + B33 = _link_atom_attribute( + "B33", + """Array of `B33` elements of the Debye-Waller displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + B12 = _link_atom_attribute( + "B12", + """Array of `B12` elements of the Debye-Waller displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + B13 = _link_atom_attribute( + "B13", + """Array of `B13` elements of the Debye-Waller displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + B23 = _link_atom_attribute( + "B23", + """Array of `B23` elements of the Debye-Waller displacement tensors. + Assignment updates the U and anisotropy attributes of all `Atoms`.""", + ) + + # Private Methods -------------------------------------------------------- + + def __empty_shared_structure(self): + """Return empty `Structure` with standard attributes same as in + self.""" + rv = Structure() + rv.__dict__.update([(k, getattr(self, k)) for k in rv.__dict__]) + return rv
+ + + +# End of class Structure +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/structure_app.html b/_modules/diffpy/structure/structure_app.html new file mode 100644 index 00000000..defc10d0 --- /dev/null +++ b/_modules/diffpy/structure/structure_app.html @@ -0,0 +1,142 @@ + + + + + + + + diffpy.structure.structure_app — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.structure_app

+import argparse
+
+from diffpy.structure.version import __version__  # noqa
+
+
+
+[docs] +def main(): + parser = argparse.ArgumentParser( + prog="diffpy.structure", + description=( + "Crystal structure container and parsers for structure formats.\n\n" + "For more information, visit: " + "https://github.com/diffpy/diffpy.structure/" + ), + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + + parser.add_argument( + "--version", + action="store_true", + help="Show the program's version number and exit", + ) + + args = parser.parse_args() + + if args.version: + print(f"diffpy.structure {__version__}") + else: + # Default behavior when no arguments are given + parser.print_help()
+ + + +if __name__ == "__main__": + main() +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/structureerrors.html b/_modules/diffpy/structure/structureerrors.html new file mode 100644 index 00000000..7d75e15b --- /dev/null +++ b/_modules/diffpy/structure/structureerrors.html @@ -0,0 +1,148 @@ + + + + + + + + diffpy.structure.structureerrors — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.structureerrors

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2006 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Exceptions used in Structure package."""
+
+
+
+[docs] +class StructureFormatError(Exception): + """Exception for failed IO from Structure file.""" + + pass
+ + + +
+[docs] +class LatticeError(Exception): + """Exception for impossible lattice parameters.""" + + pass
+ + + +
+[docs] +class SymmetryError(Exception): + """Exception raised for invalid symmetry operations.""" + + pass
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/symmetryutilities.html b/_modules/diffpy/structure/symmetryutilities.html new file mode 100644 index 00000000..fd0d74bc --- /dev/null +++ b/_modules/diffpy/structure/symmetryutilities.html @@ -0,0 +1,1639 @@ + + + + + + + + diffpy.structure.symmetryutilities — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.symmetryutilities

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2006 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Symmetry utility functions such as expansion of asymmetric unit, and
+generation of positional constraints.
+
+Attributes
+----------
+epsilon : float
+    Default tolerance for equality of 2 positions, also
+    used for identification of special positions.
+
+stdUsymbols : list
+    Standard symbols denoting elements of anisotropic thermal
+    displacement tensor.
+"""
+
+import re
+import sys
+
+import numpy
+
+from diffpy.structure.structureerrors import SymmetryError
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure"
+removal_version = "4.0.0"
+isSpaceGroupLatPar_deprecation_msg = build_deprecation_message(
+    base,
+    "isSpaceGroupLatPar",
+    "is_space_group_latt_parms",
+    removal_version,
+)
+isconstantFormula_deprecation_msg = build_deprecation_message(
+    base,
+    "isconstantFormula",
+    "is_constant_formula",
+    removal_version,
+)
+positionDifference_deprecation_msg = build_deprecation_message(
+    base,
+    "positionDifference",
+    "position_difference",
+    removal_version,
+)
+nearestSiteIndex_deprecation_msg = build_deprecation_message(
+    base,
+    "nearestSiteIndex",
+    "nearest_site_index",
+    removal_version,
+)
+equalPositions_deprecation_msg = build_deprecation_message(
+    base,
+    "equalPositions",
+    "equal_positions",
+    removal_version,
+)
+expandPosition_deprecation_msg = build_deprecation_message(
+    base,
+    "expandPosition",
+    "expand_position",
+    removal_version,
+)
+nullSpace_deprecation_msg = build_deprecation_message(
+    base,
+    "nullSpace",
+    "null_space",
+    removal_version,
+)
+
+# Constants ------------------------------------------------------------------
+
+epsilon = 1.0e-5
+
+stdUsymbols = ["U11", "U22", "U33", "U12", "U13", "U23"]
+
+# ----------------------------------------------------------------------------
+
+
+@deprecated(isSpaceGroupLatPar_deprecation_msg)
+def isSpaceGroupLatPar(spacegroup, a, b, c, alpha, beta, gamma):
+    """'diffpy.structure.isSpaceGroupLatPar' is deprecated and will be
+    removed in version 4.0.0.
+
+    Please use 'diffpy.structure.is_space_group_latt_parms' instead.
+    """
+    return is_space_group_latt_parms(spacegroup, a, b, c, alpha, beta, gamma)
+
+
+
+[docs] +def is_space_group_latt_parms(spacegroup, a, b, c, alpha, beta, gamma): + """Check if space group allows passed lattice parameters. + + Parameters + ---------- + spacegroup : SpaceGroup + Instance of `SpaceGroup`. + a, b, c, alpha, beta, gamma : float + `Lattice` parameters. + + Return + ------ + bool + ``True`` when lattice parameters are allowed by space group. + + Note + ---- + Crystal system rules: + + Benjamin, W. A., Introduction to crystallography, New York (1969), p.60. + """ + + # crystal system rules + # ref: Benjamin, W. A., Introduction to crystallography, + # New York (1969), p.60 + def check_triclinic(): + return True + + def check_monoclinic(): + rv = (alpha == gamma == 90) or (alpha == beta == 90) + return rv + + def check_orthorhombic(): + return alpha == beta == gamma == 90 + + def check_tetragonal(): + return a == b and alpha == beta == gamma == 90 + + def check_trigonal(): + rv = (a == b == c and alpha == beta == gamma) or (a == b and alpha == beta == 90 and gamma == 120) + return rv + + def check_hexagonal(): + return a == b and alpha == beta == 90 and gamma == 120 + + def check_cubic(): + return a == b == c and alpha == beta == gamma == 90 + + crystal_system_rules = { + "TRICLINIC": check_triclinic, + "MONOCLINIC": check_monoclinic, + "ORTHORHOMBIC": check_orthorhombic, + "TETRAGONAL": check_tetragonal, + "TRIGONAL": check_trigonal, + "HEXAGONAL": check_hexagonal, + "CUBIC": check_cubic, + } + rule = crystal_system_rules[spacegroup.crystal_system] + return rule()
+ + + +# Constant regular expression used in isconstantFormula(). +# isconstantFormula runs faster when regular expression is not +# compiled per every single call. + +_rx_constant_formula = re.compile(r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)??(/[-+]?\d+)?$") + + +@deprecated(isconstantFormula_deprecation_msg) +def isconstantFormula(s): + """'diffpy.structure.isconstantFormula' is deprecated and will be + removed in version 4.0.0. + + Please use 'diffpy.structure.is_constant_formula' instead. + """ + return is_constant_formula(s) + + +
+[docs] +def is_constant_formula(s): + """Check if formula string is constant. + + Parameters + ---------- + s : str + Formula string. + + Return + ------ + bool + ``True`` when argument is a floating point number or a fraction of float with integer. + """ + res = _rx_constant_formula.match(s.replace(" ", "")) + return bool(res)
+ + + +# Helper class intended for this module only: + + +class _Position2Tuple(object): + """Create callable object that converts fractional coordinates to a + tuple of integers with given precision. For presision close to zero + it will return a tuples of double. + + Note + ---- + Helper class intended for local use only. + + Parameters + ---------- + eps : float + Cutoff for equivalent coordinates. + + Attributes + ---------- + eps : float + Cutoff for equivalent coordinates. When two coordinates map to the + same tuple, they are closer than `eps`. + """ + + def __init__(self, eps=None): + if eps is None: + eps = epsilon + # ensure self.eps has exact machine representation + self.eps = eps + 1.0 + self.eps = self.eps - 1.0 + # no conversions for very small eps + if self.eps == 0.0 or 1.0 / self.eps > sys.maxsize: + self.eps = 0.0 + return + + def __call__(self, xyz): + """Convert array of fractional coordinates to a tuple. + + Parameters + ---------- + xyz : Iterable + Fractional coordinates. + + Return + ------ + tuple + Tuple of 3 float when `eps` is zero, otherwise tuple of 3 int. + """ + # no conversion case + if self.eps == 0.0: + tpl = tuple(xyz % 1.0) + return tpl + # here we convert to integer + tpl = tuple([int((xi - numpy.floor(xi)) / self.eps) for xi in xyz]) + return tpl + + +# End of class _Position2Tuple + + +@deprecated(positionDifference_deprecation_msg) +def positionDifference(xyz0, xyz1): + """'diffpy.structure.positionDifference' is deprecated and will be + removed in version 4.0.0. + + Please use 'diffpy.structure.position_difference' instead. + """ + return position_difference(xyz0, xyz1) + + +
+[docs] +def position_difference(xyz0, xyz1): + """Smallest difference between two coordinates in periodic lattice. + + Parameters + ---------- + xyz0, xyz1 : array_like + Fractional coordinates. + + Return + ------ + dxyz : numpy.ndarray + Smallest difference between two coordinates in periodic lattice + with ``0 <= dxyz <= 0.5``. + """ + dxyz = numpy.asarray(xyz0) - xyz1 + # map differences to [0,0.5] + dxyz = dxyz - numpy.floor(dxyz) + mask = dxyz > 0.5 + dxyz[mask] = 1.0 - dxyz[mask] + return dxyz
+ + + +@deprecated(nearestSiteIndex_deprecation_msg) +def nearestSiteIndex(sites, xyz): + """'diffpy.structure.nearestSiteIndex' is deprecated and will be + removed in version 4.0.0. + + Please use 'diffpy.structure.nearest_site_index' instead. + """ + # we use box distance to be consistent with _Position2Tuple conversion + return nearest_site_index(sites, xyz) + + +
+[docs] +def nearest_site_index(sites, xyz): + """Index of the nearest site to a specified position. + + Parameters + ---------- + sites : array_like + List of coordinates. + xyz : array_like + Single position. + + Return + ------ + int + Index of the nearest site. + """ + # we use box distance to be consistent with _Position2Tuple conversion + dbox = position_difference(sites, xyz).max(axis=1) + nearindex = numpy.argmin(dbox) + return nearindex
+ + + +@deprecated(equalPositions_deprecation_msg) +def equalPositions(xyz0, xyz1, eps): + """'diffpy.structure.equalPositions' is deprecated and will be + removed in version 4.0.0. + + Please use 'diffpy.structure.equal_positions' instead. + """ + return equal_positions(xyz0, xyz1, eps) + + +
+[docs] +def equal_positions(xyz0, xyz1, eps): + """Equality of two coordinates with optional tolerance. + + Parameters + ---------- + xyz0, xyz1 : array_like + Fractional coordinates. + eps : float + Tolerance for equality of coordinates. + + Return + ------ + bool + ``True`` when two coordinates are closer than `eps`. + """ + # we use box distance to be consistent with _Position2Tuple conversion + dxyz = position_difference(xyz0, xyz1) + return numpy.all(dxyz <= eps)
+ + + +@deprecated(expandPosition_deprecation_msg) +def expandPosition(spacegroup, xyz, sgoffset=[0, 0, 0], eps=None): + """'diffpy.structure.expandPosition' is deprecated and will be + removed in version 4.0.0. + + Please use 'diffpy.structure.expand_position' instead. + """ + return expand_position(spacegroup, xyz, sgoffset, eps) + + +
+[docs] +def expand_position(spacegroup, xyz, sgoffset=[0, 0, 0], eps=None): + """Obtain unique equivalent positions and corresponding operations. + + Parameters + ---------- + spacegroup : SpaceGroup + Instance of SpaceGroup. + xyz : list + Position to be expanded. + sgoffset : list, Optional + Offset of space group origin ``[0, 0, 0]``. Default is ``[0, 0, 0]``. + eps : float, Optional + Cutoff for equal positions, default is ``1.0e-5``. + + Return + ------ + tuple + A tuple with ``(list of unique equivalent positions, nested + list of `SpaceGroups.SymOp` instances, site multiplicity)``. + """ + sgoffset = numpy.asarray(sgoffset, dtype=float) + if eps is None: + eps = epsilon + pos2tuple = _Position2Tuple(eps) + positions = [] + site_symops = {} # position tuples with [related symops] + for symop in spacegroup.iter_symops(): + # operate on coordinates in non-shifted spacegroup + pos = symop(xyz + sgoffset) - sgoffset + mask = numpy.logical_or(pos < 0.0, pos >= 1.0) + pos[mask] -= numpy.floor(pos[mask]) + tpl = pos2tuple(pos) + if tpl not in site_symops: + pos_is_new = True + site_symops[tpl] = [] + # double check if there is any position nearby + if positions: + nearpos = positions[nearest_site_index(positions, pos)] + # is it an equivalent position? + if equal_positions(nearpos, pos, eps): + # tpl should map to the same list as nearpos + site_symops[tpl] = site_symops[pos2tuple(nearpos)] + pos_is_new = False + if pos_is_new: + positions.append(pos) + # here tpl is inside site_symops + site_symops[tpl].append(symop) + # pos_symops is nested list of symops associated with each position + pos_symops = [site_symops[pos2tuple(p)] for p in positions] + multiplicity = len(positions) + return positions, pos_symops, multiplicity
+ + + +@deprecated(nullSpace_deprecation_msg) +def nullSpace(A): + """'diffpy.structure.nullSpace' is deprecated and will be removed in + version 4.0.0. + + Please use 'diffpy.structure.null_space' instead. + """ + return null_space(A) + + +
+[docs] +def null_space(A): + """Null space of matrix A.""" + from numpy import linalg + + u, s, v = linalg.svd(A) + # s may have smaller dimension than v + vnrows = numpy.shape(v)[0] + mask = numpy.ones(vnrows, dtype=bool) + mask[s > epsilon] = False + null_space = numpy.compress(mask, v, axis=0) + return null_space
+ + + +def _find_invariants(symops): + """Find a list of symmetry operations which contains identity. + + Parameters + ---------- + symops : list of SymOp + Nested list of `SymOp` instances. + + Return + ------ + list + List-item in symops which contains identity. + + Raise + ----- + ValueError + When identity is not found. + """ + invrnts = None + R0 = numpy.identity(3, dtype=float) + t0 = numpy.zeros(3, dtype=float) + for ops in symops: + for op in ops: + if numpy.all(op.R == R0) and numpy.all(op.t == t0): + invrnts = ops + break + if invrnts: + break + if invrnts is None: + emsg = "Could not find identity operation." + raise ValueError(emsg) + return invrnts + + +# ---------------------------------------------------------------------------- + +generator_site = "diffpy.symmetryutilities.GeneratorSite" +signedRatStr_deprecation_msg = build_deprecation_message( + generator_site, + "signedRatStr", + "convert_fp_num_to_signed_rational", + removal_version, +) +positionFormula_deprecation_msg = build_deprecation_message( + generator_site, + "positionFormula", + "position_formula", + removal_version, +) +UFormula_deprecation_msg = build_deprecation_message( + generator_site, + "UFormula", + "u_formula", + removal_version, +) +eqIndex_deprecation_msg = build_deprecation_message( + generator_site, + "eqIndex", + "eq_index", + removal_version, +) + + +
+[docs] +class GeneratorSite(object): + """Storage of data related to a generator positions. + + Parameters + ---------- + spacegroup : SpaceGroup + Instance of `SpaceGroup`. + xyz : array_like + Generating site. When `xyz` is close to special + position `self.xyz` will be adjusted. + Uij : array_like, Optional + Thermal factors at generator site. Yields `self.Uij` + after adjusting to spacegroup symmetry. Default is zeros. + sgoffset : list, Optional + Offset of space group origin ``[0, 0, 0]``. Default is ``[0, 0, 0]``. + eps : float, Optional + Cutoff for equal positions. Default is ``1.0e-5``. + + Attributes + ---------- + xyz : numpy.ndarray + Fractional coordinates of generator site. + Uij : numpy.ndarray + Anisotropic thermal displacement at generator site. + sgoffset : numpy.ndarray + Offset of space group origin ``[0, 0, 0]``. + eps : float + Cutoff for equal positions. + eqxyz : list + List of equivalent positions. + eqUij : list + List of displacement matrices at equivalent positions. + symops : list + Nested list of operations per each `eqxyz`. + multiplicity : int + Generator site multiplicity. + Uisotropy : bool + Bool flag for isotropic thermal factors. + invariants : list + List of invariant operations for generator site. + null_space : numpy.ndarray + Null space of all possible differences of invariant + rotational matrices, this is a base of symmetry + allowed shifts. + Uspace : numpy.ndarray + 3D array of independent components of U matrices. + pparameters : list + List of ``(xyz symbol, value)`` pairs. + Uparameters : list + List of ``(U symbol, value)`` pairs. + """ + + Ucomponents = numpy.array( + [ + [[1, 0, 0], [0, 0, 0], [0, 0, 0]], + [[0, 0, 0], [0, 1, 0], [0, 0, 0]], + [[0, 0, 0], [0, 0, 0], [0, 0, 1]], + [[0, 1, 0], [1, 0, 0], [0, 0, 0]], + [[0, 0, 1], [0, 0, 0], [1, 0, 0]], + [[0, 0, 0], [0, 0, 1], [0, 1, 0]], + ], + dtype=float, + ) + """numpy.ndarray: 6x3x3 array of independent components of U + matrices.""" + + idx2Usymbol = { + 0: "U11", + 1: "U12", + 2: "U13", + 3: "U12", + 4: "U22", + 5: "U23", + 6: "U13", + 7: "U23", + 8: "U33", + } + """dict: Mapping of index to standard U symbol.""" + + def __init__( + self, + spacegroup, + xyz, + Uij=numpy.zeros((3, 3)), + sgoffset=[0, 0, 0], + eps=None, + ): + if eps is None: + eps = epsilon + # just declare the members + self.xyz = numpy.array(xyz, dtype=float) + self.Uij = numpy.array(Uij, dtype=float) + self.sgoffset = numpy.array(sgoffset, dtype=float) + self.eps = eps + self.eqxyz = [] + self.eqUij = [] + self.symops = None + self.multiplicity = None + self.Uisotropy = False + self.invariants = [] + self.null_space = None + self.Uspace = None + self.pparameters = [] + self.Uparameters = [] + # fill in the values + sites, ops, mult = expandPosition(spacegroup, xyz, sgoffset, eps) + invariants = _find_invariants(ops) + # shift self.xyz exactly to the special position + if mult > 1: + xyzdups = numpy.array([op(xyz + self.sgoffset) - self.sgoffset for op in invariants]) + dxyz = xyzdups - xyz + dxyz = numpy.mean(dxyz - dxyz.round(), axis=0) + # recalculate if needed + if numpy.any(dxyz != 0.0): + self.xyz = xyz + dxyz + self.xyz[numpy.fabs(self.xyz) < self.eps] = 0.0 + sites, ops, mult = expandPosition(spacegroup, self.xyz, self.sgoffset, eps) + invariants = _find_invariants(ops) + # self.xyz, sites, ops are all adjusted here + self.eqxyz = sites + self.symops = ops + self.multiplicity = mult + self.invariants = invariants + self._find_null_space() + self._find_pos_parameters() + self._find_u_space() + self._find_u_parameters() + self._find_eq_uij() + return + +
+[docs] + def convert_fp_num_to_signed_rational(self, x): + """Convert floating point number to signed rational + representation. + + Possible fractional are multiples of 1/3, 1/6, 1/7, 1/9, if these + are not close, return `%+g` format. + + Parameters + ---------- + x : float + Floating point number. + + Return + ------ + str + Signed rational representation of `x`. + """ + s = "{:.8g}".format(x) + if len(s) < 6: + return "%+g" % x + den = numpy.array([3.0, 6.0, 7.0, 9.0]) + nom = x * den + idx = numpy.where(numpy.fabs(nom - nom.round()) < self.eps)[0] + if idx.size == 0: + return "%+g" % x + # here we have fraction + return "%+.0f/%.0f" % (nom[idx[0]], den[idx[0]])
+ + + @deprecated(signedRatStr_deprecation_msg) + def signedRatStr(self, x): + """'diffpy.structure.GeneratorSite.signedRatStr' is deprecated + and will be removed in version 4.0.0. + + Please use 'diffpy.structure.GeneratorSite.convert_fp_num_to_signed_rational' instead. + """ + return self.convert_fp_num_to_signed_rational(x) + + def _find_null_space(self): + """Calculate `self.null_space` from `self.invariants`. + + Try to represent `self.null_space` using small integers. + """ + R0 = self.invariants[0].R + Rdiff = [(symop.R - R0) for symop in self.invariants] + Rdiff = numpy.concatenate(Rdiff, axis=0) + self.null_space = null_space(Rdiff) + if self.null_space.size == 0: + return + # reverse sort rows of null_space rows by absolute value + key = tuple(numpy.fabs(numpy.transpose(self.null_space))[::-1]) + order = numpy.lexsort(key) + self.null_space = self.null_space[order[::-1]] + # rationalize by the smallest element larger than cutoff + cutoff = 1.0 / 32 + for row in self.null_space: + abrow = numpy.abs(row) + sgrow = numpy.sign(row) + # equalize items with round-off-equal absolute value + ii = abrow.argsort() + delta = 1e-8 * abrow[ii[-1]] + for k in ii[1:]: + if abrow[k] - abrow[k - 1] < delta: + abrow[k] = abrow[k - 1] + # find the smallest nonzero absolute element + jnz = numpy.flatnonzero(abrow > cutoff) + idx = jnz[abrow[jnz].argmin()] + row[:] = (sgrow * abrow) / sgrow[idx] / abrow[idx] + return + + def _find_pos_parameters(self): + """Find pparameters and their values for expressing + `self.xyz`.""" + usedsymbol = {} + # parameter values depend on offset of self.xyz + txyz = self.xyz + # define txyz such that most of its elements are zero + for nvec in self.null_space: + idx = numpy.where(numpy.fabs(nvec) >= epsilon)[0][0] + varvalue = txyz[idx] / nvec[idx] + txyz = txyz - varvalue * nvec + # determine standard parameter name + vname = [s for s in "xyz"[idx:] if s not in usedsymbol][0] + self.pparameters.append((vname, varvalue)) + usedsymbol[vname] = True + return + + def _find_u_space(self): + """Find independent U components with respect to invariant + rotations.""" + n = len(self.invariants) + R6zall = numpy.tile(-numpy.identity(6, dtype=float), (n, 1)) + R6zall_iter = numpy.split(R6zall, n, axis=0) + i6kl = ( + (0, (0, 0)), + (1, (1, 1)), + (2, (2, 2)), + (3, (0, 1)), + (4, (0, 2)), + (5, (1, 2)), + ) + for op, R6z in zip(self.invariants, R6zall_iter): + R = op.R + for j, Ucj in enumerate(self.Ucomponents): + Ucj2 = numpy.dot(R, numpy.dot(Ucj, R.T)) + for i, kl in i6kl: + R6z[i, j] += Ucj2[kl] + Usp6 = null_space(R6zall) + # normalize Usp6 by its maximum component + mxcols = numpy.argmax(numpy.fabs(Usp6), axis=1) + mxrows = numpy.arange(len(mxcols)) + Usp6 /= Usp6[mxrows, mxcols].reshape(-1, 1) + Usp6 = numpy.around(Usp6, 2) + # normalize again after rounding to get correct signs + mxcols = numpy.argmax(numpy.fabs(Usp6), axis=1) + Usp6 /= Usp6[mxrows, mxcols].reshape(-1, 1) + self.Uspace = numpy.tensordot(Usp6, self.Ucomponents, axes=(1, 0)) + self.Uisotropy = len(self.Uspace) == 1 + return + + def _find_u_parameters(self): + """Find Uparameters and their values for expressing + `self.Uij`.""" + # permute indices as 00 11 22 01 02 12 10 20 21 + diagorder = numpy.array((0, 4, 8, 1, 2, 5, 3, 6, 7)) + Uijflat = self.Uij.flatten() + for Usp in self.Uspace: + Uspflat = Usp.flatten() + Uspnorm2 = numpy.dot(Uspflat, Uspflat) + permidx = next(i for i, x in enumerate(Uspflat[diagorder]) if x == 1) + idx = diagorder[permidx] + vname = self.idx2Usymbol[idx] + varvalue = numpy.dot(Uijflat, Uspflat) / Uspnorm2 + self.Uparameters.append((vname, varvalue)) + return + + def _find_eq_uij(self): + """Adjust `self.Uij` and `self.eqUij` to be consistent with + spacegroup.""" + self.Uij = numpy.zeros((3, 3), dtype=float) + for i in range(len(self.Uparameters)): + Usp = self.Uspace[i] + varvalue = self.Uparameters[i][1] + self.Uij += varvalue * Usp + # now determine eqUij + for ops in self.symops: + # take first rotation matrix + R = ops[0].R + Rt = R.transpose() + self.eqUij.append(numpy.dot(R, numpy.dot(self.Uij, Rt))) + return + + @deprecated(positionFormula_deprecation_msg) + def positionFormula(self, pos, xyzsymbols=("x", "y", "z")): + """'diffpy.structure.GeneratorSite.positionFormula' is + deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.GeneratorSite.position_formula' + instead. + """ + return self.position_formula(pos, xyzsymbols) + +
+[docs] + def position_formula(self, pos, xyzsymbols=("x", "y", "z")): + """Formula of equivalent position with respect to generator + site. + + Parameters + ---------- + pos : array_like + Fractional coordinates of possibly equivalent site. + xyzsymbols : tuple, Optional + Symbols for parametrized coordinates. + + Return + ------ + dict + Position formulas in a dictionary with keys equal ``("x", "y", "z")`` + or an empty dictionary when pos is not equivalent to generator. + Formulas are formatted as ``[[-][%g*]{x|y|z}] [{+|-}%g]``, for example + ``-x``, ``z +0.5``, ``0.25``. + """ + # find pos in eqxyz + idx = nearest_site_index(self.eqxyz, pos) + eqpos = self.eqxyz[idx] + if not equal_positions(eqpos, pos, self.eps): + return {} + # any rotation matrix should do fine + R = self.symops[idx][0].R + nsrotated = numpy.dot(self.null_space, numpy.transpose(R)) + # build formulas using eqpos + # find offset + teqpos = numpy.array(eqpos) + for nvec, (vname, varvalue) in zip(nsrotated, self.pparameters): + teqpos -= nvec * varvalue + # map varnames to xyzsymbols + name2sym = dict(zip(("x", "y", "z"), xyzsymbols)) + xyzformula = 3 * [""] + for nvec, (vname, ignore) in zip(nsrotated, self.pparameters): + for i in range(3): + if abs(nvec[i]) < epsilon: + continue + xyzformula[i] += "%s*%s " % ( + self.convert_fp_num_to_signed_rational(nvec[i]), + name2sym[vname], + ) + # add constant offset teqpos to all formulas + for i in range(3): + if xyzformula[i] and abs(teqpos[i]) < epsilon: + continue + xyzformula[i] += self.convert_fp_num_to_signed_rational(teqpos[i]) + # reduce unnecessary +1* and -1* + xyzformula = [re.sub("^[+]1[*]|(?<=[+-])1[*]", "", f).strip() for f in xyzformula] + return dict(zip(("x", "y", "z"), xyzformula))
+ + + @deprecated(UFormula_deprecation_msg) + def UFormula(self, pos, Usymbols=stdUsymbols): + """'diffpy.structure.GeneratorSite.UFormula' is deprecated and + will be removed in version 4.0.0. + + Please use 'diffpy.structure.GeneratorSite.u_formula' instead. + """ + return self.u_formula(pos, Usymbols) + +
+[docs] + def u_formula(self, pos, Usymbols=stdUsymbols): + """List of atom displacement formulas with custom parameter + symbols. + + Parameters + ---------- + pos : array_like + Fractional coordinates of possibly equivalent site. + Usymbols : list, Optional + 6 symbols for possible U matrix parameters, default is + ``["U11", "U22", "U33", "U12", "U13", "U23"]``. + + Return + ------ + Uformula : dict + U element formulas in a dictionary where keys are from + ``('U11','U22','U33','U12','U13','U23')`` or empty dictionary when + pos is not equivalent to generator. + """ + # find pos in eqxyz + idx = nearest_site_index(self.eqxyz, pos) + eqpos = self.eqxyz[idx] + if not equal_positions(eqpos, pos, self.eps): + return {} + # any rotation matrix should do fine + R = self.symops[idx][0].R + Rt = R.transpose() + Usrotated = [numpy.dot(R, numpy.dot(Us, Rt)) for Us in self.Uspace] + Uformula = dict.fromkeys(stdUsymbols, "") + name2sym = dict(zip(stdUsymbols, Usymbols)) + for Usr, (vname, ignore) in zip(Usrotated, self.Uparameters): + # avoid adding off-diagonal elements twice + assert numpy.all(Usr == Usr.T) + Usr -= numpy.tril(Usr, -1) + Usrflat = Usr.flatten() + for i in numpy.where(Usrflat)[0]: + f = "%+g*%s" % (Usrflat[i], name2sym[vname]) + smbl = self.idx2Usymbol[i] + Uformula[smbl] += f + for smbl, f in Uformula.items(): + if not f: + f = "0" + f = re.sub(r"^[+]?1[*]|^[+](?=\d)|(?<=[+-])1[*]", "", f).strip() + Uformula[smbl] = f + return Uformula
+ + + @deprecated(eqIndex_deprecation_msg) + def eqIndex(self, pos): + """'diffpy.structure.GeneratorSite.eqIndex' is deprecated and + will be removed in version 4.0.0. + + Please use 'diffpy.structure.GeneratorSite.eq_index' instead. + """ + return self.eq_index(pos) + +
+[docs] + def eq_index(self, pos): + """Index of the nearest generator equivalent site. + + Parameters + ---------- + pos : array_like + Fractional coordinates. + + Return + ------ + int + Index of the nearest generator equivalent site. + """ + return nearest_site_index(self.eqxyz, pos)
+
+ + + +# End of class GeneratorSite + +# ---------------------------------------------------------------------------- + + +
+[docs] +class ExpandAsymmetricUnit(object): + """Expand asymmetric unit and anisotropic thermal displacement. + + Parameters + ---------- + spacegroup : SpaceGroup + Instance of `SpaceGroup`. + corepos : array_like + List of positions in asymmetric unit, + it may contain duplicates. + coreUijs : numpy.ndarray, Optional + Thermal factors for `corepos`. + sgoffset : list, Optional + Offset of space group origin ``[0, 0, 0]``. Default is ``[0, 0, 0]``. + eps : float, Optional + Cutoff for duplicate positions. Default is ``1.0e-5``. + + Attributes + ---------- + spacegroup : SpaceGroup + Instance of `SpaceGroup`. + corepos : array_like + List of positions in asymmetric unit, + it may contain duplicates. + coreUijs : numpy.ndarray + Thermal factors for `corepos`. Defaults to zeros. + sgoffset : numpy.ndarray + Offset of space group origin ``[0, 0, 0]``. Default to zeros. + eps : float + Cutoff for equivalent positions. Default is ``1.0e-5``. + multiplicity : list + Multiplicity of each site in `corepos`. + Uisotropy : list + Bool flags for isotropic sites in `corepos`. + expandedpos : list + List of equivalent positions per each site in `corepos`. + expandedUijs : list + List of thermal factors per each site in `corepos`. + """ + + # By design Atom instances are not accepted as arguments to keep + # number of required imports low. + def __init__(self, spacegroup, corepos, coreUijs=None, sgoffset=[0, 0, 0], eps=None): + if eps is None: + eps = epsilon + # declare data members + self.spacegroup = spacegroup + self.corepos = corepos + self.coreUijs = None + self.sgoffset = numpy.array(sgoffset) + self.eps = eps + self.multiplicity = [] + self.Uisotropy = [] + self.expandedpos = [] + self.expandedUijs = [] + # obtain their values + corelen = len(self.corepos) + if coreUijs: + self.coreUijs = coreUijs + else: + self.coreUijs = numpy.zeros((corelen, 3, 3), dtype=float) + for cpos, cUij in zip(self.corepos, self.coreUijs): + gen = GeneratorSite(self.spacegroup, cpos, cUij, self.sgoffset, self.eps) + self.multiplicity.append(gen.multiplicity) + self.Uisotropy.append(gen.Uisotropy) + self.expandedpos.append(gen.eqxyz) + self.expandedUijs.append(gen.eqUij) + return
+ + + +# End of class ExpandAsymmetricUnit + + +# Helper function for SymmetryConstraints class. It may be useful +# elsewhere therefore its name does not start with underscore. + +pruneFormulaDictionary_deprecation_msg = build_deprecation_message( + base, + "pruneFormulaDictionary", + "prune_formula_dictionary", + removal_version, +) + + +@deprecated(pruneFormulaDictionary_deprecation_msg) +def pruneFormulaDictionary(eqdict): + """'diffpy.structure.pruneFormulaDictionary' is deprecated and will + be removed in version 4.0.0. + + Please use 'diffpy.structure.prune_formula_dictionary' instead. + """ + pruned = {} + for smb, eq in eqdict.items(): + if not is_constant_formula(eq): + pruned[smb] = eq + return pruned + + +
+[docs] +def prune_formula_dictionary(eqdict): + """Remove constant items from formula dictionary. + + Parameters + ---------- + eqdict : dict + Formula dictionary which maps standard variable symbols + ``("x", "U11")`` to string formulas ``("0", "-x3", "z7 +0.5")``. + + Return + ------ + dict + Pruned formula dictionary. + """ + pruned = {} + for smb, eq in eqdict.items(): + if not is_constant_formula(eq): + pruned[smb] = eq + return pruned
+ + + +symmetry_constraints = "diffpy.symmetryutilities.SymmetryConstraints" +posparSymbols_deprecation_msg = build_deprecation_message( + symmetry_constraints, + "posparSymbols", + "pospar_symbols", + removal_version, +) +posparValues_deprecation_msg = build_deprecation_message( + symmetry_constraints, + "posparValues", + "pospar_values", + removal_version, +) +UparSymbols_deprecation_msg = build_deprecation_message( + symmetry_constraints, + "UparSymbols", + "upar_symbols", + removal_version, +) +UparValues_deprecation_msg = build_deprecation_message( + symmetry_constraints, + "UparValues", + "upar_values", + removal_version, +) +UFormulas_deprecation_msg = build_deprecation_message( + symmetry_constraints, + "UFormulas", + "u_formulas", + removal_version, +) +positionFormulas_deprecation_msg = build_deprecation_message( + symmetry_constraints, + "positionFormulas", + "position_formulas", + removal_version, +) +positionFormulasPruned_deprecation_msg = build_deprecation_message( + symmetry_constraints, + "positionFormulasPruned", + "position_formulas_pruned", + removal_version, +) +UFormulasPruned_deprecation_msg = build_deprecation_message( + symmetry_constraints, + "UFormulasPruned", + "u_formulas_pruned", + removal_version, +) + + +
+[docs] +class SymmetryConstraints(object): + """Generate symmetry constraints for specified positions. + + Parameters + ---------- + spacegroup : SpaceGroup + Instance of `SpaceGroup`. + positions : array_like + List of all positions to be constrained. + Uijs : array_like, Optional + List of U matrices for all constrained positions. + sgoffset : list, Optional + Offset of space group origin ``[0, 0, 0]``. Default is ``[0, 0, 0]``. + eps : float, Optional + Cutoff for duplicate positions. Default is ``1.0e-5``. + + Attributes + ---------- + spacegroup : SpaceGroup + Instance of `SpaceGroup`. + positions : numpy.ndarray + All positions to be constrained. + Uijs : numpy.ndarray + Thermal factors for all positions. Defaults to zeros. + sgoffset : numpy.ndarray + Optional offset of space group origin ``[0, 0, 0]``. + eps : float + Cutoff for equivalent positions. Default is ``1.0e-5``. + corepos : list + List of of positions in the asymmetric unit. + coremap : dict + Dictionary mapping indices of asymmetric core positions + to indices of all symmetry related positions. + poseqns : list + List of coordinate formula dictionaries per each site. + Formula dictionary keys are from ``("x", "y", "z")`` and + the values are formatted as ``[[-]{x|y|z}%i] [{+|-}%g]``, + for example: ``x0``, ``-x3``, ``z7 +0.5``, ``0.25``. + pospars : list + List of ``(xyz symbol, value)`` pairs. + Ueqns : list + List of anisotropic atomic displacement formula + dictionaries per each position. Formula dictionary + keys are from ``('U11','U22','U33','U12','U13','U23')`` + and the values are formatted as ``{[%g*][Uij%i]|0}``, + for example: ``U110``, ``0.5*U2213``, ``0``. + Upars : list + List of ``(U symbol, value)`` pairs. + Uisotropy : list + List of bool flags for isotropic thermal displacements. + """ + + def __init__(self, spacegroup, positions, Uijs=None, sgoffset=[0, 0, 0], eps=None): + if eps is None: + eps = epsilon + # fill in data members + self.spacegroup = spacegroup + self.positions = None + self.Uijs = None + self.sgoffset = numpy.array(sgoffset) + self.eps = eps + self.corepos = [] + self.coremap = {} + self.poseqns = None + self.pospars = [] + self.Ueqns = None + self.Upars = [] + self.Uisotropy = None + # handle list of lists returned by ExpandAsymmetricUnit + if len(positions) and isinstance(positions[0], list): + # concatenate lists before converting to Nx3 array + flatpos = sum(positions, []) + flatpos = numpy.array(flatpos, dtype=float).flatten() + self.positions = flatpos.reshape((-1, 3)) + # otherwise convert to array + else: + flatpos = numpy.array(positions, dtype=float).flatten() + self.positions = flatpos.reshape((-1, 3)) + # here self.positions should be a 2D numpy array + numpos = len(self.positions) + # adjust Uijs if not specified + if Uijs is not None: + self.Uijs = numpy.array(Uijs, dtype=float) + else: + self.Uijs = numpy.zeros((numpos, 3, 3), dtype=float) + self.poseqns = numpos * [None] + self.Ueqns = numpos * [None] + self.Uisotropy = numpos * [False] + # all members should be initialized here + self._find_constraints() + return + + def _find_constraints(self): + """Find constraints for positions and anisotropic displacements + `Uij`.""" + numpos = len(self.positions) + # canonical xyzsymbols and Usymbols + xyzsymbols = [smbl + str(i) for i in range(numpos) for smbl in "xyz"] + Usymbols = [smbl + str(i) for i in range(numpos) for smbl in stdUsymbols] + independent = set(range(numpos)) + for genidx in range(numpos): + if genidx not in independent: + continue + # it is a generator + self.coremap[genidx] = [] + genpos = self.positions[genidx] + genUij = self.Uijs[genidx] + gen = GeneratorSite(self.spacegroup, genpos, genUij, self.sgoffset, self.eps) + # append new pparameters if there are any + gxyzsymbols = xyzsymbols[3 * genidx : 3 * (genidx + 1)] + for k, v in gen.pparameters: + smbl = gxyzsymbols["xyz".index(k)] + self.pospars.append((smbl, v)) + gUsymbols = Usymbols[6 * genidx : 6 * (genidx + 1)] + for k, v in gen.Uparameters: + smbl = gUsymbols[stdUsymbols.index(k)] + self.Upars.append((smbl, v)) + # search for equivalents inside indies + indies = sorted(independent) + for indidx in indies: + indpos = self.positions[indidx] + formula = gen.position_formula(indpos, gxyzsymbols) + # formula is empty when indidx is independent + if not formula: + continue + # indidx is dependent here + independent.remove(indidx) + self.coremap[genidx].append(indidx) + self.poseqns[indidx] = formula + self.Ueqns[indidx] = gen.u_formula(indpos, gUsymbols) + # make sure positions and Uijs are consistent with spacegroup + eqidx = gen.eq_index(indpos) + dxyz = gen.eqxyz[eqidx] - indpos + self.positions[indidx] += dxyz - dxyz.round() + self.Uijs[indidx] = gen.eqUij[eqidx] + self.Uisotropy[indidx] = gen.Uisotropy + # all done here + coreidx = sorted(self.coremap.keys()) + self.corepos = [self.positions[i] for i in coreidx] + return + + @deprecated(posparSymbols_deprecation_msg) + def posparSymbols(self): + """'diffpy.structure.SymmetryConstraints.posparSymbols' is + deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.SymmetryConstraints.pos_parm_symbols' instead. + """ + return self.pos_parm_symbols() + +
+[docs] + def pos_parm_symbols(self): + """Return list of standard position parameter symbols.""" + return [n for n, v in self.pospars]
+ + + @deprecated(posparValues_deprecation_msg) + def posparValues(self): + """'diffpy.structure.SymmetryConstraints.posparValues' is + deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.SymmetryConstraints.pos_parm_values' instead. + """ + return self.pos_parm_values() + +
+[docs] + def pos_parm_values(self): + """Return list of position parameters values.""" + return [v for n, v in self.pospars]
+ + + @deprecated(posparValues_deprecation_msg) + def positionFormulas(self, xyzsymbols=None): + """'diffpy.structure.SymmetryConstraints.positionFormulas' is + deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.SymmetryConstraints.position_formulas' instead. + """ + return self.position_formulas(xyzsymbols) + +
+[docs] + def position_formulas(self, xyzsymbols=None): + """List of position formulas with custom parameter symbols. + + Parameters + ---------- + xyzsymbols : list, Optional + List of custom symbols used in formula strings. + + Return + ------ + list + List of coordinate formulas dictionaries. Formulas dictionary + keys are from ``("x", "y", "z")`` and the values are formatted as + ``[[-]{symbol}] [{+|-}%g]``, for example: ``x0``, ``-sym``, ``@7 +0.5``, ``0.25``. + """ + if not xyzsymbols: + return list(self.poseqns) + # check xyzsymbols + if len(xyzsymbols) < len(self.pospars): + emsg = "Not enough symbols for %i position parameters" % len(self.pospars) + raise SymmetryError(emsg) + # build translation dictionary + trsmbl = dict(zip(self.pos_parm_symbols(), xyzsymbols)) + + def translatesymbol(matchobj): + return trsmbl[matchobj.group(0)] + + pat = re.compile(r"\b[xyz]\d+") + rv = [] + for eqns in self.poseqns: + treqns = {} + for smbl, eq in eqns.items(): + treqns[smbl] = re.sub(pat, translatesymbol, eq) + rv.append(treqns) + return rv
+ + + @deprecated(positionFormulasPruned_deprecation_msg) + def positionFormulasPruned(self, xyzsymbols=None): + """'diffpy.structure.SymmetryConstraints.positionFormulasPruned' + is deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.SymmetryConstraints.position_formulas_pruned' instead. + """ + return self.position_formulas_pruned(xyzsymbols) + +
+[docs] + def position_formulas_pruned(self, xyzsymbols=None): + """List of position formula dictionaries with constant items + removed. + + See also + -------- + positionFormulas() + + Parameters + ---------- + xyzsymbols : list, Optional + List of custom symbols used in formula strings. + + Return + ------ + list + List of coordinate formula dictionaries. + """ + rv = [prune_formula_dictionary(eqns) for eqns in self.position_formulas(xyzsymbols)] + return rv
+ + + @deprecated(UparSymbols_deprecation_msg) + def UparSymbols(self): + """'diffpy.structure.SymmetryConstraints.UparSymbols' is + deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.SymmetryConstraints.u_parm_symbols' instead. + """ + return self.u_parm_symbols() + +
+[docs] + def u_parm_symbols(self): + """Return list of standard atom displacement parameter + symbols.""" + return [n for n, v in self.Upars]
+ + + @deprecated(UparValues_deprecation_msg) + def UparValues(self): + """'diffpy.structure.SymmetryConstraints.UparValues' is + deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.SymmetryConstraints.u_parm_values' + instead. + """ + return [v for n, v in self.Upars] + +
+[docs] + def u_parm_values(self): + """Return list of atom displacement parameters values.""" + return [v for n, v in self.Upars]
+ + + @deprecated(UFormula_deprecation_msg) + def UFormulas(self, Usymbols=None): + """'diffpy.structure.SymmetryConstraints.UFormulas' is + deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.SymmetryConstraints.u_formulas' + instead. + """ + return self.u_formulas(Usymbols) + +
+[docs] + def u_formulas(self, Usymbols=None): + """List of atom displacement formulas with custom parameter + symbols. + + Parameters + ---------- + Usymbols : list, Optional + List of custom symbols used in formula strings. + + Return + ------ + list + List of atom displacement formula dictionaries per each site. + Formula dictionary keys are from ``('U11','U22','U33','U12','U13','U23')`` + and the values are formatted as ``{[%g*][Usymbol]|0}``, for example: + ``U11``, ``0.5*@37``, ``0``. + """ + if not Usymbols: + return list(self.Ueqns) + # check Usymbols + if len(Usymbols) < len(self.Upars): + emsg = "Not enough symbols for %i U parameters" % len(self.Upars) + raise SymmetryError(emsg) + # build translation dictionary + trsmbl = dict(zip(self.u_parm_symbols(), Usymbols)) + + def translatesymbol(matchobj): + return trsmbl[matchobj.group(0)] + + pat = re.compile(r"\bU\d\d\d+") + rv = [] + for eqns in self.Ueqns: + treqns = {} + for smbl, eq in eqns.items(): + treqns[smbl] = re.sub(pat, translatesymbol, eq) + rv.append(treqns) + return rv
+ + + @deprecated(UFormulasPruned_deprecation_msg) + def UFormulasPruned(self, Usymbols=None): + """'diffpy.structure.SymmetryConstraints.UFormulasPruned' is + deprecated and will be removed in version 4.0.0. + + Please use 'diffpy.structure.SymmetryConstraints.u_formulas_pruned' + instead. + """ + return self.u_formulas_pruned(Usymbols) + +
+[docs] + def u_formulas_pruned(self, Usymbols=None): + """List of atom displacement formula dictionaries with constant + items removed. + + See Also + -------- + UFormulas() + + Parameters + ---------- + Usymbols : list, Optional + List of custom symbols used in formula strings. + + Return + ------ + list + List of atom displacement formulas in tuples of + ``(U11, U22, U33, U12, U13, U23)``. + """ + rv = [prune_formula_dictionary(eqns) for eqns in self.u_formulas(Usymbols)] + return rv
+
+ + + +# End of class SymmetryConstraints + +# ---------------------------------------------------------------------------- + +# basic demonstration +if __name__ == "__main__": + from diffpy.structure.spacegroups import sg100 + + site = [0.125, 0.625, 0.13] + Uij = [[1, 2, 3], [2, 4, 5], [3, 5, 6]] + g = GeneratorSite(sg100, site, Uij=Uij) + fm100 = g.position_formula(site) + print("g = GeneratorSite(sg100, %r)" % site) + print("g.positionFormula(%r) = %s" % (site, fm100)) + print("g.pparameters =", g.pparameters) + print("g.Uparameters =", g.Uparameters) + print("g.UFormula(%r) =" % site, g.u_formula(site)) +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/diffpy/structure/utils.html b/_modules/diffpy/structure/utils.html new file mode 100644 index 00000000..47bdfb1e --- /dev/null +++ b/_modules/diffpy/structure/utils.html @@ -0,0 +1,261 @@ + + + + + + + + diffpy.structure.utils — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for diffpy.structure.utils

+#!/usr/bin/env python
+##############################################################################
+#
+# diffpy.structure  by DANSE Diffraction group
+#                   Simon J. L. Billinge
+#                   (c) 2006 trustees of the Michigan State University.
+#                   All rights reserved.
+#
+# File coded by:    Pavol Juhas
+#
+# See AUTHORS.txt for a list of people who contributed.
+# See LICENSE_DANSE.txt for license information.
+#
+##############################################################################
+"""Small shared functions."""
+
+from collections.abc import Iterable as _Iterable
+
+import numpy
+
+from diffpy.utils._deprecator import build_deprecation_message, deprecated
+
+base = "diffpy.structure"
+removal_version = "4.0.0"
+atomBareSymbol_deprecation_msg = build_deprecation_message(
+    base,
+    "atomBareSymbol",
+    "atom_bare_symbol",
+    removal_version,
+)
+
+
+
+[docs] +def isiterable(obj): + """``True`` if argument is iterable.""" + rv = isinstance(obj, _Iterable) + return rv
+ + + +
+[docs] +def isfloat(s): + """``True`` if argument can be converted to float.""" + try: + float(s) + return True + except ValueError: + pass + return False
+ + + +@deprecated(atomBareSymbol_deprecation_msg) +def atomBareSymbol(smbl): + """This function has been deprecated and will be removed in version + 4.0.0. + + Please use diffpy.structure.atom_bare_symbol instead. + """ + + return atom_bare_symbol(smbl) + + +
+[docs] +def atom_bare_symbol(smbl): + """Remove atom type string stripped of isotope and ion charge + symbols. + + This function removes any blank, isotope numbers (0-9), leading hyphens (-), and ion charge + symbols (1-9)(+-) from the given atom type string, returning only the bare element symbol. + + Parameters + ---------- + smbl : str + Atom type string that may include isotope numbers, ion charges, or hyphens. + + Returns + ------- + str + The bare element symbol. + + Examples + -------- + >>> atom_bare_symbol("Cl-") + 'Cl' + >>> atom_bare_symbol("Ca2+") + 'Ca' + >>> atom_bare_symbol("12-C") + 'C' + """ + rv = smbl.strip().lstrip("0123456789-").rstrip("123456789+-") + return rv
+ + + +# Helpers for the Structure class -------------------------------------------- + + +def _link_atom_attribute(attrname, doc, toarray=numpy.array): + """Create property wrapper that maps the specified atom attribute. + + The returned property object provides convenient access to atom + attributes from the owner `Structure` class. + + Parameters + ---------- + attrname : str + The string name of the `Atom` class attribute to be mapped. + doc : str + The docstring for the property wrapper. + toarray : callable, Optional + Factory function that converts list of attributes to `numpy.ndarray`. + Use `numpy.char.array` for string attributes. + + Return a property object. + """ + from itertools import repeat + from operator import setitem + + _all = slice(None) + + def fget(self): + va = toarray([getattr(a, attrname) for a in self]) + return va + + def fset(self, value): + n = len(self) + if n == 0: + return + v0 = getattr(self[0], attrname) + # replace scalar values, but change array attributes in place + if numpy.isscalar(v0): + + def setvalue(a, v): + return setattr(a, attrname, v) + + else: + + def setvalue(a, v): + return setitem(getattr(a, attrname), _all, v) + + # avoid broadcasting if the new value is a scalar + if numpy.isscalar(value): + genvalues = repeat(value) + else: + genvalues = numpy.broadcast_to(value, (n,) + numpy.shape(v0)) + for a, v in zip(self, genvalues): + setvalue(a, v) + return + + rv = property(fget, fset, doc=doc) + return rv +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/index.html b/_modules/index.html new file mode 100644 index 00000000..f2fa82df --- /dev/null +++ b/_modules/index.html @@ -0,0 +1,134 @@ + + + + + + + + Overview: module code — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/source/api/diffpy.structure.apps.rst b/_sources/api/diffpy.structure.apps.rst.txt similarity index 100% rename from docs/source/api/diffpy.structure.apps.rst rename to _sources/api/diffpy.structure.apps.rst.txt diff --git a/docs/source/api/diffpy.structure.expansion.rst b/_sources/api/diffpy.structure.expansion.rst.txt similarity index 100% rename from docs/source/api/diffpy.structure.expansion.rst rename to _sources/api/diffpy.structure.expansion.rst.txt diff --git a/docs/source/api/diffpy.structure.parsers.rst b/_sources/api/diffpy.structure.parsers.rst.txt similarity index 100% rename from docs/source/api/diffpy.structure.parsers.rst rename to _sources/api/diffpy.structure.parsers.rst.txt diff --git a/docs/source/api/diffpy.structure.rst b/_sources/api/diffpy.structure.rst.txt similarity index 100% rename from docs/source/api/diffpy.structure.rst rename to _sources/api/diffpy.structure.rst.txt diff --git a/docs/source/diffpy.structure.apps.rst b/_sources/diffpy.structure.apps.rst.txt similarity index 100% rename from docs/source/diffpy.structure.apps.rst rename to _sources/diffpy.structure.apps.rst.txt diff --git a/docs/source/diffpy.structure.expansion.rst b/_sources/diffpy.structure.expansion.rst.txt similarity index 100% rename from docs/source/diffpy.structure.expansion.rst rename to _sources/diffpy.structure.expansion.rst.txt diff --git a/docs/source/diffpy.structure.parsers.rst b/_sources/diffpy.structure.parsers.rst.txt similarity index 100% rename from docs/source/diffpy.structure.parsers.rst rename to _sources/diffpy.structure.parsers.rst.txt diff --git a/docs/source/index.rst b/_sources/index.rst.txt similarity index 100% rename from docs/source/index.rst rename to _sources/index.rst.txt diff --git a/docs/source/license.rst b/_sources/license.rst.txt similarity index 100% rename from docs/source/license.rst rename to _sources/license.rst.txt diff --git a/docs/source/mod-atom.rst b/_sources/mod-atom.rst.txt similarity index 100% rename from docs/source/mod-atom.rst rename to _sources/mod-atom.rst.txt diff --git a/docs/source/mod-lattice.rst b/_sources/mod-lattice.rst.txt similarity index 100% rename from docs/source/mod-lattice.rst rename to _sources/mod-lattice.rst.txt diff --git a/docs/source/mod-spacegroup.rst b/_sources/mod-spacegroup.rst.txt similarity index 100% rename from docs/source/mod-spacegroup.rst rename to _sources/mod-spacegroup.rst.txt diff --git a/docs/source/release.rst b/_sources/release.rst.txt similarity index 100% rename from docs/source/release.rst rename to _sources/release.rst.txt diff --git a/_static/_sphinx_javascript_frameworks_compat.js b/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 00000000..81415803 --- /dev/null +++ b/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,123 @@ +/* Compatability shim for jQuery and underscores.js. + * + * Copyright Sphinx contributors + * Released under the two clause BSD licence + */ + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/_static/base-stemmer.js b/_static/base-stemmer.js new file mode 100644 index 00000000..e6fa0c49 --- /dev/null +++ b/_static/base-stemmer.js @@ -0,0 +1,476 @@ +// @ts-check + +/**@constructor*/ +BaseStemmer = function() { + /** @protected */ + this.current = ''; + this.cursor = 0; + this.limit = 0; + this.limit_backward = 0; + this.bra = 0; + this.ket = 0; + + /** + * @param {string} value + */ + this.setCurrent = function(value) { + this.current = value; + this.cursor = 0; + this.limit = this.current.length; + this.limit_backward = 0; + this.bra = this.cursor; + this.ket = this.limit; + }; + + /** + * @return {string} + */ + this.getCurrent = function() { + return this.current; + }; + + /** + * @param {BaseStemmer} other + */ + this.copy_from = function(other) { + /** @protected */ + this.current = other.current; + this.cursor = other.cursor; + this.limit = other.limit; + this.limit_backward = other.limit_backward; + this.bra = other.bra; + this.ket = other.ket; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.in_grouping = function(s, min, max) { + /** @protected */ + if (this.cursor >= this.limit) return false; + var ch = this.current.charCodeAt(this.cursor); + if (ch > max || ch < min) return false; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false; + this.cursor++; + return true; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.go_in_grouping = function(s, min, max) { + /** @protected */ + while (this.cursor < this.limit) { + var ch = this.current.charCodeAt(this.cursor); + if (ch > max || ch < min) + return true; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) + return true; + this.cursor++; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.in_grouping_b = function(s, min, max) { + /** @protected */ + if (this.cursor <= this.limit_backward) return false; + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) return false; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return false; + this.cursor--; + return true; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.go_in_grouping_b = function(s, min, max) { + /** @protected */ + while (this.cursor > this.limit_backward) { + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) return true; + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) return true; + this.cursor--; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.out_grouping = function(s, min, max) { + /** @protected */ + if (this.cursor >= this.limit) return false; + var ch = this.current.charCodeAt(this.cursor); + if (ch > max || ch < min) { + this.cursor++; + return true; + } + ch -= min; + if ((s[ch >>> 3] & (0X1 << (ch & 0x7))) == 0) { + this.cursor++; + return true; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.go_out_grouping = function(s, min, max) { + /** @protected */ + while (this.cursor < this.limit) { + var ch = this.current.charCodeAt(this.cursor); + if (ch <= max && ch >= min) { + ch -= min; + if ((s[ch >>> 3] & (0X1 << (ch & 0x7))) != 0) { + return true; + } + } + this.cursor++; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.out_grouping_b = function(s, min, max) { + /** @protected */ + if (this.cursor <= this.limit_backward) return false; + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch > max || ch < min) { + this.cursor--; + return true; + } + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) == 0) { + this.cursor--; + return true; + } + return false; + }; + + /** + * @param {number[]} s + * @param {number} min + * @param {number} max + * @return {boolean} + */ + this.go_out_grouping_b = function(s, min, max) { + /** @protected */ + while (this.cursor > this.limit_backward) { + var ch = this.current.charCodeAt(this.cursor - 1); + if (ch <= max && ch >= min) { + ch -= min; + if ((s[ch >>> 3] & (0x1 << (ch & 0x7))) != 0) { + return true; + } + } + this.cursor--; + } + return false; + }; + + /** + * @param {string} s + * @return {boolean} + */ + this.eq_s = function(s) + { + /** @protected */ + if (this.limit - this.cursor < s.length) return false; + if (this.current.slice(this.cursor, this.cursor + s.length) != s) + { + return false; + } + this.cursor += s.length; + return true; + }; + + /** + * @param {string} s + * @return {boolean} + */ + this.eq_s_b = function(s) + { + /** @protected */ + if (this.cursor - this.limit_backward < s.length) return false; + if (this.current.slice(this.cursor - s.length, this.cursor) != s) + { + return false; + } + this.cursor -= s.length; + return true; + }; + + /** + * @param {Among[]} v + * @return {number} + */ + this.find_among = function(v) + { + /** @protected */ + var i = 0; + var j = v.length; + + var c = this.cursor; + var l = this.limit; + + var common_i = 0; + var common_j = 0; + + var first_key_inspected = false; + + while (true) + { + var k = i + ((j - i) >>> 1); + var diff = 0; + var common = common_i < common_j ? common_i : common_j; // smaller + // w[0]: string, w[1]: substring_i, w[2]: result, w[3]: function (optional) + var w = v[k]; + var i2; + for (i2 = common; i2 < w[0].length; i2++) + { + if (c + common == l) + { + diff = -1; + break; + } + diff = this.current.charCodeAt(c + common) - w[0].charCodeAt(i2); + if (diff != 0) break; + common++; + } + if (diff < 0) + { + j = k; + common_j = common; + } + else + { + i = k; + common_i = common; + } + if (j - i <= 1) + { + if (i > 0) break; // v->s has been inspected + if (j == i) break; // only one item in v + + // - but now we need to go round once more to get + // v->s inspected. This looks messy, but is actually + // the optimal approach. + + if (first_key_inspected) break; + first_key_inspected = true; + } + } + do { + var w = v[i]; + if (common_i >= w[0].length) + { + this.cursor = c + w[0].length; + if (w.length < 4) return w[2]; + var res = w[3](this); + this.cursor = c + w[0].length; + if (res) return w[2]; + } + i = w[1]; + } while (i >= 0); + return 0; + }; + + // find_among_b is for backwards processing. Same comments apply + /** + * @param {Among[]} v + * @return {number} + */ + this.find_among_b = function(v) + { + /** @protected */ + var i = 0; + var j = v.length + + var c = this.cursor; + var lb = this.limit_backward; + + var common_i = 0; + var common_j = 0; + + var first_key_inspected = false; + + while (true) + { + var k = i + ((j - i) >> 1); + var diff = 0; + var common = common_i < common_j ? common_i : common_j; + var w = v[k]; + var i2; + for (i2 = w[0].length - 1 - common; i2 >= 0; i2--) + { + if (c - common == lb) + { + diff = -1; + break; + } + diff = this.current.charCodeAt(c - 1 - common) - w[0].charCodeAt(i2); + if (diff != 0) break; + common++; + } + if (diff < 0) + { + j = k; + common_j = common; + } + else + { + i = k; + common_i = common; + } + if (j - i <= 1) + { + if (i > 0) break; + if (j == i) break; + if (first_key_inspected) break; + first_key_inspected = true; + } + } + do { + var w = v[i]; + if (common_i >= w[0].length) + { + this.cursor = c - w[0].length; + if (w.length < 4) return w[2]; + var res = w[3](this); + this.cursor = c - w[0].length; + if (res) return w[2]; + } + i = w[1]; + } while (i >= 0); + return 0; + }; + + /* to replace chars between c_bra and c_ket in this.current by the + * chars in s. + */ + /** + * @param {number} c_bra + * @param {number} c_ket + * @param {string} s + * @return {number} + */ + this.replace_s = function(c_bra, c_ket, s) + { + /** @protected */ + var adjustment = s.length - (c_ket - c_bra); + this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket); + this.limit += adjustment; + if (this.cursor >= c_ket) this.cursor += adjustment; + else if (this.cursor > c_bra) this.cursor = c_bra; + return adjustment; + }; + + /** + * @return {boolean} + */ + this.slice_check = function() + { + /** @protected */ + if (this.bra < 0 || + this.bra > this.ket || + this.ket > this.limit || + this.limit > this.current.length) + { + return false; + } + return true; + }; + + /** + * @param {number} c_bra + * @return {boolean} + */ + this.slice_from = function(s) + { + /** @protected */ + var result = false; + if (this.slice_check()) + { + this.replace_s(this.bra, this.ket, s); + result = true; + } + return result; + }; + + /** + * @return {boolean} + */ + this.slice_del = function() + { + /** @protected */ + return this.slice_from(""); + }; + + /** + * @param {number} c_bra + * @param {number} c_ket + * @param {string} s + */ + this.insert = function(c_bra, c_ket, s) + { + /** @protected */ + var adjustment = this.replace_s(c_bra, c_ket, s); + if (c_bra <= this.bra) this.bra += adjustment; + if (c_bra <= this.ket) this.ket += adjustment; + }; + + /** + * @return {string} + */ + this.slice_to = function() + { + /** @protected */ + var result = ''; + if (this.slice_check()) + { + result = this.current.slice(this.bra, this.ket); + } + return result; + }; + + /** + * @return {string} + */ + this.assign_to = function() + { + /** @protected */ + return this.current.slice(0, this.limit); + }; +}; diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 00000000..4738b2ed --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,906 @@ +/* + * Sphinx stylesheet -- basic theme. + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin-top: 10px; +} + +ul.search li { + padding: 5px 0; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/check-solid.svg b/_static/check-solid.svg new file mode 100644 index 00000000..92fad4b5 --- /dev/null +++ b/_static/check-solid.svg @@ -0,0 +1,4 @@ + + + + diff --git a/_static/clipboard.min.js b/_static/clipboard.min.js new file mode 100644 index 00000000..54b3c463 --- /dev/null +++ b/_static/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.8 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1 + + + + diff --git a/_static/copybutton.css b/_static/copybutton.css new file mode 100644 index 00000000..f1916ec7 --- /dev/null +++ b/_static/copybutton.css @@ -0,0 +1,94 @@ +/* Copy buttons */ +button.copybtn { + position: absolute; + display: flex; + top: .3em; + right: .3em; + width: 1.7em; + height: 1.7em; + opacity: 0; + transition: opacity 0.3s, border .3s, background-color .3s; + user-select: none; + padding: 0; + border: none; + outline: none; + border-radius: 0.4em; + /* The colors that GitHub uses */ + border: #1b1f2426 1px solid; + background-color: #f6f8fa; + color: #57606a; +} + +button.copybtn.success { + border-color: #22863a; + color: #22863a; +} + +button.copybtn svg { + stroke: currentColor; + width: 1.5em; + height: 1.5em; + padding: 0.1em; +} + +div.highlight { + position: relative; +} + +/* Show the copybutton */ +.highlight:hover button.copybtn, button.copybtn.success { + opacity: 1; +} + +.highlight button.copybtn:hover { + background-color: rgb(235, 235, 235); +} + +.highlight button.copybtn:active { + background-color: rgb(187, 187, 187); +} + +/** + * A minimal CSS-only tooltip copied from: + * https://codepen.io/mildrenben/pen/rVBrpK + * + * To use, write HTML like the following: + * + *

Short

+ */ + .o-tooltip--left { + position: relative; + } + + .o-tooltip--left:after { + opacity: 0; + visibility: hidden; + position: absolute; + content: attr(data-tooltip); + padding: .2em; + font-size: .8em; + left: -.2em; + background: grey; + color: white; + white-space: nowrap; + z-index: 2; + border-radius: 2px; + transform: translateX(-102%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); +} + +.o-tooltip--left:hover:after { + display: block; + opacity: 1; + visibility: visible; + transform: translateX(-100%) translateY(0); + transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1); + transition-delay: .5s; +} + +/* By default the copy button shouldn't show up when printing a page */ +@media print { + button.copybtn { + display: none; + } +} diff --git a/_static/copybutton.js b/_static/copybutton.js new file mode 100644 index 00000000..caa31c1e --- /dev/null +++ b/_static/copybutton.js @@ -0,0 +1,248 @@ +// Localization support +const messages = { + 'en': { + 'copy': 'Copy', + 'copy_to_clipboard': 'Copy to clipboard', + 'copy_success': 'Copied!', + 'copy_failure': 'Failed to copy', + }, + 'es' : { + 'copy': 'Copiar', + 'copy_to_clipboard': 'Copiar al portapapeles', + 'copy_success': '¡Copiado!', + 'copy_failure': 'Error al copiar', + }, + 'de' : { + 'copy': 'Kopieren', + 'copy_to_clipboard': 'In die Zwischenablage kopieren', + 'copy_success': 'Kopiert!', + 'copy_failure': 'Fehler beim Kopieren', + }, + 'fr' : { + 'copy': 'Copier', + 'copy_to_clipboard': 'Copier dans le presse-papier', + 'copy_success': 'Copié !', + 'copy_failure': 'Échec de la copie', + }, + 'ru': { + 'copy': 'Скопировать', + 'copy_to_clipboard': 'Скопировать в буфер', + 'copy_success': 'Скопировано!', + 'copy_failure': 'Не удалось скопировать', + }, + 'zh-CN': { + 'copy': '复制', + 'copy_to_clipboard': '复制到剪贴板', + 'copy_success': '复制成功!', + 'copy_failure': '复制失败', + }, + 'it' : { + 'copy': 'Copiare', + 'copy_to_clipboard': 'Copiato negli appunti', + 'copy_success': 'Copiato!', + 'copy_failure': 'Errore durante la copia', + } +} + +let locale = 'en' +if( document.documentElement.lang !== undefined + && messages[document.documentElement.lang] !== undefined ) { + locale = document.documentElement.lang +} + +let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT; +if (doc_url_root == '#') { + doc_url_root = ''; +} + +/** + * SVG files for our copy buttons + */ +let iconCheck = ` + ${messages[locale]['copy_success']} + + +` + +// If the user specified their own SVG use that, otherwise use the default +let iconCopy = ``; +if (!iconCopy) { + iconCopy = ` + ${messages[locale]['copy_to_clipboard']} + + + +` +} + +/** + * Set up copy/paste for code blocks + */ + +const runWhenDOMLoaded = cb => { + if (document.readyState != 'loading') { + cb() + } else if (document.addEventListener) { + document.addEventListener('DOMContentLoaded', cb) + } else { + document.attachEvent('onreadystatechange', function() { + if (document.readyState == 'complete') cb() + }) + } +} + +const codeCellId = index => `codecell${index}` + +// Clears selected text since ClipboardJS will select the text when copying +const clearSelection = () => { + if (window.getSelection) { + window.getSelection().removeAllRanges() + } else if (document.selection) { + document.selection.empty() + } +} + +// Changes tooltip text for a moment, then changes it back +// We want the timeout of our `success` class to be a bit shorter than the +// tooltip and icon change, so that we can hide the icon before changing back. +var timeoutIcon = 2000; +var timeoutSuccessClass = 1500; + +const temporarilyChangeTooltip = (el, oldText, newText) => { + el.setAttribute('data-tooltip', newText) + el.classList.add('success') + // Remove success a little bit sooner than we change the tooltip + // So that we can use CSS to hide the copybutton first + setTimeout(() => el.classList.remove('success'), timeoutSuccessClass) + setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon) +} + +// Changes the copy button icon for two seconds, then changes it back +const temporarilyChangeIcon = (el) => { + el.innerHTML = iconCheck; + setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon) +} + +const addCopyButtonToCodeCells = () => { + // If ClipboardJS hasn't loaded, wait a bit and try again. This + // happens because we load ClipboardJS asynchronously. + if (window.ClipboardJS === undefined) { + setTimeout(addCopyButtonToCodeCells, 250) + return + } + + // Add copybuttons to all of our code cells + const COPYBUTTON_SELECTOR = 'div.highlight pre'; + const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR) + codeCells.forEach((codeCell, index) => { + const id = codeCellId(index) + codeCell.setAttribute('id', id) + + const clipboardButton = id => + `` + codeCell.insertAdjacentHTML('afterend', clipboardButton(id)) + }) + +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} + + +var copyTargetText = (trigger) => { + var target = document.querySelector(trigger.attributes['data-clipboard-target'].value); + + // get filtered text + let exclude = '.linenos'; + + let text = filterText(target, exclude); + return formatCopyText(text, '^\\$ ', true, true, true, true, '', '') +} + + // Initialize with a callback so we can modify the text before copy + const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText}) + + // Update UI with error/success messages + clipboard.on('success', event => { + clearSelection() + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success']) + temporarilyChangeIcon(event.trigger) + }) + + clipboard.on('error', event => { + temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure']) + }) +} + +runWhenDOMLoaded(addCopyButtonToCodeCells) \ No newline at end of file diff --git a/_static/copybutton_funcs.js b/_static/copybutton_funcs.js new file mode 100644 index 00000000..dbe1aaad --- /dev/null +++ b/_static/copybutton_funcs.js @@ -0,0 +1,73 @@ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +export function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// Callback when a copy button is clicked. Will be passed the node that was clicked +// should then grab the text and replace pieces of text that shouldn't be used in output +export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") { + var regexp; + var match; + + // Do we check for line continuation characters and "HERE-documents"? + var useLineCont = !!lineContinuationChar + var useHereDoc = !!hereDocDelim + + // create regexp to capture prompt and remaining line + if (isRegexp) { + regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)') + } else { + regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)') + } + + const outputLines = []; + var promptFound = false; + var gotLineCont = false; + var gotHereDoc = false; + const lineGotPrompt = []; + for (const line of textContent.split('\n')) { + match = line.match(regexp) + if (match || gotLineCont || gotHereDoc) { + promptFound = regexp.test(line) + lineGotPrompt.push(promptFound) + if (removePrompts && promptFound) { + outputLines.push(match[2]) + } else { + outputLines.push(line) + } + gotLineCont = line.endsWith(lineContinuationChar) & useLineCont + if (line.includes(hereDocDelim) & useHereDoc) + gotHereDoc = !gotHereDoc + } else if (!onlyCopyPromptLines) { + outputLines.push(line) + } else if (copyEmptyLines && line.trim() === '') { + outputLines.push(line) + } + } + + // If no lines with the prompt were found then just use original lines + if (lineGotPrompt.some(v => v === true)) { + textContent = outputLines.join('\n'); + } + + // Remove a trailing newline to avoid auto-running when pasting + if (textContent.endsWith("\n")) { + textContent = textContent.slice(0, -1) + } + return textContent +} diff --git a/_static/css/badge_only.css b/_static/css/badge_only.css new file mode 100644 index 00000000..88ba55b9 --- /dev/null +++ b/_static/css/badge_only.css @@ -0,0 +1 @@ +.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions .rst-other-versions .rtd-current-item{font-weight:700}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}#flyout-search-form{padding:6px} \ No newline at end of file diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff b/_static/css/fonts/Roboto-Slab-Bold.woff new file mode 100644 index 00000000..6cb60000 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Bold.woff2 b/_static/css/fonts/Roboto-Slab-Bold.woff2 new file mode 100644 index 00000000..7059e231 Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Bold.woff2 differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff b/_static/css/fonts/Roboto-Slab-Regular.woff new file mode 100644 index 00000000..f815f63f Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff differ diff --git a/_static/css/fonts/Roboto-Slab-Regular.woff2 b/_static/css/fonts/Roboto-Slab-Regular.woff2 new file mode 100644 index 00000000..f2c76e5b Binary files /dev/null and b/_static/css/fonts/Roboto-Slab-Regular.woff2 differ diff --git a/_static/css/fonts/fontawesome-webfont.eot b/_static/css/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000..e9f60ca9 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.eot differ diff --git a/_static/css/fonts/fontawesome-webfont.svg b/_static/css/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000..855c845e --- /dev/null +++ b/_static/css/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_static/css/fonts/fontawesome-webfont.ttf b/_static/css/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000..35acda2f Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.ttf differ diff --git a/_static/css/fonts/fontawesome-webfont.woff b/_static/css/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000..400014a4 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff differ diff --git a/_static/css/fonts/fontawesome-webfont.woff2 b/_static/css/fonts/fontawesome-webfont.woff2 new file mode 100644 index 00000000..4d13fc60 Binary files /dev/null and b/_static/css/fonts/fontawesome-webfont.woff2 differ diff --git a/_static/css/fonts/lato-bold-italic.woff b/_static/css/fonts/lato-bold-italic.woff new file mode 100644 index 00000000..88ad05b9 Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff differ diff --git a/_static/css/fonts/lato-bold-italic.woff2 b/_static/css/fonts/lato-bold-italic.woff2 new file mode 100644 index 00000000..c4e3d804 Binary files /dev/null and b/_static/css/fonts/lato-bold-italic.woff2 differ diff --git a/_static/css/fonts/lato-bold.woff b/_static/css/fonts/lato-bold.woff new file mode 100644 index 00000000..c6dff51f Binary files /dev/null and b/_static/css/fonts/lato-bold.woff differ diff --git a/_static/css/fonts/lato-bold.woff2 b/_static/css/fonts/lato-bold.woff2 new file mode 100644 index 00000000..bb195043 Binary files /dev/null and b/_static/css/fonts/lato-bold.woff2 differ diff --git a/_static/css/fonts/lato-normal-italic.woff b/_static/css/fonts/lato-normal-italic.woff new file mode 100644 index 00000000..76114bc0 Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff differ diff --git a/_static/css/fonts/lato-normal-italic.woff2 b/_static/css/fonts/lato-normal-italic.woff2 new file mode 100644 index 00000000..3404f37e Binary files /dev/null and b/_static/css/fonts/lato-normal-italic.woff2 differ diff --git a/_static/css/fonts/lato-normal.woff b/_static/css/fonts/lato-normal.woff new file mode 100644 index 00000000..ae1307ff Binary files /dev/null and b/_static/css/fonts/lato-normal.woff differ diff --git a/_static/css/fonts/lato-normal.woff2 b/_static/css/fonts/lato-normal.woff2 new file mode 100644 index 00000000..3bf98433 Binary files /dev/null and b/_static/css/fonts/lato-normal.woff2 differ diff --git a/_static/css/theme.css b/_static/css/theme.css new file mode 100644 index 00000000..a88467c1 --- /dev/null +++ b/_static/css/theme.css @@ -0,0 +1,4 @@ +html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}[hidden],audio:not([controls]){display:none}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}blockquote{margin:0}dfn{font-style:italic}ins{background:#ff9;text-decoration:none}ins,mark{color:#000}mark{background:#ff0;font-style:italic;font-weight:700}.rst-content code,.rst-content tt,code,kbd,pre,samp{font-family:monospace,serif;_font-family:courier new,monospace;font-size:1em}pre{white-space:pre}q{quotes:none}q:after,q:before{content:"";content:none}small{font-size:85%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}dl,ol,ul{margin:0;padding:0;list-style:none;list-style-image:none}li{list-style:none}dd{margin:0}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle;max-width:100%}svg:not(:root){overflow:hidden}figure,form{margin:0}label{cursor:pointer}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button;*overflow:visible}button[disabled],input[disabled]{cursor:default}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}textarea{resize:vertical}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}.chromeframe{margin:.2em 0;background:#ccc;color:#000;padding:.2em 0}.ir{display:block;border:0;text-indent:-999em;overflow:hidden;background-color:transparent;background-repeat:no-repeat;text-align:left;direction:ltr;*line-height:0}.ir br{display:none}.hidden{display:none!important;visibility:hidden}.visuallyhidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}.invisible{visibility:hidden}.relative{position:relative}big,small{font-size:100%}@media print{body,html,section{background:none!important}*{box-shadow:none!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}a,a:visited{text-decoration:underline}.ir a:after,a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}.rst-content .toctree-wrapper>p.caption,h2,h3,p{orphans:3;widows:3}.rst-content .toctree-wrapper>p.caption,h2,h3{page-break-after:avoid}}.btn,.fa:before,.icon:before,.rst-content .admonition,.rst-content .admonition-title:before,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .code-block-caption .headerlink:before,.rst-content .danger,.rst-content .eqno .headerlink:before,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-alert,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before,input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select,textarea{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:FontAwesome;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713);src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix&v=4.7.0) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#fontawesomeregular) format("svg");font-weight:400;font-style:normal}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14286em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14286em;width:2.14286em;top:.14286em;text-align:center}.fa-li.fa-lg{left:-1.85714em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa-pull-left.icon,.fa.fa-pull-left,.rst-content .code-block-caption .fa-pull-left.headerlink,.rst-content .eqno .fa-pull-left.headerlink,.rst-content .fa-pull-left.admonition-title,.rst-content code.download span.fa-pull-left:first-child,.rst-content dl dt .fa-pull-left.headerlink,.rst-content h1 .fa-pull-left.headerlink,.rst-content h2 .fa-pull-left.headerlink,.rst-content h3 .fa-pull-left.headerlink,.rst-content h4 .fa-pull-left.headerlink,.rst-content h5 .fa-pull-left.headerlink,.rst-content h6 .fa-pull-left.headerlink,.rst-content p .fa-pull-left.headerlink,.rst-content table>caption .fa-pull-left.headerlink,.rst-content tt.download span.fa-pull-left:first-child,.wy-menu-vertical li.current>a button.fa-pull-left.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-left.toctree-expand,.wy-menu-vertical li button.fa-pull-left.toctree-expand{margin-right:.3em}.fa-pull-right.icon,.fa.fa-pull-right,.rst-content .code-block-caption .fa-pull-right.headerlink,.rst-content .eqno .fa-pull-right.headerlink,.rst-content .fa-pull-right.admonition-title,.rst-content code.download span.fa-pull-right:first-child,.rst-content dl dt .fa-pull-right.headerlink,.rst-content h1 .fa-pull-right.headerlink,.rst-content h2 .fa-pull-right.headerlink,.rst-content h3 .fa-pull-right.headerlink,.rst-content h4 .fa-pull-right.headerlink,.rst-content h5 .fa-pull-right.headerlink,.rst-content h6 .fa-pull-right.headerlink,.rst-content p .fa-pull-right.headerlink,.rst-content table>caption .fa-pull-right.headerlink,.rst-content tt.download span.fa-pull-right:first-child,.wy-menu-vertical li.current>a button.fa-pull-right.toctree-expand,.wy-menu-vertical li.on a button.fa-pull-right.toctree-expand,.wy-menu-vertical li button.fa-pull-right.toctree-expand{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left,.pull-left.icon,.rst-content .code-block-caption .pull-left.headerlink,.rst-content .eqno .pull-left.headerlink,.rst-content .pull-left.admonition-title,.rst-content code.download span.pull-left:first-child,.rst-content dl dt .pull-left.headerlink,.rst-content h1 .pull-left.headerlink,.rst-content h2 .pull-left.headerlink,.rst-content h3 .pull-left.headerlink,.rst-content h4 .pull-left.headerlink,.rst-content h5 .pull-left.headerlink,.rst-content h6 .pull-left.headerlink,.rst-content p .pull-left.headerlink,.rst-content table>caption .pull-left.headerlink,.rst-content tt.download span.pull-left:first-child,.wy-menu-vertical li.current>a button.pull-left.toctree-expand,.wy-menu-vertical li.on a button.pull-left.toctree-expand,.wy-menu-vertical li button.pull-left.toctree-expand{margin-right:.3em}.fa.pull-right,.pull-right.icon,.rst-content .code-block-caption .pull-right.headerlink,.rst-content .eqno .pull-right.headerlink,.rst-content .pull-right.admonition-title,.rst-content code.download span.pull-right:first-child,.rst-content dl dt .pull-right.headerlink,.rst-content h1 .pull-right.headerlink,.rst-content h2 .pull-right.headerlink,.rst-content h3 .pull-right.headerlink,.rst-content h4 .pull-right.headerlink,.rst-content h5 .pull-right.headerlink,.rst-content h6 .pull-right.headerlink,.rst-content p .pull-right.headerlink,.rst-content table>caption .pull-right.headerlink,.rst-content tt.download span.pull-right:first-child,.wy-menu-vertical li.current>a button.pull-right.toctree-expand,.wy-menu-vertical li.on a button.pull-right.toctree-expand,.wy-menu-vertical li button.pull-right.toctree-expand{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scaleY(-1);-ms-transform:scaleY(-1);transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before,.icon-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before,.icon-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before,.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before,.icon-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before{content:""}.fa-check-circle:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before,.rst-content .admonition-title:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before,.icon-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before,.icon-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before,.icon-circle-arrow-left:before{content:""}.fa-arrow-circle-right:before,.icon-circle-arrow-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before,.icon-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before,.icon-caret-down:before,.wy-dropdown .caret:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell-o:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before{content:""}.fa-sort-alpha-desc:before{content:""}.fa-sort-amount-asc:before{content:""}.fa-sort-amount-desc:before{content:""}.fa-sort-numeric-asc:before{content:""}.fa-sort-numeric-desc:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before,.icon-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before,.wy-menu-vertical li button.toctree-expand:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-pied-piper-pp:before{content:""}.fa-pied-piper-alt:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before,.icon-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-pied-piper:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.fa,.icon,.rst-content .admonition-title,.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content code.download span:first-child,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink,.rst-content tt.download span:first-child,.wy-dropdown .caret,.wy-inline-validate.wy-inline-validate-danger .wy-input-context,.wy-inline-validate.wy-inline-validate-info .wy-input-context,.wy-inline-validate.wy-inline-validate-success .wy-input-context,.wy-inline-validate.wy-inline-validate-warning .wy-input-context,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li button.toctree-expand{font-family:inherit}.fa:before,.icon:before,.rst-content .admonition-title:before,.rst-content .code-block-caption .headerlink:before,.rst-content .eqno .headerlink:before,.rst-content code.download span:first-child:before,.rst-content dl dt .headerlink:before,.rst-content h1 .headerlink:before,.rst-content h2 .headerlink:before,.rst-content h3 .headerlink:before,.rst-content h4 .headerlink:before,.rst-content h5 .headerlink:before,.rst-content h6 .headerlink:before,.rst-content p.caption .headerlink:before,.rst-content p .headerlink:before,.rst-content table>caption .headerlink:before,.rst-content tt.download span:first-child:before,.wy-dropdown .caret:before,.wy-inline-validate.wy-inline-validate-danger .wy-input-context:before,.wy-inline-validate.wy-inline-validate-info .wy-input-context:before,.wy-inline-validate.wy-inline-validate-success .wy-input-context:before,.wy-inline-validate.wy-inline-validate-warning .wy-input-context:before,.wy-menu-vertical li.current>a button.toctree-expand:before,.wy-menu-vertical li.on a button.toctree-expand:before,.wy-menu-vertical li button.toctree-expand:before{font-family:FontAwesome;display:inline-block;font-style:normal;font-weight:400;line-height:1;text-decoration:inherit}.rst-content .code-block-caption a .headerlink,.rst-content .eqno a .headerlink,.rst-content a .admonition-title,.rst-content code.download a span:first-child,.rst-content dl dt a .headerlink,.rst-content h1 a .headerlink,.rst-content h2 a .headerlink,.rst-content h3 a .headerlink,.rst-content h4 a .headerlink,.rst-content h5 a .headerlink,.rst-content h6 a .headerlink,.rst-content p.caption a .headerlink,.rst-content p a .headerlink,.rst-content table>caption a .headerlink,.rst-content tt.download a span:first-child,.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand,.wy-menu-vertical li a button.toctree-expand,a .fa,a .icon,a .rst-content .admonition-title,a .rst-content .code-block-caption .headerlink,a .rst-content .eqno .headerlink,a .rst-content code.download span:first-child,a .rst-content dl dt .headerlink,a .rst-content h1 .headerlink,a .rst-content h2 .headerlink,a .rst-content h3 .headerlink,a .rst-content h4 .headerlink,a .rst-content h5 .headerlink,a .rst-content h6 .headerlink,a .rst-content p.caption .headerlink,a .rst-content p .headerlink,a .rst-content table>caption .headerlink,a .rst-content tt.download span:first-child,a .wy-menu-vertical li button.toctree-expand{display:inline-block;text-decoration:inherit}.btn .fa,.btn .icon,.btn .rst-content .admonition-title,.btn .rst-content .code-block-caption .headerlink,.btn .rst-content .eqno .headerlink,.btn .rst-content code.download span:first-child,.btn .rst-content dl dt .headerlink,.btn .rst-content h1 .headerlink,.btn .rst-content h2 .headerlink,.btn .rst-content h3 .headerlink,.btn .rst-content h4 .headerlink,.btn .rst-content h5 .headerlink,.btn .rst-content h6 .headerlink,.btn .rst-content p .headerlink,.btn .rst-content table>caption .headerlink,.btn .rst-content tt.download span:first-child,.btn .wy-menu-vertical li.current>a button.toctree-expand,.btn .wy-menu-vertical li.on a button.toctree-expand,.btn .wy-menu-vertical li button.toctree-expand,.nav .fa,.nav .icon,.nav .rst-content .admonition-title,.nav .rst-content .code-block-caption .headerlink,.nav .rst-content .eqno .headerlink,.nav .rst-content code.download span:first-child,.nav .rst-content dl dt .headerlink,.nav .rst-content h1 .headerlink,.nav .rst-content h2 .headerlink,.nav .rst-content h3 .headerlink,.nav .rst-content h4 .headerlink,.nav .rst-content h5 .headerlink,.nav .rst-content h6 .headerlink,.nav .rst-content p .headerlink,.nav .rst-content table>caption .headerlink,.nav .rst-content tt.download span:first-child,.nav .wy-menu-vertical li.current>a button.toctree-expand,.nav .wy-menu-vertical li.on a button.toctree-expand,.nav .wy-menu-vertical li button.toctree-expand,.rst-content .btn .admonition-title,.rst-content .code-block-caption .btn .headerlink,.rst-content .code-block-caption .nav .headerlink,.rst-content .eqno .btn .headerlink,.rst-content .eqno .nav .headerlink,.rst-content .nav .admonition-title,.rst-content code.download .btn span:first-child,.rst-content code.download .nav span:first-child,.rst-content dl dt .btn .headerlink,.rst-content dl dt .nav .headerlink,.rst-content h1 .btn .headerlink,.rst-content h1 .nav .headerlink,.rst-content h2 .btn .headerlink,.rst-content h2 .nav .headerlink,.rst-content h3 .btn .headerlink,.rst-content h3 .nav .headerlink,.rst-content h4 .btn .headerlink,.rst-content h4 .nav .headerlink,.rst-content h5 .btn .headerlink,.rst-content h5 .nav .headerlink,.rst-content h6 .btn .headerlink,.rst-content h6 .nav .headerlink,.rst-content p .btn .headerlink,.rst-content p .nav .headerlink,.rst-content table>caption .btn .headerlink,.rst-content table>caption .nav .headerlink,.rst-content tt.download .btn span:first-child,.rst-content tt.download .nav span:first-child,.wy-menu-vertical li .btn button.toctree-expand,.wy-menu-vertical li.current>a .btn button.toctree-expand,.wy-menu-vertical li.current>a .nav button.toctree-expand,.wy-menu-vertical li .nav button.toctree-expand,.wy-menu-vertical li.on a .btn button.toctree-expand,.wy-menu-vertical li.on a .nav button.toctree-expand{display:inline}.btn .fa-large.icon,.btn .fa.fa-large,.btn .rst-content .code-block-caption .fa-large.headerlink,.btn .rst-content .eqno .fa-large.headerlink,.btn .rst-content .fa-large.admonition-title,.btn .rst-content code.download span.fa-large:first-child,.btn .rst-content dl dt .fa-large.headerlink,.btn .rst-content h1 .fa-large.headerlink,.btn .rst-content h2 .fa-large.headerlink,.btn .rst-content h3 .fa-large.headerlink,.btn .rst-content h4 .fa-large.headerlink,.btn .rst-content h5 .fa-large.headerlink,.btn .rst-content h6 .fa-large.headerlink,.btn .rst-content p .fa-large.headerlink,.btn .rst-content table>caption .fa-large.headerlink,.btn .rst-content tt.download span.fa-large:first-child,.btn .wy-menu-vertical li button.fa-large.toctree-expand,.nav .fa-large.icon,.nav .fa.fa-large,.nav .rst-content .code-block-caption .fa-large.headerlink,.nav .rst-content .eqno .fa-large.headerlink,.nav .rst-content .fa-large.admonition-title,.nav .rst-content code.download span.fa-large:first-child,.nav .rst-content dl dt .fa-large.headerlink,.nav .rst-content h1 .fa-large.headerlink,.nav .rst-content h2 .fa-large.headerlink,.nav .rst-content h3 .fa-large.headerlink,.nav .rst-content h4 .fa-large.headerlink,.nav .rst-content h5 .fa-large.headerlink,.nav .rst-content h6 .fa-large.headerlink,.nav .rst-content p .fa-large.headerlink,.nav .rst-content table>caption .fa-large.headerlink,.nav .rst-content tt.download span.fa-large:first-child,.nav .wy-menu-vertical li button.fa-large.toctree-expand,.rst-content .btn .fa-large.admonition-title,.rst-content .code-block-caption .btn .fa-large.headerlink,.rst-content .code-block-caption .nav .fa-large.headerlink,.rst-content .eqno .btn .fa-large.headerlink,.rst-content .eqno .nav .fa-large.headerlink,.rst-content .nav .fa-large.admonition-title,.rst-content code.download .btn span.fa-large:first-child,.rst-content code.download .nav span.fa-large:first-child,.rst-content dl dt .btn .fa-large.headerlink,.rst-content dl dt .nav .fa-large.headerlink,.rst-content h1 .btn .fa-large.headerlink,.rst-content h1 .nav .fa-large.headerlink,.rst-content h2 .btn .fa-large.headerlink,.rst-content h2 .nav .fa-large.headerlink,.rst-content h3 .btn .fa-large.headerlink,.rst-content h3 .nav .fa-large.headerlink,.rst-content h4 .btn .fa-large.headerlink,.rst-content h4 .nav .fa-large.headerlink,.rst-content h5 .btn .fa-large.headerlink,.rst-content h5 .nav .fa-large.headerlink,.rst-content h6 .btn .fa-large.headerlink,.rst-content h6 .nav .fa-large.headerlink,.rst-content p .btn .fa-large.headerlink,.rst-content p .nav .fa-large.headerlink,.rst-content table>caption .btn .fa-large.headerlink,.rst-content table>caption .nav .fa-large.headerlink,.rst-content tt.download .btn span.fa-large:first-child,.rst-content tt.download .nav span.fa-large:first-child,.wy-menu-vertical li .btn button.fa-large.toctree-expand,.wy-menu-vertical li .nav button.fa-large.toctree-expand{line-height:.9em}.btn .fa-spin.icon,.btn .fa.fa-spin,.btn .rst-content .code-block-caption .fa-spin.headerlink,.btn .rst-content .eqno .fa-spin.headerlink,.btn .rst-content .fa-spin.admonition-title,.btn .rst-content code.download span.fa-spin:first-child,.btn .rst-content dl dt .fa-spin.headerlink,.btn .rst-content h1 .fa-spin.headerlink,.btn .rst-content h2 .fa-spin.headerlink,.btn .rst-content h3 .fa-spin.headerlink,.btn .rst-content h4 .fa-spin.headerlink,.btn .rst-content h5 .fa-spin.headerlink,.btn .rst-content h6 .fa-spin.headerlink,.btn .rst-content p .fa-spin.headerlink,.btn .rst-content table>caption .fa-spin.headerlink,.btn .rst-content tt.download span.fa-spin:first-child,.btn .wy-menu-vertical li button.fa-spin.toctree-expand,.nav .fa-spin.icon,.nav .fa.fa-spin,.nav .rst-content .code-block-caption .fa-spin.headerlink,.nav .rst-content .eqno .fa-spin.headerlink,.nav .rst-content .fa-spin.admonition-title,.nav .rst-content code.download span.fa-spin:first-child,.nav .rst-content dl dt .fa-spin.headerlink,.nav .rst-content h1 .fa-spin.headerlink,.nav .rst-content h2 .fa-spin.headerlink,.nav .rst-content h3 .fa-spin.headerlink,.nav .rst-content h4 .fa-spin.headerlink,.nav .rst-content h5 .fa-spin.headerlink,.nav .rst-content h6 .fa-spin.headerlink,.nav .rst-content p .fa-spin.headerlink,.nav .rst-content table>caption .fa-spin.headerlink,.nav .rst-content tt.download span.fa-spin:first-child,.nav .wy-menu-vertical li button.fa-spin.toctree-expand,.rst-content .btn .fa-spin.admonition-title,.rst-content .code-block-caption .btn .fa-spin.headerlink,.rst-content .code-block-caption .nav .fa-spin.headerlink,.rst-content .eqno .btn .fa-spin.headerlink,.rst-content .eqno .nav .fa-spin.headerlink,.rst-content .nav .fa-spin.admonition-title,.rst-content code.download .btn span.fa-spin:first-child,.rst-content code.download .nav span.fa-spin:first-child,.rst-content dl dt .btn .fa-spin.headerlink,.rst-content dl dt .nav .fa-spin.headerlink,.rst-content h1 .btn .fa-spin.headerlink,.rst-content h1 .nav .fa-spin.headerlink,.rst-content h2 .btn .fa-spin.headerlink,.rst-content h2 .nav .fa-spin.headerlink,.rst-content h3 .btn .fa-spin.headerlink,.rst-content h3 .nav .fa-spin.headerlink,.rst-content h4 .btn .fa-spin.headerlink,.rst-content h4 .nav .fa-spin.headerlink,.rst-content h5 .btn .fa-spin.headerlink,.rst-content h5 .nav .fa-spin.headerlink,.rst-content h6 .btn .fa-spin.headerlink,.rst-content h6 .nav .fa-spin.headerlink,.rst-content p .btn .fa-spin.headerlink,.rst-content p .nav .fa-spin.headerlink,.rst-content table>caption .btn .fa-spin.headerlink,.rst-content table>caption .nav .fa-spin.headerlink,.rst-content tt.download .btn span.fa-spin:first-child,.rst-content tt.download .nav span.fa-spin:first-child,.wy-menu-vertical li .btn button.fa-spin.toctree-expand,.wy-menu-vertical li .nav button.fa-spin.toctree-expand{display:inline-block}.btn.fa:before,.btn.icon:before,.rst-content .btn.admonition-title:before,.rst-content .code-block-caption .btn.headerlink:before,.rst-content .eqno .btn.headerlink:before,.rst-content code.download span.btn:first-child:before,.rst-content dl dt .btn.headerlink:before,.rst-content h1 .btn.headerlink:before,.rst-content h2 .btn.headerlink:before,.rst-content h3 .btn.headerlink:before,.rst-content h4 .btn.headerlink:before,.rst-content h5 .btn.headerlink:before,.rst-content h6 .btn.headerlink:before,.rst-content p .btn.headerlink:before,.rst-content table>caption .btn.headerlink:before,.rst-content tt.download span.btn:first-child:before,.wy-menu-vertical li button.btn.toctree-expand:before{opacity:.5;-webkit-transition:opacity .05s ease-in;-moz-transition:opacity .05s ease-in;transition:opacity .05s ease-in}.btn.fa:hover:before,.btn.icon:hover:before,.rst-content .btn.admonition-title:hover:before,.rst-content .code-block-caption .btn.headerlink:hover:before,.rst-content .eqno .btn.headerlink:hover:before,.rst-content code.download span.btn:first-child:hover:before,.rst-content dl dt .btn.headerlink:hover:before,.rst-content h1 .btn.headerlink:hover:before,.rst-content h2 .btn.headerlink:hover:before,.rst-content h3 .btn.headerlink:hover:before,.rst-content h4 .btn.headerlink:hover:before,.rst-content h5 .btn.headerlink:hover:before,.rst-content h6 .btn.headerlink:hover:before,.rst-content p .btn.headerlink:hover:before,.rst-content table>caption .btn.headerlink:hover:before,.rst-content tt.download span.btn:first-child:hover:before,.wy-menu-vertical li button.btn.toctree-expand:hover:before{opacity:1}.btn-mini .fa:before,.btn-mini .icon:before,.btn-mini .rst-content .admonition-title:before,.btn-mini .rst-content .code-block-caption .headerlink:before,.btn-mini .rst-content .eqno .headerlink:before,.btn-mini .rst-content code.download span:first-child:before,.btn-mini .rst-content dl dt .headerlink:before,.btn-mini .rst-content h1 .headerlink:before,.btn-mini .rst-content h2 .headerlink:before,.btn-mini .rst-content h3 .headerlink:before,.btn-mini .rst-content h4 .headerlink:before,.btn-mini .rst-content h5 .headerlink:before,.btn-mini .rst-content h6 .headerlink:before,.btn-mini .rst-content p .headerlink:before,.btn-mini .rst-content table>caption .headerlink:before,.btn-mini .rst-content tt.download span:first-child:before,.btn-mini .wy-menu-vertical li button.toctree-expand:before,.rst-content .btn-mini .admonition-title:before,.rst-content .code-block-caption .btn-mini .headerlink:before,.rst-content .eqno .btn-mini .headerlink:before,.rst-content code.download .btn-mini span:first-child:before,.rst-content dl dt .btn-mini .headerlink:before,.rst-content h1 .btn-mini .headerlink:before,.rst-content h2 .btn-mini .headerlink:before,.rst-content h3 .btn-mini .headerlink:before,.rst-content h4 .btn-mini .headerlink:before,.rst-content h5 .btn-mini .headerlink:before,.rst-content h6 .btn-mini .headerlink:before,.rst-content p .btn-mini .headerlink:before,.rst-content table>caption .btn-mini .headerlink:before,.rst-content tt.download .btn-mini span:first-child:before,.wy-menu-vertical li .btn-mini button.toctree-expand:before{font-size:14px;vertical-align:-15%}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning,.wy-alert{padding:12px;line-height:24px;margin-bottom:24px;background:#e7f2fa}.rst-content .admonition-title,.wy-alert-title{font-weight:700;display:block;color:#fff;background:#6ab0de;padding:6px 12px;margin:-12px -12px 12px}.rst-content .danger,.rst-content .error,.rst-content .wy-alert-danger.admonition,.rst-content .wy-alert-danger.admonition-todo,.rst-content .wy-alert-danger.attention,.rst-content .wy-alert-danger.caution,.rst-content .wy-alert-danger.hint,.rst-content .wy-alert-danger.important,.rst-content .wy-alert-danger.note,.rst-content .wy-alert-danger.seealso,.rst-content .wy-alert-danger.tip,.rst-content .wy-alert-danger.warning,.wy-alert.wy-alert-danger{background:#fdf3f2}.rst-content .danger .admonition-title,.rst-content .danger .wy-alert-title,.rst-content .error .admonition-title,.rst-content .error .wy-alert-title,.rst-content .wy-alert-danger.admonition-todo .admonition-title,.rst-content .wy-alert-danger.admonition-todo .wy-alert-title,.rst-content .wy-alert-danger.admonition .admonition-title,.rst-content .wy-alert-danger.admonition .wy-alert-title,.rst-content .wy-alert-danger.attention .admonition-title,.rst-content .wy-alert-danger.attention .wy-alert-title,.rst-content .wy-alert-danger.caution .admonition-title,.rst-content .wy-alert-danger.caution .wy-alert-title,.rst-content .wy-alert-danger.hint .admonition-title,.rst-content .wy-alert-danger.hint .wy-alert-title,.rst-content .wy-alert-danger.important .admonition-title,.rst-content .wy-alert-danger.important .wy-alert-title,.rst-content .wy-alert-danger.note .admonition-title,.rst-content .wy-alert-danger.note .wy-alert-title,.rst-content .wy-alert-danger.seealso .admonition-title,.rst-content .wy-alert-danger.seealso .wy-alert-title,.rst-content .wy-alert-danger.tip .admonition-title,.rst-content .wy-alert-danger.tip .wy-alert-title,.rst-content .wy-alert-danger.warning .admonition-title,.rst-content .wy-alert-danger.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-danger .admonition-title,.wy-alert.wy-alert-danger .rst-content .admonition-title,.wy-alert.wy-alert-danger .wy-alert-title{background:#f29f97}.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .warning,.rst-content .wy-alert-warning.admonition,.rst-content .wy-alert-warning.danger,.rst-content .wy-alert-warning.error,.rst-content .wy-alert-warning.hint,.rst-content .wy-alert-warning.important,.rst-content .wy-alert-warning.note,.rst-content .wy-alert-warning.seealso,.rst-content .wy-alert-warning.tip,.wy-alert.wy-alert-warning{background:#ffedcc}.rst-content .admonition-todo .admonition-title,.rst-content .admonition-todo .wy-alert-title,.rst-content .attention .admonition-title,.rst-content .attention .wy-alert-title,.rst-content .caution .admonition-title,.rst-content .caution .wy-alert-title,.rst-content .warning .admonition-title,.rst-content .warning .wy-alert-title,.rst-content .wy-alert-warning.admonition .admonition-title,.rst-content .wy-alert-warning.admonition .wy-alert-title,.rst-content .wy-alert-warning.danger .admonition-title,.rst-content .wy-alert-warning.danger .wy-alert-title,.rst-content .wy-alert-warning.error .admonition-title,.rst-content .wy-alert-warning.error .wy-alert-title,.rst-content .wy-alert-warning.hint .admonition-title,.rst-content .wy-alert-warning.hint .wy-alert-title,.rst-content .wy-alert-warning.important .admonition-title,.rst-content .wy-alert-warning.important .wy-alert-title,.rst-content .wy-alert-warning.note .admonition-title,.rst-content .wy-alert-warning.note .wy-alert-title,.rst-content .wy-alert-warning.seealso .admonition-title,.rst-content .wy-alert-warning.seealso .wy-alert-title,.rst-content .wy-alert-warning.tip .admonition-title,.rst-content .wy-alert-warning.tip .wy-alert-title,.rst-content .wy-alert.wy-alert-warning .admonition-title,.wy-alert.wy-alert-warning .rst-content .admonition-title,.wy-alert.wy-alert-warning .wy-alert-title{background:#f0b37e}.rst-content .note,.rst-content .seealso,.rst-content .wy-alert-info.admonition,.rst-content .wy-alert-info.admonition-todo,.rst-content .wy-alert-info.attention,.rst-content .wy-alert-info.caution,.rst-content .wy-alert-info.danger,.rst-content .wy-alert-info.error,.rst-content .wy-alert-info.hint,.rst-content .wy-alert-info.important,.rst-content .wy-alert-info.tip,.rst-content .wy-alert-info.warning,.wy-alert.wy-alert-info{background:#e7f2fa}.rst-content .note .admonition-title,.rst-content .note .wy-alert-title,.rst-content .seealso .admonition-title,.rst-content .seealso .wy-alert-title,.rst-content .wy-alert-info.admonition-todo .admonition-title,.rst-content .wy-alert-info.admonition-todo .wy-alert-title,.rst-content .wy-alert-info.admonition .admonition-title,.rst-content .wy-alert-info.admonition .wy-alert-title,.rst-content .wy-alert-info.attention .admonition-title,.rst-content .wy-alert-info.attention .wy-alert-title,.rst-content .wy-alert-info.caution .admonition-title,.rst-content .wy-alert-info.caution .wy-alert-title,.rst-content .wy-alert-info.danger .admonition-title,.rst-content .wy-alert-info.danger .wy-alert-title,.rst-content .wy-alert-info.error .admonition-title,.rst-content .wy-alert-info.error .wy-alert-title,.rst-content .wy-alert-info.hint .admonition-title,.rst-content .wy-alert-info.hint .wy-alert-title,.rst-content .wy-alert-info.important .admonition-title,.rst-content .wy-alert-info.important .wy-alert-title,.rst-content .wy-alert-info.tip .admonition-title,.rst-content .wy-alert-info.tip .wy-alert-title,.rst-content .wy-alert-info.warning .admonition-title,.rst-content .wy-alert-info.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-info .admonition-title,.wy-alert.wy-alert-info .rst-content .admonition-title,.wy-alert.wy-alert-info .wy-alert-title{background:#6ab0de}.rst-content .hint,.rst-content .important,.rst-content .tip,.rst-content .wy-alert-success.admonition,.rst-content .wy-alert-success.admonition-todo,.rst-content .wy-alert-success.attention,.rst-content .wy-alert-success.caution,.rst-content .wy-alert-success.danger,.rst-content .wy-alert-success.error,.rst-content .wy-alert-success.note,.rst-content .wy-alert-success.seealso,.rst-content .wy-alert-success.warning,.wy-alert.wy-alert-success{background:#dbfaf4}.rst-content .hint .admonition-title,.rst-content .hint .wy-alert-title,.rst-content .important .admonition-title,.rst-content .important .wy-alert-title,.rst-content .tip .admonition-title,.rst-content .tip .wy-alert-title,.rst-content .wy-alert-success.admonition-todo .admonition-title,.rst-content .wy-alert-success.admonition-todo .wy-alert-title,.rst-content .wy-alert-success.admonition .admonition-title,.rst-content .wy-alert-success.admonition .wy-alert-title,.rst-content .wy-alert-success.attention .admonition-title,.rst-content .wy-alert-success.attention .wy-alert-title,.rst-content .wy-alert-success.caution .admonition-title,.rst-content .wy-alert-success.caution .wy-alert-title,.rst-content .wy-alert-success.danger .admonition-title,.rst-content .wy-alert-success.danger .wy-alert-title,.rst-content .wy-alert-success.error .admonition-title,.rst-content .wy-alert-success.error .wy-alert-title,.rst-content .wy-alert-success.note .admonition-title,.rst-content .wy-alert-success.note .wy-alert-title,.rst-content .wy-alert-success.seealso .admonition-title,.rst-content .wy-alert-success.seealso .wy-alert-title,.rst-content .wy-alert-success.warning .admonition-title,.rst-content .wy-alert-success.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-success .admonition-title,.wy-alert.wy-alert-success .rst-content .admonition-title,.wy-alert.wy-alert-success .wy-alert-title{background:#1abc9c}.rst-content .wy-alert-neutral.admonition,.rst-content .wy-alert-neutral.admonition-todo,.rst-content .wy-alert-neutral.attention,.rst-content .wy-alert-neutral.caution,.rst-content .wy-alert-neutral.danger,.rst-content .wy-alert-neutral.error,.rst-content .wy-alert-neutral.hint,.rst-content .wy-alert-neutral.important,.rst-content .wy-alert-neutral.note,.rst-content .wy-alert-neutral.seealso,.rst-content .wy-alert-neutral.tip,.rst-content .wy-alert-neutral.warning,.wy-alert.wy-alert-neutral{background:#f3f6f6}.rst-content .wy-alert-neutral.admonition-todo .admonition-title,.rst-content .wy-alert-neutral.admonition-todo .wy-alert-title,.rst-content .wy-alert-neutral.admonition .admonition-title,.rst-content .wy-alert-neutral.admonition .wy-alert-title,.rst-content .wy-alert-neutral.attention .admonition-title,.rst-content .wy-alert-neutral.attention .wy-alert-title,.rst-content .wy-alert-neutral.caution .admonition-title,.rst-content .wy-alert-neutral.caution .wy-alert-title,.rst-content .wy-alert-neutral.danger .admonition-title,.rst-content .wy-alert-neutral.danger .wy-alert-title,.rst-content .wy-alert-neutral.error .admonition-title,.rst-content .wy-alert-neutral.error .wy-alert-title,.rst-content .wy-alert-neutral.hint .admonition-title,.rst-content .wy-alert-neutral.hint .wy-alert-title,.rst-content .wy-alert-neutral.important .admonition-title,.rst-content .wy-alert-neutral.important .wy-alert-title,.rst-content .wy-alert-neutral.note .admonition-title,.rst-content .wy-alert-neutral.note .wy-alert-title,.rst-content .wy-alert-neutral.seealso .admonition-title,.rst-content .wy-alert-neutral.seealso .wy-alert-title,.rst-content .wy-alert-neutral.tip .admonition-title,.rst-content .wy-alert-neutral.tip .wy-alert-title,.rst-content .wy-alert-neutral.warning .admonition-title,.rst-content .wy-alert-neutral.warning .wy-alert-title,.rst-content .wy-alert.wy-alert-neutral .admonition-title,.wy-alert.wy-alert-neutral .rst-content .admonition-title,.wy-alert.wy-alert-neutral .wy-alert-title{color:#404040;background:#e1e4e5}.rst-content .wy-alert-neutral.admonition-todo a,.rst-content .wy-alert-neutral.admonition a,.rst-content .wy-alert-neutral.attention a,.rst-content .wy-alert-neutral.caution a,.rst-content .wy-alert-neutral.danger a,.rst-content .wy-alert-neutral.error a,.rst-content .wy-alert-neutral.hint a,.rst-content .wy-alert-neutral.important a,.rst-content .wy-alert-neutral.note a,.rst-content .wy-alert-neutral.seealso a,.rst-content .wy-alert-neutral.tip a,.rst-content .wy-alert-neutral.warning a,.wy-alert.wy-alert-neutral a{color:#2980b9}.rst-content .admonition-todo p:last-child,.rst-content .admonition p:last-child,.rst-content .attention p:last-child,.rst-content .caution p:last-child,.rst-content .danger p:last-child,.rst-content .error p:last-child,.rst-content .hint p:last-child,.rst-content .important p:last-child,.rst-content .note p:last-child,.rst-content .seealso p:last-child,.rst-content .tip p:last-child,.rst-content .warning p:last-child,.wy-alert p:last-child{margin-bottom:0}.wy-tray-container{position:fixed;bottom:0;left:0;z-index:600}.wy-tray-container li{display:block;width:300px;background:transparent;color:#fff;text-align:center;box-shadow:0 5px 5px 0 rgba(0,0,0,.1);padding:0 24px;min-width:20%;opacity:0;height:0;line-height:56px;overflow:hidden;-webkit-transition:all .3s ease-in;-moz-transition:all .3s ease-in;transition:all .3s ease-in}.wy-tray-container li.wy-tray-item-success{background:#27ae60}.wy-tray-container li.wy-tray-item-info{background:#2980b9}.wy-tray-container li.wy-tray-item-warning{background:#e67e22}.wy-tray-container li.wy-tray-item-danger{background:#e74c3c}.wy-tray-container li.on{opacity:1;height:56px}@media screen and (max-width:768px){.wy-tray-container{bottom:auto;top:0;width:100%}.wy-tray-container li{width:100%}}button{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;cursor:pointer;line-height:normal;-webkit-appearance:button;*overflow:visible}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button[disabled]{cursor:default}.btn{display:inline-block;border-radius:2px;line-height:normal;white-space:nowrap;text-align:center;cursor:pointer;font-size:100%;padding:6px 12px 8px;color:#fff;border:1px solid rgba(0,0,0,.1);background-color:#27ae60;text-decoration:none;font-weight:400;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 2px -1px hsla(0,0%,100%,.5),inset 0 -2px 0 0 rgba(0,0,0,.1);outline-none:false;vertical-align:middle;*display:inline;zoom:1;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:all .1s linear;-moz-transition:all .1s linear;transition:all .1s linear}.btn-hover{background:#2e8ece;color:#fff}.btn:hover{background:#2cc36b;color:#fff}.btn:focus{background:#2cc36b;outline:0}.btn:active{box-shadow:inset 0 -1px 0 0 rgba(0,0,0,.05),inset 0 2px 0 0 rgba(0,0,0,.1);padding:8px 12px 6px}.btn:visited{color:#fff}.btn-disabled,.btn-disabled:active,.btn-disabled:focus,.btn-disabled:hover,.btn:disabled{background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none}.btn::-moz-focus-inner{padding:0;border:0}.btn-small{font-size:80%}.btn-info{background-color:#2980b9!important}.btn-info:hover{background-color:#2e8ece!important}.btn-neutral{background-color:#f3f6f6!important;color:#404040!important}.btn-neutral:hover{background-color:#e5ebeb!important;color:#404040}.btn-neutral:visited{color:#404040!important}.btn-success{background-color:#27ae60!important}.btn-success:hover{background-color:#295!important}.btn-danger{background-color:#e74c3c!important}.btn-danger:hover{background-color:#ea6153!important}.btn-warning{background-color:#e67e22!important}.btn-warning:hover{background-color:#e98b39!important}.btn-invert{background-color:#222}.btn-invert:hover{background-color:#2f2f2f!important}.btn-link{background-color:transparent!important;color:#2980b9;box-shadow:none;border-color:transparent!important}.btn-link:active,.btn-link:hover{background-color:transparent!important;color:#409ad5!important;box-shadow:none}.btn-link:visited{color:#9b59b6}.wy-btn-group .btn,.wy-control .btn{vertical-align:middle}.wy-btn-group{margin-bottom:24px;*zoom:1}.wy-btn-group:after,.wy-btn-group:before{display:table;content:""}.wy-btn-group:after{clear:both}.wy-dropdown{position:relative;display:inline-block}.wy-dropdown-active .wy-dropdown-menu{display:block}.wy-dropdown-menu{position:absolute;left:0;display:none;float:left;top:100%;min-width:100%;background:#fcfcfc;z-index:100;border:1px solid #cfd7dd;box-shadow:0 2px 2px 0 rgba(0,0,0,.1);padding:12px}.wy-dropdown-menu>dd>a{display:block;clear:both;color:#404040;white-space:nowrap;font-size:90%;padding:0 12px;cursor:pointer}.wy-dropdown-menu>dd>a:hover{background:#2980b9;color:#fff}.wy-dropdown-menu>dd.divider{border-top:1px solid #cfd7dd;margin:6px 0}.wy-dropdown-menu>dd.search{padding-bottom:12px}.wy-dropdown-menu>dd.search input[type=search]{width:100%}.wy-dropdown-menu>dd.call-to-action{background:#e3e3e3;text-transform:uppercase;font-weight:500;font-size:80%}.wy-dropdown-menu>dd.call-to-action:hover{background:#e3e3e3}.wy-dropdown-menu>dd.call-to-action .btn{color:#fff}.wy-dropdown.wy-dropdown-up .wy-dropdown-menu{bottom:100%;top:auto;left:auto;right:0}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu{background:#fcfcfc;margin-top:2px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a{padding:6px 12px}.wy-dropdown.wy-dropdown-bubble .wy-dropdown-menu a:hover{background:#2980b9;color:#fff}.wy-dropdown.wy-dropdown-left .wy-dropdown-menu{right:0;left:auto;text-align:right}.wy-dropdown-arrow:before{content:" ";border-bottom:5px solid #f5f5f5;border-left:5px solid transparent;border-right:5px solid transparent;position:absolute;display:block;top:-4px;left:50%;margin-left:-3px}.wy-dropdown-arrow.wy-dropdown-arrow-left:before{left:11px}.wy-form-stacked select{display:block}.wy-form-aligned .wy-help-inline,.wy-form-aligned input,.wy-form-aligned label,.wy-form-aligned select,.wy-form-aligned textarea{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-form-aligned .wy-control-group>label{display:inline-block;vertical-align:middle;width:10em;margin:6px 12px 0 0;float:left}.wy-form-aligned .wy-control{float:left}.wy-form-aligned .wy-control label{display:block}.wy-form-aligned .wy-control select{margin-top:6px}fieldset{margin:0}fieldset,legend{border:0;padding:0}legend{width:100%;white-space:normal;margin-bottom:24px;font-size:150%;*margin-left:-7px}label,legend{display:block}label{margin:0 0 .3125em;color:#333;font-size:90%}input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}.wy-control-group{margin-bottom:24px;max-width:1200px;margin-left:auto;margin-right:auto;*zoom:1}.wy-control-group:after,.wy-control-group:before{display:table;content:""}.wy-control-group:after{clear:both}.wy-control-group.wy-control-group-required>label:after{content:" *";color:#e74c3c}.wy-control-group .wy-form-full,.wy-control-group .wy-form-halves,.wy-control-group .wy-form-thirds{padding-bottom:12px}.wy-control-group .wy-form-full input[type=color],.wy-control-group .wy-form-full input[type=date],.wy-control-group .wy-form-full input[type=datetime-local],.wy-control-group .wy-form-full input[type=datetime],.wy-control-group .wy-form-full input[type=email],.wy-control-group .wy-form-full input[type=month],.wy-control-group .wy-form-full input[type=number],.wy-control-group .wy-form-full input[type=password],.wy-control-group .wy-form-full input[type=search],.wy-control-group .wy-form-full input[type=tel],.wy-control-group .wy-form-full input[type=text],.wy-control-group .wy-form-full input[type=time],.wy-control-group .wy-form-full input[type=url],.wy-control-group .wy-form-full input[type=week],.wy-control-group .wy-form-full select,.wy-control-group .wy-form-halves input[type=color],.wy-control-group .wy-form-halves input[type=date],.wy-control-group .wy-form-halves input[type=datetime-local],.wy-control-group .wy-form-halves input[type=datetime],.wy-control-group .wy-form-halves input[type=email],.wy-control-group .wy-form-halves input[type=month],.wy-control-group .wy-form-halves input[type=number],.wy-control-group .wy-form-halves input[type=password],.wy-control-group .wy-form-halves input[type=search],.wy-control-group .wy-form-halves input[type=tel],.wy-control-group .wy-form-halves input[type=text],.wy-control-group .wy-form-halves input[type=time],.wy-control-group .wy-form-halves input[type=url],.wy-control-group .wy-form-halves input[type=week],.wy-control-group .wy-form-halves select,.wy-control-group .wy-form-thirds input[type=color],.wy-control-group .wy-form-thirds input[type=date],.wy-control-group .wy-form-thirds input[type=datetime-local],.wy-control-group .wy-form-thirds input[type=datetime],.wy-control-group .wy-form-thirds input[type=email],.wy-control-group .wy-form-thirds input[type=month],.wy-control-group .wy-form-thirds input[type=number],.wy-control-group .wy-form-thirds input[type=password],.wy-control-group .wy-form-thirds input[type=search],.wy-control-group .wy-form-thirds input[type=tel],.wy-control-group .wy-form-thirds input[type=text],.wy-control-group .wy-form-thirds input[type=time],.wy-control-group .wy-form-thirds input[type=url],.wy-control-group .wy-form-thirds input[type=week],.wy-control-group .wy-form-thirds select{width:100%}.wy-control-group .wy-form-full{float:left;display:block;width:100%;margin-right:0}.wy-control-group .wy-form-full:last-child{margin-right:0}.wy-control-group .wy-form-halves{float:left;display:block;margin-right:2.35765%;width:48.82117%}.wy-control-group .wy-form-halves:last-child,.wy-control-group .wy-form-halves:nth-of-type(2n){margin-right:0}.wy-control-group .wy-form-halves:nth-of-type(odd){clear:left}.wy-control-group .wy-form-thirds{float:left;display:block;margin-right:2.35765%;width:31.76157%}.wy-control-group .wy-form-thirds:last-child,.wy-control-group .wy-form-thirds:nth-of-type(3n){margin-right:0}.wy-control-group .wy-form-thirds:nth-of-type(3n+1){clear:left}.wy-control-group.wy-control-group-no-input .wy-control,.wy-control-no-input{margin:6px 0 0;font-size:90%}.wy-control-no-input{display:inline-block}.wy-control-group.fluid-input input[type=color],.wy-control-group.fluid-input input[type=date],.wy-control-group.fluid-input input[type=datetime-local],.wy-control-group.fluid-input input[type=datetime],.wy-control-group.fluid-input input[type=email],.wy-control-group.fluid-input input[type=month],.wy-control-group.fluid-input input[type=number],.wy-control-group.fluid-input input[type=password],.wy-control-group.fluid-input input[type=search],.wy-control-group.fluid-input input[type=tel],.wy-control-group.fluid-input input[type=text],.wy-control-group.fluid-input input[type=time],.wy-control-group.fluid-input input[type=url],.wy-control-group.fluid-input input[type=week]{width:100%}.wy-form-message-inline{padding-left:.3em;color:#666;font-size:90%}.wy-form-message{display:block;color:#999;font-size:70%;margin-top:.3125em;font-style:italic}.wy-form-message p{font-size:inherit;font-style:italic;margin-bottom:6px}.wy-form-message p:last-child{margin-bottom:0}input{line-height:normal}input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;*overflow:visible}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week]{-webkit-appearance:none;padding:6px;display:inline-block;border:1px solid #ccc;font-size:80%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;box-shadow:inset 0 1px 3px #ddd;border-radius:0;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}input[type=datetime-local]{padding:.34375em .625em}input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{padding:0;margin-right:.3125em;*height:13px;*width:13px}input[type=checkbox],input[type=radio],input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus{outline:0;outline:thin dotted\9;border-color:#333}input.no-focus:focus{border-color:#ccc!important}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin dotted #333;outline:1px auto #129fea}input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled]{cursor:not-allowed;background-color:#fafafa}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{color:#e74c3c;border:1px solid #e74c3c}input:focus:invalid:focus,select:focus:invalid:focus,textarea:focus:invalid:focus{border-color:#e74c3c}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#e74c3c}input.wy-input-large{padding:12px;font-size:100%}textarea{overflow:auto;vertical-align:top;width:100%;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif}select,textarea{padding:.5em .625em;display:inline-block;border:1px solid #ccc;font-size:80%;box-shadow:inset 0 1px 3px #ddd;-webkit-transition:border .3s linear;-moz-transition:border .3s linear;transition:border .3s linear}select{border:1px solid #ccc;background-color:#fff}select[multiple]{height:auto}select:focus,textarea:focus{outline:0}input[readonly],select[disabled],select[readonly],textarea[disabled],textarea[readonly]{cursor:not-allowed;background-color:#fafafa}input[type=checkbox][disabled],input[type=radio][disabled]{cursor:not-allowed}.wy-checkbox,.wy-radio{margin:6px 0;color:#404040;display:block}.wy-checkbox input,.wy-radio input{vertical-align:baseline}.wy-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.wy-input-prefix,.wy-input-suffix{white-space:nowrap;padding:6px}.wy-input-prefix .wy-input-context,.wy-input-suffix .wy-input-context{line-height:27px;padding:0 8px;display:inline-block;font-size:80%;background-color:#f3f6f6;border:1px solid #ccc;color:#999}.wy-input-suffix .wy-input-context{border-left:0}.wy-input-prefix .wy-input-context{border-right:0}.wy-switch{position:relative;display:block;height:24px;margin-top:12px;cursor:pointer}.wy-switch:before{left:0;top:0;width:36px;height:12px;background:#ccc}.wy-switch:after,.wy-switch:before{position:absolute;content:"";display:block;border-radius:4px;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.wy-switch:after{width:18px;height:18px;background:#999;left:-3px;top:-3px}.wy-switch span{position:absolute;left:48px;display:block;font-size:12px;color:#ccc;line-height:1}.wy-switch.active:before{background:#1e8449}.wy-switch.active:after{left:24px;background:#27ae60}.wy-switch.disabled{cursor:not-allowed;opacity:.8}.wy-control-group.wy-control-group-error .wy-form-message,.wy-control-group.wy-control-group-error>label{color:#e74c3c}.wy-control-group.wy-control-group-error input[type=color],.wy-control-group.wy-control-group-error input[type=date],.wy-control-group.wy-control-group-error input[type=datetime-local],.wy-control-group.wy-control-group-error input[type=datetime],.wy-control-group.wy-control-group-error input[type=email],.wy-control-group.wy-control-group-error input[type=month],.wy-control-group.wy-control-group-error input[type=number],.wy-control-group.wy-control-group-error input[type=password],.wy-control-group.wy-control-group-error input[type=search],.wy-control-group.wy-control-group-error input[type=tel],.wy-control-group.wy-control-group-error input[type=text],.wy-control-group.wy-control-group-error input[type=time],.wy-control-group.wy-control-group-error input[type=url],.wy-control-group.wy-control-group-error input[type=week],.wy-control-group.wy-control-group-error textarea{border:1px solid #e74c3c}.wy-inline-validate{white-space:nowrap}.wy-inline-validate .wy-input-context{padding:.5em .625em;display:inline-block;font-size:80%}.wy-inline-validate.wy-inline-validate-success .wy-input-context{color:#27ae60}.wy-inline-validate.wy-inline-validate-danger .wy-input-context{color:#e74c3c}.wy-inline-validate.wy-inline-validate-warning .wy-input-context{color:#e67e22}.wy-inline-validate.wy-inline-validate-info .wy-input-context{color:#2980b9}.rotate-90{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.rotate-180{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.rotate-270{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg)}.mirror{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);-o-transform:scaleX(-1);transform:scaleX(-1)}.mirror.rotate-90{-webkit-transform:scaleX(-1) rotate(90deg);-moz-transform:scaleX(-1) rotate(90deg);-ms-transform:scaleX(-1) rotate(90deg);-o-transform:scaleX(-1) rotate(90deg);transform:scaleX(-1) rotate(90deg)}.mirror.rotate-180{-webkit-transform:scaleX(-1) rotate(180deg);-moz-transform:scaleX(-1) rotate(180deg);-ms-transform:scaleX(-1) rotate(180deg);-o-transform:scaleX(-1) rotate(180deg);transform:scaleX(-1) rotate(180deg)}.mirror.rotate-270{-webkit-transform:scaleX(-1) rotate(270deg);-moz-transform:scaleX(-1) rotate(270deg);-ms-transform:scaleX(-1) rotate(270deg);-o-transform:scaleX(-1) rotate(270deg);transform:scaleX(-1) rotate(270deg)}@media only screen and (max-width:480px){.wy-form button[type=submit]{margin:.7em 0 0}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=text],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week],.wy-form label{margin-bottom:.3em;display:block}.wy-form input[type=color],.wy-form input[type=date],.wy-form input[type=datetime-local],.wy-form input[type=datetime],.wy-form input[type=email],.wy-form input[type=month],.wy-form input[type=number],.wy-form input[type=password],.wy-form input[type=search],.wy-form input[type=tel],.wy-form input[type=time],.wy-form input[type=url],.wy-form input[type=week]{margin-bottom:0}.wy-form-aligned .wy-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.wy-form-aligned .wy-control{margin:1.5em 0 0}.wy-form-message,.wy-form-message-inline,.wy-form .wy-help-inline{display:block;font-size:80%;padding:6px 0}}@media screen and (max-width:768px){.tablet-hide{display:none}}@media screen and (max-width:480px){.mobile-hide{display:none}}.float-left{float:left}.float-right{float:right}.full-width{width:100%}.rst-content table.docutils,.rst-content table.field-list,.wy-table{border-collapse:collapse;border-spacing:0;empty-cells:show;margin-bottom:24px}.rst-content table.docutils caption,.rst-content table.field-list caption,.wy-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.rst-content table.docutils td,.rst-content table.docutils th,.rst-content table.field-list td,.rst-content table.field-list th,.wy-table td,.wy-table th{font-size:90%;margin:0;overflow:visible;padding:8px 16px}.rst-content table.docutils td:first-child,.rst-content table.docutils th:first-child,.rst-content table.field-list td:first-child,.rst-content table.field-list th:first-child,.wy-table td:first-child,.wy-table th:first-child{border-left-width:0}.rst-content table.docutils thead,.rst-content table.field-list thead,.wy-table thead{color:#000;text-align:left;vertical-align:bottom;white-space:nowrap}.rst-content table.docutils thead th,.rst-content table.field-list thead th,.wy-table thead th{font-weight:700;border-bottom:2px solid #e1e4e5}.rst-content table.docutils td,.rst-content table.field-list td,.wy-table td{background-color:transparent;vertical-align:middle}.rst-content table.docutils td p,.rst-content table.field-list td p,.wy-table td p{line-height:18px}.rst-content table.docutils td p:last-child,.rst-content table.field-list td p:last-child,.wy-table td p:last-child{margin-bottom:0}.rst-content table.docutils .wy-table-cell-min,.rst-content table.field-list .wy-table-cell-min,.wy-table .wy-table-cell-min{width:1%;padding-right:0}.rst-content table.docutils .wy-table-cell-min input[type=checkbox],.rst-content table.field-list .wy-table-cell-min input[type=checkbox],.wy-table .wy-table-cell-min input[type=checkbox]{margin:0}.wy-table-secondary{color:grey;font-size:90%}.wy-table-tertiary{color:grey;font-size:80%}.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td,.wy-table-backed,.wy-table-odd td,.wy-table-striped tr:nth-child(2n-1) td{background-color:#f3f6f6}.rst-content table.docutils,.wy-table-bordered-all{border:1px solid #e1e4e5}.rst-content table.docutils td,.wy-table-bordered-all td{border-bottom:1px solid #e1e4e5;border-left:1px solid #e1e4e5}.rst-content table.docutils tbody>tr:last-child td,.wy-table-bordered-all tbody>tr:last-child td{border-bottom-width:0}.wy-table-bordered{border:1px solid #e1e4e5}.wy-table-bordered-rows td{border-bottom:1px solid #e1e4e5}.wy-table-bordered-rows tbody>tr:last-child td{border-bottom-width:0}.wy-table-horizontal td,.wy-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #e1e4e5}.wy-table-horizontal tbody>tr:last-child td{border-bottom-width:0}.wy-table-responsive{margin-bottom:24px;max-width:100%;overflow:auto}.wy-table-responsive table{margin-bottom:0!important}.wy-table-responsive table td,.wy-table-responsive table th{white-space:nowrap}a{color:#2980b9;text-decoration:none;cursor:pointer}a:hover{color:#3091d1}a:visited{color:#9b59b6}html{height:100%}body,html{overflow-x:hidden}body{font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-weight:400;color:#404040;min-height:100%;background:#edf0f2}.wy-text-left{text-align:left}.wy-text-center{text-align:center}.wy-text-right{text-align:right}.wy-text-large{font-size:120%}.wy-text-normal{font-size:100%}.wy-text-small,small{font-size:80%}.wy-text-strike{text-decoration:line-through}.wy-text-warning{color:#e67e22!important}a.wy-text-warning:hover{color:#eb9950!important}.wy-text-info{color:#2980b9!important}a.wy-text-info:hover{color:#409ad5!important}.wy-text-success{color:#27ae60!important}a.wy-text-success:hover{color:#36d278!important}.wy-text-danger{color:#e74c3c!important}a.wy-text-danger:hover{color:#ed7669!important}.wy-text-neutral{color:#404040!important}a.wy-text-neutral:hover{color:#595959!important}.rst-content .toctree-wrapper>p.caption,h1,h2,h3,h4,h5,h6,legend{margin-top:0;font-weight:700;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif}p{line-height:24px;font-size:16px;margin:0 0 24px}h1{font-size:175%}.rst-content .toctree-wrapper>p.caption,h2{font-size:150%}h3{font-size:125%}h4{font-size:115%}h5{font-size:110%}h6{font-size:100%}hr{display:block;height:1px;border:0;border-top:1px solid #e1e4e5;margin:24px 0;padding:0}.rst-content code,.rst-content tt,code{white-space:nowrap;max-width:100%;background:#fff;border:1px solid #e1e4e5;font-size:75%;padding:0 5px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#e74c3c;overflow-x:auto}.rst-content tt.code-large,code.code-large{font-size:90%}.rst-content .section ul,.rst-content .toctree-wrapper ul,.rst-content section ul,.wy-plain-list-disc,article ul{list-style:disc;line-height:24px;margin-bottom:24px}.rst-content .section ul li,.rst-content .toctree-wrapper ul li,.rst-content section ul li,.wy-plain-list-disc li,article ul li{list-style:disc;margin-left:24px}.rst-content .section ul li p:last-child,.rst-content .section ul li ul,.rst-content .toctree-wrapper ul li p:last-child,.rst-content .toctree-wrapper ul li ul,.rst-content section ul li p:last-child,.rst-content section ul li ul,.wy-plain-list-disc li p:last-child,.wy-plain-list-disc li ul,article ul li p:last-child,article ul li ul{margin-bottom:0}.rst-content .section ul li li,.rst-content .toctree-wrapper ul li li,.rst-content section ul li li,.wy-plain-list-disc li li,article ul li li{list-style:circle}.rst-content .section ul li li li,.rst-content .toctree-wrapper ul li li li,.rst-content section ul li li li,.wy-plain-list-disc li li li,article ul li li li{list-style:square}.rst-content .section ul li ol li,.rst-content .toctree-wrapper ul li ol li,.rst-content section ul li ol li,.wy-plain-list-disc li ol li,article ul li ol li{list-style:decimal}.rst-content .section ol,.rst-content .section ol.arabic,.rst-content .toctree-wrapper ol,.rst-content .toctree-wrapper ol.arabic,.rst-content section ol,.rst-content section ol.arabic,.wy-plain-list-decimal,article ol{list-style:decimal;line-height:24px;margin-bottom:24px}.rst-content .section ol.arabic li,.rst-content .section ol li,.rst-content .toctree-wrapper ol.arabic li,.rst-content .toctree-wrapper ol li,.rst-content section ol.arabic li,.rst-content section ol li,.wy-plain-list-decimal li,article ol li{list-style:decimal;margin-left:24px}.rst-content .section ol.arabic li ul,.rst-content .section ol li p:last-child,.rst-content .section ol li ul,.rst-content .toctree-wrapper ol.arabic li ul,.rst-content .toctree-wrapper ol li p:last-child,.rst-content .toctree-wrapper ol li ul,.rst-content section ol.arabic li ul,.rst-content section ol li p:last-child,.rst-content section ol li ul,.wy-plain-list-decimal li p:last-child,.wy-plain-list-decimal li ul,article ol li p:last-child,article ol li ul{margin-bottom:0}.rst-content .section ol.arabic li ul li,.rst-content .section ol li ul li,.rst-content .toctree-wrapper ol.arabic li ul li,.rst-content .toctree-wrapper ol li ul li,.rst-content section ol.arabic li ul li,.rst-content section ol li ul li,.wy-plain-list-decimal li ul li,article ol li ul li{list-style:disc}.wy-breadcrumbs{*zoom:1}.wy-breadcrumbs:after,.wy-breadcrumbs:before{display:table;content:""}.wy-breadcrumbs:after{clear:both}.wy-breadcrumbs>li{display:inline-block;padding-top:5px}.wy-breadcrumbs>li.wy-breadcrumbs-aside{float:right}.rst-content .wy-breadcrumbs>li code,.rst-content .wy-breadcrumbs>li tt,.wy-breadcrumbs>li .rst-content tt,.wy-breadcrumbs>li code{all:inherit;color:inherit}.breadcrumb-item:before{content:"/";color:#bbb;font-size:13px;padding:0 6px 0 3px}.wy-breadcrumbs-extra{margin-bottom:0;color:#b3b3b3;font-size:80%;display:inline-block}@media screen and (max-width:480px){.wy-breadcrumbs-extra,.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}@media print{.wy-breadcrumbs li.wy-breadcrumbs-aside{display:none}}html{font-size:16px}.wy-affix{position:fixed;top:1.618em}.wy-menu a:hover{text-decoration:none}.wy-menu-horiz{*zoom:1}.wy-menu-horiz:after,.wy-menu-horiz:before{display:table;content:""}.wy-menu-horiz:after{clear:both}.wy-menu-horiz li,.wy-menu-horiz ul{display:inline-block}.wy-menu-horiz li:hover{background:hsla(0,0%,100%,.1)}.wy-menu-horiz li.divide-left{border-left:1px solid #404040}.wy-menu-horiz li.divide-right{border-right:1px solid #404040}.wy-menu-horiz a{height:32px;display:inline-block;line-height:32px;padding:0 16px}.wy-menu-vertical{width:300px}.wy-menu-vertical header,.wy-menu-vertical p.caption{color:#55a5d9;height:32px;line-height:32px;padding:0 1.618em;margin:12px 0 0;display:block;font-weight:700;text-transform:uppercase;font-size:85%;white-space:nowrap}.wy-menu-vertical ul{margin-bottom:0}.wy-menu-vertical li.divide-top{border-top:1px solid #404040}.wy-menu-vertical li.divide-bottom{border-bottom:1px solid #404040}.wy-menu-vertical li.current{background:#e3e3e3}.wy-menu-vertical li.current a{color:grey;border-right:1px solid #c9c9c9;padding:.4045em 2.427em}.wy-menu-vertical li.current a:hover{background:#d6d6d6}.rst-content .wy-menu-vertical li tt,.wy-menu-vertical li .rst-content tt,.wy-menu-vertical li code{border:none;background:inherit;color:inherit;padding-left:0;padding-right:0}.wy-menu-vertical li button.toctree-expand{display:block;float:left;margin-left:-1.2em;line-height:18px;color:#4d4d4d;border:none;background:none;padding:0}.wy-menu-vertical li.current>a,.wy-menu-vertical li.on a{color:#404040;font-weight:700;position:relative;background:#fcfcfc;border:none;padding:.4045em 1.618em}.wy-menu-vertical li.current>a:hover,.wy-menu-vertical li.on a:hover{background:#fcfcfc}.wy-menu-vertical li.current>a:hover button.toctree-expand,.wy-menu-vertical li.on a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.current>a button.toctree-expand,.wy-menu-vertical li.on a button.toctree-expand{display:block;line-height:18px;color:#333}.wy-menu-vertical li.toctree-l1.current>a{border-bottom:1px solid #c9c9c9;border-top:1px solid #c9c9c9}.wy-menu-vertical .toctree-l1.current .toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .toctree-l11>ul{display:none}.wy-menu-vertical .toctree-l1.current .current.toctree-l2>ul,.wy-menu-vertical .toctree-l2.current .current.toctree-l3>ul,.wy-menu-vertical .toctree-l3.current .current.toctree-l4>ul,.wy-menu-vertical .toctree-l4.current .current.toctree-l5>ul,.wy-menu-vertical .toctree-l5.current .current.toctree-l6>ul,.wy-menu-vertical .toctree-l6.current .current.toctree-l7>ul,.wy-menu-vertical .toctree-l7.current .current.toctree-l8>ul,.wy-menu-vertical .toctree-l8.current .current.toctree-l9>ul,.wy-menu-vertical .toctree-l9.current .current.toctree-l10>ul,.wy-menu-vertical .toctree-l10.current .current.toctree-l11>ul{display:block}.wy-menu-vertical li.toctree-l3,.wy-menu-vertical li.toctree-l4{font-size:.9em}.wy-menu-vertical li.toctree-l2 a,.wy-menu-vertical li.toctree-l3 a,.wy-menu-vertical li.toctree-l4 a,.wy-menu-vertical li.toctree-l5 a,.wy-menu-vertical li.toctree-l6 a,.wy-menu-vertical li.toctree-l7 a,.wy-menu-vertical li.toctree-l8 a,.wy-menu-vertical li.toctree-l9 a,.wy-menu-vertical li.toctree-l10 a{color:#404040}.wy-menu-vertical li.toctree-l2 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l3 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l4 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l5 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l6 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l7 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l8 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l9 a:hover button.toctree-expand,.wy-menu-vertical li.toctree-l10 a:hover button.toctree-expand{color:grey}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a,.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a,.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a,.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a,.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a,.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{display:block}.wy-menu-vertical li.toctree-l2.current>a{padding:.4045em 2.427em}.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{padding:.4045em 1.618em .4045em 4.045em}.wy-menu-vertical li.toctree-l3.current>a{padding:.4045em 4.045em}.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{padding:.4045em 1.618em .4045em 5.663em}.wy-menu-vertical li.toctree-l4.current>a{padding:.4045em 5.663em}.wy-menu-vertical li.toctree-l4.current li.toctree-l5>a{padding:.4045em 1.618em .4045em 7.281em}.wy-menu-vertical li.toctree-l5.current>a{padding:.4045em 7.281em}.wy-menu-vertical li.toctree-l5.current li.toctree-l6>a{padding:.4045em 1.618em .4045em 8.899em}.wy-menu-vertical li.toctree-l6.current>a{padding:.4045em 8.899em}.wy-menu-vertical li.toctree-l6.current li.toctree-l7>a{padding:.4045em 1.618em .4045em 10.517em}.wy-menu-vertical li.toctree-l7.current>a{padding:.4045em 10.517em}.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a{padding:.4045em 1.618em .4045em 12.135em}.wy-menu-vertical li.toctree-l8.current>a{padding:.4045em 12.135em}.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a{padding:.4045em 1.618em .4045em 13.753em}.wy-menu-vertical li.toctree-l9.current>a{padding:.4045em 13.753em}.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a{padding:.4045em 1.618em .4045em 15.371em}.wy-menu-vertical li.toctree-l10.current>a{padding:.4045em 15.371em}.wy-menu-vertical li.toctree-l10.current li.toctree-l11>a{padding:.4045em 1.618em .4045em 16.989em}.wy-menu-vertical li.toctree-l2.current>a,.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a{background:#c9c9c9}.wy-menu-vertical li.toctree-l2 button.toctree-expand{color:#a3a3a3}.wy-menu-vertical li.toctree-l3.current>a,.wy-menu-vertical li.toctree-l3.current li.toctree-l4>a{background:#bdbdbd}.wy-menu-vertical li.toctree-l3 button.toctree-expand{color:#969696}.wy-menu-vertical li.current ul{display:block}.wy-menu-vertical li ul{margin-bottom:0;display:none}.wy-menu-vertical li ul li a{margin-bottom:0;color:#d9d9d9;font-weight:400}.wy-menu-vertical a{line-height:18px;padding:.4045em 1.618em;display:block;position:relative;font-size:90%;color:#d9d9d9}.wy-menu-vertical a:hover{background-color:#4e4a4a;cursor:pointer}.wy-menu-vertical a:hover button.toctree-expand{color:#d9d9d9}.wy-menu-vertical a:active{background-color:#2980b9;cursor:pointer;color:#fff}.wy-menu-vertical a:active button.toctree-expand{color:#fff}.wy-side-nav-search{display:block;width:300px;padding:.809em;margin-bottom:.809em;z-index:200;background-color:#2980b9;text-align:center;color:#fcfcfc}.wy-side-nav-search input[type=text]{width:100%;border-radius:50px;padding:6px 12px;border-color:#2472a4}.wy-side-nav-search img{display:block;margin:auto auto .809em;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-side-nav-search .wy-dropdown>a,.wy-side-nav-search>a{color:#fcfcfc;font-size:100%;font-weight:700;display:inline-block;padding:4px 6px;margin-bottom:.809em;max-width:100%}.wy-side-nav-search .wy-dropdown>a:hover,.wy-side-nav-search .wy-dropdown>aactive,.wy-side-nav-search .wy-dropdown>afocus,.wy-side-nav-search>a:hover,.wy-side-nav-search>aactive,.wy-side-nav-search>afocus{background:hsla(0,0%,100%,.1)}.wy-side-nav-search .wy-dropdown>a img.logo,.wy-side-nav-search>a img.logo{display:block;margin:0 auto;height:auto;width:auto;border-radius:0;max-width:100%;background:transparent}.wy-side-nav-search .wy-dropdown>a.icon,.wy-side-nav-search>a.icon{display:block}.wy-side-nav-search .wy-dropdown>a.icon img.logo,.wy-side-nav-search>a.icon img.logo{margin-top:.85em}.wy-side-nav-search>div.switch-menus{position:relative;display:block;margin-top:-.4045em;margin-bottom:.809em;font-weight:400;color:hsla(0,0%,100%,.3)}.wy-side-nav-search>div.switch-menus>div.language-switch,.wy-side-nav-search>div.switch-menus>div.version-switch{display:inline-block;padding:.2em}.wy-side-nav-search>div.switch-menus>div.language-switch select,.wy-side-nav-search>div.switch-menus>div.version-switch select{display:inline-block;margin-right:-2rem;padding-right:2rem;max-width:240px;text-align-last:center;background:none;border:none;border-radius:0;box-shadow:none;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;font-size:1em;font-weight:400;color:hsla(0,0%,100%,.3);cursor:pointer;appearance:none;-webkit-appearance:none;-moz-appearance:none}.wy-side-nav-search>div.switch-menus>div.language-switch select:active,.wy-side-nav-search>div.switch-menus>div.language-switch select:focus,.wy-side-nav-search>div.switch-menus>div.language-switch select:hover,.wy-side-nav-search>div.switch-menus>div.version-switch select:active,.wy-side-nav-search>div.switch-menus>div.version-switch select:focus,.wy-side-nav-search>div.switch-menus>div.version-switch select:hover{background:hsla(0,0%,100%,.1);color:hsla(0,0%,100%,.5)}.wy-side-nav-search>div.switch-menus>div.language-switch select option,.wy-side-nav-search>div.switch-menus>div.version-switch select option{color:#000}.wy-side-nav-search>div.switch-menus>div.language-switch:has(>select):after,.wy-side-nav-search>div.switch-menus>div.version-switch:has(>select):after{display:inline-block;width:1.5em;height:100%;padding:.1em;content:"\f0d7";font-size:1em;line-height:1.2em;font-family:FontAwesome;text-align:center;pointer-events:none;box-sizing:border-box}.wy-nav .wy-menu-vertical header{color:#2980b9}.wy-nav .wy-menu-vertical a{color:#b3b3b3}.wy-nav .wy-menu-vertical a:hover{background-color:#2980b9;color:#fff}[data-menu-wrap]{-webkit-transition:all .2s ease-in;-moz-transition:all .2s ease-in;transition:all .2s ease-in;position:absolute;opacity:1;width:100%;opacity:0}[data-menu-wrap].move-center{left:0;right:auto;opacity:1}[data-menu-wrap].move-left{right:auto;left:-100%;opacity:0}[data-menu-wrap].move-right{right:-100%;left:auto;opacity:0}.wy-body-for-nav{background:#fcfcfc}.wy-grid-for-nav{position:absolute;width:100%;height:100%}.wy-nav-side{position:fixed;top:0;bottom:0;left:0;padding-bottom:2em;width:300px;overflow-x:hidden;overflow-y:hidden;min-height:100%;color:#9b9b9b;background:#343131;z-index:200}.wy-side-scroll{width:320px;position:relative;overflow-x:hidden;overflow-y:scroll;height:100%}.wy-nav-top{display:none;background:#2980b9;color:#fff;padding:.4045em .809em;position:relative;line-height:50px;text-align:center;font-size:100%;*zoom:1}.wy-nav-top:after,.wy-nav-top:before{display:table;content:""}.wy-nav-top:after{clear:both}.wy-nav-top a{color:#fff;font-weight:700}.wy-nav-top img{margin-right:12px;height:45px;width:45px;background-color:#2980b9;padding:5px;border-radius:100%}.wy-nav-top i{font-size:30px;float:left;cursor:pointer;padding-top:inherit}.wy-nav-content-wrap{margin-left:300px;background:#fcfcfc;min-height:100%}.wy-nav-content{padding:1.618em 3.236em;height:100%;max-width:800px;margin:auto}.wy-body-mask{position:fixed;width:100%;height:100%;background:rgba(0,0,0,.2);display:none;z-index:499}.wy-body-mask.on{display:block}footer{color:grey}footer p{margin-bottom:12px}.rst-content footer span.commit tt,footer span.commit .rst-content tt,footer span.commit code{padding:0;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:1em;background:none;border:none;color:grey}.rst-footer-buttons{*zoom:1}.rst-footer-buttons:after,.rst-footer-buttons:before{width:100%;display:table;content:""}.rst-footer-buttons:after{clear:both}.rst-breadcrumbs-buttons{margin-top:12px;*zoom:1}.rst-breadcrumbs-buttons:after,.rst-breadcrumbs-buttons:before{display:table;content:""}.rst-breadcrumbs-buttons:after{clear:both}#search-results .search li{margin-bottom:24px;border-bottom:1px solid #e1e4e5;padding-bottom:24px}#search-results .search li:first-child{border-top:1px solid #e1e4e5;padding-top:24px}#search-results .search li a{font-size:120%;margin-bottom:12px;display:inline-block}#search-results .context{color:grey;font-size:90%}.genindextable li>ul{margin-left:24px}@media screen and (max-width:768px){.wy-body-for-nav{background:#fcfcfc}.wy-nav-top{display:block}.wy-nav-side{left:-300px}.wy-nav-side.shift{width:85%;left:0}.wy-menu.wy-menu-vertical,.wy-side-nav-search,.wy-side-scroll{width:auto}.wy-nav-content-wrap{margin-left:0}.wy-nav-content-wrap .wy-nav-content{padding:1.618em}.wy-nav-content-wrap.shift{position:fixed;min-width:100%;left:85%;top:0;height:100%;overflow:hidden}}@media screen and (min-width:1100px){.wy-nav-content-wrap{background:rgba(0,0,0,.05)}.wy-nav-content{margin:0;background:#fcfcfc}}@media print{.rst-versions,.wy-nav-side,footer{display:none}.wy-nav-content-wrap{margin-left:0}}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:after,.rst-versions .rst-current-version:before{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-content .code-block-caption .rst-versions .rst-current-version .headerlink,.rst-content .eqno .rst-versions .rst-current-version .headerlink,.rst-content .rst-versions .rst-current-version .admonition-title,.rst-content code.download .rst-versions .rst-current-version span:first-child,.rst-content dl dt .rst-versions .rst-current-version .headerlink,.rst-content h1 .rst-versions .rst-current-version .headerlink,.rst-content h2 .rst-versions .rst-current-version .headerlink,.rst-content h3 .rst-versions .rst-current-version .headerlink,.rst-content h4 .rst-versions .rst-current-version .headerlink,.rst-content h5 .rst-versions .rst-current-version .headerlink,.rst-content h6 .rst-versions .rst-current-version .headerlink,.rst-content p .rst-versions .rst-current-version .headerlink,.rst-content table>caption .rst-versions .rst-current-version .headerlink,.rst-content tt.download .rst-versions .rst-current-version span:first-child,.rst-versions .rst-current-version .fa,.rst-versions .rst-current-version .icon,.rst-versions .rst-current-version .rst-content .admonition-title,.rst-versions .rst-current-version .rst-content .code-block-caption .headerlink,.rst-versions .rst-current-version .rst-content .eqno .headerlink,.rst-versions .rst-current-version .rst-content code.download span:first-child,.rst-versions .rst-current-version .rst-content dl dt .headerlink,.rst-versions .rst-current-version .rst-content h1 .headerlink,.rst-versions .rst-current-version .rst-content h2 .headerlink,.rst-versions .rst-current-version .rst-content h3 .headerlink,.rst-versions .rst-current-version .rst-content h4 .headerlink,.rst-versions .rst-current-version .rst-content h5 .headerlink,.rst-versions .rst-current-version .rst-content h6 .headerlink,.rst-versions .rst-current-version .rst-content p .headerlink,.rst-versions .rst-current-version .rst-content table>caption .headerlink,.rst-versions .rst-current-version .rst-content tt.download span:first-child,.rst-versions .rst-current-version .wy-menu-vertical li button.toctree-expand,.wy-menu-vertical li .rst-versions .rst-current-version button.toctree-expand{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions .rst-other-versions .rtd-current-item{font-weight:700}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}#flyout-search-form{padding:6px}.rst-content .toctree-wrapper>p.caption,.rst-content h1,.rst-content h2,.rst-content h3,.rst-content h4,.rst-content h5,.rst-content h6{margin-bottom:24px}.rst-content img{max-width:100%;height:auto}.rst-content div.figure,.rst-content figure{margin-bottom:24px}.rst-content div.figure .caption-text,.rst-content figure .caption-text{font-style:italic}.rst-content div.figure p:last-child.caption,.rst-content figure p:last-child.caption{margin-bottom:0}.rst-content div.figure.align-center,.rst-content figure.align-center{text-align:center}.rst-content .section>a>img,.rst-content .section>img,.rst-content section>a>img,.rst-content section>img{margin-bottom:24px}.rst-content abbr[title]{text-decoration:none}.rst-content.style-external-links a.reference.external:after{font-family:FontAwesome;content:"\f08e";color:#b3b3b3;vertical-align:super;font-size:60%;margin:0 .2em}.rst-content blockquote{margin-left:24px;line-height:24px;margin-bottom:24px}.rst-content pre.literal-block{white-space:pre;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;display:block;overflow:auto}.rst-content div[class^=highlight],.rst-content pre.literal-block{border:1px solid #e1e4e5;overflow-x:auto;margin:1px 0 24px}.rst-content div[class^=highlight] div[class^=highlight],.rst-content pre.literal-block div[class^=highlight]{padding:0;border:none;margin:0}.rst-content div[class^=highlight] td.code{width:100%}.rst-content .linenodiv pre{border-right:1px solid #e6e9ea;margin:0;padding:12px;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;user-select:none;pointer-events:none}.rst-content div[class^=highlight] pre{white-space:pre;margin:0;padding:12px;display:block;overflow:auto}.rst-content div[class^=highlight] pre .hll{display:block;margin:0 -12px;padding:0 12px}.rst-content .linenodiv pre,.rst-content div[class^=highlight] pre,.rst-content pre.literal-block{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;font-size:12px;line-height:1.4}.rst-content div.highlight .gp,.rst-content div.highlight span.linenos{user-select:none;pointer-events:none}.rst-content div.highlight span.linenos{display:inline-block;padding-left:0;padding-right:12px;margin-right:12px;border-right:1px solid #e6e9ea}.rst-content .code-block-caption{font-style:italic;font-size:85%;line-height:1;padding:1em 0;text-align:center}@media print{.rst-content .codeblock,.rst-content div[class^=highlight],.rst-content div[class^=highlight] pre{white-space:pre-wrap}}.rst-content .admonition,.rst-content .admonition-todo,.rst-content .attention,.rst-content .caution,.rst-content .danger,.rst-content .error,.rst-content .hint,.rst-content .important,.rst-content .note,.rst-content .seealso,.rst-content .tip,.rst-content .warning{clear:both}.rst-content .admonition-todo .last,.rst-content .admonition-todo>:last-child,.rst-content .admonition .last,.rst-content .admonition>:last-child,.rst-content .attention .last,.rst-content .attention>:last-child,.rst-content .caution .last,.rst-content .caution>:last-child,.rst-content .danger .last,.rst-content .danger>:last-child,.rst-content .error .last,.rst-content .error>:last-child,.rst-content .hint .last,.rst-content .hint>:last-child,.rst-content .important .last,.rst-content .important>:last-child,.rst-content .note .last,.rst-content .note>:last-child,.rst-content .seealso .last,.rst-content .seealso>:last-child,.rst-content .tip .last,.rst-content .tip>:last-child,.rst-content .warning .last,.rst-content .warning>:last-child{margin-bottom:0}.rst-content .admonition-title:before{margin-right:4px}.rst-content .admonition table{border-color:rgba(0,0,0,.1)}.rst-content .admonition table td,.rst-content .admonition table th{background:transparent!important;border-color:rgba(0,0,0,.1)!important}.rst-content .section ol.loweralpha,.rst-content .section ol.loweralpha>li,.rst-content .toctree-wrapper ol.loweralpha,.rst-content .toctree-wrapper ol.loweralpha>li,.rst-content section ol.loweralpha,.rst-content section ol.loweralpha>li{list-style:lower-alpha}.rst-content .section ol.upperalpha,.rst-content .section ol.upperalpha>li,.rst-content .toctree-wrapper ol.upperalpha,.rst-content .toctree-wrapper ol.upperalpha>li,.rst-content section ol.upperalpha,.rst-content section ol.upperalpha>li{list-style:upper-alpha}.rst-content .section ol li>*,.rst-content .section ul li>*,.rst-content .toctree-wrapper ol li>*,.rst-content .toctree-wrapper ul li>*,.rst-content section ol li>*,.rst-content section ul li>*{margin-top:12px;margin-bottom:12px}.rst-content .section ol li>:first-child,.rst-content .section ul li>:first-child,.rst-content .toctree-wrapper ol li>:first-child,.rst-content .toctree-wrapper ul li>:first-child,.rst-content section ol li>:first-child,.rst-content section ul li>:first-child{margin-top:0}.rst-content .section ol li>p,.rst-content .section ol li>p:last-child,.rst-content .section ul li>p,.rst-content .section ul li>p:last-child,.rst-content .toctree-wrapper ol li>p,.rst-content .toctree-wrapper ol li>p:last-child,.rst-content .toctree-wrapper ul li>p,.rst-content .toctree-wrapper ul li>p:last-child,.rst-content section ol li>p,.rst-content section ol li>p:last-child,.rst-content section ul li>p,.rst-content section ul li>p:last-child{margin-bottom:12px}.rst-content .section ol li>p:only-child,.rst-content .section ol li>p:only-child:last-child,.rst-content .section ul li>p:only-child,.rst-content .section ul li>p:only-child:last-child,.rst-content .toctree-wrapper ol li>p:only-child,.rst-content .toctree-wrapper ol li>p:only-child:last-child,.rst-content .toctree-wrapper ul li>p:only-child,.rst-content .toctree-wrapper ul li>p:only-child:last-child,.rst-content section ol li>p:only-child,.rst-content section ol li>p:only-child:last-child,.rst-content section ul li>p:only-child,.rst-content section ul li>p:only-child:last-child{margin-bottom:0}.rst-content .section ol li>ol,.rst-content .section ol li>ul,.rst-content .section ul li>ol,.rst-content .section ul li>ul,.rst-content .toctree-wrapper ol li>ol,.rst-content .toctree-wrapper ol li>ul,.rst-content .toctree-wrapper ul li>ol,.rst-content .toctree-wrapper ul li>ul,.rst-content section ol li>ol,.rst-content section ol li>ul,.rst-content section ul li>ol,.rst-content section ul li>ul{margin-bottom:12px}.rst-content .section ol.simple li>*,.rst-content .section ol.simple li ol,.rst-content .section ol.simple li ul,.rst-content .section ul.simple li>*,.rst-content .section ul.simple li ol,.rst-content .section ul.simple li ul,.rst-content .toctree-wrapper ol.simple li>*,.rst-content .toctree-wrapper ol.simple li ol,.rst-content .toctree-wrapper ol.simple li ul,.rst-content .toctree-wrapper ul.simple li>*,.rst-content .toctree-wrapper ul.simple li ol,.rst-content .toctree-wrapper ul.simple li ul,.rst-content section ol.simple li>*,.rst-content section ol.simple li ol,.rst-content section ol.simple li ul,.rst-content section ul.simple li>*,.rst-content section ul.simple li ol,.rst-content section ul.simple li ul{margin-top:0;margin-bottom:0}.rst-content .line-block{margin-left:0;margin-bottom:24px;line-height:24px}.rst-content .line-block .line-block{margin-left:24px;margin-bottom:0}.rst-content .topic-title{font-weight:700;margin-bottom:12px}.rst-content .toc-backref{color:#404040}.rst-content .align-right{float:right;margin:0 0 24px 24px}.rst-content .align-left{float:left;margin:0 24px 24px 0}.rst-content .align-center{margin:auto}.rst-content .align-center:not(table){display:block}.rst-content .code-block-caption .headerlink,.rst-content .eqno .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink,.rst-content dl dt .headerlink,.rst-content h1 .headerlink,.rst-content h2 .headerlink,.rst-content h3 .headerlink,.rst-content h4 .headerlink,.rst-content h5 .headerlink,.rst-content h6 .headerlink,.rst-content p.caption .headerlink,.rst-content p .headerlink,.rst-content table>caption .headerlink{opacity:0;font-size:14px;font-family:FontAwesome;margin-left:.5em}.rst-content .code-block-caption .headerlink:focus,.rst-content .code-block-caption:hover .headerlink,.rst-content .eqno .headerlink:focus,.rst-content .eqno:hover .headerlink,.rst-content .toctree-wrapper>p.caption .headerlink:focus,.rst-content .toctree-wrapper>p.caption:hover .headerlink,.rst-content dl dt .headerlink:focus,.rst-content dl dt:hover .headerlink,.rst-content h1 .headerlink:focus,.rst-content h1:hover .headerlink,.rst-content h2 .headerlink:focus,.rst-content h2:hover .headerlink,.rst-content h3 .headerlink:focus,.rst-content h3:hover .headerlink,.rst-content h4 .headerlink:focus,.rst-content h4:hover .headerlink,.rst-content h5 .headerlink:focus,.rst-content h5:hover .headerlink,.rst-content h6 .headerlink:focus,.rst-content h6:hover .headerlink,.rst-content p.caption .headerlink:focus,.rst-content p.caption:hover .headerlink,.rst-content p .headerlink:focus,.rst-content p:hover .headerlink,.rst-content table>caption .headerlink:focus,.rst-content table>caption:hover .headerlink{opacity:1}.rst-content p a{overflow-wrap:anywhere}.rst-content .wy-table td p,.rst-content .wy-table td ul,.rst-content .wy-table th p,.rst-content .wy-table th ul,.rst-content table.docutils td p,.rst-content table.docutils td ul,.rst-content table.docutils th p,.rst-content table.docutils th ul,.rst-content table.field-list td p,.rst-content table.field-list td ul,.rst-content table.field-list th p,.rst-content table.field-list th ul{font-size:inherit}.rst-content .btn:focus{outline:2px solid}.rst-content table>caption .headerlink:after{font-size:12px}.rst-content .centered{text-align:center}.rst-content .sidebar{float:right;width:40%;display:block;margin:0 0 24px 24px;padding:24px;background:#f3f6f6;border:1px solid #e1e4e5}.rst-content .sidebar dl,.rst-content .sidebar p,.rst-content .sidebar ul{font-size:90%}.rst-content .sidebar .last,.rst-content .sidebar>:last-child{margin-bottom:0}.rst-content .sidebar .sidebar-title{display:block;font-family:Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;font-weight:700;background:#e1e4e5;padding:6px 12px;margin:-24px -24px 24px;font-size:100%}.rst-content .highlighted{background:#f1c40f;box-shadow:0 0 0 2px #f1c40f;display:inline;font-weight:700}.rst-content .citation-reference,.rst-content .footnote-reference{vertical-align:baseline;position:relative;top:-.4em;line-height:0;font-size:90%}.rst-content .citation-reference>span.fn-bracket,.rst-content .footnote-reference>span.fn-bracket{display:none}.rst-content .hlist{width:100%}.rst-content dl dt span.classifier:before{content:" : "}.rst-content dl dt span.classifier-delimiter{display:none!important}html.writer-html4 .rst-content table.docutils.citation,html.writer-html4 .rst-content table.docutils.footnote{background:none;border:none}html.writer-html4 .rst-content table.docutils.citation td,html.writer-html4 .rst-content table.docutils.citation tr,html.writer-html4 .rst-content table.docutils.footnote td,html.writer-html4 .rst-content table.docutils.footnote tr{border:none;background-color:transparent!important;white-space:normal}html.writer-html4 .rst-content table.docutils.citation td.label,html.writer-html4 .rst-content table.docutils.footnote td.label{padding-left:0;padding-right:0;vertical-align:top}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{display:grid;grid-template-columns:auto minmax(80%,95%)}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{display:inline-grid;grid-template-columns:max-content auto}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{display:grid;grid-template-columns:auto auto minmax(.65rem,auto) minmax(40%,95%)}html.writer-html5 .rst-content aside.citation>span.label,html.writer-html5 .rst-content aside.footnote>span.label,html.writer-html5 .rst-content div.citation>span.label{grid-column-start:1;grid-column-end:2}html.writer-html5 .rst-content aside.citation>span.backrefs,html.writer-html5 .rst-content aside.footnote>span.backrefs,html.writer-html5 .rst-content div.citation>span.backrefs{grid-column-start:2;grid-column-end:3;grid-row-start:1;grid-row-end:3}html.writer-html5 .rst-content aside.citation>p,html.writer-html5 .rst-content aside.footnote>p,html.writer-html5 .rst-content div.citation>p{grid-column-start:4;grid-column-end:5}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.field-list,html.writer-html5 .rst-content dl.footnote{margin-bottom:24px}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dt{padding-left:1rem}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.field-list>dd,html.writer-html5 .rst-content dl.field-list>dt,html.writer-html5 .rst-content dl.footnote>dd,html.writer-html5 .rst-content dl.footnote>dt{margin-bottom:0}html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{font-size:.9rem}html.writer-html5 .rst-content dl.citation>dt,html.writer-html5 .rst-content dl.footnote>dt{margin:0 .5rem .5rem 0;line-height:1.2rem;word-break:break-all;font-weight:400}html.writer-html5 .rst-content dl.citation>dt>span.brackets:before,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:before{content:"["}html.writer-html5 .rst-content dl.citation>dt>span.brackets:after,html.writer-html5 .rst-content dl.footnote>dt>span.brackets:after{content:"]"}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a{word-break:keep-all}html.writer-html5 .rst-content dl.citation>dt>span.fn-backref>a:not(:first-child):before,html.writer-html5 .rst-content dl.footnote>dt>span.fn-backref>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content dl.citation>dd,html.writer-html5 .rst-content dl.footnote>dd{margin:0 0 .5rem;line-height:1.2rem}html.writer-html5 .rst-content dl.citation>dd p,html.writer-html5 .rst-content dl.footnote>dd p{font-size:.9rem}html.writer-html5 .rst-content aside.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content div.citation{padding-left:1rem;padding-right:1rem;font-size:.9rem;line-height:1.2rem}html.writer-html5 .rst-content aside.citation p,html.writer-html5 .rst-content aside.footnote p,html.writer-html5 .rst-content div.citation p{font-size:.9rem;line-height:1.2rem;margin-bottom:12px}html.writer-html5 .rst-content aside.citation span.backrefs,html.writer-html5 .rst-content aside.footnote span.backrefs,html.writer-html5 .rst-content div.citation span.backrefs{text-align:left;font-style:italic;margin-left:.65rem;word-break:break-word;word-spacing:-.1rem;max-width:5rem}html.writer-html5 .rst-content aside.citation span.backrefs>a,html.writer-html5 .rst-content aside.footnote span.backrefs>a,html.writer-html5 .rst-content div.citation span.backrefs>a{word-break:keep-all}html.writer-html5 .rst-content aside.citation span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content aside.footnote span.backrefs>a:not(:first-child):before,html.writer-html5 .rst-content div.citation span.backrefs>a:not(:first-child):before{content:" "}html.writer-html5 .rst-content aside.citation span.label,html.writer-html5 .rst-content aside.footnote span.label,html.writer-html5 .rst-content div.citation span.label{line-height:1.2rem}html.writer-html5 .rst-content aside.citation-list,html.writer-html5 .rst-content aside.footnote-list,html.writer-html5 .rst-content div.citation-list{margin-bottom:24px}html.writer-html5 .rst-content dl.option-list kbd{font-size:.9rem}.rst-content table.docutils.footnote,html.writer-html4 .rst-content table.docutils.citation,html.writer-html5 .rst-content aside.footnote,html.writer-html5 .rst-content aside.footnote-list aside.footnote,html.writer-html5 .rst-content div.citation-list>div.citation,html.writer-html5 .rst-content dl.citation,html.writer-html5 .rst-content dl.footnote{color:grey}.rst-content table.docutils.footnote code,.rst-content table.docutils.footnote tt,html.writer-html4 .rst-content table.docutils.citation code,html.writer-html4 .rst-content table.docutils.citation tt,html.writer-html5 .rst-content aside.footnote-list aside.footnote code,html.writer-html5 .rst-content aside.footnote-list aside.footnote tt,html.writer-html5 .rst-content aside.footnote code,html.writer-html5 .rst-content aside.footnote tt,html.writer-html5 .rst-content div.citation-list>div.citation code,html.writer-html5 .rst-content div.citation-list>div.citation tt,html.writer-html5 .rst-content dl.citation code,html.writer-html5 .rst-content dl.citation tt,html.writer-html5 .rst-content dl.footnote code,html.writer-html5 .rst-content dl.footnote tt{color:#555}.rst-content .wy-table-responsive.citation,.rst-content .wy-table-responsive.footnote{margin-bottom:0}.rst-content .wy-table-responsive.citation+:not(.citation),.rst-content .wy-table-responsive.footnote+:not(.footnote){margin-top:24px}.rst-content .wy-table-responsive.citation:last-child,.rst-content .wy-table-responsive.footnote:last-child{margin-bottom:24px}.rst-content table.docutils th{border-color:#e1e4e5}html.writer-html5 .rst-content table.docutils th{border:1px solid #e1e4e5}html.writer-html5 .rst-content table.docutils td>p,html.writer-html5 .rst-content table.docutils th>p{line-height:1rem;margin-bottom:0;font-size:.9rem}.rst-content table.docutils td .last,.rst-content table.docutils td .last>:last-child{margin-bottom:0}.rst-content table.field-list,.rst-content table.field-list td{border:none}.rst-content table.field-list td p{line-height:inherit}.rst-content table.field-list td>strong{display:inline-block}.rst-content table.field-list .field-name{padding-right:10px;text-align:left;white-space:nowrap}.rst-content table.field-list .field-body{text-align:left}.rst-content code,.rst-content tt{color:#000;font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;padding:2px 5px}.rst-content code big,.rst-content code em,.rst-content tt big,.rst-content tt em{font-size:100%!important;line-height:normal}.rst-content code.literal,.rst-content tt.literal{color:#e74c3c;white-space:normal}.rst-content code.xref,.rst-content tt.xref,a .rst-content code,a .rst-content tt{font-weight:700;color:#404040;overflow-wrap:normal}.rst-content kbd,.rst-content pre,.rst-content samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace}.rst-content a code,.rst-content a tt{color:#2980b9}.rst-content dl{margin-bottom:24px}.rst-content dl dt{font-weight:700;margin-bottom:12px}.rst-content dl ol,.rst-content dl p,.rst-content dl table,.rst-content dl ul{margin-bottom:12px}.rst-content dl dd{margin:0 0 12px 24px;line-height:24px}.rst-content dl dd>ol:last-child,.rst-content dl dd>p:last-child,.rst-content dl dd>table:last-child,.rst-content dl dd>ul:last-child{margin-bottom:0}html.writer-html4 .rst-content dl:not(.docutils),html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple){margin-bottom:24px}html.writer-html4 .rst-content dl:not(.docutils)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{display:table;margin:6px 0;font-size:90%;line-height:normal;background:#e7f2fa;color:#2980b9;border-top:3px solid #6ab0de;padding:6px;position:relative}html.writer-html4 .rst-content dl:not(.docutils)>dt:before,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:before{color:#6ab0de}html.writer-html4 .rst-content dl:not(.docutils)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt{margin-bottom:6px;border:none;border-left:3px solid #ccc;background:#f0f0f0;color:#555}html.writer-html4 .rst-content dl:not(.docutils) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) dl:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt .headerlink{color:#404040;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils)>dt:first-child,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple)>dt:first-child{margin-top:0}html.writer-html4 .rst-content dl:not(.docutils) code.descclassname,html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descclassname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{background-color:transparent;border:none;padding:0;font-size:100%!important}html.writer-html4 .rst-content dl:not(.docutils) code.descname,html.writer-html4 .rst-content dl:not(.docutils) tt.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) code.descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) tt.descname{font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .optional,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .optional{display:inline-block;padding:0 4px;color:#000;font-weight:700}html.writer-html4 .rst-content dl:not(.docutils) .property,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .property{display:inline-block;padding-right:8px;max-width:100%}html.writer-html4 .rst-content dl:not(.docutils) .k,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .k{font-style:italic}html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}.rst-content .viewcode-back,.rst-content .viewcode-link{display:inline-block;color:#27ae60;font-size:80%;padding-left:24px}.rst-content .viewcode-back{display:block;float:right}.rst-content p.rubric{margin-bottom:12px;font-weight:700}.rst-content code.download,.rst-content tt.download{background:inherit;padding:inherit;font-weight:400;font-family:inherit;font-size:inherit;color:inherit;border:inherit;white-space:inherit}.rst-content code.download span:first-child,.rst-content tt.download span:first-child{-webkit-font-smoothing:subpixel-antialiased}.rst-content code.download span:first-child:before,.rst-content tt.download span:first-child:before{margin-right:4px}.rst-content .guilabel,.rst-content .menuselection{font-size:80%;font-weight:700;border-radius:4px;padding:2.4px 6px;margin:auto 2px}.rst-content .guilabel,.rst-content .menuselection{border:1px solid #7fbbe3;background:#e7f2fa}.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>.kbd,.rst-content :not(dl.option-list)>:not(dt):not(kbd):not(.kbd)>kbd{color:inherit;font-size:80%;background-color:#fff;border:1px solid #a6a6a6;border-radius:4px;box-shadow:0 2px grey;padding:2.4px 6px;margin:auto 0}.rst-content .versionmodified{font-style:italic}@media screen and (max-width:480px){.rst-content .sidebar{width:100%;float:none;margin-left:0}}span[id*=MathJax-Span]{color:#404040}.math{text-align:center}@font-face{font-family:Lato;src:url(fonts/lato-normal.woff2?bd03a2cc277bbbc338d464e679fe9942) format("woff2"),url(fonts/lato-normal.woff?27bd77b9162d388cb8d4c4217c7c5e2a) format("woff");font-weight:400;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold.woff2?cccb897485813c7c256901dbca54ecf2) format("woff2"),url(fonts/lato-bold.woff?d878b6c29b10beca227e9eef4246111b) format("woff");font-weight:700;font-style:normal;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-bold-italic.woff2?0b6bb6725576b072c5d0b02ecdd1900d) format("woff2"),url(fonts/lato-bold-italic.woff?9c7e4e9eb485b4a121c760e61bc3707c) format("woff");font-weight:700;font-style:italic;font-display:block}@font-face{font-family:Lato;src:url(fonts/lato-normal-italic.woff2?4eb103b4d12be57cb1d040ed5e162e9d) format("woff2"),url(fonts/lato-normal-italic.woff?f28f2d6482446544ef1ea1ccc6dd5892) format("woff");font-weight:400;font-style:italic;font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:400;src:url(fonts/Roboto-Slab-Regular.woff2?7abf5b8d04d26a2cafea937019bca958) format("woff2"),url(fonts/Roboto-Slab-Regular.woff?c1be9284088d487c5e3ff0a10a92e58c) format("woff");font-display:block}@font-face{font-family:Roboto Slab;font-style:normal;font-weight:700;src:url(fonts/Roboto-Slab-Bold.woff2?9984f4a9bda09be08e83f2506954adbe) format("woff2"),url(fonts/Roboto-Slab-Bold.woff?bed5564a116b05148e3b3bea6fb1162a) format("woff");font-display:block} \ No newline at end of file diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 00000000..807cdb17 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,150 @@ +/* + * Base JavaScript utilities for all Sphinx HTML documentation. + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})`, + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)), + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS + && !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) + return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/_static/documentation_options.js b/_static/documentation_options.js new file mode 100644 index 00000000..02ec18f5 --- /dev/null +++ b/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '3.4.0', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: true, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/_static/english-stemmer.js b/_static/english-stemmer.js new file mode 100644 index 00000000..056760ee --- /dev/null +++ b/_static/english-stemmer.js @@ -0,0 +1,1066 @@ +// Generated from english.sbl by Snowball 3.0.1 - https://snowballstem.org/ + +/**@constructor*/ +var EnglishStemmer = function() { + var base = new BaseStemmer(); + + /** @const */ var a_0 = [ + ["arsen", -1, -1], + ["commun", -1, -1], + ["emerg", -1, -1], + ["gener", -1, -1], + ["later", -1, -1], + ["organ", -1, -1], + ["past", -1, -1], + ["univers", -1, -1] + ]; + + /** @const */ var a_1 = [ + ["'", -1, 1], + ["'s'", 0, 1], + ["'s", -1, 1] + ]; + + /** @const */ var a_2 = [ + ["ied", -1, 2], + ["s", -1, 3], + ["ies", 1, 2], + ["sses", 1, 1], + ["ss", 1, -1], + ["us", 1, -1] + ]; + + /** @const */ var a_3 = [ + ["succ", -1, 1], + ["proc", -1, 1], + ["exc", -1, 1] + ]; + + /** @const */ var a_4 = [ + ["even", -1, 2], + ["cann", -1, 2], + ["inn", -1, 2], + ["earr", -1, 2], + ["herr", -1, 2], + ["out", -1, 2], + ["y", -1, 1] + ]; + + /** @const */ var a_5 = [ + ["", -1, -1], + ["ed", 0, 2], + ["eed", 1, 1], + ["ing", 0, 3], + ["edly", 0, 2], + ["eedly", 4, 1], + ["ingly", 0, 2] + ]; + + /** @const */ var a_6 = [ + ["", -1, 3], + ["bb", 0, 2], + ["dd", 0, 2], + ["ff", 0, 2], + ["gg", 0, 2], + ["bl", 0, 1], + ["mm", 0, 2], + ["nn", 0, 2], + ["pp", 0, 2], + ["rr", 0, 2], + ["at", 0, 1], + ["tt", 0, 2], + ["iz", 0, 1] + ]; + + /** @const */ var a_7 = [ + ["anci", -1, 3], + ["enci", -1, 2], + ["ogi", -1, 14], + ["li", -1, 16], + ["bli", 3, 12], + ["abli", 4, 4], + ["alli", 3, 8], + ["fulli", 3, 9], + ["lessli", 3, 15], + ["ousli", 3, 10], + ["entli", 3, 5], + ["aliti", -1, 8], + ["biliti", -1, 12], + ["iviti", -1, 11], + ["tional", -1, 1], + ["ational", 14, 7], + ["alism", -1, 8], + ["ation", -1, 7], + ["ization", 17, 6], + ["izer", -1, 6], + ["ator", -1, 7], + ["iveness", -1, 11], + ["fulness", -1, 9], + ["ousness", -1, 10], + ["ogist", -1, 13] + ]; + + /** @const */ var a_8 = [ + ["icate", -1, 4], + ["ative", -1, 6], + ["alize", -1, 3], + ["iciti", -1, 4], + ["ical", -1, 4], + ["tional", -1, 1], + ["ational", 5, 2], + ["ful", -1, 5], + ["ness", -1, 5] + ]; + + /** @const */ var a_9 = [ + ["ic", -1, 1], + ["ance", -1, 1], + ["ence", -1, 1], + ["able", -1, 1], + ["ible", -1, 1], + ["ate", -1, 1], + ["ive", -1, 1], + ["ize", -1, 1], + ["iti", -1, 1], + ["al", -1, 1], + ["ism", -1, 1], + ["ion", -1, 2], + ["er", -1, 1], + ["ous", -1, 1], + ["ant", -1, 1], + ["ent", -1, 1], + ["ment", 15, 1], + ["ement", 16, 1] + ]; + + /** @const */ var a_10 = [ + ["e", -1, 1], + ["l", -1, 2] + ]; + + /** @const */ var a_11 = [ + ["andes", -1, -1], + ["atlas", -1, -1], + ["bias", -1, -1], + ["cosmos", -1, -1], + ["early", -1, 5], + ["gently", -1, 3], + ["howe", -1, -1], + ["idly", -1, 2], + ["news", -1, -1], + ["only", -1, 6], + ["singly", -1, 7], + ["skies", -1, 1], + ["sky", -1, -1], + ["ugly", -1, 4] + ]; + + /** @const */ var /** Array */ g_aeo = [17, 64]; + + /** @const */ var /** Array */ g_v = [17, 65, 16, 1]; + + /** @const */ var /** Array */ g_v_WXY = [1, 17, 65, 208, 1]; + + /** @const */ var /** Array */ g_valid_LI = [55, 141, 2]; + + var /** boolean */ B_Y_found = false; + var /** number */ I_p2 = 0; + var /** number */ I_p1 = 0; + + + /** @return {boolean} */ + function r_prelude() { + B_Y_found = false; + /** @const */ var /** number */ v_1 = base.cursor; + lab0: { + base.bra = base.cursor; + if (!(base.eq_s("'"))) + { + break lab0; + } + base.ket = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + base.cursor = v_1; + /** @const */ var /** number */ v_2 = base.cursor; + lab1: { + base.bra = base.cursor; + if (!(base.eq_s("y"))) + { + break lab1; + } + base.ket = base.cursor; + if (!base.slice_from("Y")) + { + return false; + } + B_Y_found = true; + } + base.cursor = v_2; + /** @const */ var /** number */ v_3 = base.cursor; + lab2: { + while(true) + { + /** @const */ var /** number */ v_4 = base.cursor; + lab3: { + golab4: while(true) + { + /** @const */ var /** number */ v_5 = base.cursor; + lab5: { + if (!(base.in_grouping(g_v, 97, 121))) + { + break lab5; + } + base.bra = base.cursor; + if (!(base.eq_s("y"))) + { + break lab5; + } + base.ket = base.cursor; + base.cursor = v_5; + break golab4; + } + base.cursor = v_5; + if (base.cursor >= base.limit) + { + break lab3; + } + base.cursor++; + } + if (!base.slice_from("Y")) + { + return false; + } + B_Y_found = true; + continue; + } + base.cursor = v_4; + break; + } + } + base.cursor = v_3; + return true; + }; + + /** @return {boolean} */ + function r_mark_regions() { + I_p1 = base.limit; + I_p2 = base.limit; + /** @const */ var /** number */ v_1 = base.cursor; + lab0: { + lab1: { + /** @const */ var /** number */ v_2 = base.cursor; + lab2: { + if (base.find_among(a_0) == 0) + { + break lab2; + } + break lab1; + } + base.cursor = v_2; + if (!base.go_out_grouping(g_v, 97, 121)) + { + break lab0; + } + base.cursor++; + if (!base.go_in_grouping(g_v, 97, 121)) + { + break lab0; + } + base.cursor++; + } + I_p1 = base.cursor; + if (!base.go_out_grouping(g_v, 97, 121)) + { + break lab0; + } + base.cursor++; + if (!base.go_in_grouping(g_v, 97, 121)) + { + break lab0; + } + base.cursor++; + I_p2 = base.cursor; + } + base.cursor = v_1; + return true; + }; + + /** @return {boolean} */ + function r_shortv() { + lab0: { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.out_grouping_b(g_v_WXY, 89, 121))) + { + break lab1; + } + if (!(base.in_grouping_b(g_v, 97, 121))) + { + break lab1; + } + if (!(base.out_grouping_b(g_v, 97, 121))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + lab2: { + if (!(base.out_grouping_b(g_v, 97, 121))) + { + break lab2; + } + if (!(base.in_grouping_b(g_v, 97, 121))) + { + break lab2; + } + if (base.cursor > base.limit_backward) + { + break lab2; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("past"))) + { + return false; + } + } + return true; + }; + + /** @return {boolean} */ + function r_R1() { + return I_p1 <= base.cursor; + }; + + /** @return {boolean} */ + function r_R2() { + return I_p2 <= base.cursor; + }; + + /** @return {boolean} */ + function r_Step_1a() { + var /** number */ among_var; + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab0: { + base.ket = base.cursor; + if (base.find_among_b(a_1) == 0) + { + base.cursor = base.limit - v_1; + break lab0; + } + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + base.ket = base.cursor; + among_var = base.find_among_b(a_2); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + if (!base.slice_from("ss")) + { + return false; + } + break; + case 2: + lab1: { + /** @const */ var /** number */ v_2 = base.limit - base.cursor; + lab2: { + { + /** @const */ var /** number */ c1 = base.cursor - 2; + if (c1 < base.limit_backward) + { + break lab2; + } + base.cursor = c1; + } + if (!base.slice_from("i")) + { + return false; + } + break lab1; + } + base.cursor = base.limit - v_2; + if (!base.slice_from("ie")) + { + return false; + } + } + break; + case 3: + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + if (!base.go_out_grouping_b(g_v, 97, 121)) + { + return false; + } + base.cursor--; + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_1b() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_5); + base.bra = base.cursor; + lab0: { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab1: { + switch (among_var) { + case 1: + /** @const */ var /** number */ v_2 = base.limit - base.cursor; + lab2: { + lab3: { + /** @const */ var /** number */ v_3 = base.limit - base.cursor; + lab4: { + if (base.find_among_b(a_3) == 0) + { + break lab4; + } + if (base.cursor > base.limit_backward) + { + break lab4; + } + break lab3; + } + base.cursor = base.limit - v_3; + if (!r_R1()) + { + break lab2; + } + if (!base.slice_from("ee")) + { + return false; + } + } + } + base.cursor = base.limit - v_2; + break; + case 2: + break lab1; + case 3: + among_var = base.find_among_b(a_4); + if (among_var == 0) + { + break lab1; + } + switch (among_var) { + case 1: + /** @const */ var /** number */ v_4 = base.limit - base.cursor; + if (!(base.out_grouping_b(g_v, 97, 121))) + { + break lab1; + } + if (base.cursor > base.limit_backward) + { + break lab1; + } + base.cursor = base.limit - v_4; + base.bra = base.cursor; + if (!base.slice_from("ie")) + { + return false; + } + break; + case 2: + if (base.cursor > base.limit_backward) + { + break lab1; + } + break; + } + break; + } + break lab0; + } + base.cursor = base.limit - v_1; + /** @const */ var /** number */ v_5 = base.limit - base.cursor; + if (!base.go_out_grouping_b(g_v, 97, 121)) + { + return false; + } + base.cursor--; + base.cursor = base.limit - v_5; + if (!base.slice_del()) + { + return false; + } + base.ket = base.cursor; + base.bra = base.cursor; + /** @const */ var /** number */ v_6 = base.limit - base.cursor; + among_var = base.find_among_b(a_6); + switch (among_var) { + case 1: + if (!base.slice_from("e")) + { + return false; + } + return false; + case 2: + { + /** @const */ var /** number */ v_7 = base.limit - base.cursor; + lab5: { + if (!(base.in_grouping_b(g_aeo, 97, 111))) + { + break lab5; + } + if (base.cursor > base.limit_backward) + { + break lab5; + } + return false; + } + base.cursor = base.limit - v_7; + } + break; + case 3: + if (base.cursor != I_p1) + { + return false; + } + /** @const */ var /** number */ v_8 = base.limit - base.cursor; + if (!r_shortv()) + { + return false; + } + base.cursor = base.limit - v_8; + if (!base.slice_from("e")) + { + return false; + } + return false; + } + base.cursor = base.limit - v_6; + base.ket = base.cursor; + if (base.cursor <= base.limit_backward) + { + return false; + } + base.cursor--; + base.bra = base.cursor; + if (!base.slice_del()) + { + return false; + } + } + return true; + }; + + /** @return {boolean} */ + function r_Step_1c() { + base.ket = base.cursor; + lab0: { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("y"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("Y"))) + { + return false; + } + } + base.bra = base.cursor; + if (!(base.out_grouping_b(g_v, 97, 121))) + { + return false; + } + lab2: { + if (base.cursor > base.limit_backward) + { + break lab2; + } + return false; + } + if (!base.slice_from("i")) + { + return false; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_2() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_7); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("tion")) + { + return false; + } + break; + case 2: + if (!base.slice_from("ence")) + { + return false; + } + break; + case 3: + if (!base.slice_from("ance")) + { + return false; + } + break; + case 4: + if (!base.slice_from("able")) + { + return false; + } + break; + case 5: + if (!base.slice_from("ent")) + { + return false; + } + break; + case 6: + if (!base.slice_from("ize")) + { + return false; + } + break; + case 7: + if (!base.slice_from("ate")) + { + return false; + } + break; + case 8: + if (!base.slice_from("al")) + { + return false; + } + break; + case 9: + if (!base.slice_from("ful")) + { + return false; + } + break; + case 10: + if (!base.slice_from("ous")) + { + return false; + } + break; + case 11: + if (!base.slice_from("ive")) + { + return false; + } + break; + case 12: + if (!base.slice_from("ble")) + { + return false; + } + break; + case 13: + if (!base.slice_from("og")) + { + return false; + } + break; + case 14: + if (!(base.eq_s_b("l"))) + { + return false; + } + if (!base.slice_from("og")) + { + return false; + } + break; + case 15: + if (!base.slice_from("less")) + { + return false; + } + break; + case 16: + if (!(base.in_grouping_b(g_valid_LI, 99, 116))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_3() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_8); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R1()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("tion")) + { + return false; + } + break; + case 2: + if (!base.slice_from("ate")) + { + return false; + } + break; + case 3: + if (!base.slice_from("al")) + { + return false; + } + break; + case 4: + if (!base.slice_from("ic")) + { + return false; + } + break; + case 5: + if (!base.slice_del()) + { + return false; + } + break; + case 6: + if (!r_R2()) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_4() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_9); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + if (!r_R2()) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_del()) + { + return false; + } + break; + case 2: + lab0: { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab1: { + if (!(base.eq_s_b("s"))) + { + break lab1; + } + break lab0; + } + base.cursor = base.limit - v_1; + if (!(base.eq_s_b("t"))) + { + return false; + } + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_Step_5() { + var /** number */ among_var; + base.ket = base.cursor; + among_var = base.find_among_b(a_10); + if (among_var == 0) + { + return false; + } + base.bra = base.cursor; + switch (among_var) { + case 1: + lab0: { + lab1: { + if (!r_R2()) + { + break lab1; + } + break lab0; + } + if (!r_R1()) + { + return false; + } + { + /** @const */ var /** number */ v_1 = base.limit - base.cursor; + lab2: { + if (!r_shortv()) + { + break lab2; + } + return false; + } + base.cursor = base.limit - v_1; + } + } + if (!base.slice_del()) + { + return false; + } + break; + case 2: + if (!r_R2()) + { + return false; + } + if (!(base.eq_s_b("l"))) + { + return false; + } + if (!base.slice_del()) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_exception1() { + var /** number */ among_var; + base.bra = base.cursor; + among_var = base.find_among(a_11); + if (among_var == 0) + { + return false; + } + base.ket = base.cursor; + if (base.cursor < base.limit) + { + return false; + } + switch (among_var) { + case 1: + if (!base.slice_from("sky")) + { + return false; + } + break; + case 2: + if (!base.slice_from("idl")) + { + return false; + } + break; + case 3: + if (!base.slice_from("gentl")) + { + return false; + } + break; + case 4: + if (!base.slice_from("ugli")) + { + return false; + } + break; + case 5: + if (!base.slice_from("earli")) + { + return false; + } + break; + case 6: + if (!base.slice_from("onli")) + { + return false; + } + break; + case 7: + if (!base.slice_from("singl")) + { + return false; + } + break; + } + return true; + }; + + /** @return {boolean} */ + function r_postlude() { + if (!B_Y_found) + { + return false; + } + while(true) + { + /** @const */ var /** number */ v_1 = base.cursor; + lab0: { + golab1: while(true) + { + /** @const */ var /** number */ v_2 = base.cursor; + lab2: { + base.bra = base.cursor; + if (!(base.eq_s("Y"))) + { + break lab2; + } + base.ket = base.cursor; + base.cursor = v_2; + break golab1; + } + base.cursor = v_2; + if (base.cursor >= base.limit) + { + break lab0; + } + base.cursor++; + } + if (!base.slice_from("y")) + { + return false; + } + continue; + } + base.cursor = v_1; + break; + } + return true; + }; + + this.stem = /** @return {boolean} */ function() { + lab0: { + /** @const */ var /** number */ v_1 = base.cursor; + lab1: { + if (!r_exception1()) + { + break lab1; + } + break lab0; + } + base.cursor = v_1; + lab2: { + { + /** @const */ var /** number */ v_2 = base.cursor; + lab3: { + { + /** @const */ var /** number */ c1 = base.cursor + 3; + if (c1 > base.limit) + { + break lab3; + } + base.cursor = c1; + } + break lab2; + } + base.cursor = v_2; + } + break lab0; + } + base.cursor = v_1; + r_prelude(); + r_mark_regions(); + base.limit_backward = base.cursor; base.cursor = base.limit; + /** @const */ var /** number */ v_3 = base.limit - base.cursor; + r_Step_1a(); + base.cursor = base.limit - v_3; + /** @const */ var /** number */ v_4 = base.limit - base.cursor; + r_Step_1b(); + base.cursor = base.limit - v_4; + /** @const */ var /** number */ v_5 = base.limit - base.cursor; + r_Step_1c(); + base.cursor = base.limit - v_5; + /** @const */ var /** number */ v_6 = base.limit - base.cursor; + r_Step_2(); + base.cursor = base.limit - v_6; + /** @const */ var /** number */ v_7 = base.limit - base.cursor; + r_Step_3(); + base.cursor = base.limit - v_7; + /** @const */ var /** number */ v_8 = base.limit - base.cursor; + r_Step_4(); + base.cursor = base.limit - v_8; + /** @const */ var /** number */ v_9 = base.limit - base.cursor; + r_Step_5(); + base.cursor = base.limit - v_9; + base.cursor = base.limit_backward; + /** @const */ var /** number */ v_10 = base.cursor; + r_postlude(); + base.cursor = v_10; + } + return true; + }; + + /**@return{string}*/ + this['stemWord'] = function(/**string*/word) { + base.setCurrent(word); + this.stem(); + return base.getCurrent(); + }; +}; diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 00000000..a858a410 Binary files /dev/null and b/_static/file.png differ diff --git a/_static/fonts/Lato/lato-bold.eot b/_static/fonts/Lato/lato-bold.eot new file mode 100644 index 00000000..3361183a Binary files /dev/null and b/_static/fonts/Lato/lato-bold.eot differ diff --git a/_static/fonts/Lato/lato-bold.ttf b/_static/fonts/Lato/lato-bold.ttf new file mode 100644 index 00000000..29f691d5 Binary files /dev/null and b/_static/fonts/Lato/lato-bold.ttf differ diff --git a/_static/fonts/Lato/lato-bold.woff b/_static/fonts/Lato/lato-bold.woff new file mode 100644 index 00000000..c6dff51f Binary files /dev/null and b/_static/fonts/Lato/lato-bold.woff differ diff --git a/_static/fonts/Lato/lato-bold.woff2 b/_static/fonts/Lato/lato-bold.woff2 new file mode 100644 index 00000000..bb195043 Binary files /dev/null and b/_static/fonts/Lato/lato-bold.woff2 differ diff --git a/_static/fonts/Lato/lato-bolditalic.eot b/_static/fonts/Lato/lato-bolditalic.eot new file mode 100644 index 00000000..3d415493 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.eot differ diff --git a/_static/fonts/Lato/lato-bolditalic.ttf b/_static/fonts/Lato/lato-bolditalic.ttf new file mode 100644 index 00000000..f402040b Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.ttf differ diff --git a/_static/fonts/Lato/lato-bolditalic.woff b/_static/fonts/Lato/lato-bolditalic.woff new file mode 100644 index 00000000..88ad05b9 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.woff differ diff --git a/_static/fonts/Lato/lato-bolditalic.woff2 b/_static/fonts/Lato/lato-bolditalic.woff2 new file mode 100644 index 00000000..c4e3d804 Binary files /dev/null and b/_static/fonts/Lato/lato-bolditalic.woff2 differ diff --git a/_static/fonts/Lato/lato-italic.eot b/_static/fonts/Lato/lato-italic.eot new file mode 100644 index 00000000..3f826421 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.eot differ diff --git a/_static/fonts/Lato/lato-italic.ttf b/_static/fonts/Lato/lato-italic.ttf new file mode 100644 index 00000000..b4bfc9b2 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.ttf differ diff --git a/_static/fonts/Lato/lato-italic.woff b/_static/fonts/Lato/lato-italic.woff new file mode 100644 index 00000000..76114bc0 Binary files /dev/null and b/_static/fonts/Lato/lato-italic.woff differ diff --git a/_static/fonts/Lato/lato-italic.woff2 b/_static/fonts/Lato/lato-italic.woff2 new file mode 100644 index 00000000..3404f37e Binary files /dev/null and b/_static/fonts/Lato/lato-italic.woff2 differ diff --git a/_static/fonts/Lato/lato-regular.eot b/_static/fonts/Lato/lato-regular.eot new file mode 100644 index 00000000..11e3f2a5 Binary files /dev/null and b/_static/fonts/Lato/lato-regular.eot differ diff --git a/_static/fonts/Lato/lato-regular.ttf b/_static/fonts/Lato/lato-regular.ttf new file mode 100644 index 00000000..74decd9e Binary files /dev/null and b/_static/fonts/Lato/lato-regular.ttf differ diff --git a/_static/fonts/Lato/lato-regular.woff b/_static/fonts/Lato/lato-regular.woff new file mode 100644 index 00000000..ae1307ff Binary files /dev/null and b/_static/fonts/Lato/lato-regular.woff differ diff --git a/_static/fonts/Lato/lato-regular.woff2 b/_static/fonts/Lato/lato-regular.woff2 new file mode 100644 index 00000000..3bf98433 Binary files /dev/null and b/_static/fonts/Lato/lato-regular.woff2 differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot new file mode 100644 index 00000000..79dc8efe Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf new file mode 100644 index 00000000..df5d1df2 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff new file mode 100644 index 00000000..6cb60000 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 new file mode 100644 index 00000000..7059e231 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot new file mode 100644 index 00000000..2f7ca78a Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf new file mode 100644 index 00000000..eb52a790 Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff new file mode 100644 index 00000000..f815f63f Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff differ diff --git a/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 new file mode 100644 index 00000000..f2c76e5b Binary files /dev/null and b/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 differ diff --git a/_static/jquery.js b/_static/jquery.js new file mode 100644 index 00000000..c4c6022f --- /dev/null +++ b/_static/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,D=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var _t,zt=[],Ut=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=zt.pop()||S.expando+"_"+wt.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Ut.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ut.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ut,"$1"+r):!1!==e.jsonp&&(e.url+=(Tt.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,zt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((_t=E.implementation.createHTMLDocument("").body).innerHTML="
",2===_t.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=Fe(y.pixelPosition,function(e,t){if(t)return t=We(e,n),Pe.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t a.language.name.localeCompare(b.language.name)); + + const languagesHTML = ` +
+
Languages
+ ${languages + .map( + (translation) => ` +
+ ${translation.language.code} +
+ `, + ) + .join("\n")} +
+ `; + return languagesHTML; + } + + function renderVersions(config) { + if (!config.versions.active.length) { + return ""; + } + const versionsHTML = ` +
+
Versions
+ ${config.versions.active + .map( + (version) => ` +
+ ${version.slug} +
+ `, + ) + .join("\n")} +
+ `; + return versionsHTML; + } + + function renderDownloads(config) { + if (!Object.keys(config.versions.current.downloads).length) { + return ""; + } + const downloadsNameDisplay = { + pdf: "PDF", + epub: "Epub", + htmlzip: "HTML", + }; + + const downloadsHTML = ` +
+
Downloads
+ ${Object.entries(config.versions.current.downloads) + .map( + ([name, url]) => ` +
+ ${downloadsNameDisplay[name]} +
+ `, + ) + .join("\n")} +
+ `; + return downloadsHTML; + } + + document.addEventListener("readthedocs-addons-data-ready", function (event) { + const config = event.detail.data(); + + const flyout = ` +
+ + Read the Docs + v: ${config.versions.current.slug} + + +
+
+ ${renderLanguages(config)} + ${renderVersions(config)} + ${renderDownloads(config)} +
+
On Read the Docs
+
+ Project Home +
+
+ Builds +
+
+ Downloads +
+
+
+
Search
+
+
+ +
+
+
+
+ + Hosted by Read the Docs + +
+
+ `; + + // Inject the generated flyout into the body HTML element. + document.body.insertAdjacentHTML("beforeend", flyout); + + // Trigger the Read the Docs Addons Search modal when clicking on the "Search docs" input from inside the flyout. + document + .querySelector("#flyout-search-form") + .addEventListener("focusin", () => { + const event = new CustomEvent("readthedocs-search-show"); + document.dispatchEvent(event); + }); + }) +} + +if (themeLanguageSelector || themeVersionSelector) { + function onSelectorSwitch(event) { + const option = event.target.selectedIndex; + const item = event.target.options[option]; + window.location.href = item.dataset.url; + } + + document.addEventListener("readthedocs-addons-data-ready", function (event) { + const config = event.detail.data(); + + const versionSwitch = document.querySelector( + "div.switch-menus > div.version-switch", + ); + if (themeVersionSelector) { + let versions = config.versions.active; + if (config.versions.current.hidden || config.versions.current.type === "external") { + versions.unshift(config.versions.current); + } + const versionSelect = ` + + `; + + versionSwitch.innerHTML = versionSelect; + versionSwitch.firstElementChild.addEventListener("change", onSelectorSwitch); + } + + const languageSwitch = document.querySelector( + "div.switch-menus > div.language-switch", + ); + + if (themeLanguageSelector) { + if (config.projects.translations.length) { + // Add the current language to the options on the selector + let languages = config.projects.translations.concat( + config.projects.current, + ); + languages = languages.sort((a, b) => + a.language.name.localeCompare(b.language.name), + ); + + const languageSelect = ` + + `; + + languageSwitch.innerHTML = languageSelect; + languageSwitch.firstElementChild.addEventListener("change", onSelectorSwitch); + } + else { + languageSwitch.remove(); + } + } + }); +} + +document.addEventListener("readthedocs-addons-data-ready", function (event) { + // Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav. + document + .querySelector("[role='search'] input") + .addEventListener("focusin", () => { + const event = new CustomEvent("readthedocs-search-show"); + document.dispatchEvent(event); + }); +}); \ No newline at end of file diff --git a/_static/language_data.js b/_static/language_data.js new file mode 100644 index 00000000..57767864 --- /dev/null +++ b/_static/language_data.js @@ -0,0 +1,13 @@ +/* + * This script contains the language-specific data used by searchtools.js, + * namely the set of stopwords, stemmer, scorer and splitter. + */ + +const stopwords = new Set(["a", "about", "above", "after", "again", "against", "all", "am", "an", "and", "any", "are", "aren't", "as", "at", "be", "because", "been", "before", "being", "below", "between", "both", "but", "by", "can't", "cannot", "could", "couldn't", "did", "didn't", "do", "does", "doesn't", "doing", "don't", "down", "during", "each", "few", "for", "from", "further", "had", "hadn't", "has", "hasn't", "have", "haven't", "having", "he", "he'd", "he'll", "he's", "her", "here", "here's", "hers", "herself", "him", "himself", "his", "how", "how's", "i", "i'd", "i'll", "i'm", "i've", "if", "in", "into", "is", "isn't", "it", "it's", "its", "itself", "let's", "me", "more", "most", "mustn't", "my", "myself", "no", "nor", "not", "of", "off", "on", "once", "only", "or", "other", "ought", "our", "ours", "ourselves", "out", "over", "own", "same", "shan't", "she", "she'd", "she'll", "she's", "should", "shouldn't", "so", "some", "such", "than", "that", "that's", "the", "their", "theirs", "them", "themselves", "then", "there", "there's", "these", "they", "they'd", "they'll", "they're", "they've", "this", "those", "through", "to", "too", "under", "until", "up", "very", "was", "wasn't", "we", "we'd", "we'll", "we're", "we've", "were", "weren't", "what", "what's", "when", "when's", "where", "where's", "which", "while", "who", "who's", "whom", "why", "why's", "with", "won't", "would", "wouldn't", "you", "you'd", "you'll", "you're", "you've", "your", "yours", "yourself", "yourselves"]); +window.stopwords = stopwords; // Export to global scope + + +/* Non-minified versions are copied as separate JavaScript files, if available */ +BaseStemmer=function(){this.current="",this.cursor=0,this.limit=0,this.limit_backward=0,this.bra=0,this.ket=0,this.setCurrent=function(t){this.current=t,this.cursor=0,this.limit=this.current.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},this.getCurrent=function(){return this.current},this.copy_from=function(t){this.current=t.current,this.cursor=t.cursor,this.limit=t.limit,this.limit_backward=t.limit_backward,this.bra=t.bra,this.ket=t.ket},this.in_grouping=function(t,r,i){return!(this.cursor>=this.limit||i<(i=this.current.charCodeAt(this.cursor))||i>>3]&1<<(7&i))||(this.cursor++,0))},this.go_in_grouping=function(t,r,i){for(;this.cursor>>3]&1<<(7&s)))return!0;this.cursor++}return!1},this.in_grouping_b=function(t,r,i){return!(this.cursor<=this.limit_backward||i<(i=this.current.charCodeAt(this.cursor-1))||i>>3]&1<<(7&i))||(this.cursor--,0))},this.go_in_grouping_b=function(t,r,i){for(;this.cursor>this.limit_backward;){var s=this.current.charCodeAt(this.cursor-1);if(i>>3]&1<<(7&s)))return!0;this.cursor--}return!1},this.out_grouping=function(t,r,i){return!(this.cursor>=this.limit)&&(i<(i=this.current.charCodeAt(this.cursor))||i>>3]&1<<(7&i)))&&(this.cursor++,!0)},this.go_out_grouping=function(t,r,i){for(;this.cursor>>3]&1<<(7&s)))return!0;this.cursor++}return!1},this.out_grouping_b=function(t,r,i){return!(this.cursor<=this.limit_backward)&&(i<(i=this.current.charCodeAt(this.cursor-1))||i>>3]&1<<(7&i)))&&(this.cursor--,!0)},this.go_out_grouping_b=function(t,r,i){for(;this.cursor>this.limit_backward;){var s=this.current.charCodeAt(this.cursor-1);if(s<=i&&r<=s&&0!=(t[(s-=r)>>>3]&1<<(7&s)))return!0;this.cursor--}return!1},this.eq_s=function(t){return!(this.limit-this.cursor>>1),o=0,a=e=(l=t[r])[0].length){if(this.cursor=s+l[0].length,l.length<4)return l[2];var g=l[3](this);if(this.cursor=s+l[0].length,g)return l[2]}}while(0<=(r=l[1]));return 0},this.find_among_b=function(t){for(var r=0,i=t.length,s=this.cursor,h=this.limit_backward,e=0,n=0,c=!1;;){for(var u,o=r+(i-r>>1),a=0,l=e=(u=t[r])[0].length){if(this.cursor=s-u[0].length,u.length<4)return u[2];var g=u[3](this);if(this.cursor=s-u[0].length,g)return u[2]}}while(0<=(r=u[1]));return 0},this.replace_s=function(t,r,i){var s=i.length-(r-t);return this.current=this.current.slice(0,t)+i+this.current.slice(r),this.limit+=s,this.cursor>=r?this.cursor+=s:this.cursor>t&&(this.cursor=t),s},this.slice_check=function(){return!(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>this.current.length)},this.slice_from=function(t){var r=!1;return this.slice_check()&&(this.replace_s(this.bra,this.ket,t),r=!0),r},this.slice_del=function(){return this.slice_from("")},this.insert=function(t,r,i){r=this.replace_s(t,r,i);t<=this.bra&&(this.bra+=r),t<=this.ket&&(this.ket+=r)},this.slice_to=function(){var t="";return t=this.slice_check()?this.current.slice(this.bra,this.ket):t},this.assign_to=function(){return this.current.slice(0,this.limit)}}; +var EnglishStemmer=function(){var a=new BaseStemmer,c=[["arsen",-1,-1],["commun",-1,-1],["emerg",-1,-1],["gener",-1,-1],["later",-1,-1],["organ",-1,-1],["past",-1,-1],["univers",-1,-1]],o=[["'",-1,1],["'s'",0,1],["'s",-1,1]],u=[["ied",-1,2],["s",-1,3],["ies",1,2],["sses",1,1],["ss",1,-1],["us",1,-1]],t=[["succ",-1,1],["proc",-1,1],["exc",-1,1]],l=[["even",-1,2],["cann",-1,2],["inn",-1,2],["earr",-1,2],["herr",-1,2],["out",-1,2],["y",-1,1]],n=[["",-1,-1],["ed",0,2],["eed",1,1],["ing",0,3],["edly",0,2],["eedly",4,1],["ingly",0,2]],f=[["",-1,3],["bb",0,2],["dd",0,2],["ff",0,2],["gg",0,2],["bl",0,1],["mm",0,2],["nn",0,2],["pp",0,2],["rr",0,2],["at",0,1],["tt",0,2],["iz",0,1]],_=[["anci",-1,3],["enci",-1,2],["ogi",-1,14],["li",-1,16],["bli",3,12],["abli",4,4],["alli",3,8],["fulli",3,9],["lessli",3,15],["ousli",3,10],["entli",3,5],["aliti",-1,8],["biliti",-1,12],["iviti",-1,11],["tional",-1,1],["ational",14,7],["alism",-1,8],["ation",-1,7],["ization",17,6],["izer",-1,6],["ator",-1,7],["iveness",-1,11],["fulness",-1,9],["ousness",-1,10],["ogist",-1,13]],m=[["icate",-1,4],["ative",-1,6],["alize",-1,3],["iciti",-1,4],["ical",-1,4],["tional",-1,1],["ational",5,2],["ful",-1,5],["ness",-1,5]],b=[["ic",-1,1],["ance",-1,1],["ence",-1,1],["able",-1,1],["ible",-1,1],["ate",-1,1],["ive",-1,1],["ize",-1,1],["iti",-1,1],["al",-1,1],["ism",-1,1],["ion",-1,2],["er",-1,1],["ous",-1,1],["ant",-1,1],["ent",-1,1],["ment",15,1],["ement",16,1]],k=[["e",-1,1],["l",-1,2]],g=[["andes",-1,-1],["atlas",-1,-1],["bias",-1,-1],["cosmos",-1,-1],["early",-1,5],["gently",-1,3],["howe",-1,-1],["idly",-1,2],["news",-1,-1],["only",-1,6],["singly",-1,7],["skies",-1,1],["sky",-1,-1],["ugly",-1,4]],d=[17,64],v=[17,65,16,1],i=[1,17,65,208,1],w=[55,141,2],p=!1,y=0,h=0;function q(){var r=a.limit-a.cursor;return!!(a.out_grouping_b(i,89,121)&&a.in_grouping_b(v,97,121)&&a.out_grouping_b(v,97,121)||(a.cursor=a.limit-r,a.out_grouping_b(v,97,121)&&a.in_grouping_b(v,97,121)&&!(a.cursor>a.limit_backward))||(a.cursor=a.limit-r,a.eq_s_b("past")))}function z(){return h<=a.cursor}function Y(){return y<=a.cursor}this.stem=function(){var r=a.cursor;if(!(()=>{var r;if(a.bra=a.cursor,0!=(r=a.find_among(g))&&(a.ket=a.cursor,!(a.cursora.limit)a.cursor=i;else{a.cursor=e,a.cursor=r,(()=>{p=!1;var r=a.cursor;if(a.bra=a.cursor,!a.eq_s("'")||(a.ket=a.cursor,a.slice_del())){a.cursor=r;r=a.cursor;if(a.bra=a.cursor,a.eq_s("y")){if(a.ket=a.cursor,!a.slice_from("Y"))return;p=!0}a.cursor=r;for(r=a.cursor;;){var i=a.cursor;r:{for(;;){var e=a.cursor;if(a.in_grouping(v,97,121)&&(a.bra=a.cursor,a.eq_s("y"))){a.ket=a.cursor,a.cursor=e;break}if(a.cursor=e,a.cursor>=a.limit)break r;a.cursor++}if(!a.slice_from("Y"))return;p=!0;continue}a.cursor=i;break}a.cursor=r}})(),h=a.limit,y=a.limit;i=a.cursor;r:{var s=a.cursor;if(0==a.find_among(c)){if(a.cursor=s,!a.go_out_grouping(v,97,121))break r;if(a.cursor++,!a.go_in_grouping(v,97,121))break r;a.cursor++}h=a.cursor,a.go_out_grouping(v,97,121)&&(a.cursor++,a.go_in_grouping(v,97,121))&&(a.cursor++,y=a.cursor)}a.cursor=i,a.limit_backward=a.cursor,a.cursor=a.limit;var e=a.limit-a.cursor,r=((()=>{var r=a.limit-a.cursor;if(a.ket=a.cursor,0==a.find_among_b(o))a.cursor=a.limit-r;else if(a.bra=a.cursor,!a.slice_del())return;if(a.ket=a.cursor,0!=(r=a.find_among_b(u)))switch(a.bra=a.cursor,r){case 1:if(a.slice_from("ss"))break;return;case 2:r:{var i=a.limit-a.cursor,e=a.cursor-2;if(!(e{a.ket=a.cursor,o=a.find_among_b(n),a.bra=a.cursor;r:{var r=a.limit-a.cursor;i:{switch(o){case 1:var i=a.limit-a.cursor;e:{var e=a.limit-a.cursor;if(0==a.find_among_b(t)||a.cursor>a.limit_backward){if(a.cursor=a.limit-e,!z())break e;if(!a.slice_from("ee"))return}}a.cursor=a.limit-i;break;case 2:break i;case 3:if(0==(o=a.find_among_b(l)))break i;switch(o){case 1:var s=a.limit-a.cursor;if(!a.out_grouping_b(v,97,121))break i;if(a.cursor>a.limit_backward)break i;if(a.cursor=a.limit-s,a.bra=a.cursor,a.slice_from("ie"))break;return;case 2:if(a.cursor>a.limit_backward)break i}}break r}a.cursor=a.limit-r;var c=a.limit-a.cursor;if(!a.go_out_grouping_b(v,97,121))return;if(a.cursor--,a.cursor=a.limit-c,!a.slice_del())return;a.ket=a.cursor,a.bra=a.cursor;var o,c=a.limit-a.cursor;switch(o=a.find_among_b(f)){case 1:return a.slice_from("e");case 2:var u=a.limit-a.cursor;if(a.in_grouping_b(d,97,111)&&!(a.cursor>a.limit_backward))return;a.cursor=a.limit-u;break;case 3:return a.cursor!=h||(u=a.limit-a.cursor,q()&&(a.cursor=a.limit-u,a.slice_from("e")))}if(a.cursor=a.limit-c,a.ket=a.cursor,a.cursor<=a.limit_backward)return;if(a.cursor--,a.bra=a.cursor,!a.slice_del())return}})(),a.cursor=a.limit-r,a.limit-a.cursor),r=(a.ket=a.cursor,e=a.limit-a.cursor,(a.eq_s_b("y")||(a.cursor=a.limit-e,a.eq_s_b("Y")))&&(a.bra=a.cursor,a.out_grouping_b(v,97,121))&&a.cursor>a.limit_backward&&a.slice_from("i"),a.cursor=a.limit-i,a.limit-a.cursor),e=((()=>{var r;if(a.ket=a.cursor,0!=(r=a.find_among_b(_))&&(a.bra=a.cursor,z()))switch(r){case 1:if(a.slice_from("tion"))break;return;case 2:if(a.slice_from("ence"))break;return;case 3:if(a.slice_from("ance"))break;return;case 4:if(a.slice_from("able"))break;return;case 5:if(a.slice_from("ent"))break;return;case 6:if(a.slice_from("ize"))break;return;case 7:if(a.slice_from("ate"))break;return;case 8:if(a.slice_from("al"))break;return;case 9:if(a.slice_from("ful"))break;return;case 10:if(a.slice_from("ous"))break;return;case 11:if(a.slice_from("ive"))break;return;case 12:if(a.slice_from("ble"))break;return;case 13:if(a.slice_from("og"))break;return;case 14:if(!a.eq_s_b("l"))return;if(a.slice_from("og"))break;return;case 15:if(a.slice_from("less"))break;return;case 16:if(!a.in_grouping_b(w,99,116))return;if(a.slice_del())break}})(),a.cursor=a.limit-r,a.limit-a.cursor),i=((()=>{var r;if(a.ket=a.cursor,0!=(r=a.find_among_b(m))&&(a.bra=a.cursor,z()))switch(r){case 1:if(a.slice_from("tion"))break;return;case 2:if(a.slice_from("ate"))break;return;case 3:if(a.slice_from("al"))break;return;case 4:if(a.slice_from("ic"))break;return;case 5:if(a.slice_del())break;return;case 6:if(!Y())return;if(a.slice_del())break}})(),a.cursor=a.limit-e,a.limit-a.cursor),r=((()=>{var r;if(a.ket=a.cursor,0!=(r=a.find_among_b(b))&&(a.bra=a.cursor,Y()))switch(r){case 1:if(a.slice_del())break;return;case 2:var i=a.limit-a.cursor;if(!a.eq_s_b("s")&&(a.cursor=a.limit-i,!a.eq_s_b("t")))return;if(a.slice_del())break}})(),a.cursor=a.limit-i,a.limit-a.cursor),e=((()=>{var r;if(a.ket=a.cursor,0!=(r=a.find_among_b(k)))switch(a.bra=a.cursor,r){case 1:if(!Y()){if(!z())return;var i=a.limit-a.cursor;if(q())return;a.cursor=a.limit-i}if(a.slice_del())break;return;case 2:if(!Y())return;if(!a.eq_s_b("l"))return;if(a.slice_del())break}})(),a.cursor=a.limit-r,a.cursor=a.limit_backward,a.cursor);(()=>{if(p)for(;;){var r=a.cursor;r:{for(;;){var i=a.cursor;if(a.bra=a.cursor,a.eq_s("Y")){a.ket=a.cursor,a.cursor=i;break}if(a.cursor=i,a.cursor>=a.limit)break r;a.cursor++}if(a.slice_from("y"))continue;return}a.cursor=r;break}})(),a.cursor=e}}return!0},this.stemWord=function(r){return a.setCurrent(r),this.stem(),a.getCurrent()}}; +window.Stemmer = EnglishStemmer; diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 00000000..d96755fd Binary files /dev/null and b/_static/minus.png differ diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 00000000..7107cec9 Binary files /dev/null and b/_static/plus.png differ diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 00000000..5f2b0a25 --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,75 @@ +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeffcc; } +.highlight .c { color: #408090; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #F00 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666 } /* Operator */ +.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #FFF0F0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #F00 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #333 } /* Generic.Output */ +.highlight .gp { color: #C65D09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #04D } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070A0 } /* Literal.String */ +.highlight .na { color: #4070A0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0E84B5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60ADD5 } /* Name.Constant */ +.highlight .nd { color: #555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #D55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287E } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0E84B5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #BB60D5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #BBB } /* Text.Whitespace */ +.highlight .mb { color: #208050 } /* Literal.Number.Bin */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sa { color: #4070A0 } /* Literal.String.Affix */ +.highlight .sb { color: #4070A0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070A0 } /* Literal.String.Char */ +.highlight .dl { color: #4070A0 } /* Literal.String.Delimiter */ +.highlight .sd { color: #4070A0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070A0 } /* Literal.String.Double */ +.highlight .se { color: #4070A0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070A0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70A0D0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #C65D09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070A0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #06287E } /* Name.Function.Magic */ +.highlight .vc { color: #BB60D5 } /* Name.Variable.Class */ +.highlight .vg { color: #BB60D5 } /* Name.Variable.Global */ +.highlight .vi { color: #BB60D5 } /* Name.Variable.Instance */ +.highlight .vm { color: #BB60D5 } /* Name.Variable.Magic */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/searchtools.js b/_static/searchtools.js new file mode 100644 index 00000000..e29b1c75 --- /dev/null +++ b/_static/searchtools.js @@ -0,0 +1,693 @@ +/* + * Sphinx JavaScript utilities for the full-text search. + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename, kind] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +// Global search result kind enum, used by themes to style search results. +// prettier-ignore +class SearchResultKind { + static get index() { return "index"; } + static get object() { return "object"; } + static get text() { return "text"; } + static get title() { return "title"; } +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _escapeHTML = (text) => { + return text + .replaceAll("&", "&") + .replaceAll("<", "<") + .replaceAll(">", ">") + .replaceAll('"', """) + .replaceAll("'", "'"); +}; + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename, kind] = item; + + let listItem = document.createElement("li"); + // Add a class representing the item's type: + // can be used by a theme's CSS selector for styling + // See SearchResultKind for the class names. + listItem.classList.add(`kind-${kind}`); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = _escapeHTML(title); + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + ` (${_escapeHTML(descr)})`; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) + // SPHINX_HIGHLIGHT_ENABLED is set in sphinx_highlight.js + highlightTerms.forEach((term) => + _highlightText(listItem, term, "highlighted"), + ); + } else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms, anchor), + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) + // SPHINX_HIGHLIGHT_ENABLED is set in sphinx_highlight.js + highlightTerms.forEach((term) => + _highlightText(listItem, term, "highlighted"), + ); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.", + ); + else + Search.status.innerText = Documentation.ngettext( + "Search finished, found one page matching the search query.", + "Search finished, found ${resultCount} pages matching the search query.", + resultCount, + ).replace("${resultCount}", resultCount); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5, + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename, kind]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => + query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter((term) => term); // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString( + htmlString, + "text/html", + ); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { + el.remove(); + }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector( + `[role="main"] ${anchor}`, + ); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.`, + ); + } + + // if anchor not specified or not found, fall back to main content + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent) return docContent.textContent; + + console.warn( + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template.", + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.setAttribute("role", "list"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + _parseQuery: (query) => { + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords set is from language_data.js + if (stopwords.has(queryTermLower) || queryTerm.match(/^\d+$/)) return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { + // SPHINX_HIGHLIGHT_ENABLED is set in sphinx_highlight.js + localStorage.setItem( + "sphinx_highlight_terms", + [...highlightTerms].join(" "), + ); + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: ( + query, + searchTerms, + excludedTerms, + highlightTerms, + objectTerms, + ) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename, kind]. + const normalResults = []; + const nonMainIndexResults = []; + + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if ( + title.toLowerCase().trim().includes(queryLower) + && queryLower.length >= title.length / 2 + ) { + for (const [file, id] of foundTitles) { + const score = Math.round( + (Scorer.title * queryLower.length) / title.length, + ); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score + boost, + filenames[file], + SearchResultKind.title, + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && queryLower.length >= entry.length / 2) { + for (const [file, id, isMain] of foundEntries) { + const score = Math.round((100 * queryLower.length) / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + SearchResultKind.index, + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + + // lookup as object + objectTerms.forEach((term) => + normalResults.push(...Search.performObjectSearch(term, objectTerms)), + ); + + // lookup as search terms in fulltext + normalResults.push( + ...Search.performTermsSearch(searchTerms, excludedTerms), + ); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result + .slice(0, 4) + .concat([result[5]]) + .map((v) => String(v)) + .join(","); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + return results.reverse(); + }, + + query: (query) => { + const [ + searchQuery, + searchTerms, + excludedTerms, + highlightTerms, + objectTerms, + ] = Search._parseQuery(query); + const results = Search._performSearch( + searchQuery, + searchTerms, + excludedTerms, + highlightTerms, + objectTerms, + ); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4]; + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + SearchResultKind.object, + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => objectSearchCallback(prefix, array)), + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + // find documents, if any, containing the query word in their text/title term indices + // use Object.hasOwnProperty to avoid mismatching against prototype properties + const arr = [ + { + files: terms.hasOwnProperty(word) ? terms[word] : undefined, + score: Scorer.term, + }, + { + files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, + score: Scorer.title, + }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, new Map()); + const fileScores = scoreMap.get(file); + fileScores.set(word, record.score); + }); + }); + + // create the mapping + files.forEach((file) => { + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2, + ).length; + if ( + wordList.length !== searchTerms.size + && wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file + || titleTerms[term] === file + || (terms[term] || []).includes(file) + || (titleTerms[term] || []).includes(file), + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w))); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + SearchResultKind.text, + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = + top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/_static/sphinx_highlight.js b/_static/sphinx_highlight.js new file mode 100644 index 00000000..a74e103a --- /dev/null +++ b/_static/sphinx_highlight.js @@ -0,0 +1,159 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true; + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 + && !parent.classList.contains(className) + && !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore(span, parent.insertBefore(rest, node.nextSibling)); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect", + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target), + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms"); + // Update history only if '?highlight' is present; otherwise it + // clears text fragments (not set in window.location by the browser) + if (url.searchParams.has("highlight")) { + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + } + + // get individual terms from highlight string + const terms = highlight + .toLowerCase() + .split(/\s+/) + .filter((x) => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '", + ), + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms"); + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) + return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) + return; + if ( + DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + && event.key === "Escape" + ) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/api/diffpy.structure.apps.html b/api/diffpy.structure.apps.html new file mode 100644 index 00000000..4d6f4412 --- /dev/null +++ b/api/diffpy.structure.apps.html @@ -0,0 +1,514 @@ + + + + + + + + + diffpy.structure.apps package — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.apps package

+

Script applications that use the diffpy.structure package.

+
+

Submodules

+
+

diffpy.structure.apps.transtru module

+

Translate structure file to different format.

+

Usage: transtru INFMT..OUTFMT strufile

+

Translates structure file strufile from INFMT to OUTFMT format and prints it +to the screen. Use “-” as strufile to read from standard input. To save the +translated file, use

+
+

transtru INFMT..OUTFMT strufile > strufile.out

+
+
+
Supported input and output structure formats are
    +
  • INFMT: inputFormats

  • +
  • OUTFMT: outputFormats

  • +
+
+
Options:
+
-h, --help
+

Display this message.

+
+
-V, --version
+

Show script version.

+
+
+
+
+
+
+diffpy.structure.apps.transtru.main()[source]
+
+ +
+
+diffpy.structure.apps.transtru.usage(style=None)[source]
+

Show usage info, for style=="brief" show only first 2 +lines.

+
+ +
+
+diffpy.structure.apps.transtru.version()[source]
+
+ +
+
+

diffpy.structure.apps.anyeye module

+

Anyeye view structure file in atomeye.

+

Usage: anyeye [options] strufile

+

Anyeye understands more Structure formats than atomeye. It converts strufile +to a temporary XCFG file which is opened in atomeye. See supported file formats: +inputFormats

+
+
Options:
+
-f, --formula
+

Override chemical formula in strufile. The formula defines +elements in the same order as in strufile, e.g., Na4Cl4.

+
+
-w, --watch
+

Watch input file for changes.

+
+
--viewer=VIEWER
+

The structure viewer program, by default “atomeye”. +The program will be executed as “VIEWER structurefile”.

+
+
--formats=FORMATS
+

Comma-separated list of file formats that are understood +by the VIEWER, by default "xcfg,pdb". Files of other +formats will be converted to the first listed format.

+
+
-h, --help
+

Display this message and exit.

+
+
-V, --version
+

Show script version and exit.

+
+
+
+
+
+
+diffpy.structure.apps.anyeye.cleanUp(pd)
+
+ +
+
+diffpy.structure.apps.anyeye.clean_up(pd)[source]
+
+ +
+
+diffpy.structure.apps.anyeye.convertStructureFile(pd)
+
+ +
+
+diffpy.structure.apps.anyeye.convert_structure_file(pd)[source]
+
+ +
+
+diffpy.structure.apps.anyeye.die(exit_status=0, pd={})[source]
+
+ +
+
+diffpy.structure.apps.anyeye.loadStructureFile(filename, format='auto')
+

Load structure from specified file.

+
+
Parameters:
+
    +
  • filename (str) – Path to the structure file.

  • +
  • format (str, Optional) – File format, by default “auto”.

  • +
+
+
Returns:
+

A tuple of (Structure, fileformat).

+
+
Return type:
+

tuple

+
+
+
+ +
+
+diffpy.structure.apps.anyeye.load_structure_file(filename, format='auto')[source]
+

Load structure from specified file.

+
+
Parameters:
+
    +
  • filename (str) – Path to the structure file.

  • +
  • format (str, Optional) – File format, by default “auto”.

  • +
+
+
Returns:
+

A tuple of (Structure, fileformat).

+
+
Return type:
+

tuple

+
+
+
+ +
+
+diffpy.structure.apps.anyeye.main()[source]
+
+ +
+
+diffpy.structure.apps.anyeye.parseFormula(formula)
+

Parse chemical formula and return a list of elements.

+
+ +
+
+diffpy.structure.apps.anyeye.parse_formula(formula)[source]
+

Parse chemical formula and return a list of elements.

+
+ +
+
+diffpy.structure.apps.anyeye.signalHandler(signum, stackframe)
+
+ +
+
+diffpy.structure.apps.anyeye.signal_handler(signum, stackframe)[source]
+
+ +
+
+diffpy.structure.apps.anyeye.usage(style=None)[source]
+

Show usage info, for style=="brief" show only first 2 +lines.

+
+ +
+
+diffpy.structure.apps.anyeye.version()[source]
+
+ +
+
+diffpy.structure.apps.anyeye.watchStructureFile(pd)
+
+ +
+
+diffpy.structure.apps.anyeye.watch_structure_file(pd)[source]
+
+ +
+
+

diffpy.structure.apps.vesta_viewer module

+

View structure file in VESTA.

+

Usage: vestaview [options] strufile

+

Vestaview understands more Structure formats than VESTA. It converts +strufile to a temporary VESTA or CIF file which is opened in VESTA. +See supported file formats: inputFormats

+
+
Options:
+
-f, --formula
+

Override chemical formula in strufile. The formula defines +elements in the same order as in strufile, e.g., Na4Cl4.

+
+
-w, --watch
+

Watch input file for changes.

+
+
--viewer=VIEWER
+

The structure viewer program, by default “vesta”. +The program will be executed as “VIEWER structurefile”.

+
+
--formats=FORMATS
+

Comma-separated list of file formats that are understood +by the VIEWER, by default "vesta,cif". Files of other +formats will be converted to the first listed format.

+
+
-h, --help
+

Display this message and exit.

+
+
-V, --version
+

Show script version and exit.

+
+
+
+
+

Notes

+

VESTA is the actively maintained successor to AtomEye. Unlike AtomEye, +VESTA natively reads CIF, its own .vesta format, and several other +crystallographic file types, so format conversion is only required for +formats not in that set.

+

AtomEye XCFG format is no longer a default target format but the XCFG +parser (P_xcfg) remains available in diffpy.structure.parsers +for backward compatibility.

+
+
+diffpy.structure.apps.vesta_viewer.clean_up(pd)[source]
+

Remove temporary file and directory created during conversion.

+
+
Parameters:
+

pd (dict) – The parameter dictionary that may contain "tmpfile" and +"tmpdir" entries to be removed.

+
+
+
+ +
+
+diffpy.structure.apps.vesta_viewer.convert_structure_file(pd)[source]
+

Convert strufile to a temporary file understood by the +viewer.

+

On the first call, a temporary directory is created and stored in +pd. Subsequent calls in watch mode reuse the directory.

+

The VESTA viewer natively reads .vesta and .cif files, so if +the source is already in one of the formats listed in +pd["formats"] and no formula override is requested, the file is +copied unchanged. Otherwise the structure is loaded and re-written in +the first format listed in pd["formats"].

+
+
Parameters:
+

pd (dict) – The parameter dictionary containing at minimum "strufile" +and "formats" keys. It is modified in place to add +"tmpdir" and "tmpfile" on the first call.

+
+
+
+ +
+
+diffpy.structure.apps.vesta_viewer.die(exit_status=0, pd=None)[source]
+

Clean up temporary files and exit with exit_status.

+
+
Parameters:
+
    +
  • exit_status (int, optional) – The exit code passed to sys.exit(), by default 0.

  • +
  • pd (dict, optional) – The parameter dictionary forwarded to clean_up().

  • +
+
+
+
+ +
+
+diffpy.structure.apps.vesta_viewer.load_structure_file(filename, format='auto')[source]
+

Load structure from the specified file.

+
+
Parameters:
+
    +
  • filename (str or Path) – The path to the structure file.

  • +
  • format (str, optional) – The file format, by default "auto".

  • +
+
+
Returns:
+

The loaded (Structure, fileformat) pair.

+
+
Return type:
+

tuple

+
+
+
+ +
+
+diffpy.structure.apps.vesta_viewer.main()[source]
+

Entry point for the vestaview command-line tool.

+
+ +
+
+diffpy.structure.apps.vesta_viewer.parse_formula(formula)[source]
+

Parse chemical formula and return a list of elements.

+
+
Parameters:
+

formula (str) – The chemical formula string such as "Na4Cl4" or "H2O".

+
+
Returns:
+

The ordered list of element symbols with repetition matching the +formula.

+
+
Return type:
+

list of str

+
+
Raises:
+

RuntimeError – Raised when formula does not start with an uppercase letter + or contains a non-integer count.

+
+
+
+ +
+
+diffpy.structure.apps.vesta_viewer.signal_handler(signum, stackframe)[source]
+

Handle OS signals by reverting to the default handler and +exiting.

+

On SIGCHLD the child exit status is harvested via +os.wait(); on all other signals die() is called with +exit status 1.

+
+
Parameters:
+
    +
  • signum (int) – The signal number.

  • +
  • stackframe (frame) – The current stack frame. Unused.

  • +
+
+
+
+ +
+
+diffpy.structure.apps.vesta_viewer.usage(style=None)[source]
+

Show usage info. for style=="brief" show only first 2 lines.

+
+
Parameters:
+

style (str, optional) – The usage display style.

+
+
+
+ +
+
+diffpy.structure.apps.vesta_viewer.version()[source]
+

Print the script version.

+
+ +
+
+diffpy.structure.apps.vesta_viewer.watch_structure_file(pd)[source]
+

Watch strufile for modifications and reconvert when changed.

+

Polls the modification timestamps of pd["strufile"] and +pd["tmpfile"] once per second. When the source is newer, the +file is reconverted via convert_structure_file().

+
+
Parameters:
+

pd (dict) – The parameter dictionary as used by +convert_structure_file().

+
+
+
+ +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/api/diffpy.structure.expansion.html b/api/diffpy.structure.expansion.html new file mode 100644 index 00000000..9501a0f9 --- /dev/null +++ b/api/diffpy.structure.expansion.html @@ -0,0 +1,273 @@ + + + + + + + + + diffpy.structure.expansion package — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.expansion package

+

Methods and classes for manipulating Structure instances.

+
+
Package content:
    +
  • supercell – create a supercell from an existing Structure.

  • +
+
+
+
+

Submodules

+
+

diffpy.structure.expansion.shapeutils module

+
+
+diffpy.structure.expansion.shapeutils.findCenter(S)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.find_center instead.

+
+ +
+
+diffpy.structure.expansion.shapeutils.findCenter_deprecation_msg = 'diffpy.structure'
+

Utilities for making shapes.

+
+ +
+
+diffpy.structure.expansion.shapeutils.find_center(S)[source]
+

Find the approximate center Atom of a Structure.

+

The center of the Structure is the Atom closest to (0.5, 0.5, 0.5).

+
+
Parameters:
+

S (Structure) – A Structure instance.

+
+
Returns:
+

The index of the center Atom.

+
+
Return type:
+

int

+
+
+
+ +
+
+

diffpy.structure.expansion.makeellipsoid module

+

Make a spheroid nanoparticle from a template structure.

+
+
+diffpy.structure.expansion.makeellipsoid.makeEllipsoid(S, a, b=None, c=None)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.make_ellipsoid instead.

+
+ +
+
+diffpy.structure.expansion.makeellipsoid.makeSphere(S, radius)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.make_sphere instead.

+
+ +
+
+diffpy.structure.expansion.makeellipsoid.make_ellipsoid(S, a, b=None, c=None)[source]
+

Cut a Structure out of another one.

+
+
Parameters:
+
    +
  • S (Structure) – A Structure instance.

  • +
  • a (float) – Primary equatorial radius (along x-axis).

  • +
  • b (float, Optional) – Secondary equatorial radius (along y-axis). If b is None +(default), then it is set equal to a.

  • +
  • c (float, Optional) – Polar radius (along z-axis). If c is None (default), then it is +set equal to a.

  • +
+
+
Returns:
+

A new Structure instance.

+
+
Return type:
+

Structure

+
+
+
+ +
+
+diffpy.structure.expansion.makeellipsoid.make_sphere(S, radius)[source]
+

Create a spherical nanoparticle.

+
+
Parameters:
+
    +
  • S (Structure) – A Structure instance.

  • +
  • radius (float) – Primary equatorial radius (along x-axis).

  • +
+
+
Returns:
+

A new Structure instance.

+
+
Return type:
+

Structure

+
+
+
+ +
+
+

diffpy.structure.expansion.supercell_mod module

+

This module contains functions for simple Structure +manipulation.

+
+
+diffpy.structure.expansion.supercell_mod.supercell(S, mno)[source]
+

Perform supercell expansion for a Structure.

+

New lattice parameters are multiplied and fractional coordinates +divided by corresponding multiplier. New Atoms are grouped with +their source in the original cell.

+
+
Parameters:
+
    +
  • S (Structure) – An instance of Structure from diffpy.structure.

  • +
  • mno (array_like) – Sequence of 3 integers for cell multipliers along +the a, b and c axes.

  • +
+
+
Returns:
+

A new Structure instance representing the expanded supercell.

+
+
Return type:
+

Structure

+
+
Raises:
+
    +
  • TypeErrorS is not a Structure instance.

  • +
  • ValueError – Invalid mno argument.

  • +
+
+
+
+ +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/api/diffpy.structure.html b/api/diffpy.structure.html new file mode 100644 index 00000000..55964f8c --- /dev/null +++ b/api/diffpy.structure.html @@ -0,0 +1,3533 @@ + + + + + + + + + diffpy.structure package — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure package

+

Crystal structure container and parsers for structure formats.

+
+
Classes related to the structure of materials:
    +
  • Atom

  • +
  • Lattice

  • +
  • Structure

  • +
  • PDFFitStructure

  • +
+
+
Other classes:
    +
  • SpaceGroup

  • +
  • SymOp

  • +
  • ExpandAsymmetricUnit

  • +
  • GeneratorSite

  • +
  • SymmetryConstraints

  • +
+
+
Exceptions:
    +
  • StructureFormatError

  • +
  • LatticeError

  • +
  • SymmetryError

  • +
+
+
+
+
+class diffpy.structure.DeprecatedStructureModule[source]
+

Bases: object

+

Proxy for backward compatibility of diffpy.Structure.

+
+ +
+
+diffpy.structure.loadStructure(filename, fmt='auto', **kw)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.load_structure instead.

+
+ +
+
+diffpy.structure.load_structure(filename, fmt='auto', **kw)[source]
+

Load new structure object from the specified file.

+
+
Parameters:
+
    +
  • filename (str) – Path to the file to be loaded.

  • +
  • fmt (str, Optional) – Format of the structure file such as ‘cif’ or ‘xyz’. Must be +one of the formats listed by the parsers.inputFormats function. +When ‘auto’, all supported formats are tried in a sequence.

  • +
  • kw (Optional) – Extra keyword arguments that are passed to parsers.getParser +function. These configure the dedicated Parser object that +is used to read content in filename.

  • +
+
+
Returns:
+

stru – The new Structure object loaded from the specified file. +Return a more specific PDFFitStructure type for ‘pdffit’ +and ‘discus’ formats.

+
+
Return type:
+

Structure, PDFFitStructure

+
+
+
+ +
+

Subpackages

+ +
+
+

Submodules

+
+

diffpy.structure.structure_app module

+
+
+diffpy.structure.structure_app.main()[source]
+
+ +
+
+

diffpy.structure.spacegroups module

+

Space group classes and definitions from mmLib and sgtbx.

+
+
+diffpy.structure.spacegroups.SpaceGroupList
+

List of all spacegroup definitions.

+
+
Type:
+

list

+
+
+
+ +
+
+diffpy.structure.spacegroups.FindSpaceGroup(symops, shuffle=False)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.find_space_group instead.

+
+ +
+
+diffpy.structure.spacegroups.GetSpaceGroup(sgid)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.get_space_group instead.

+
+ +
+
+diffpy.structure.spacegroups.IsSpaceGroupIdentifier(sgid)
+

Check if identifier can be used as an argument to +GetSpaceGroup.

+
+
Return type:
+

bool

+
+
+
+ +
+
+diffpy.structure.spacegroups.find_space_group(symops, shuffle=False)[source]
+

Lookup SpaceGroup from a given list of symmetry operations.

+
+
Parameters:
+
    +
  • symops (list) – The list of SymOp objects for which to find SpaceGroup.

  • +
  • shuffle (bool, Optional) – Flag for allowing different order of symops in the returned +SpaceGroup. The default is False.

  • +
+
+
Returns:
+

The SpaceGroup object with equivalent list of symmetry +operations. Return predefined SpaceGroup instance when +symmetry operations have the same order or when the +shuffle flag is set.

+
+
Return type:
+

SpaceGroup

+
+
Raises:
+

ValueError – When symops do not match any known SpaceGroup.

+
+
+
+ +
+
+diffpy.structure.spacegroups.get_space_group(sgid)[source]
+

Returns the SpaceGroup instance for the given identifier.

+
+
Parameters:
+

sgid (str, int) – space group symbol, either short_name or pdb_name, +whatever it means in mmlib. Can be also an integer.

+
+
Returns:
+

The SpaceGroup object for the given identifier.

+
+
Return type:
+

SpaceGroup

+
+
Raises:
+

ValueError – When the identifier is not found.

+
+
+
+ +
+
+diffpy.structure.spacegroups.is_space_group_identifier(sgid)[source]
+

Check if identifier can be used as an argument to +GetSpaceGroup.

+
+
Return type:
+

bool

+
+
+
+ +
+
+

diffpy.structure._legacy_importer module

+

Support import of old camel-case module names with +DeprecationWarning.

+

The imported camel-case modules are aliases for the current module +instances. Their __name__ attributes are thus all in lower-case.

+
+

Note

+

this module must be only imported from diffpy.Structure.

+
+
+

Warning

+

This module is deprecated and will be removed in the future.

+
+
+
+class diffpy.structure._legacy_importer.FindRenamedStructureModule[source]
+

Bases: MetaPathFinder

+
+
+find_spec(fullname, path=None, target=None)[source]
+
+ +
+
+prefix = 'diffpy.Structure.'
+
+ +
+ +
+
+class diffpy.structure._legacy_importer.MapRenamedStructureModule[source]
+

Bases: Loader

+

Loader for old camel-case module names.

+

Import the current module and alias it under the old name.

+
+
+create_module(spec)[source]
+

Return a module to initialize and into which to load.

+

This method should raise ImportError if anything prevents it +from creating a new module. It may return None to indicate +that the spec should create the new module.

+
+ +
+
+exec_module(module)[source]
+
+ +
+ +
+
+

diffpy.structure.structureerrors module

+

Exceptions used in Structure package.

+
+
+exception diffpy.structure.structureerrors.LatticeError[source]
+

Bases: Exception

+

Exception for impossible lattice parameters.

+
+ +
+
+exception diffpy.structure.structureerrors.StructureFormatError[source]
+

Bases: Exception

+

Exception for failed IO from Structure file.

+
+ +
+
+exception diffpy.structure.structureerrors.SymmetryError[source]
+

Bases: Exception

+

Exception raised for invalid symmetry operations.

+
+ +
+
+

diffpy.structure.spacegroupmod module

+

Symmetry operations as functions on vectors or arrays.

+
+
+class diffpy.structure.spacegroupmod.SpaceGroup(number=None, num_sym_equiv=None, num_primitive_sym_equiv=None, short_name=None, point_group_name=None, crystal_system=None, pdb_name=None, symop_list=None)[source]
+

Bases: object

+

Definition and basic operations for a specific space group.

+

Provide standard names and all symmetry operations contained in +one space group.

+
+
Parameters:
+
    +
  • number (int) – The space group number.

  • +
  • num_sym_equiv (int) – The number of symmetry equivalent sites for a general position.

  • +
  • num_primitive_sym_equiv (int) – The number of symmetry equivalent sites in a primitive unit cell.

  • +
  • short_name (str) – The short Hermann-Mauguin symbol of the space group.

  • +
  • point_group_name (str) – The point group of this space group.

  • +
  • crystal_system (str) – The crystal system of this space group.

  • +
  • pdb_name (str) – The full Hermann-Mauguin symbol of the space group.

  • +
  • symop_list (list of SymOp) – The symmetry operations contained in this space group.

  • +
+
+
+
+
+number
+

A unique space group number. This may be incremented by +several thousands to facilitate unique values for multiple +settings of the same space group. Use number % 1000 +to get the standard space group number from International +Tables.

+
+
Type:
+

int

+
+
+
+ +
+
+num_sym_equiv
+

The number of symmetry equivalent sites for a general position.

+
+
Type:
+

int

+
+
+
+ +
+
+num_primitive_sym_equiv
+

The number of symmetry equivalent sites in a primitive unit cell.

+
+
Type:
+

int

+
+
+
+ +
+
+short_name
+

The short Hermann-Mauguin symbol of the space group.

+
+
Type:
+

str

+
+
+
+ +
+
+point_group_name
+

The point group to which this space group belongs to.

+
+
Type:
+

str

+
+
+
+ +
+
+crystal_system
+

The crystal system of this space group. The possible values are +"TRICLINIC", "MONOCLINIC", "ORTHORHOMBIC", "TETRAGONAL", +"TRIGONAL" "HEXAGONAL", "CUBIC".

+
+
Type:
+

str

+
+
+
+ +
+
+pdb_name
+

The full Hermann-Mauguin symbol of the space group.

+
+
Type:
+

str

+
+
+
+ +
+
+symop_list
+

A list of SymOp objects for all symmetry operations +in this space group.

+
+
Type:
+

list of SymOp

+
+
+
+ +
+
+check_group_name(name)[source]
+

Check if given name matches this space group.

+
+
Parameters:
+

name (str or int) – The space group identifier, a string name or number.

+
+
Returns:
+

True if the specified name matches one of the recognized +names of this space group or if it equals its number. +Return False otherwise.

+
+
Return type:
+

bool

+
+
+
+ +
+
+iter_equivalent_positions(vec)[source]
+

Generate symmetry equivalent positions for the specified +position.

+

The initial position must be in fractional coordinates and so +are the symmetry equivalent positions yielded by iteration. +This generates num_sym_equiv positions regardless of initial +coordinates being a special symmetry position or not.

+
+
Parameters:
+

vec (numpy.ndarray) – The initial position in fractional coordinates.

+
+
Yields:
+

numpy.ndarray – The symmetry equivalent positions in fractional coordinates. +The positions may be duplicate or outside of the 0 <= x < 1 +unit cell bounds.

+
+
+
+ +
+
+iter_symops()[source]
+

Iterate over all symmetry operations in the space group.

+
+
Yields:
+

SymOp – Generate all symmetry operations for this space group.

+
+
+
+ +
+ +
+
+class diffpy.structure.spacegroupmod.SymOp(R, t)[source]
+

Bases: object

+

The transformation of coordinates to a symmetry-related position.

+

The SymOp operation involves rotation and translation in cell coordinates.

+
+
Parameters:
+
    +
  • R (numpy.ndarray) – The 3x3 matrix of rotation for this symmetry operation.

  • +
  • t (numpy.ndarray) – The vector of translation in this symmetry operation.

  • +
+
+
+
+
+R
+

The 3x3 matrix of rotation pertaining to unit cell coordinates. +This may be identity, simple rotation, improper rotation, mirror +or inversion. The determinant of R is either +1 or -1.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+t
+

The translation of cell coordinates applied after rotation R.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+is_identity()[source]
+

Check if this SymOp is an identity operation.

+
+
Returns:
+

True if this is an identity operation within a small round-off. +Return False otherwise.

+
+
Return type:
+

bool

+
+
+
+ +
+ +
+
+

diffpy.structure.utils module

+

Small shared functions.

+
+
+diffpy.structure.utils.atomBareSymbol(smbl)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.atom_bare_symbol instead.

+
+ +
+
+diffpy.structure.utils.atom_bare_symbol(smbl)[source]
+

Remove atom type string stripped of isotope and ion charge +symbols.

+

This function removes any blank, isotope numbers (0-9), leading hyphens (-), and ion charge +symbols (1-9)(+-) from the given atom type string, returning only the bare element symbol.

+
+
Parameters:
+

smbl (str) – Atom type string that may include isotope numbers, ion charges, or hyphens.

+
+
Returns:
+

The bare element symbol.

+
+
Return type:
+

str

+
+
+

Examples

+
>>> atom_bare_symbol("Cl-")
+'Cl'
+>>> atom_bare_symbol("Ca2+")
+'Ca'
+>>> atom_bare_symbol("12-C")
+'C'
+
+
+
+ +
+
+diffpy.structure.utils.isfloat(s)[source]
+

True if argument can be converted to float.

+
+ +
+
+diffpy.structure.utils.isiterable(obj)[source]
+

True if argument is iterable.

+
+ +
+
+

diffpy.structure.lattice module

+

Class Lattice stores properties and provides simple operations in +lattice coordinate system.

+
+
+diffpy.structure.lattice.cartesian
+

Constant instance of Lattice, default Cartesian system.

+
+
Type:
+

Lattice

+
+
+
+ +
+
+class diffpy.structure.lattice.Lattice(a=None, b=None, c=None, alpha=None, beta=None, gamma=None, baserot=None, base=None)[source]
+

Bases: object

+

General coordinate system and associated operations.

+
+
Parameters:
+
    +
  • a (float or Lattice, Optional) – The cell length a. When present, other cell parameters +must be also specified. When of the Lattice type, create +a duplicate Lattice.

  • +
  • b (float) – The cell length b.

  • +
  • c (float) – The cell length c.

  • +
  • alpha (float) – The angle between the b and c axes in degrees.

  • +
  • beta (float) – The angle between the b and c axes in degrees.

  • +
  • gamma (float) – The angle between the a and b axes in degrees.

  • +
  • baserot (array_like, Optional) – The 3x3 rotation matrix of the base vectors with respect +to their standard setting.

  • +
  • base (array_like, Optional) – The 3x3 array of row base vectors. This must be the +only argument when present.

  • +
+
+
+
+
+metrics
+

The metrics tensor.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+base
+

The 3x3 matrix of row base vectors in Cartesian coordinates, +which may be rotated, i.e., base = stdbase @ baserot.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+stdbase
+

The 3x3 matrix of row base vectors in standard orientation.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+baserot
+

The rotation matrix for the base.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+recbase
+

The inverse of the base matrix, where the columns give +reciprocal vectors in Cartesian coordinates.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+normbase
+

The base vectors scaled by magnitudes of reciprocal cell lengths.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+recnormbase
+

The inverse of the normbase matrix.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+isotropicunit
+

The 3x3 tensor for a unit isotropic displacement parameters in this +coordinate system. This is an identity matrix when this Lattice +is orthonormal.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+

Note

+

The array attributes are read-only. They get updated by changing +some lattice parameters or by calling the setLatPar() or +setLatBase() methods.

+
+

Examples

+

Create a Cartesian coordinate system:

+
>>> Lattice()
+
+
+

Create coordinate system with the cell lengths a, b, c +and cell angles alpha, beta, gamma in degrees:

+
>>> Lattice(a, b, c, alpha, beta, gamma)
+
+
+

Create a duplicate of an existing Lattice lat:

+
>>> Lattice(lat)
+
+
+

Create coordinate system with the base vectors given by rows +of the abc matrix:

+
>>> Lattice(base=abc)
+
+
+
+
+property a
+

The unit cell length a.

+
+ +
+
+abcABG()
+

‘diffpy.structure.Lattice.abcABG’ is deprecated and will be +removed in version 4.0.0.

+

Please use ‘diffpy.structure.Lattice.cell_parms’ instead.

+
+ +
+
+property alpha
+

The cell angle alpha in degrees.

+
+ +
+
+property alphar
+

The reciprocal cell angle alpha in degrees.

+
+ +
+
+angle(u, v)[source]
+

Calculate angle between 2 lattice vectors in degrees.

+
+
Parameters:
+
    +
  • u (array_like) – The first lattice vector.

  • +
  • v (array_like) – The second lattice vector.

  • +
+
+
Returns:
+

The angle between lattice vectors u and v in degrees.

+
+
Return type:
+

float

+
+
+
+ +
+
+property ar
+

The cell length a of the reciprocal lattice.

+
+ +
+
+property b
+

The unit cell length b.

+
+ +
+
+property beta
+

The cell angle beta in degrees.

+
+ +
+
+property betar
+

The reciprocal cell angle beta in degrees

+
+ +
+
+property br
+

The cell length b of the reciprocal lattice.

+
+ +
+
+property c
+

The unit cell length c.

+
+ +
+
+property ca
+

The cosine of the cell angle alpha.

+
+ +
+
+property car
+

The cosine of the reciprocal angle alpha.

+
+ +
+
+cartesian(u)[source]
+

Transform lattice vector to Cartesian coordinates.

+
+
Parameters:
+

u (array_like) – Vector of lattice coordinates or an Nx3 array +of lattice vectors.

+
+
Returns:
+

rc – Cartesian coordinates of the u vector.

+
+
Return type:
+

numpy.ndarray

+
+
+
+ +
+
+property cb
+

The cosine of the cell angle beta.

+
+ +
+
+property cbr
+

The cosine of the reciprocal angle beta.

+
+ +
+
+cell_parms()[source]
+

Return the cell parameters in the standard setting.

+
+
Returns:
+

A tuple of (a, b, c, alpha, beta, gamma).

+
+
Return type:
+

tuple

+
+
+
+ +
+
+property cg
+

The cosine of the cell angle gamma.

+
+ +
+
+property cgr
+

The cosine of the reciprocal angle gamma.

+
+ +
+
+property cr
+

The cell length c of the reciprocal lattice.

+
+ +
+
+dist(u, v)[source]
+

Calculate distance between 2 points in lattice coordinates.

+
+
Parameters:
+
    +
  • u (array_like) – A vector or an Nx3 matrix of fractional coordinates.

  • +
  • v (numpy.ndarray) – A vector or an Nx3 matrix of fractional coordinates.

  • +
+
+
+
+

Note

+

u and v must be of the same shape when matrices.

+
+
+
Returns:
+

The distance between lattice points u and v.

+
+
Return type:
+

float or numpy.ndarray

+
+
+
+ +
+
+dot(u, v)[source]
+

Calculate dot product of 2 lattice vectors.

+
+
Parameters:
+
    +
  • u (array_like) – The first lattice vector or an Nx3 array.

  • +
  • v (array_like) – The second lattice vector or an array of +the same shape as u.

  • +
+
+
Returns:
+

The dot product of lattice vectors u, v.

+
+
Return type:
+

float or numpy.ndarray

+
+
+
+ +
+
+fractional(rc)[source]
+

Transform Cartesian vector to fractional lattice coordinates.

+
+
Parameters:
+

rc (array_like) – A vector of Cartesian coordinates or an Nx3 array of +Cartesian vectors.

+
+
Returns:
+

u – Fractional coordinates of the Cartesian vector rc.

+
+
Return type:
+

numpy.ndarray

+
+
+
+ +
+
+property gamma
+

The cell angle gamma in degrees.

+
+ +
+
+property gammar
+

The reciprocal cell angle gamma in degrees

+
+ +
+
+isanisotropic(umx)[source]
+

True if displacement parameter matrix is anisotropic.

+

This checks if the specified matrix of anisotropic displacement +parameters (ADP) differs from isotropic values for this lattice +by more than a small round-off error.

+
+
Parameters:
+

umx (array_like) – The 3x3 matrix of displacement parameters.

+
+
Returns:
+

True when umx is anisotropic by more than a round-off error.

+
+
Return type:
+

bool

+
+
+
+ +
+
+norm(xyz)[source]
+

Calculate norm of a lattice vector.

+
+
Parameters:
+

xyz (array_like) – A vector or an Nx3 array of fractional coordinates.

+
+
Returns:
+

The magnitude of the lattice vector xyz.

+
+
Return type:
+

float or numpy.ndarray

+
+
+
+ +
+
+reciprocal()[source]
+

Return the reciprocal lattice of the current lattice.

+
+
Returns:
+

The reciprocal lattice of the current lattice.

+
+
Return type:
+

Lattice

+
+
+
+ +
+
+rnorm(hkl)[source]
+

Calculate norm of a reciprocal vector.

+
+
Parameters:
+

hkl (array_like) – A vector or an Nx3 array of reciprocal coordinates.

+
+
Returns:
+

The magnitude of the reciprocal vector hkl.

+
+
Return type:
+

float or numpy.ndarray

+
+
+
+ +
+
+property sa
+

The sine of the cell angle alpha.

+
+ +
+
+property sar
+

The sine of the reciprocal angle alpha.

+
+ +
+
+property sb
+

The sine of the cell angle beta.

+
+ +
+
+property sbr
+

The sine of the reciprocal angle beta.

+
+ +
+
+setLatBase(base)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Lattice.set_lat_base instead.

+
+ +
+
+setLatPar(a=None, b=None, c=None, alpha=None, beta=None, gamma=None, baserot=None)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Lattice.set_lat_par instead.

+
+ +
+
+set_latt_parms(a=None, b=None, c=None, alpha=None, beta=None, gamma=None, baserot=None)[source]
+

Set one or more lattice parameters.

+

This updates all attributes that depend on the lattice parameters.

+
+
Parameters:
+
    +
  • a (float, Optional) – The new value of the cell length a.

  • +
  • b (float, Optional) – The new value of the cell length b.

  • +
  • c (float, Optional) – The new value of the cell length c.

  • +
  • alpha (float, Optional) – The new value of the cell angle alpha in degrees.

  • +
  • beta (float, Optional) – The new value of the cell angle beta in degrees.

  • +
  • gamma (float, Optional) – The new value of the cell angle gamma in degrees.

  • +
  • baserot (array_like, Optional) – The new 3x3 rotation matrix of the base vectors with respect +to their standard setting in Cartesian coordinates.

  • +
+
+
+
+

Note

+

Parameters that are not specified will keep their initial +values.

+
+
+ +
+
+set_new_latt_base_vec(base)[source]
+

Set new base vectors for this lattice.

+

This updates the cell lengths and cell angles according to the +new base. The stdbase, baserot, and metrics attributes +are also updated.

+
+
Parameters:
+

base (array_like) – The 3x3 matrix of row base vectors expressed +in Cartesian coordinates.

+
+
+
+ +
+
+property sg
+

The sine of the cell angle gamma.

+
+ +
+
+property sgr
+

The sine of the reciprocal angle gamma.

+
+ +
+
+property unitvolume
+

The unit cell volume when a = b = c = 1.

+
+ +
+
+property volume
+

The unit cell volume.

+
+ +
+ +
+
+diffpy.structure.lattice.cosd(x)[source]
+

Return the cosine of x (measured in degrees).

+

Avoid round-off errors for exact cosine values.

+
+
Parameters:
+

x (float) – The angle in degrees.

+
+
Returns:
+

The cosine of the angle x.

+
+
Return type:
+

float

+
+
+
+ +
+
+diffpy.structure.lattice.sind(x)[source]
+

Return the sine of x (measured in degrees).

+

Avoid round-off errors for exact sine values.

+
+
Parameters:
+

x (float) – The angle in degrees.

+
+
Returns:
+

The sine of the angle x.

+
+
Return type:
+

float

+
+
+
+ +
+
+

diffpy.structure.structure module

+

This module defines class Structure.

+
+
+class diffpy.structure.structure.Structure(atoms=None, lattice=None, title=None, filename=None, format=None)[source]
+

Bases: list

+

Define group of atoms in a specified lattice. Structure –> group +of atoms.

+

Structure class is inherited from Python list. It contains +a list of Atom instances. Structure overloads setitem and setslice +methods so that the lattice attribute of atoms get set to lattice.

+
+
Parameters:
+
    +
  • atoms (list of Atom or Structure, Optional) – List of Atom instances to be included in this Structure. +When atoms argument is an existing Structure instance, +the new structure is its copy.

  • +
  • lattice (Lattice, Optional) – Instance of Lattice defining coordinate systems, property.

  • +
  • title (str, Optional) – String description of the structure.

  • +
  • filename (str, Optional) – Name of a file to load the structure from.

  • +
  • format (str, Optional) – Structure format of the loaded filename. By default +all structure formats are tried one by one. Ignored when +filename has not been specified.

  • +
+
+
+
+

Note

+

Cannot use filename and atoms arguments together. Overrides atoms argument +when filename is specified.

+
+
+
+title
+

String description of the structure.

+
+
Type:
+

str

+
+
+
+ +
+
+lattice
+

Instance of Lattice defining coordinate systems.

+
+
Type:
+

Lattice

+
+
+
+ +
+
+pdffit
+

Dictionary of PDFFit-related metadata.

+
+
Type:
+

None or dict

+
+
+
+ +

Examples

+

Structure(stru) create a copy of Structure instance stru.

+
>>> stru = Structure()
+>>> copystru = Structure(stru)
+
+
+

Structure is inherited from a list it can use list expansions.

+
>>> oxygen_atoms = [a for a in stru if a.element == "O" ]
+>>> oxygen_stru = Structure(oxygen_atoms, lattice=stru.lattice)
+
+
+
+
+property B11
+

Array of B11 elements of the Debye-Waller displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property B12
+

Array of B12 elements of the Debye-Waller displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property B13
+

Array of B13 elements of the Debye-Waller displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property B22
+

Array of B22 elements of the Debye-Waller displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property B23
+

Array of B23 elements of the Debye-Waller displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property B33
+

Array of B33 elements of the Debye-Waller displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property Bisoequiv
+

Array of Debye-Waller isotropic thermal displacement or equivalent +values. Assignment updates the U attribute of all Atoms.

+
+ +
+
+property U
+

Array of anisotropic thermal displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property U11
+

Array of U11 elements of the anisotropic displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property U12
+

Array of U12 elements of the anisotropic displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property U13
+

Array of U13 elements of the anisotropic displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property U22
+

Array of U22 elements of the anisotropic displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property U23
+

Array of U23 elements of the anisotropic displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property U33
+

Array of U33 elements of the anisotropic displacement tensors. +Assignment updates the U and anisotropy attributes of all Atoms.

+
+ +
+
+property Uisoequiv
+

Array of isotropic thermal displacement or equivalent values. +Assignment updates the U attribute of all Atoms.

+
+ +
+
+addNewAtom(*args, **kwargs)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Structure.add_new_atom instead.

+
+ +
+
+add_new_atom(*args, **kwargs)[source]
+

Add new Atom instance to the end of this Structure.

+
+
Parameters:
+
    +
  • *args – See Atom class constructor.

  • +
  • **kwargs – See Atom class constructor.

  • +
+
+
Raises:
+

UserWarning – If an atom with the same element/type and coordinates already exists.

+
+
+
+ +
+
+angle(aid0, aid1, aid2)[source]
+

The bond angle at the second of three Atoms in degrees.

+
+
Parameters:
+
    +
  • aid0 (int or str) – Zero based index of the first Atom or a string label.

  • +
  • aid1 (int or str) – Index or string label for the second atom, where the angle is formed.

  • +
  • aid2 (int or str) – Index or string label for the third atom.

  • +
+
+
Returns:
+

The bond angle in degrees.

+
+
Return type:
+

float

+
+
Raises:
+

IndexError – If any of the arguments are invalid.

+
+
+
+ +
+
+property anisotropy
+

Boolean array for anisotropic thermal displacement flags. +Assignment updates the anisotropy attribute of all Atoms.

+
+ +
+
+append(a, copy=True)[source]
+

Append Atom to a structure and update its lattice +attribute.

+
+
Parameters:
+
    +
  • a (Atom) – Instance of Atom to be appended.

  • +
  • copy (bool, Optional) – Flag for appending a copy of a. When False, append a and update a.lattice.

  • +
+
+
+
+ +
+
+assignUniqueLabels()
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Structure.assign_unique_labels +instead.

+
+ +
+
+assign_unique_labels()[source]
+

Set a unique label string for each Atom in this structure.

+

The label strings are formatted as “%(baresymbol)s%(index)i”, +where baresymbol is the element right-stripped of “[0-9][+-]”.

+
+ +
+
+property composition
+

Dictionary of chemical symbols and their total occupancies.

+
+ +
+
+copy()[source]
+

Return a copy of this Structure object.

+
+ +
+
+distance(aid0, aid1)[source]
+

Calculate distance between 2 Atoms, no periodic boundary +conditions.

+
+
Parameters:
+
    +
  • aid0 (int or str) – Zero based index of the first Atom or a string label.

  • +
  • aid1 (int or str) – Zero based index or string label of the second atom.

  • +
+
+
Returns:
+

Distance between the two Atoms in Angstroms.

+
+
Return type:
+

float

+
+
Raises:
+

IndexError – If any of the Atom indices or labels are invalid.

+
+
+
+ +
+
+property element
+

Character array of Atom types. Assignment updates +the element attribute of the respective Atoms. +Set the maximum length of the element string to 5 characters.

+
+ +
+
+extend(atoms, copy=None)[source]
+

Extend Structure with an iterable of atoms.

+

Update the lattice attribute of all added atoms.

+
+
Parameters:
+
    +
  • atoms (Iterable) – The Atom objects to be appended to this Structure.

  • +
  • copy (bool, Optional) – Flag for adding copies of Atom objects. +Make copies when True, append atoms unchanged when False. +The default behavior is to make copies when atoms are of +Structure type or if new atoms introduce repeated objects.

  • +
+
+
+
+ +
+
+getLastAtom()
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Structure.get_last_atom instead.

+
+ +
+
+get_last_atom()[source]
+

Return Reference to the last Atom in this structure.

+
+ +
+
+insert(idx, a, copy=True)[source]
+

Insert Atom a before position idx in this Structure.

+
+
Parameters:
+
    +
  • idx (int) – Position in Atom list.

  • +
  • a (Atom) – Instance of Atom to be inserted.

  • +
  • copy (bool, Optional) – Flag for inserting a copy of a. When False, append a and update a.lattice.

  • +
+
+
+
+ +
+
+property label
+

Character array of Atom names. Assignment updates +the label attribute of all Atoms. +Set the maximum length of the label string to 5 characters.

+
+ +
+
+property lattice
+

Coordinate system for this Structure.

+
+ +
+
+property occupancy
+

Array of Atom occupancies. Assignment updates the +occupancy attribute of all Atoms.

+
+ +
+
+pdffit = None
+

default values for pdffit.

+
+
Type:
+

None

+
+
+
+ +
+
+placeInLattice(new_lattice)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Structure.place_in_lattice instead.

+
+ +
+
+place_in_lattice(new_lattice)[source]
+

Place structure into new_lattice coordinate system.

+

Sets lattice to new_lattice and recalculate fractional coordinates +of all Atoms so their absolute positions remain the same.

+
+
Parameters:
+

new_lattice (Lattice) – New lattice to place the structure into.

+
+
Returns:
+

Reference to this Structure object. The lattice attribute +is updated to new_lattice.

+
+
Return type:
+

Structure

+
+
+
+ +
+
+read(filename, format='auto')[source]
+

Load structure from a file, any original data become lost.

+
+
Parameters:
+
    +
  • filename (str) – File to be loaded.

  • +
  • format (str, Optional) – All structure formats are defined in parsers submodule, +when format == 'auto' all parsers are tried one by one.

  • +
+
+
Returns:
+

Return instance of data Parser used to process input string. This +can be inspected for information related to particular format.

+
+
Return type:
+

Parser

+
+
+
+ +
+
+readStr(s, format='auto')
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Structure.read_structure instead.

+
+ +
+
+read_structure(s, format='auto')[source]
+

Read structure from a string.

+
+
Parameters:
+
    +
  • s (str) – String with structure definition.

  • +
  • format (str, Optional) – All structure formats are defined in parsers submodule. When format == 'auto', +all parsers are tried one by one.

  • +
+
+
Returns:
+

Return instance of data Parser used to process input string. This +can be inspected for information related to particular format.

+
+
Return type:
+

Parser

+
+
+
+ +
+
+title = ''
+

default values for title.

+
+
Type:
+

str

+
+
+
+ +
+
+tolist()[source]
+

Return Atoms in this Structure as a standard Python +list.

+
+ +
+
+write(filename, format)[source]
+

Save structure to file in the specified format.

+
+
Parameters:
+
    +
  • filename (str) – File to save the structure to.

  • +
  • format (str) – Structure format to use for saving.

  • +
+
+
+
+

Note

+

Available structure formats can be obtained by:

+
+

from parsers import formats

+
+
+
+ +
+
+writeStr(format)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Structure.write_structure instead.

+
+ +
+
+write_structure(format)[source]
+

Return string representation of the structure in specified +format.

+
+

Note

+

Available structure formats can be obtained by:

+
+

from parsers import formats

+
+
+
+ +
+
+property x
+

Array of all fractional coordinates x. +Assignment updates xyz attribute of all Atoms.

+
+ +
+
+property xyz
+

Array of fractional coordinates of all Atoms. +Assignment updates xyz attribute of all Atoms.

+
+ +
+
+property xyz_cartn
+

Array of absolute Cartesian coordinates of all Atoms. +Assignment updates the xyz attribute of all Atoms.

+
+ +
+
+property y
+

Array of all fractional coordinates y. +Assignment updates xyz attribute of all Atoms.

+
+ +
+
+property z
+

Array of all fractional coordinates z. +Assignment updates xyz attribute of all Atoms.

+
+ +
+ +
+
+

diffpy.structure.mmlibspacegroups module

+

Space groups defined as a part of the pymmlib.

+
+
+

diffpy.structure.symmetryutilities module

+

Symmetry utility functions such as expansion of asymmetric unit, and +generation of positional constraints.

+
+
+diffpy.structure.symmetryutilities.epsilon
+

Default tolerance for equality of 2 positions, also +used for identification of special positions.

+
+
Type:
+

float

+
+
+
+ +
+
+diffpy.structure.symmetryutilities.stdUsymbols
+

Standard symbols denoting elements of anisotropic thermal +displacement tensor.

+
+
Type:
+

list

+
+
+
+ +
+
+class diffpy.structure.symmetryutilities.ExpandAsymmetricUnit(spacegroup, corepos, coreUijs=None, sgoffset=[0, 0, 0], eps=None)[source]
+

Bases: object

+

Expand asymmetric unit and anisotropic thermal displacement.

+
+
Parameters:
+
    +
  • spacegroup (SpaceGroup) – Instance of SpaceGroup.

  • +
  • corepos (array_like) – List of positions in asymmetric unit, +it may contain duplicates.

  • +
  • coreUijs (numpy.ndarray, Optional) – Thermal factors for corepos.

  • +
  • sgoffset (list, Optional) – Offset of space group origin [0, 0, 0]. Default is [0, 0, 0].

  • +
  • eps (float, Optional) – Cutoff for duplicate positions. Default is 1.0e-5.

  • +
+
+
+
+
+spacegroup
+

Instance of SpaceGroup.

+
+
Type:
+

SpaceGroup

+
+
+
+ +
+
+corepos
+

List of positions in asymmetric unit, +it may contain duplicates.

+
+
Type:
+

array_like

+
+
+
+ +
+
+coreUijs
+

Thermal factors for corepos. Defaults to zeros.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+sgoffset
+

Offset of space group origin [0, 0, 0]. Default to zeros.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+eps
+

Cutoff for equivalent positions. Default is 1.0e-5.

+
+
Type:
+

float

+
+
+
+ +
+
+multiplicity
+

Multiplicity of each site in corepos.

+
+
Type:
+

list

+
+
+
+ +
+
+Uisotropy
+

Bool flags for isotropic sites in corepos.

+
+
Type:
+

list

+
+
+
+ +
+
+expandedpos
+

List of equivalent positions per each site in corepos.

+
+
Type:
+

list

+
+
+
+ +
+
+expandedUijs
+

List of thermal factors per each site in corepos.

+
+
Type:
+

list

+
+
+
+ +
+ +
+
+class diffpy.structure.symmetryutilities.GeneratorSite(spacegroup, xyz, Uij=array([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]), sgoffset=[0, 0, 0], eps=None)[source]
+

Bases: object

+

Storage of data related to a generator positions.

+
+
Parameters:
+
    +
  • spacegroup (SpaceGroup) – Instance of SpaceGroup.

  • +
  • xyz (array_like) – Generating site. When xyz is close to special +position self.xyz will be adjusted.

  • +
  • Uij (array_like, Optional) – Thermal factors at generator site. Yields self.Uij +after adjusting to spacegroup symmetry. Default is zeros.

  • +
  • sgoffset (list, Optional) – Offset of space group origin [0, 0, 0]. Default is [0, 0, 0].

  • +
  • eps (float, Optional) – Cutoff for equal positions. Default is 1.0e-5.

  • +
+
+
+
+
+xyz
+

Fractional coordinates of generator site.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+Uij
+

Anisotropic thermal displacement at generator site.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+sgoffset
+

Offset of space group origin [0, 0, 0].

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+eps
+

Cutoff for equal positions.

+
+
Type:
+

float

+
+
+
+ +
+
+eqxyz
+

List of equivalent positions.

+
+
Type:
+

list

+
+
+
+ +
+
+eqUij
+

List of displacement matrices at equivalent positions.

+
+
Type:
+

list

+
+
+
+ +
+
+symops
+

Nested list of operations per each eqxyz.

+
+
Type:
+

list

+
+
+
+ +
+
+multiplicity
+

Generator site multiplicity.

+
+
Type:
+

int

+
+
+
+ +
+
+Uisotropy
+

Bool flag for isotropic thermal factors.

+
+
Type:
+

bool

+
+
+
+ +
+
+invariants
+

List of invariant operations for generator site.

+
+
Type:
+

list

+
+
+
+ +
+
+null_space
+

Null space of all possible differences of invariant +rotational matrices, this is a base of symmetry +allowed shifts.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+Uspace
+

3D array of independent components of U matrices.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+pparameters
+

List of (xyz symbol, value) pairs.

+
+
Type:
+

list

+
+
+
+ +
+
+Uparameters
+

List of (U symbol, value) pairs.

+
+
Type:
+

list

+
+
+
+ +
+
+UFormula(pos, Usymbols=['U11', 'U22', 'U33', 'U12', 'U13', 'U23'])
+

‘diffpy.structure.GeneratorSite.UFormula’ is deprecated and +will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.GeneratorSite.u_formula’ instead.

+
+ +
+
+Ucomponents = array([[[1., 0., 0.],         [0., 0., 0.],         [0., 0., 0.]],         [[0., 0., 0.],         [0., 1., 0.],         [0., 0., 0.]],         [[0., 0., 0.],         [0., 0., 0.],         [0., 0., 1.]],         [[0., 1., 0.],         [1., 0., 0.],         [0., 0., 0.]],         [[0., 0., 1.],         [0., 0., 0.],         [1., 0., 0.]],         [[0., 0., 0.],         [0., 0., 1.],         [0., 1., 0.]]])
+

6x3x3 array of independent components of U +matrices.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+convert_fp_num_to_signed_rational(x)[source]
+

Convert floating point number to signed rational +representation.

+

Possible fractional are multiples of 1/3, 1/6, 1/7, 1/9, if these +are not close, return %+g format.

+
+
Parameters:
+

x (float) – Floating point number.

+
+
Returns:
+

Signed rational representation of x.

+
+
Return type:
+

str

+
+
+
+ +
+
+eqIndex(pos)
+

‘diffpy.structure.GeneratorSite.eqIndex’ is deprecated and +will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.GeneratorSite.eq_index’ instead.

+
+ +
+
+eq_index(pos)[source]
+

Index of the nearest generator equivalent site.

+
+
Parameters:
+

pos (array_like) – Fractional coordinates.

+
+
Returns:
+

Index of the nearest generator equivalent site.

+
+
Return type:
+

int

+
+
+
+ +
+
+idx2Usymbol = {0: 'U11', 1: 'U12', 2: 'U13', 3: 'U12', 4: 'U22', 5: 'U23', 6: 'U13', 7: 'U23', 8: 'U33'}
+

Mapping of index to standard U symbol.

+
+
Type:
+

dict

+
+
+
+ +
+
+positionFormula(pos, xyzsymbols=('x', 'y', 'z'))
+

‘diffpy.structure.GeneratorSite.positionFormula’ is +deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.GeneratorSite.position_formula’ +instead.

+
+ +
+
+position_formula(pos, xyzsymbols=('x', 'y', 'z'))[source]
+

Formula of equivalent position with respect to generator +site.

+
+
Parameters:
+
    +
  • pos (array_like) – Fractional coordinates of possibly equivalent site.

  • +
  • xyzsymbols (tuple, Optional) – Symbols for parametrized coordinates.

  • +
+
+
Returns:
+

Position formulas in a dictionary with keys equal ("x", "y", "z") +or an empty dictionary when pos is not equivalent to generator. +Formulas are formatted as [[-][%g*]{x|y|z}] [{+|-}%g], for example +-x, z +0.5, 0.25.

+
+
Return type:
+

dict

+
+
+
+ +
+
+signedRatStr(x)
+

‘diffpy.structure.GeneratorSite.signedRatStr’ is deprecated +and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.GeneratorSite.convert_fp_num_to_signed_rational’ instead.

+
+ +
+
+u_formula(pos, Usymbols=['U11', 'U22', 'U33', 'U12', 'U13', 'U23'])[source]
+

List of atom displacement formulas with custom parameter +symbols.

+
+
Parameters:
+
    +
  • pos (array_like) – Fractional coordinates of possibly equivalent site.

  • +
  • Usymbols (list, Optional) – 6 symbols for possible U matrix parameters, default is +["U11", "U22", "U33", "U12", "U13", "U23"].

  • +
+
+
Returns:
+

Uformula – U element formulas in a dictionary where keys are from +('U11','U22','U33','U12','U13','U23') or empty dictionary when +pos is not equivalent to generator.

+
+
Return type:
+

dict

+
+
+
+ +
+ +
+
+class diffpy.structure.symmetryutilities.SymmetryConstraints(spacegroup, positions, Uijs=None, sgoffset=[0, 0, 0], eps=None)[source]
+

Bases: object

+

Generate symmetry constraints for specified positions.

+
+
Parameters:
+
    +
  • spacegroup (SpaceGroup) – Instance of SpaceGroup.

  • +
  • positions (array_like) – List of all positions to be constrained.

  • +
  • Uijs (array_like, Optional) – List of U matrices for all constrained positions.

  • +
  • sgoffset (list, Optional) – Offset of space group origin [0, 0, 0]. Default is [0, 0, 0].

  • +
  • eps (float, Optional) – Cutoff for duplicate positions. Default is 1.0e-5.

  • +
+
+
+
+
+spacegroup
+

Instance of SpaceGroup.

+
+
Type:
+

SpaceGroup

+
+
+
+ +
+
+positions
+

All positions to be constrained.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+Uijs
+

Thermal factors for all positions. Defaults to zeros.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+sgoffset
+

Optional offset of space group origin [0, 0, 0].

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+eps
+

Cutoff for equivalent positions. Default is 1.0e-5.

+
+
Type:
+

float

+
+
+
+ +
+
+corepos
+

List of of positions in the asymmetric unit.

+
+
Type:
+

list

+
+
+
+ +
+
+coremap
+

Dictionary mapping indices of asymmetric core positions +to indices of all symmetry related positions.

+
+
Type:
+

dict

+
+
+
+ +
+
+poseqns
+

List of coordinate formula dictionaries per each site. +Formula dictionary keys are from ("x", "y", "z") and +the values are formatted as [[-]{x|y|z}%i] [{+|-}%g], +for example: x0, -x3, z7 +0.5, 0.25.

+
+
Type:
+

list

+
+
+
+ +
+
+pospars
+

List of (xyz symbol, value) pairs.

+
+
Type:
+

list

+
+
+
+ +
+
+Ueqns
+

List of anisotropic atomic displacement formula +dictionaries per each position. Formula dictionary +keys are from ('U11','U22','U33','U12','U13','U23') +and the values are formatted as {[%g*][Uij%i]|0}, +for example: U110, 0.5*U2213, 0.

+
+
Type:
+

list

+
+
+
+ +
+
+Upars
+

List of (U symbol, value) pairs.

+
+
Type:
+

list

+
+
+
+ +
+
+Uisotropy
+

List of bool flags for isotropic thermal displacements.

+
+
Type:
+

list

+
+
+
+ +
+
+UFormulas(Usymbols=None)
+

‘diffpy.structure.SymmetryConstraints.UFormulas’ is +deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.SymmetryConstraints.u_formulas’ +instead.

+
+ +
+
+UFormulasPruned(Usymbols=None)
+

‘diffpy.structure.SymmetryConstraints.UFormulasPruned’ is +deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.SymmetryConstraints.u_formulas_pruned’ +instead.

+
+ +
+
+UparSymbols()
+

‘diffpy.structure.SymmetryConstraints.UparSymbols’ is +deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.SymmetryConstraints.u_parm_symbols’ instead.

+
+ +
+
+UparValues()
+

‘diffpy.structure.SymmetryConstraints.UparValues’ is +deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.SymmetryConstraints.u_parm_values’ +instead.

+
+ +
+
+pos_parm_symbols()[source]
+

Return list of standard position parameter symbols.

+
+ +
+
+pos_parm_values()[source]
+

Return list of position parameters values.

+
+ +
+
+positionFormulas(xyzsymbols=None)
+

‘diffpy.structure.SymmetryConstraints.positionFormulas’ is +deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.SymmetryConstraints.position_formulas’ instead.

+
+ +
+
+positionFormulasPruned(xyzsymbols=None)
+

‘diffpy.structure.SymmetryConstraints.positionFormulasPruned’ +is deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.SymmetryConstraints.position_formulas_pruned’ instead.

+
+ +
+
+position_formulas(xyzsymbols=None)[source]
+

List of position formulas with custom parameter symbols.

+
+
Parameters:
+

xyzsymbols (list, Optional) – List of custom symbols used in formula strings.

+
+
Returns:
+

List of coordinate formulas dictionaries. Formulas dictionary +keys are from ("x", "y", "z") and the values are formatted as +[[-]{symbol}] [{+|-}%g], for example: x0, -sym, @7 +0.5, 0.25.

+
+
Return type:
+

list

+
+
+
+ +
+
+position_formulas_pruned(xyzsymbols=None)[source]
+

List of position formula dictionaries with constant items +removed.

+
+

See also

+

positionFormulas

+
+
+
Parameters:
+

xyzsymbols (list, Optional) – List of custom symbols used in formula strings.

+
+
Returns:
+

List of coordinate formula dictionaries.

+
+
Return type:
+

list

+
+
+
+ +
+
+posparSymbols()
+

‘diffpy.structure.SymmetryConstraints.posparSymbols’ is +deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.SymmetryConstraints.pos_parm_symbols’ instead.

+
+ +
+
+posparValues()
+

‘diffpy.structure.SymmetryConstraints.posparValues’ is +deprecated and will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.SymmetryConstraints.pos_parm_values’ instead.

+
+ +
+
+u_formulas(Usymbols=None)[source]
+

List of atom displacement formulas with custom parameter +symbols.

+
+
Parameters:
+

Usymbols (list, Optional) – List of custom symbols used in formula strings.

+
+
Returns:
+

List of atom displacement formula dictionaries per each site. +Formula dictionary keys are from ('U11','U22','U33','U12','U13','U23') +and the values are formatted as {[%g*][Usymbol]|0}, for example: +U11, 0.5*@37, 0.

+
+
Return type:
+

list

+
+
+
+ +
+
+u_formulas_pruned(Usymbols=None)[source]
+

List of atom displacement formula dictionaries with constant +items removed.

+
+

See also

+

UFormulas

+
+
+
Parameters:
+

Usymbols (list, Optional) – List of custom symbols used in formula strings.

+
+
Returns:
+

List of atom displacement formulas in tuples of +(U11, U22, U33, U12, U13, U23).

+
+
Return type:
+

list

+
+
+
+ +
+
+u_parm_symbols()[source]
+

Return list of standard atom displacement parameter +symbols.

+
+ +
+
+u_parm_values()[source]
+

Return list of atom displacement parameters values.

+
+ +
+ +
+
+diffpy.structure.symmetryutilities.equalPositions(xyz0, xyz1, eps)
+

‘diffpy.structure.equalPositions’ is deprecated and will be +removed in version 4.0.0.

+

Please use ‘diffpy.structure.equal_positions’ instead.

+
+ +
+
+diffpy.structure.symmetryutilities.equal_positions(xyz0, xyz1, eps)[source]
+

Equality of two coordinates with optional tolerance.

+
+
Parameters:
+
    +
  • xyz0 (array_like) – Fractional coordinates.

  • +
  • xyz1 (array_like) – Fractional coordinates.

  • +
  • eps (float) – Tolerance for equality of coordinates.

  • +
+
+
Returns:
+

True when two coordinates are closer than eps.

+
+
Return type:
+

bool

+
+
+
+ +
+
+diffpy.structure.symmetryutilities.expandPosition(spacegroup, xyz, sgoffset=[0, 0, 0], eps=None)
+

‘diffpy.structure.expandPosition’ is deprecated and will be +removed in version 4.0.0.

+

Please use ‘diffpy.structure.expand_position’ instead.

+
+ +
+
+diffpy.structure.symmetryutilities.expand_position(spacegroup, xyz, sgoffset=[0, 0, 0], eps=None)[source]
+

Obtain unique equivalent positions and corresponding operations.

+
+
Parameters:
+
    +
  • spacegroup (SpaceGroup) – Instance of SpaceGroup.

  • +
  • xyz (list) – Position to be expanded.

  • +
  • sgoffset (list, Optional) – Offset of space group origin [0, 0, 0]. Default is [0, 0, 0].

  • +
  • eps (float, Optional) – Cutoff for equal positions, default is 1.0e-5.

  • +
+
+
Returns:
+

A tuple with (list of unique equivalent positions, nested +list of `SpaceGroups.SymOp` instances, site multiplicity).

+
+
Return type:
+

tuple

+
+
+
+ +
+
+diffpy.structure.symmetryutilities.isSpaceGroupLatPar(spacegroup, a, b, c, alpha, beta, gamma)
+

‘diffpy.structure.isSpaceGroupLatPar’ is deprecated and will be +removed in version 4.0.0.

+

Please use ‘diffpy.structure.is_space_group_latt_parms’ instead.

+
+ +
+
+diffpy.structure.symmetryutilities.is_constant_formula(s)[source]
+

Check if formula string is constant.

+
+
Parameters:
+

s (str) – Formula string.

+
+
Returns:
+

True when argument is a floating point number or a fraction of float with integer.

+
+
Return type:
+

bool

+
+
+
+ +
+
+diffpy.structure.symmetryutilities.is_space_group_latt_parms(spacegroup, a, b, c, alpha, beta, gamma)[source]
+

Check if space group allows passed lattice parameters.

+
+
Parameters:
+
    +
  • spacegroup (SpaceGroup) – Instance of SpaceGroup.

  • +
  • a (float) – Lattice parameters.

  • +
  • b (float) – Lattice parameters.

  • +
  • c (float) – Lattice parameters.

  • +
  • alpha (float) – Lattice parameters.

  • +
  • beta (float) – Lattice parameters.

  • +
  • gamma (float) – Lattice parameters.

  • +
+
+
Returns:
+

True when lattice parameters are allowed by space group.

+
+
Return type:
+

bool

+
+
+
+

Note

+

Crystal system rules:

+

Benjamin, W. A., Introduction to crystallography, New York (1969), p.60.

+
+
+ +
+
+diffpy.structure.symmetryutilities.isconstantFormula(s)
+

‘diffpy.structure.isconstantFormula’ is deprecated and will be +removed in version 4.0.0.

+

Please use ‘diffpy.structure.is_constant_formula’ instead.

+
+ +
+
+diffpy.structure.symmetryutilities.nearestSiteIndex(sites, xyz)
+

‘diffpy.structure.nearestSiteIndex’ is deprecated and will be +removed in version 4.0.0.

+

Please use ‘diffpy.structure.nearest_site_index’ instead.

+
+ +
+
+diffpy.structure.symmetryutilities.nearest_site_index(sites, xyz)[source]
+

Index of the nearest site to a specified position.

+
+
Parameters:
+
    +
  • sites (array_like) – List of coordinates.

  • +
  • xyz (array_like) – Single position.

  • +
+
+
Returns:
+

Index of the nearest site.

+
+
Return type:
+

int

+
+
+
+ +
+
+diffpy.structure.symmetryutilities.nullSpace(A)
+

‘diffpy.structure.nullSpace’ is deprecated and will be removed in +version 4.0.0.

+

Please use ‘diffpy.structure.null_space’ instead.

+
+ +
+
+diffpy.structure.symmetryutilities.null_space(A)[source]
+

Null space of matrix A.

+
+ +
+
+diffpy.structure.symmetryutilities.positionDifference(xyz0, xyz1)
+

‘diffpy.structure.positionDifference’ is deprecated and will be +removed in version 4.0.0.

+

Please use ‘diffpy.structure.position_difference’ instead.

+
+ +
+
+diffpy.structure.symmetryutilities.position_difference(xyz0, xyz1)[source]
+

Smallest difference between two coordinates in periodic lattice.

+
+
Parameters:
+
    +
  • xyz0 (array_like) – Fractional coordinates.

  • +
  • xyz1 (array_like) – Fractional coordinates.

  • +
+
+
Returns:
+

dxyz – Smallest difference between two coordinates in periodic lattice +with 0 <= dxyz <= 0.5.

+
+
Return type:
+

numpy.ndarray

+
+
+
+ +
+
+diffpy.structure.symmetryutilities.pruneFormulaDictionary(eqdict)
+

‘diffpy.structure.pruneFormulaDictionary’ is deprecated and will +be removed in version 4.0.0.

+

Please use ‘diffpy.structure.prune_formula_dictionary’ instead.

+
+ +
+
+diffpy.structure.symmetryutilities.prune_formula_dictionary(eqdict)[source]
+

Remove constant items from formula dictionary.

+
+
Parameters:
+

eqdict (dict) – Formula dictionary which maps standard variable symbols +("x", "U11") to string formulas ("0", "-x3", "z7 +0.5").

+
+
Returns:
+

Pruned formula dictionary.

+
+
Return type:
+

dict

+
+
+
+ +
+
+

diffpy.structure.atom module

+

Provide class Atom for managing properties of an atom in structure +model.

+
+
+class diffpy.structure.atom.Atom(atype=None, xyz=None, label=None, occupancy=None, anisotropy=None, U=None, Uisoequiv=None, lattice=None)[source]
+

Bases: object

+

Storage of structure information relevant for a single atom.

+

This class manages atom information such as element symbol, position +in fractional and Cartesian coordinates, atomic displacement parameters +and so forth.

+
+
Parameters:
+
    +
  • atype (str or Atom, Optional) – The string atom type to be set as the element attribute. +By default an empty string. When of the Atom type, create +a copy of atype and adjust it per other arguments.

  • +
  • xyz (numpy.ndarray, Optional) – Fractional coordinates within the associated lattice. +By default [0, 0, 0].

  • +
  • label (str, Optional) – A unique string label for referring to this Atom. +By default an empty string.

  • +
  • occupancy (float, Optional) – The initial occupancy of this atom, by default 1.

  • +
  • anisotropy (bool, Optional) – The flag for anisotropic thermal displacements parameters. +This overrides anisotropy implied by presence of the +U or Uisoequiv arguments. Defaults to False +when not set in any other way.

  • +
  • U (numpy.ndarray, Optional) – The 3x3 matrix of anisotropic thermal displacement parameters. +When present anisotropy defaults to True.

  • +
  • Uisoequiv (float, Optional) – The isotropic atomic displacement parameter. The anisotropy +defaults to False when present. Only one of the U and +Uisoequiv arguments may be provided at the same time. Assume +zero atomic displacements when U and Uisoequiv are unset.

  • +
  • lattice (Lattice, Optional) – Coordinate system for the fractional coordinates xyz. +Use the absolute Cartesian system when None.

  • +
+
+
+
+
+element
+

The string type of the atom. An element or ion symbol.

+
+
Type:
+

str

+
+
+
+ +
+
+xyz
+

The fractional coordinates in the associated lattice.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+label
+

A unique string label referring to this atom, for example, “C_1”. +The label can be used to reference this atom when contained in +a Structure object.

+
+
Type:
+

str

+
+
+
+ +
+
+occupancy
+

The fractional occupancy of this atom.

+
+
Type:
+

float

+
+
+
+ +
+
+lattice
+

Coordinate system for the fractional coordinates xyz and +the tensor of atomic displacement parameters U. +Use the absolute Cartesian coordinates when None.

+
+
Type:
+

Lattice

+
+
+
+ +
+

Note

+

Cannot use both U and Uisoequiv arguments at the same time.

+
+
+
+property B11
+

The B11 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U11. When anisotropy +is False setting a new value updates entire tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property B12
+

The B12 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U12. Setting a new +value updates U in a symmetric way. Assignment has no effect +when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property B13
+

The B13 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U13. Setting a new +value updates U in a symmetric way. Assignment has no effect +when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property B22
+

The B22 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U22. When anisotropy +is False setting a new value updates entire tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property B23
+

The B23 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U23. Setting a new +value updates U in a symmetric way. Assignment has no effect +when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property B33
+

The B33 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U33. When anisotropy +is False setting a new value updates entire tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property Bisoequiv
+

The Debye-Waller isotropic displacement or an equivalent value.

+

This equals 8 * pi**2 * Uisoequiv. Setting a new value +rescales U tensor to yield equivalent direction-average of +Debye-Waller displacements.

+
+
Type:
+

float

+
+
+
+ +
+
+property U
+

The 3x3 matrix of anisotropic atomic +displacements.

+

For isotropic displacements (when anisotropy is False) +assignment to U uses only the first Unew[0, 0] element +and the remaining components of U are adjusted to obtain +isotropic tensor in the active lattice.

+
+

Note

+

Elements of the U tensor such as U[0, 1] should be +considered read-only as setting them directly leads to +undefined behavior. Use the U11, U22, …, or B11, +B22, …, descriptors to set only some U components.

+
+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+property U11
+

The U[0, 0] component of the displacement tensor U.

+

When anisotropy is False setting a new value updates entire +tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property U12
+

The U[0, 1] element of the displacement tensor U.

+

Sets U[1, 0] together with U[0, 1]. Assignment +has no effect when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property U13
+

The U[0, 2] element of the displacement tensor U.

+

Sets U[2, 0] together with U[0, 2]. Assignment +has no effect when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property U22
+

The U[1, 1] component of the displacement tensor U.

+

When anisotropy is False setting a new value updates entire +tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property U23
+

The U[1, 2] element of the displacement tensor U.

+

Sets U[2, 1] together with U[1, 2]. Assignment +has no effect when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property U33
+

The U[2, 2] component of the displacement tensor U.

+

When anisotropy is False setting a new value updates entire +tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property Uisoequiv
+

The isotropic displacement parameter or an equivalent value.

+

Setting a new value rescales tensor U so it yields equivalent +direction-averaged displacements.

+
+
Type:
+

float

+
+
+
+ +
+
+property anisotropy
+

Flag for allowing anisotropic displacement parameters.

+

When False the tensor of thermal displacement parameters U +must be isotropic and only its diagonal elements are taken into +account.

+
+
Type:
+

bool

+
+
+
+ +
+
+element = ''
+

Default values of element.

+
+
Type:
+

str

+
+
+
+ +
+
+label = ''
+

Default values of label.

+
+
Type:
+

str

+
+
+
+ +
+
+lattice = None
+

Default values of lattice.

+
+
Type:
+

None

+
+
+
+ +
+
+msdCart(vc)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Atom.msd_cart instead.

+
+ +
+
+msdLat(vl)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Atom.msd_latt instead.

+
+ +
+
+msd_cart(vc)[source]
+

Calculate mean square displacement along the Cartesian +vector.

+
+
Parameters:
+

vc (array_like) – Vector in Cartesian coordinates.

+
+
Returns:
+

The mean square displacement along vc.

+
+
Return type:
+

float

+
+
+
+ +
+
+msd_latt(vl)[source]
+

Calculate mean square displacement along the lattice vector.

+
+
Parameters:
+

vl (array_like) – The vector in lattice coordinates.

+
+
Returns:
+

The mean square displacement along vl.

+
+
Return type:
+

float

+
+
+
+ +
+
+occupancy = 1.0
+

Default values of occupancy.

+
+
Type:
+

float

+
+
+
+ +
+
+property x
+

fractional coordinate x, same as xyz[0].

+
+
Type:
+

float

+
+
+
+ +
+
+property xyz_cartn
+

Atom position in absolute Cartesian +coordinates.

+

This is computed from fractional coordinates xyz and the +current lattice setup. Assignment to xyz_cartn or +its components is applied on fractional coordinates xyz.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+property y
+

fractional coordinate y, same as xyz[1].

+
+
Type:
+

float

+
+
+
+ +
+
+property z
+

fractional coordinate z, same as xyz[2].

+
+
Type:
+

float

+
+
+
+ +
+ +
+
+

diffpy.structure.pdffitstructure module

+

Definition of PDFFitStructure class derived from Structure.

+
+
+class diffpy.structure.pdffitstructure.PDFFitStructure(*args, **kwargs)[source]
+

Bases: Structure

+

PDFFitStructure –> Structure with extra pdffit member.

+
+
Parameters:
+
    +
  • *args – See Structure class constructor.

  • +
  • **kwargs – See Structure class constructor.

  • +
+
+
+
+
+pdffit
+

Dictionary for storing following extra parameters from +PDFFit structure files:

+
+

‘scale’, ‘delta1’, ‘delta2’, ‘sratio’, +‘rcut’, ‘spcgr’, ‘dcell’, ‘ncell’

+
+
+
Type:
+

dict

+
+
+
+ +
+
+read(filename, format='auto')[source]
+

Same as Structure.read, but update spcgr value in +self.pdffit when parser can get spacegroup.

+

See Structure.read() for more info.

+
+
Parameters:
+
    +
  • filename (str) – File to be loaded.

  • +
  • format (str, Optional) – All structure formats are defined in parsers submodule, +when format == 'auto' all parsers are tried one by one.

  • +
+
+
Returns:
+

Instance of StructureParser used to load the data.

+
+
Return type:
+

StructureParser

+
+
+
+ +
+
+readStr(s, format='auto')
+

‘diffpy.structure.PDFFitStructure.readStr’ is deprecated and +will be removed in version 4.0.0.

+

Please use ‘diffpy.structure.PDFFitStructure.read_structure’ +instead.

+
+ +
+
+read_structure(s, format='auto')[source]
+

Same as Structure.readStr, but update spcgr value in +self.pdffit when parser can get spacegroup.

+

See Structure.readStr() for more info.

+
+
Parameters:
+
    +
  • s (str) – String with structure definition.

  • +
  • format (str, Optional) – All structure formats are defined in parsers submodule. When format == 'auto', +all parsers are tried one by one.

  • +
+
+
Returns:
+

Instance of StructureParser used to load the data.

+
+
Return type:
+

StructureParser

+
+
+
+ +
+ +
+
+

diffpy.structure.sgtbxspacegroups module

+

Extra space group representations generated using sgtbx module from +cctbx. Import of this module extends the SpaceGroupList in the +SpaceGroups module.

+
+
+diffpy.structure.sgtbxspacegroups.sgtbxSpaceGroupList
+

List of space group instances defined in this module.

+
+
Type:
+

list

+
+
+
+ +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/api/diffpy.structure.parsers.html b/api/diffpy.structure.parsers.html new file mode 100644 index 00000000..d88693f0 --- /dev/null +++ b/api/diffpy.structure.parsers.html @@ -0,0 +1,1771 @@ + + + + + + + + + diffpy.structure.parsers package — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.parsers package

+

Conversion plugins for various structure formats.

+

The recognized structure formats are defined by subclassing StructureParser, +by convention these classes are named P_<format>.py. The parser classes should +to override the parseLines() and toLines() methods of StructureParser. +Any structure parser needs to be registered in parser_index module.

+

For normal usage it should be sufficient to use the routines provided +in this module.

+
+
Content:
    +
  • StructureParser: base class for a concrete Parser

  • +
  • parser_index: dictionary of known structure formats

  • +
  • getParser: factory for Parser at given format

  • +
  • inputFormats: list of available input formats

  • +
  • outputFormats: list of available output formats

  • +
+
+
+
+
+diffpy.structure.parsers.getParser(format, **kw)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.get_parser(format, **kw)[source]
+

Return Parser instance for a given structure format.

+
+
Parameters:
+
    +
  • format (str) – String with the format name, see parser_index_mod.

  • +
  • **kw (dict) – Keyword arguments passed to the Parser init function.

  • +
+
+
Returns:
+

Parser instance for the given format.

+
+
Return type:
+

Parser

+
+
Raises:
+

StructureFormatError – When the format is not defined.

+
+
+
+ +
+
+diffpy.structure.parsers.inputFormats()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.input_formats instead.

+
+ +
+
+diffpy.structure.parsers.input_formats()[source]
+

Return list of implemented input structure formats.

+
+ +
+
+diffpy.structure.parsers.outputFormats()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.output_formats instead.

+
+ +
+
+diffpy.structure.parsers.output_formats()[source]
+

Return list of implemented output structure formats.

+
+ +
+

Submodules

+
+

diffpy.structure.parsers.p_rawxyz module

+

Parser for raw XYZ file format.

+

Raw XYZ is a 3 or 4 column text file with cartesian coordinates of atoms +and an optional first column for atom types.

+
+
+class diffpy.structure.parsers.p_rawxyz.P_rawxyz[source]
+

Bases: StructureParser

+

Parser –> StructureParser subclass for RAWXYZ format.

+
+
+format
+

Format name, default “rawxyz”.

+
+
Type:
+

str

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_rawxyz.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in RAWXYZ format.

+
+
Parameters:
+

lines (list of str) – List of lines in RAWXYZ format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – Invalid RAWXYZ format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_rawxyz.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in RAWXYZ format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in RAWXYZ format.

+
+
Return type:
+

list of str

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_rawxyz.getParser()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_rawxyz.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_rawxyz.get_parser()[source]
+

Return new parser object for RAWXYZ format.

+
+
Returns:
+

Instance of P_rawxyz.

+
+
Return type:
+

P_rawxyz

+
+
+
+ +
+
+

diffpy.structure.parsers.structureparser module

+

Definition of StructureParser, a base class for specific parsers.

+
+
+class diffpy.structure.parsers.structureparser.StructureParser[source]
+

Bases: object

+

Base class for all structure parsers.

+
+
+format
+

Format name of particular parser.

+
+
Type:
+

str

+
+
+
+ +
+
+filename
+

Path to structure file that is read or written.

+
+
Type:
+

str

+
+
+
+ +
+
+parse(s)[source]
+

Create Structure instance from a string.

+
+ +
+
+parseFile(filename)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.StructureParser.parse_file instead.

+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.StructureParser.parse_lines instead.

+
+ +
+
+parse_file(filename)[source]
+

Create Structure instance from an existing file.

+
+ +
+
+parse_lines(lines)[source]
+

Create Structure instance from a list of lines.

+

Return Structure object or raise StructureFormatError exception.

+
+

Note

+

This method has to be overloaded in derived class.

+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.StructureParser.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines.

+

Return list of strings.

+
+

Note

+

This method has to be overloaded in derived class.

+
+
+ +
+
+tostring(stru)[source]
+

Convert Structure instance to a string.

+
+ +
+ +
+
+

diffpy.structure.parsers.p_cif module

+

Parser for basic CIF file format.

+
+
+diffpy.structure.parsers.p_cif.rx_float
+

Constant regular expression for leading_float().

+
+
Type:
+

re.Pattern

+
+
+
+ +
+
+diffpy.structure.parsers.p_cif.symvec
+

Helper dictionary for getSymOp().

+
+
Type:
+

dict

+
+
+
+ + +
+
+class diffpy.structure.parsers.p_cif.P_cif(eps=None)[source]
+

Bases: StructureParser

+

Simple parser for CIF structure format.

+

Reads Structure from the first block containing _atom_site_label key. +Following blocks, if any, are ignored.

+
+
Parameters:
+

eps (float, Optional) – Fractional coordinates cutoff for duplicate positions. +When None use the default for ExpandAsymmetricUnit: 1.0e-5.

+
+
+
+
+format
+

Structure format name.

+
+
Type:
+

str

+
+
+
+ +
+
+ciffile
+

Instance of CifFile from PyCifRW.

+
+
Type:
+

CifFile

+
+
+
+ +
+
+stru
+

Structure instance used for CIF input or output.

+
+
Type:
+

Structure

+
+
+
+ +
+
+spacegroup
+

Instance of SpaceGroup used for symmetry expansion.

+
+
Type:
+

SpaceGroup

+
+
+
+ +
+
+eps
+

Resolution in fractional coordinates for non-equal positions. +Used for expansion of asymmetric unit.

+
+
Type:
+

float

+
+
+
+ +
+
+eau
+

Instance of ExpandAsymmetricUnit from SymmetryUtilities.

+
+
Type:
+

ExpandAsymmetricUnit

+
+
+
+ +
+
+asymmetric_unit
+

List of Atom instances for the original asymmetric unit in the CIF file.

+
+
Type:
+

list

+
+
+
+ +
+
+labelindex
+

Dictionary mapping unique atom label to index of Atom in self.asymmetric_unit.

+
+
Type:
+

dict

+
+
+
+ +
+
+anisotropy
+

Dictionary mapping unique atom label to displacement anisotropy resolved at that site.

+
+
Type:
+

dict

+
+
+
+ +
+
+cif_sgname
+

Space group name obtained by looking up the value of +_space_group_name_Hall, +_symmetry_space_group_name_Hall, +_space_group_name_H-M_alt, +_symmetry_space_group_name_H-M +items. None when neither is defined.

+
+
Type:
+

str or None

+
+
+
+ +
+
+BtoU = 0.012665147955292222
+

Conversion factor from B values to U values.

+
+
Type:
+

float

+
+
+
+ +
+
+parse(s)[source]
+

Create Structure instance from a string in CIF format.

+
+
Parameters:
+

s (str) – A string in CIF format.

+
+
Returns:
+

Structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – When the data do not constitute a valid CIF format.

+
+
+
+ +
+
+parseFile(filename)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_cif.parse_file instead.

+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_cif.parse_lines instead.

+
+ +
+
+parse_file(filename)[source]
+

Create Structure from an existing CIF file.

+
+
Parameters:
+

filename (str) – Path to structure file.

+
+
Returns:
+

Structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+
    +
  • StructureFormatError – When the data do not constitute a valid CIF format.

  • +
  • IOError – When the file cannot be opened.

  • +
+
+
+
+ +
+
+parse_lines(lines)
+

Parse list of lines in CIF format.

+
+
Parameters:
+

lines (list) – List of strings stripped of line terminator.

+
+
Returns:
+

Structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – When the data do not constitute a valid CIF format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_cif.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure to a list of lines in basic CIF format.

+
+
Parameters:
+

stru (Structure) – The structure to be converted.

+
+
Returns:
+

List of lines in basic CIF format.

+
+
Return type:
+

list

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_cif.getParser(eps=None)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_cif.getSymOp(s)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.get_symop instead.

+
+ +
+
+diffpy.structure.parsers.p_cif.get_parser(eps=None)[source]
+

Return new parser object for CIF format.

+
+
Parameters:
+

eps (float, Optional) – fractional coordinates cutoff for duplicate positions. +When None use the default for ExpandAsymmetricUnit: 1.0e-5.

+
+
Returns:
+

Instance of P_cif.

+
+
Return type:
+

P_cif

+
+
+
+ +
+
+diffpy.structure.parsers.p_cif.get_symop(s)[source]
+

Create SpaceGroups.SymOp instance from a string.

+
+
Parameters:
+

s (str) – Formula for equivalent coordinates, for example 'x,1/2-y,1/2+z'.

+
+
Returns:
+

Instance of SymOp.

+
+
Return type:
+

SymOp

+
+
+
+ +
+
+diffpy.structure.parsers.p_cif.leading_float(s, d=0.0)[source]
+

Extract the first float from a string and ignore trailing +characters.

+

Useful for extracting values from “value(std)” syntax.

+
+
Parameters:
+
    +
  • s (str) – The string to be scanned for floating point value.

  • +
  • d (float, Optional) – The default value when s is “.” or “?”, which in CIF +format stands for inapplicable and unknown, respectively.

  • +
+
+
Returns:
+

The extracted floating point value.

+
+
Return type:
+

float

+
+
Raises:
+

ValueError – When string does not start with a float.

+
+
+
+ +
+
+

diffpy.structure.parsers.p_auto module

+

Parser for automatic file format detection.

+

This Parser does not provide the the toLines() method.

+
+
+class diffpy.structure.parsers.p_auto.P_auto(**kw)[source]
+

Bases: StructureParser

+

Parser with automatic detection of structure format.

+

This parser attempts to automatically detect the format of a given +structure file and parse it accordingly. When successful, it sets +its format attribute to the detected structure format.

+
+
Parameters:
+

**kw (dict) – Keyword arguments for the structure parser.

+
+
+
+
+format
+

Detected structure format. Initially set to “auto” and updated +after successful detection of the structure format.

+
+
Type:
+

str

+
+
+
+ +
+
+pkw
+

Keyword arguments passed to the parser.

+
+
Type:
+

dict

+
+
+
+ +
+
+parse(s)[source]
+

Detect format and create Structure instance from a string.

+

Set format attribute to the detected file format.

+
+
Parameters:
+

s (str) – String with structure data.

+
+
Returns:
+

Structure object.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError

+
+
+
+ +
+
+parseFile(filename)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_auto.parse_file instead.

+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_auto.parse_lines instead.

+
+ +
+
+parse_file(filename)[source]
+

Detect format and create Structure instance from an existing +file.

+

Set format attribute to the detected file format.

+
+
Parameters:
+

filename (str) – Path to structure file.

+
+
Returns:
+

Structure object.

+
+
Return type:
+

Structure

+
+
Raises:
+
    +
  • StructureFormatError – If the structure format is unknown or invalid.

  • +
  • IOError – If the file cannot be read.

  • +
+
+
+
+ +
+
+parse_lines(lines)[source]
+

Detect format and create Structure instance from a list of +lines.

+

Set format attribute to the detected file format.

+
+
Parameters:
+

lines (list) – List of lines with structure data.

+
+
Returns:
+

Structure object.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_auto.getParser(**kw)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_auto.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_auto.get_parser(**kw)[source]
+

Return a new instance of the automatic parser.

+
+
Parameters:
+

**kw (dict) – Keyword arguments for the structure parser

+
+
Returns:
+

Instance of P_auto.

+
+
Return type:
+

P_auto

+
+
+
+ +
+
+

diffpy.structure.parsers.p_pdffit module

+

Parser for PDFfit structure format.

+
+
+class diffpy.structure.parsers.p_pdffit.P_pdffit[source]
+

Bases: StructureParser

+

Parser for PDFfit structure format.

+
+
+format
+

Format name, default “pdffit”.

+
+
Type:
+

str

+
+
+
+ +
+
+ignored_lines
+

List of lines ignored during parsing.

+
+
Type:
+

list

+
+
+
+ +
+
+stru
+

Structure instance used for cif input or output.

+
+
Type:
+

PDFFitStructure

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_pdffit.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in PDFfit format.

+
+
Parameters:
+

lines (list of str) – List of lines in PDB format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – File not in PDFfit format.

+
+
+
+ +
+
+toLines(stru)[source]
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_pdffit.toLines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in PDFfit format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in PDFfit format.

+
+
Return type:
+

list of str

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_pdffit.getParser()[source]
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_pdffit.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_pdffit.get_parser()[source]
+

Return new parser object for PDFfit format.

+
+
Returns:
+

Instance of P_pdffit.

+
+
Return type:
+

P_pdffit

+
+
+
+ +
+
+

diffpy.structure.parsers.p_xcfg module

+

Parser for extended CFG format used by atomeye.

+
+
+diffpy.structure.parsers.p_xcfg.AtomicMass
+

Dictionary of atomic masses for elements.

+
+
Type:
+

dict

+
+
+
+ +
+
+class diffpy.structure.parsers.p_xcfg.P_xcfg[source]
+

Bases: StructureParser

+

Parser for AtomEye extended CFG format.

+
+
+format
+

Format name, default “xcfg”.

+
+
Type:
+

str

+
+
+
+ +
+
+cluster_boundary = 2
+

Width of boundary around corners of non-periodic +cluster to avoid PBC effects in atomeye.

+
+
Type:
+

int

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_xcfg.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in XCFG format.

+
+
Parameters:
+

lines (list of str) – List of lines in XCFG format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – Invalid XCFG format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_xcfg.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in XCFG atomeye +format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in XCFG format.

+
+
Return type:
+

list of str

+
+
Raises:
+

StructureFormatError – Cannot convert empty structure to XCFG format.

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_xcfg.getParser()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_xcfg.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_xcfg.get_parser()[source]
+

Return new parser object for XCFG format.

+
+
Returns:
+

Instance of P_xcfg.

+
+
Return type:
+

P_xcfg

+
+
+
+ +
+
+

diffpy.structure.parsers.parser_index_mod module

+

Index of recognized structure formats, their IO capabilities and +associated modules where they are defined.

+
+
+diffpy.structure.parsers.parser_index_mod.parser_index
+

Dictionary of recognized structure formats. The keys are format names +and the values are dictionaries with the following keys:

+
+
modulestr

Name of the module that defines the parser class.

+
+
file_extensionstr

File extension for the format, including the leading dot.

+
+
file_patternstr

File pattern for the format, using ‘|’ as separator for multiple +patterns.

+
+
has_inputbool

True if the parser can read the format.

+
+
has_outputbool

True if the parser can write the format.

+
+
+
+
Type:
+

dict

+
+
+
+ +
+

Note

+

Plugins for new structure formats need to be added to the parser_index +dictionary in this module.

+
+
+
+

diffpy.structure.parsers.p_pdb module

+

Basic parser for PDB structure format.

+ +
+
+class diffpy.structure.parsers.p_pdb.P_pdb[source]
+

Bases: StructureParser

+

Simple parser for PDB format.

+

The parser understands following PDB records: TITLE, CRYST1, SCALE1, +SCALE2, SCALE3, ATOM, SIGATM, ANISOU, SIGUIJ, TER, HETATM, END.

+
+
+format
+

Format name, default “pdb”.

+
+
Type:
+

str

+
+
+
+ +
+
+atomLines(stru, idx)
+

Build ATOM records and possibly SIGATM, ANISOU or +SIGUIJ records for structure stru atom number aidx.

+
+ +
+
+atom_lines(stru, idx)[source]
+

Build ATOM records and possibly SIGATM, ANISOU or +SIGUIJ records for structure stru atom number aidx.

+
+ +
+
+cryst1Lines(stru)
+

Build lines corresponding to CRYST1 record.

+
+ +
+
+cryst1_lines(stru)[source]
+

Build lines corresponding to CRYST1 record.

+
+ +
+
+orderOfRecords = ['HEADER', 'OBSLTE', 'TITLE', 'CAVEAT', 'COMPND', 'SOURCE', 'KEYWDS', 'EXPDTA', 'AUTHOR', 'REVDAT', 'SPRSDE', 'JRNL', 'REMARK', 'REMARK', 'REMARK', 'REMARK', 'DBREF', 'SEQADV', 'SEQRES', 'MODRES', 'HET', 'HETNAM', 'HETSYN', 'FORMUL', 'HELIX', 'SHEET', 'TURN', 'SSBOND', 'LINK', 'HYDBND', 'SLTBRG', 'CISPEP', 'SITE', 'CRYST1', 'ORIGX1', 'ORIGX2', 'ORIGX3', 'SCALE1', 'SCALE2', 'SCALE3', 'MTRIX1', 'MTRIX2', 'MTRIX3', 'TVECT', 'MODEL', 'ATOM', 'SIGATM', 'ANISOU', 'SIGUIJ', 'TER', 'HETATM', 'ENDMDL', 'CONECT', 'MASTER', 'END']
+

Ordered list of PDB record labels.

+
+
Type:
+

list

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_pdb.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in PDB format.

+
+
Parameters:
+

lines (list of str) – List of lines in PDB format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – Invalid PDB record.

+
+
+
+ +
+
+titleLines(stru)
+

Build lines corresponding to TITLE record.

+
+ +
+
+title_lines(stru)[source]
+

Build lines corresponding to TITLE record.

+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_pdb.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in PDB format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in PDB format.

+
+
Return type:
+

list of str

+
+
+
+ +
+
+validRecords = {'ANISOU': None, 'ATOM': None, 'AUTHOR': None, 'CAVEAT': None, 'CISPEP': None, 'COMPND': None, 'CONECT': None, 'CRYST1': None, 'DBREF': None, 'END': None, 'ENDMDL': None, 'EXPDTA': None, 'FORMUL': None, 'HEADER': None, 'HELIX': None, 'HET': None, 'HETATM': None, 'HETNAM': None, 'HETSYN': None, 'HYDBND': None, 'JRNL': None, 'KEYWDS': None, 'LINK': None, 'MASTER': None, 'MODEL': None, 'MODRES': None, 'MTRIX1': None, 'MTRIX2': None, 'MTRIX3': None, 'OBSLTE': None, 'ORIGX1': None, 'ORIGX2': None, 'ORIGX3': None, 'REMARK': None, 'REVDAT': None, 'SCALE1': None, 'SCALE2': None, 'SCALE3': None, 'SEQADV': None, 'SEQRES': None, 'SHEET': None, 'SIGATM': None, 'SIGUIJ': None, 'SITE': None, 'SLTBRG': None, 'SOURCE': None, 'SPRSDE': None, 'SSBOND': None, 'TER': None, 'TITLE': None, 'TURN': None, 'TVECT': None}
+

Dictionary of PDB record labels.

+
+
Type:
+

dict

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_pdb.getParser()
+

Return new parser object for PDB format.

+
+
Returns:
+

Instance of P_pdb.

+
+
Return type:
+

P_pdb

+
+
+
+ +
+
+diffpy.structure.parsers.p_pdb.get_parser()[source]
+

Return new parser object for PDB format.

+
+
Returns:
+

Instance of P_pdb.

+
+
Return type:
+

P_pdb

+
+
+
+ +
+
+

diffpy.structure.parsers.p_discus module

+

Parser for DISCUS structure format.

+
+
+class diffpy.structure.parsers.p_discus.P_discus[source]
+

Bases: StructureParser

+

Parser for DISCUS structure format. The parser chokes on molecule +and generator records.

+
+
+format
+

File format name, default “discus”.

+
+
Type:
+

str

+
+
+
+ +
+
+nl
+

Line number of the current line being parsed.

+
+
Type:
+

int

+
+
+
+ +
+
+lines
+

List of lines from the input file.

+
+
Type:
+

list of str

+
+
+
+ +
+
+line
+

Current line being parsed.

+
+
Type:
+

str

+
+
+
+ +
+
+stru
+

Structure being parsed.

+
+
Type:
+

PDFFitStructure

+
+
+
+ +
+
+ignored_lines
+

List of lines that were ignored during parsing.

+
+
Type:
+

list of str

+
+
+
+ +
+
+cell_read
+

True if cell record processed.

+
+
Type:
+

bool

+
+
+
+ +
+
+ncell_read
+

True if ncell record processed.

+
+
Type:
+

bool

+
+
+
+ +
+
+parseLines(lines)
+

Parse list of lines in DISCUS format.

+
+
Parameters:
+

lines (list of str) – List of lines from the input file.

+
+
Returns:
+

Parsed PDFFitStructure instance.

+
+
Return type:
+

PDFFitStructure

+
+
Raises:
+

StructureFormatError – If the file is not in DISCUS format.

+
+
+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in DISCUS format.

+
+
Parameters:
+

lines (list of str) – List of lines from the input file.

+
+
Returns:
+

Parsed PDFFitStructure instance.

+
+
Return type:
+

PDFFitStructure

+
+
Raises:
+

StructureFormatError – If the file is not in DISCUS format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_discus.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in DISCUS format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in DISCUS format.

+
+
Return type:
+

list of str

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_discus.getParser()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_discus.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_discus.get_parser()[source]
+

Return new parser object for DISCUS format.

+
+
Returns:
+

Instance of P_discus.

+
+
Return type:
+

P_discus

+
+
+
+ +
+
+

diffpy.structure.parsers.p_vesta module

+

Parser for VESTA format used by VESTA (Visualization for Electronic +and Structural Analysis).

+

This module replaces the AtomEye XCFG parser (P_xcfg). The XCFG parser and +all its original attributes are preserved for backward compatibility. +VESTA is the actively maintained successor viewer.

+
+
+diffpy.structure.parsers.p_vesta.AtomicMass
+

Dictionary of atomic masses for elements.

+
+
Type:
+

dict

+
+
+
+ +
+
+class diffpy.structure.parsers.p_vesta.P_vesta[source]
+

Bases: StructureParser

+

Parser for VESTA native structure format (.vesta).

+

VESTA (Visualization for Electronic and Structural Analysis) is the +actively maintained successor to AtomEye. This parser writes the +native VESTA format understood by VESTA 3.x and later.

+
+
+format
+

Format name, default “vesta”.

+
+
Type:
+

str

+
+
+
+ +

Notes

+

The cluster_boundary attribute is retained from the original +AtomEye/XCFG parser for API compatibility; it is not used by VESTA +because VESTA handles periodicity natively.

+
+
+cluster_boundary = 2
+

Width of boundary around corners of non-periodic cluster. +Retained from the original AtomEye/XCFG parser for API compatibility. +VESTA handles periodicity natively so this value has no effect on output.

+
+
Type:
+

int

+
+
+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in VESTA format.

+

Reads the STRUC, ATOMT, and COORD sections of a +.vesta file to reconstruct a Structure.

+
+
Parameters:
+

lines (list of str) – Lines of a VESTA format file.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – When the file does not conform to the VESTA format.

+
+
+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in VESTA format.

+

Produces a .vesta file readable by VESTA 3.x and later, +containing STRUC, ATOMT, and COORD sections derived +from the structure’s lattice and atomic data.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

Lines of a VESTA format file.

+
+
Return type:
+

list of str

+
+
Raises:
+

StructureFormatError – Cannot convert empty structure to VESTA format.

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_vesta.get_parser()[source]
+

Return new parser object for VESTA format.

+
+
Returns:
+

Instance of P_vesta.

+
+
Return type:
+

P_vesta

+
+
+
+ +
+
+

diffpy.structure.parsers.p_xyz module

+

Parser for XYZ file format, where.

+
    +
  • First line gives number of atoms.

  • +
  • Second line has optional title.

  • +
  • Remaining lines contain element, x, y, z.

  • +
+
+
+class diffpy.structure.parsers.p_xyz.P_xyz[source]
+

Bases: StructureParser

+

Parser for standard XYZ structure format.

+
+
+format
+

Format name, default “xyz”.

+
+
Type:
+

str

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_xyz.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in XYZ format.

+
+
Parameters:
+

lines (list of str) – List of lines in XYZ format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – Invalid XYZ format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_xyz.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in XYZ format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in XYZ format.

+
+
Return type:
+

list of str

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_xyz.getParser()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_xyz.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_xyz.get_parser()[source]
+

Return new parser object for XYZ format.

+
+
Returns:
+

Instance of P_xyz.

+
+
Return type:
+

P_xcfg

+
+
+
+ +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/cookiecutter.json b/cookiecutter.json deleted file mode 100644 index 5b4de11a..00000000 --- a/cookiecutter.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "author_names": "Simon Billinge, Sangjoon Bob Lee", - "author_emails": "sbillinge@ucsb.edu, sl5400@columbia.edu", - "maintainer_names": "Simon Billinge, Sangjoon Bob Lee", - "maintainer_emails": "sbillinge@ucsb.edu, sl5400@columbia.edu", - "maintainer_github_usernames": "sbillinge, bobleesj", - "contributors": "Chris Farrow, Pavol Juhas, Simon Billinge, Billinge Group members", - "license_holders": "The Trustees of Columbia University in the City of New York", - "project_name": "diffpy.structure", - "github_username_or_orgname": "diffpy", - "github_repo_name": "diffpy.structure", - "conda_pypi_package_dist_name": "diffpy.structure", - "package_dir_name": "diffpy.structure", - "project_short_description": "Crystal structure container and parsers for structure formats.", - "project_keywords": "diffpy, crystal structure data storage, CIF, PDB", - "minimum_supported_python_version": "3.12", - "maximum_supported_python_version": "3.14", - "project_needs_c_code_compiled": "No", - "project_has_gui_tests": "No" -} diff --git a/devutils/README.md b/devutils/README.md deleted file mode 100644 index 773f4f74..00000000 --- a/devutils/README.md +++ /dev/null @@ -1 +0,0 @@ -Library of scripts used as part of the code development,please keep it out of the package but in the same repo. diff --git a/devutils/sgtbx_extra_groups.py b/devutils/sgtbx_extra_groups.py deleted file mode 100644 index 48dfdb99..00000000 --- a/devutils/sgtbx_extra_groups.py +++ /dev/null @@ -1,212 +0,0 @@ -#!/usr/bin/env python - -"""Quick and extremely dirty script for generating code for SpaceGroup -that are defined in cctbx, but not in mmLib. It was used to generate -module sgtbxspacegroups. - -This is a utility script that should not be included with code -distribution. - -Not to be included with code distributions. -""" - - -import math -import re - -import numpy -from cctbx import sgtbx - -from diffpy.structure.spacegroups import SpaceGroup, SymOp, is_space_group_identifier, mmLibSpaceGroupList - - -def tuple_to_sg_array(tpl): - if not _rtarrays: - import diffpy.structure.SpaceGroups as sgmod - - for n in dir(sgmod): - if not n.startswith("Rot_") and not n.startswith("Tr_"): - continue - a = getattr(sgmod, n) - t = tuple(a.flatten()) - _rtarrays[t] = a - if len(tpl) == 3: - tpl = tuple([(x - math.floor(x)) for x in tpl]) - if tpl not in _rtarrays: - _rtarrays[tpl] = numpy.array(tpl, dtype=float) - return _rtarrays[tpl] - - -_rtarrays = {} - - -def mm_space_group_from_symbol(symbol): - """Construct SpaceGroup instance from a string symbol using sgtbx - data.""" - sginfo = sgtbx.space_group_info(symbol) - symop_list = [] - symop_list = get_symop_list(sginfo.group()) - sgtype = sginfo.type() - uhm = sgtype.lookup_symbol() - sgsmbls = sgtbx.space_group_symbols(uhm) - kw = {} - kw["number"] = sgtype.number() - kw["num_sym_equiv"] = len(symop_list) - kw["num_primitive_sym_equiv"] = count_unique_rotations(symop_list) - kw["short_name"] = sgsmbls.hermann_mauguin().replace(" ", "") - pgt = sgsmbls.point_group_type() - pgn = "PG" + re.sub(r"-(\d)", "\\1bar", pgt) - kw["point_group_name"] = pgn - kw["crystal_system"] = sgsmbls.crystal_system().upper() - kw["pdb_name"] = sgsmbls.hermann_mauguin() - kw["symop_list"] = symop_list - mmsg = SpaceGroup(**kw) - return mmsg - - -def adjust_mm_space_group_number(mmsg): - sg0 = [x for x in mmLibSpaceGroupList if x.number == mmsg.number] - if sg0 and cmp_space_groups(sg0[0], mmsg): - return - while mmsg.number in sgnumbers: - mmsg.number += 1000 - sgnumbers.append(mmsg.number) - - -def get_symop_list(grp): - symop_list = [] - for op in grp: - r_sgtbx = op.r().as_double() - t_sgtbx = op.t().as_double() - R = tuple_to_sg_array(r_sgtbx) - t = tuple_to_sg_array(t_sgtbx) - symop_list.append(SymOp(R, t)) - return symop_list - - -def count_unique_rotations(symop_list): - unique_rotations = set() - for op in symop_list: - tpl = tuple(op.R.flatten()) - unique_rotations.add(tpl) - return len(unique_rotations) - - -def cmp_space_groups(sg0, sg1): - if sg0 is sg1: - return True - s0 = hash_mm_space_group(sg0) - s1 = hash_mm_space_group(sg1) - return s0 == s1 - - -def find_equivalent_mm_space_group(grp): - if not _equivmmsg: - for sgn in mmLibSpaceGroupList: - ssgn = hash_mm_space_group(sgn) - _equivmmsg.setdefault(ssgn, sgn) - ssg = hash_sgtbx_group(grp) - return _equivmmsg.get(ssg) - - -_equivmmsg = {} - - -def find_equivalent_sgtbx_space_group(sgmm): - if not _equivsgtbx: - for smbls in sgtbx.space_group_symbol_iterator(): - uhm = smbls.universal_hermann_mauguin() - grp = sgtbx.space_group_info(uhm).group() - hgrp = hash_sgtbx_group(grp) - _equivsgtbx.setdefault(hgrp, grp) - hgmm = hash_mm_space_group(sgmm) - return _equivsgtbx.get(hgmm) - - -_equivsgtbx = {} - - -def hash_mm_space_group(sg): - lines = [str(sg.number % 1000)] + sorted(map(str, sg.iter_symops())) - s = "\n".join(lines) - return s - - -def hash_sgtbx_group(grp): - n = grp.type().number() - lines = [str(n)] + sorted(map(str, get_symop_list(grp))) - s = "\n".join(lines) - return s - - -sgnumbers = [sg.number for sg in mmLibSpaceGroupList] - -_SGsrc = """\ -sg%(number)i = SpaceGroup( - number = %(number)i, - num_sym_equiv = %(num_sym_equiv)i, - num_primitive_sym_equiv = %(num_sym_equiv)i, - short_name = %(short_name)r, - point_group_name = %(point_group_name)r, - crystal_system = %(crystal_system)r, - pdb_name = %(pdb_name)r, - symop_list = [ - @SYMOPS@ - ] -) -""" - - -def sg_code(mmsg): - src0 = _SGsrc % mmsg.__dict__ - src1 = src0.replace("@SYMOPS@", symops_code(mmsg)) - return src1 - - -def symops_code(mmsg): - lst = ["%8s%s," % ("", symop_code(op)) for op in mmsg.iter_symops()] - src = "\n".join(lst).strip() - return src - - -def symop_code(op): - if not _rtnames: - import diffpy.structure.SpaceGroups as sgmod - - for n in dir(sgmod): - if not n.startswith("Rot_") and not n.startswith("Tr_"): - continue - a = getattr(sgmod, n) - at = tuple(a.flatten()) - _rtnames[at] = "sgmod." + n - nR = _rtnames[tuple(op.R.flatten())] - nt = _rtnames[tuple(op.t)] - src = "SymOp(%s, %s)" % (nR, nt) - return src - - -_rtnames = {} - - -def main(): - duplicates = set() - for smbls in sgtbx.space_group_symbol_iterator(): - uhm = smbls.universal_hermann_mauguin() - grp = sgtbx.space_group_info(uhm).group() - if find_equivalent_mm_space_group(grp): - continue - shn = smbls.hermann_mauguin().replace(" ", "") - if is_space_group_identifier(shn): - continue - sg = mm_space_group_from_symbol(uhm) - hsg = hash_mm_space_group(sg) - if hsg in duplicates: - continue - adjust_mm_space_group_number(sg) - duplicates.add(hsg) - print(sg_code(sg)) - return - - -if __name__ == "__main__": - main() diff --git a/diffpy.structure.apps.html b/diffpy.structure.apps.html new file mode 100644 index 00000000..b9637152 --- /dev/null +++ b/diffpy.structure.apps.html @@ -0,0 +1,308 @@ + + + + + + + + + diffpy.structure.apps package — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.apps package

+
+

Submodules

+
+
+

diffpy.structure.apps.anyeye module

+

Anyeye view structure file in atomeye.

+

Usage: anyeye [options] strufile

+

Anyeye understands more Structure formats than atomeye. It converts strufile +to a temporary XCFG file which is opened in atomeye. See supported file formats: +inputFormats

+
+
Options:
+
-f, --formula
+

Override chemical formula in strufile. The formula defines +elements in the same order as in strufile, e.g., Na4Cl4.

+
+
-w, --watch
+

Watch input file for changes.

+
+
--viewer=VIEWER
+

The structure viewer program, by default “atomeye”. +The program will be executed as “VIEWER structurefile”.

+
+
--formats=FORMATS
+

Comma-separated list of file formats that are understood +by the VIEWER, by default "xcfg,pdb". Files of other +formats will be converted to the first listed format.

+
+
-h, --help
+

Display this message and exit.

+
+
-V, --version
+

Show script version and exit.

+
+
+
+
+
+
+diffpy.structure.apps.anyeye.cleanUp(pd)
+
+ +
+
+diffpy.structure.apps.anyeye.clean_up(pd)[source]
+
+ +
+
+diffpy.structure.apps.anyeye.convertStructureFile(pd)
+
+ +
+
+diffpy.structure.apps.anyeye.convert_structure_file(pd)[source]
+
+ +
+
+diffpy.structure.apps.anyeye.die(exit_status=0, pd={})[source]
+
+ +
+
+diffpy.structure.apps.anyeye.loadStructureFile(filename, format='auto')
+

Load structure from specified file.

+
+
Parameters:
+
    +
  • filename (str) – Path to the structure file.

  • +
  • format (str, Optional) – File format, by default “auto”.

  • +
+
+
Returns:
+

A tuple of (Structure, fileformat).

+
+
Return type:
+

tuple

+
+
+
+ +
+
+diffpy.structure.apps.anyeye.load_structure_file(filename, format='auto')[source]
+

Load structure from specified file.

+
+
Parameters:
+
    +
  • filename (str) – Path to the structure file.

  • +
  • format (str, Optional) – File format, by default “auto”.

  • +
+
+
Returns:
+

A tuple of (Structure, fileformat).

+
+
Return type:
+

tuple

+
+
+
+ +
+
+diffpy.structure.apps.anyeye.main()[source]
+
+ +
+
+diffpy.structure.apps.anyeye.parseFormula(formula)
+

Parse chemical formula and return a list of elements.

+
+ +
+
+diffpy.structure.apps.anyeye.parse_formula(formula)[source]
+

Parse chemical formula and return a list of elements.

+
+ +
+
+diffpy.structure.apps.anyeye.signalHandler(signum, stackframe)
+
+ +
+
+diffpy.structure.apps.anyeye.signal_handler(signum, stackframe)[source]
+
+ +
+
+diffpy.structure.apps.anyeye.usage(style=None)[source]
+

Show usage info, for style=="brief" show only first 2 +lines.

+
+ +
+
+diffpy.structure.apps.anyeye.version()[source]
+
+ +
+
+diffpy.structure.apps.anyeye.watchStructureFile(pd)
+
+ +
+
+diffpy.structure.apps.anyeye.watch_structure_file(pd)[source]
+
+ +
+
+

diffpy.structure.apps.transtru module

+

Translate structure file to different format.

+

Usage: transtru INFMT..OUTFMT strufile

+

Translates structure file strufile from INFMT to OUTFMT format and prints it +to the screen. Use “-” as strufile to read from standard input. To save the +translated file, use

+
+

transtru INFMT..OUTFMT strufile > strufile.out

+
+
+
Supported input and output structure formats are
    +
  • INFMT: inputFormats

  • +
  • OUTFMT: outputFormats

  • +
+
+
Options:
+
-h, --help
+

Display this message.

+
+
-V, --version
+

Show script version.

+
+
+
+
+
+
+diffpy.structure.apps.transtru.main()[source]
+
+ +
+
+diffpy.structure.apps.transtru.usage(style=None)[source]
+

Show usage info, for style=="brief" show only first 2 +lines.

+
+ +
+
+diffpy.structure.apps.transtru.version()[source]
+
+ +
+
+

Module contents

+

Script applications that use the diffpy.structure package.

+
+
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/diffpy.structure.expansion.html b/diffpy.structure.expansion.html new file mode 100644 index 00000000..e93a4f20 --- /dev/null +++ b/diffpy.structure.expansion.html @@ -0,0 +1,255 @@ + + + + + + + + + diffpy.structure.expansion package — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.expansion package

+
+

Submodules

+
+
+

diffpy.structure.expansion.makeellipsoid module

+

Make a spheroid nanoparticle from a template structure.

+
+
+diffpy.structure.expansion.makeellipsoid.makeEllipsoid(S, a, b=None, c=None)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.make_ellipsoid instead.

+
+ +
+
+diffpy.structure.expansion.makeellipsoid.makeSphere(S, radius)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.make_sphere instead.

+
+ +
+
+diffpy.structure.expansion.makeellipsoid.make_ellipsoid(S, a, b=None, c=None)[source]
+

Cut a Structure out of another one.

+
+
Parameters:
+
    +
  • S (Structure) – A Structure instance.

  • +
  • a (float) – Primary equatorial radius (along x-axis).

  • +
  • b (float, Optional) – Secondary equatorial radius (along y-axis). If b is None +(default), then it is set equal to a.

  • +
  • c (float, Optional) – Polar radius (along z-axis). If c is None (default), then it is +set equal to a.

  • +
+
+
Returns:
+

A new Structure instance.

+
+
Return type:
+

Structure

+
+
+
+ +
+
+diffpy.structure.expansion.makeellipsoid.make_sphere(S, radius)[source]
+

Create a spherical nanoparticle.

+
+
Parameters:
+
    +
  • S (Structure) – A Structure instance.

  • +
  • radius (float) – Primary equatorial radius (along x-axis).

  • +
+
+
Returns:
+

A new Structure instance.

+
+
Return type:
+

Structure

+
+
+
+ +
+
+

diffpy.structure.expansion.shapeutils module

+
+
+diffpy.structure.expansion.shapeutils.findCenter(S)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.find_center instead.

+
+ +
+
+diffpy.structure.expansion.shapeutils.findCenter_deprecation_msg = 'diffpy.structure'
+

Utilities for making shapes.

+
+ +
+
+diffpy.structure.expansion.shapeutils.find_center(S)[source]
+

Find the approximate center Atom of a Structure.

+

The center of the Structure is the Atom closest to (0.5, 0.5, 0.5).

+
+
Parameters:
+

S (Structure) – A Structure instance.

+
+
Returns:
+

The index of the center Atom.

+
+
Return type:
+

int

+
+
+
+ +
+
+

diffpy.structure.expansion.supercell_mod module

+

This module contains functions for simple Structure +manipulation.

+
+
+diffpy.structure.expansion.supercell_mod.supercell(S, mno)[source]
+

Perform supercell expansion for a Structure.

+

New lattice parameters are multiplied and fractional coordinates +divided by corresponding multiplier. New Atoms are grouped with +their source in the original cell.

+
+
Parameters:
+
    +
  • S (Structure) – An instance of Structure from diffpy.structure.

  • +
  • mno (array_like) – Sequence of 3 integers for cell multipliers along +the a, b and c axes.

  • +
+
+
Returns:
+

A new Structure instance representing the expanded supercell.

+
+
Return type:
+

Structure

+
+
Raises:
+
    +
  • TypeErrorS is not a Structure instance.

  • +
  • ValueError – Invalid mno argument.

  • +
+
+
+
+ +
+
+

Module contents

+

Methods and classes for manipulating Structure instances.

+
+
Package content:
    +
  • supercell – create a supercell from an existing Structure.

  • +
+
+
+
+
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/diffpy.structure.parsers.html b/diffpy.structure.parsers.html new file mode 100644 index 00000000..962d03fb --- /dev/null +++ b/diffpy.structure.parsers.html @@ -0,0 +1,1631 @@ + + + + + + + + + diffpy.structure.parsers package — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.parsers package

+
+

Submodules

+
+
+

diffpy.structure.parsers.p_auto module

+

Parser for automatic file format detection.

+

This Parser does not provide the the toLines() method.

+
+
+class diffpy.structure.parsers.p_auto.P_auto(**kw)[source]
+

Bases: StructureParser

+

Parser with automatic detection of structure format.

+

This parser attempts to automatically detect the format of a given +structure file and parse it accordingly. When successful, it sets +its format attribute to the detected structure format.

+
+
Parameters:
+

**kw (dict) – Keyword arguments for the structure parser.

+
+
+
+
+format
+

Detected structure format. Initially set to “auto” and updated +after successful detection of the structure format.

+
+
Type:
+

str

+
+
+
+ +
+
+pkw
+

Keyword arguments passed to the parser.

+
+
Type:
+

dict

+
+
+
+ +
+
+parse(s)[source]
+

Detect format and create Structure instance from a string.

+

Set format attribute to the detected file format.

+
+
Parameters:
+

s (str) – String with structure data.

+
+
Returns:
+

Structure object.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError

+
+
+
+ +
+
+parseFile(filename)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_auto.parse_file instead.

+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_auto.parse_lines instead.

+
+ +
+
+parse_file(filename)[source]
+

Detect format and create Structure instance from an existing +file.

+

Set format attribute to the detected file format.

+
+
Parameters:
+

filename (str) – Path to structure file.

+
+
Returns:
+

Structure object.

+
+
Return type:
+

Structure

+
+
Raises:
+
    +
  • StructureFormatError – If the structure format is unknown or invalid.

  • +
  • IOError – If the file cannot be read.

  • +
+
+
+
+ +
+
+parse_lines(lines)[source]
+

Detect format and create Structure instance from a list of +lines.

+

Set format attribute to the detected file format.

+
+
Parameters:
+

lines (list) – List of lines with structure data.

+
+
Returns:
+

Structure object.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_auto.getParser(**kw)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_auto.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_auto.get_parser(**kw)[source]
+

Return a new instance of the automatic parser.

+
+
Parameters:
+

**kw (dict) – Keyword arguments for the structure parser

+
+
Returns:
+

Instance of P_auto.

+
+
Return type:
+

P_auto

+
+
+
+ +
+
+

diffpy.structure.parsers.p_cif module

+

Parser for basic CIF file format.

+
+
+diffpy.structure.parsers.p_cif.rx_float
+

Constant regular expression for leading_float().

+
+
Type:
+

re.Pattern

+
+
+
+ +
+
+diffpy.structure.parsers.p_cif.symvec
+

Helper dictionary for getSymOp().

+
+
Type:
+

dict

+
+
+
+ + +
+
+class diffpy.structure.parsers.p_cif.P_cif(eps=None)[source]
+

Bases: StructureParser

+

Simple parser for CIF structure format.

+

Reads Structure from the first block containing _atom_site_label key. +Following blocks, if any, are ignored.

+
+
Parameters:
+

eps (float, Optional) – Fractional coordinates cutoff for duplicate positions. +When None use the default for ExpandAsymmetricUnit: 1.0e-5.

+
+
+
+
+format
+

Structure format name.

+
+
Type:
+

str

+
+
+
+ +
+
+ciffile
+

Instance of CifFile from PyCifRW.

+
+
Type:
+

CifFile

+
+
+
+ +
+
+stru
+

Structure instance used for CIF input or output.

+
+
Type:
+

Structure

+
+
+
+ +
+
+spacegroup
+

Instance of SpaceGroup used for symmetry expansion.

+
+
Type:
+

SpaceGroup

+
+
+
+ +
+
+eps
+

Resolution in fractional coordinates for non-equal positions. +Used for expansion of asymmetric unit.

+
+
Type:
+

float

+
+
+
+ +
+
+eau
+

Instance of ExpandAsymmetricUnit from SymmetryUtilities.

+
+
Type:
+

ExpandAsymmetricUnit

+
+
+
+ +
+
+asymmetric_unit
+

List of Atom instances for the original asymmetric unit in the CIF file.

+
+
Type:
+

list

+
+
+
+ +
+
+labelindex
+

Dictionary mapping unique atom label to index of Atom in self.asymmetric_unit.

+
+
Type:
+

dict

+
+
+
+ +
+
+anisotropy
+

Dictionary mapping unique atom label to displacement anisotropy resolved at that site.

+
+
Type:
+

dict

+
+
+
+ +
+
+cif_sgname
+

Space group name obtained by looking up the value of +_space_group_name_Hall, +_symmetry_space_group_name_Hall, +_space_group_name_H-M_alt, +_symmetry_space_group_name_H-M +items. None when neither is defined.

+
+
Type:
+

str or None

+
+
+
+ +
+
+BtoU = 0.012665147955292222
+

Conversion factor from B values to U values.

+
+
Type:
+

float

+
+
+
+ +
+
+parse(s)[source]
+

Create Structure instance from a string in CIF format.

+
+
Parameters:
+

s (str) – A string in CIF format.

+
+
Returns:
+

Structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – When the data do not constitute a valid CIF format.

+
+
+
+ +
+
+parseFile(filename)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_cif.parse_file instead.

+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_cif.parse_lines instead.

+
+ +
+
+parse_file(filename)[source]
+

Create Structure from an existing CIF file.

+
+
Parameters:
+

filename (str) – Path to structure file.

+
+
Returns:
+

Structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+
    +
  • StructureFormatError – When the data do not constitute a valid CIF format.

  • +
  • IOError – When the file cannot be opened.

  • +
+
+
+
+ +
+
+parse_lines(lines)
+

Parse list of lines in CIF format.

+
+
Parameters:
+

lines (list) – List of strings stripped of line terminator.

+
+
Returns:
+

Structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – When the data do not constitute a valid CIF format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_cif.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure to a list of lines in basic CIF format.

+
+
Parameters:
+

stru (Structure) – The structure to be converted.

+
+
Returns:
+

List of lines in basic CIF format.

+
+
Return type:
+

list

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_cif.getParser(eps=None)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_cif.getSymOp(s)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.get_symop instead.

+
+ +
+
+diffpy.structure.parsers.p_cif.get_parser(eps=None)[source]
+

Return new parser object for CIF format.

+
+
Parameters:
+

eps (float, Optional) – fractional coordinates cutoff for duplicate positions. +When None use the default for ExpandAsymmetricUnit: 1.0e-5.

+
+
Returns:
+

Instance of P_cif.

+
+
Return type:
+

P_cif

+
+
+
+ +
+
+diffpy.structure.parsers.p_cif.get_symop(s)[source]
+

Create SpaceGroups.SymOp instance from a string.

+
+
Parameters:
+

s (str) – Formula for equivalent coordinates, for example 'x,1/2-y,1/2+z'.

+
+
Returns:
+

Instance of SymOp.

+
+
Return type:
+

SymOp

+
+
+
+ +
+
+diffpy.structure.parsers.p_cif.leading_float(s, d=0.0)[source]
+

Extract the first float from a string and ignore trailing +characters.

+

Useful for extracting values from “value(std)” syntax.

+
+
Parameters:
+
    +
  • s (str) – The string to be scanned for floating point value.

  • +
  • d (float, Optional) – The default value when s is “.” or “?”, which in CIF +format stands for inapplicable and unknown, respectively.

  • +
+
+
Returns:
+

The extracted floating point value.

+
+
Return type:
+

float

+
+
Raises:
+

ValueError – When string does not start with a float.

+
+
+
+ +
+
+

diffpy.structure.parsers.p_discus module

+

Parser for DISCUS structure format.

+
+
+class diffpy.structure.parsers.p_discus.P_discus[source]
+

Bases: StructureParser

+

Parser for DISCUS structure format. The parser chokes on molecule +and generator records.

+
+
+format
+

File format name, default “discus”.

+
+
Type:
+

str

+
+
+
+ +
+
+nl
+

Line number of the current line being parsed.

+
+
Type:
+

int

+
+
+
+ +
+
+lines
+

List of lines from the input file.

+
+
Type:
+

list of str

+
+
+
+ +
+
+line
+

Current line being parsed.

+
+
Type:
+

str

+
+
+
+ +
+
+stru
+

Structure being parsed.

+
+
Type:
+

PDFFitStructure

+
+
+
+ +
+
+ignored_lines
+

List of lines that were ignored during parsing.

+
+
Type:
+

list of str

+
+
+
+ +
+
+cell_read
+

True if cell record processed.

+
+
Type:
+

bool

+
+
+
+ +
+
+ncell_read
+

True if ncell record processed.

+
+
Type:
+

bool

+
+
+
+ +
+
+parseLines(lines)
+

Parse list of lines in DISCUS format.

+
+
Parameters:
+

lines (list of str) – List of lines from the input file.

+
+
Returns:
+

Parsed PDFFitStructure instance.

+
+
Return type:
+

PDFFitStructure

+
+
Raises:
+

StructureFormatError – If the file is not in DISCUS format.

+
+
+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in DISCUS format.

+
+
Parameters:
+

lines (list of str) – List of lines from the input file.

+
+
Returns:
+

Parsed PDFFitStructure instance.

+
+
Return type:
+

PDFFitStructure

+
+
Raises:
+

StructureFormatError – If the file is not in DISCUS format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_discus.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in DISCUS format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in DISCUS format.

+
+
Return type:
+

list of str

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_discus.getParser()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_discus.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_discus.get_parser()[source]
+

Return new parser object for DISCUS format.

+
+
Returns:
+

Instance of P_discus.

+
+
Return type:
+

P_discus

+
+
+
+ +
+
+

diffpy.structure.parsers.p_pdb module

+

Basic parser for PDB structure format.

+ +
+
+class diffpy.structure.parsers.p_pdb.P_pdb[source]
+

Bases: StructureParser

+

Simple parser for PDB format.

+

The parser understands following PDB records: TITLE, CRYST1, SCALE1, +SCALE2, SCALE3, ATOM, SIGATM, ANISOU, SIGUIJ, TER, HETATM, END.

+
+
+format
+

Format name, default “pdb”.

+
+
Type:
+

str

+
+
+
+ +
+
+atomLines(stru, idx)
+

Build ATOM records and possibly SIGATM, ANISOU or +SIGUIJ records for structure stru atom number aidx.

+
+ +
+
+atom_lines(stru, idx)[source]
+

Build ATOM records and possibly SIGATM, ANISOU or +SIGUIJ records for structure stru atom number aidx.

+
+ +
+
+cryst1Lines(stru)
+

Build lines corresponding to CRYST1 record.

+
+ +
+
+cryst1_lines(stru)[source]
+

Build lines corresponding to CRYST1 record.

+
+ +
+
+orderOfRecords = ['HEADER', 'OBSLTE', 'TITLE', 'CAVEAT', 'COMPND', 'SOURCE', 'KEYWDS', 'EXPDTA', 'AUTHOR', 'REVDAT', 'SPRSDE', 'JRNL', 'REMARK', 'REMARK', 'REMARK', 'REMARK', 'DBREF', 'SEQADV', 'SEQRES', 'MODRES', 'HET', 'HETNAM', 'HETSYN', 'FORMUL', 'HELIX', 'SHEET', 'TURN', 'SSBOND', 'LINK', 'HYDBND', 'SLTBRG', 'CISPEP', 'SITE', 'CRYST1', 'ORIGX1', 'ORIGX2', 'ORIGX3', 'SCALE1', 'SCALE2', 'SCALE3', 'MTRIX1', 'MTRIX2', 'MTRIX3', 'TVECT', 'MODEL', 'ATOM', 'SIGATM', 'ANISOU', 'SIGUIJ', 'TER', 'HETATM', 'ENDMDL', 'CONECT', 'MASTER', 'END']
+

Ordered list of PDB record labels.

+
+
Type:
+

list

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_pdb.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in PDB format.

+
+
Parameters:
+

lines (list of str) – List of lines in PDB format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – Invalid PDB record.

+
+
+
+ +
+
+titleLines(stru)
+

Build lines corresponding to TITLE record.

+
+ +
+
+title_lines(stru)[source]
+

Build lines corresponding to TITLE record.

+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_pdb.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in PDB format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in PDB format.

+
+
Return type:
+

list of str

+
+
+
+ +
+
+validRecords = {'ANISOU': None, 'ATOM': None, 'AUTHOR': None, 'CAVEAT': None, 'CISPEP': None, 'COMPND': None, 'CONECT': None, 'CRYST1': None, 'DBREF': None, 'END': None, 'ENDMDL': None, 'EXPDTA': None, 'FORMUL': None, 'HEADER': None, 'HELIX': None, 'HET': None, 'HETATM': None, 'HETNAM': None, 'HETSYN': None, 'HYDBND': None, 'JRNL': None, 'KEYWDS': None, 'LINK': None, 'MASTER': None, 'MODEL': None, 'MODRES': None, 'MTRIX1': None, 'MTRIX2': None, 'MTRIX3': None, 'OBSLTE': None, 'ORIGX1': None, 'ORIGX2': None, 'ORIGX3': None, 'REMARK': None, 'REVDAT': None, 'SCALE1': None, 'SCALE2': None, 'SCALE3': None, 'SEQADV': None, 'SEQRES': None, 'SHEET': None, 'SIGATM': None, 'SIGUIJ': None, 'SITE': None, 'SLTBRG': None, 'SOURCE': None, 'SPRSDE': None, 'SSBOND': None, 'TER': None, 'TITLE': None, 'TURN': None, 'TVECT': None}
+

Dictionary of PDB record labels.

+
+
Type:
+

dict

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_pdb.getParser()
+

Return new parser object for PDB format.

+
+
Returns:
+

Instance of P_pdb.

+
+
Return type:
+

P_pdb

+
+
+
+ +
+
+diffpy.structure.parsers.p_pdb.get_parser()[source]
+

Return new parser object for PDB format.

+
+
Returns:
+

Instance of P_pdb.

+
+
Return type:
+

P_pdb

+
+
+
+ +
+
+

diffpy.structure.parsers.p_pdffit module

+

Parser for PDFfit structure format.

+
+
+class diffpy.structure.parsers.p_pdffit.P_pdffit[source]
+

Bases: StructureParser

+

Parser for PDFfit structure format.

+
+
+format
+

Format name, default “pdffit”.

+
+
Type:
+

str

+
+
+
+ +
+
+ignored_lines
+

List of lines ignored during parsing.

+
+
Type:
+

list

+
+
+
+ +
+
+stru
+

Structure instance used for cif input or output.

+
+
Type:
+

PDFFitStructure

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_pdffit.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in PDFfit format.

+
+
Parameters:
+

lines (list of str) – List of lines in PDB format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – File not in PDFfit format.

+
+
+
+ +
+
+toLines(stru)[source]
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_pdffit.toLines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in PDFfit format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in PDFfit format.

+
+
Return type:
+

list of str

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_pdffit.getParser()[source]
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_pdffit.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_pdffit.get_parser()[source]
+

Return new parser object for PDFfit format.

+
+
Returns:
+

Instance of P_pdffit.

+
+
Return type:
+

P_pdffit

+
+
+
+ +
+
+

diffpy.structure.parsers.p_rawxyz module

+

Parser for raw XYZ file format.

+

Raw XYZ is a 3 or 4 column text file with cartesian coordinates of atoms +and an optional first column for atom types.

+
+
+class diffpy.structure.parsers.p_rawxyz.P_rawxyz[source]
+

Bases: StructureParser

+

Parser –> StructureParser subclass for RAWXYZ format.

+
+
+format
+

Format name, default “rawxyz”.

+
+
Type:
+

str

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_rawxyz.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in RAWXYZ format.

+
+
Parameters:
+

lines (list of str) – List of lines in RAWXYZ format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – Invalid RAWXYZ format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_rawxyz.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in RAWXYZ format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in RAWXYZ format.

+
+
Return type:
+

list of str

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_rawxyz.getParser()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_rawxyz.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_rawxyz.get_parser()[source]
+

Return new parser object for RAWXYZ format.

+
+
Returns:
+

Instance of P_rawxyz.

+
+
Return type:
+

P_rawxyz

+
+
+
+ +
+
+

diffpy.structure.parsers.p_xcfg module

+

Parser for extended CFG format used by atomeye.

+
+
+diffpy.structure.parsers.p_xcfg.AtomicMass
+

Dictionary of atomic masses for elements.

+
+
Type:
+

dict

+
+
+
+ +
+
+class diffpy.structure.parsers.p_xcfg.P_xcfg[source]
+

Bases: StructureParser

+

Parser for AtomEye extended CFG format.

+
+
+format
+

Format name, default “xcfg”.

+
+
Type:
+

str

+
+
+
+ +
+
+cluster_boundary = 2
+

Width of boundary around corners of non-periodic +cluster to avoid PBC effects in atomeye.

+
+
Type:
+

int

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_xcfg.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in XCFG format.

+
+
Parameters:
+

lines (list of str) – List of lines in XCFG format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – Invalid XCFG format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_xcfg.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in XCFG atomeye +format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in XCFG format.

+
+
Return type:
+

list of str

+
+
Raises:
+

StructureFormatError – Cannot convert empty structure to XCFG format.

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_xcfg.getParser()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_xcfg.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_xcfg.get_parser()[source]
+

Return new parser object for XCFG format.

+
+
Returns:
+

Instance of P_xcfg.

+
+
Return type:
+

P_xcfg

+
+
+
+ +
+
+

diffpy.structure.parsers.p_xyz module

+

Parser for XYZ file format, where.

+
    +
  • First line gives number of atoms.

  • +
  • Second line has optional title.

  • +
  • Remaining lines contain element, x, y, z.

  • +
+
+
+class diffpy.structure.parsers.p_xyz.P_xyz[source]
+

Bases: StructureParser

+

Parser for standard XYZ structure format.

+
+
+format
+

Format name, default “xyz”.

+
+
Type:
+

str

+
+
+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_xyz.parse_lines instead.

+
+ +
+
+parse_lines(lines)[source]
+

Parse list of lines in XYZ format.

+
+
Parameters:
+

lines (list of str) – List of lines in XYZ format.

+
+
Returns:
+

Parsed structure instance.

+
+
Return type:
+

Structure

+
+
Raises:
+

StructureFormatError – Invalid XYZ format.

+
+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.P_xyz.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines in XYZ format.

+
+
Parameters:
+

stru (Structure) – Structure to be converted.

+
+
Returns:
+

List of lines in XYZ format.

+
+
Return type:
+

list of str

+
+
+
+ +
+ +
+
+diffpy.structure.parsers.p_xyz.getParser()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.P_xyz.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.p_xyz.get_parser()[source]
+

Return new parser object for XYZ format.

+
+
Returns:
+

Instance of P_xyz.

+
+
Return type:
+

P_xcfg

+
+
+
+ +
+
+

diffpy.structure.parsers.parser_index_mod module

+

Index of recognized structure formats, their IO capabilities and +associated modules where they are defined.

+
+
+diffpy.structure.parsers.parser_index_mod.parser_index
+

Dictionary of recognized structure formats. The keys are format names +and the values are dictionaries with the following keys:

+
+
modulestr

Name of the module that defines the parser class.

+
+
file_extensionstr

File extension for the format, including the leading dot.

+
+
file_patternstr

File pattern for the format, using ‘|’ as separator for multiple +patterns.

+
+
has_inputbool

True if the parser can read the format.

+
+
has_outputbool

True if the parser can write the format.

+
+
+
+
Type:
+

dict

+
+
+
+ +
+

Note

+

Plugins for new structure formats need to be added to the parser_index +dictionary in this module.

+
+
+
+

diffpy.structure.parsers.structureparser module

+

Definition of StructureParser, a base class for specific parsers.

+
+
+class diffpy.structure.parsers.structureparser.StructureParser[source]
+

Bases: object

+

Base class for all structure parsers.

+
+
+format
+

Format name of particular parser.

+
+
Type:
+

str

+
+
+
+ +
+
+filename
+

Path to structure file that is read or written.

+
+
Type:
+

str

+
+
+
+ +
+
+parse(s)[source]
+

Create Structure instance from a string.

+
+ +
+
+parseFile(filename)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.StructureParser.parse_file instead.

+
+ +
+
+parseLines(lines)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.StructureParser.parse_lines instead.

+
+ +
+
+parse_file(filename)[source]
+

Create Structure instance from an existing file.

+
+ +
+
+parse_lines(lines)[source]
+

Create Structure instance from a list of lines.

+

Return Structure object or raise StructureFormatError exception.

+
+

Note

+

This method has to be overloaded in derived class.

+
+
+ +
+
+toLines(stru)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.StructureParser.to_lines instead.

+
+ +
+
+to_lines(stru)[source]
+

Convert Structure stru to a list of lines.

+

Return list of strings.

+
+

Note

+

This method has to be overloaded in derived class.

+
+
+ +
+
+tostring(stru)[source]
+

Convert Structure instance to a string.

+
+ +
+ +
+
+

Module contents

+

Conversion plugins for various structure formats.

+

The recognized structure formats are defined by subclassing StructureParser, +by convention these classes are named P_<format>.py. The parser classes should +to override the parseLines() and toLines() methods of StructureParser. +Any structure parser needs to be registered in parser_index module.

+

For normal usage it should be sufficient to use the routines provided +in this module.

+
+
Content:
    +
  • StructureParser: base class for a concrete Parser

  • +
  • parser_index: dictionary of known structure formats

  • +
  • getParser: factory for Parser at given format

  • +
  • inputFormats: list of available input formats

  • +
  • outputFormats: list of available output formats

  • +
+
+
+
+
+diffpy.structure.parsers.getParser(format, **kw)
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.get_parser instead.

+
+ +
+
+diffpy.structure.parsers.get_parser(format, **kw)[source]
+

Return Parser instance for a given structure format.

+
+
Parameters:
+
    +
  • format (str) – String with the format name, see parser_index_mod.

  • +
  • **kw (dict) – Keyword arguments passed to the Parser init function.

  • +
+
+
Returns:
+

Parser instance for the given format.

+
+
Return type:
+

Parser

+
+
Raises:
+

StructureFormatError – When the format is not defined.

+
+
+
+ +
+
+diffpy.structure.parsers.inputFormats()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.input_formats instead.

+
+ +
+
+diffpy.structure.parsers.input_formats()[source]
+

Return list of implemented input structure formats.

+
+ +
+
+diffpy.structure.parsers.outputFormats()
+

This function has been deprecated and will be removed in version +4.0.0.

+

Please use diffpy.structure.output_formats instead.

+
+ +
+
+diffpy.structure.parsers.output_formats()[source]
+

Return list of implemented output structure formats.

+
+ +
+
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index fe03b556..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,194 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build -BASENAME = $(subst .,,$(subst $() $(),,diffpy.structure)) - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/$(BASENAME).qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/$(BASENAME).qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/$(BASENAME)" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/$(BASENAME)" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -# Manual publishing to the gh-pages branch - -GITREPOPATH = $(shell cd $(CURDIR) && git rev-parse --git-dir) -GITREMOTE = origin -GITREMOTEURL = $(shell git config --get remote.$(GITREMOTE).url) -GITLASTCOMMIT = $(shell git rev-parse --short HEAD) - -publish: - @test -d build/html || \ - ( echo >&2 "Run 'make html' first!"; false ) - git show-ref --verify --quiet refs/heads/gh-pages || \ - git branch --track gh-pages $(GITREMOTE)/gh-pages - test -d build/gh-pages || \ - git clone -s -b gh-pages $(GITREPOPATH) build/gh-pages - cd build/gh-pages && \ - git pull $(GITREMOTEURL) gh-pages - rsync -acv --delete --exclude=.git --exclude=.rsync-exclude \ - --exclude-from=build/gh-pages/.rsync-exclude \ - --link-dest=$(CURDIR)/build/html build/html/ build/gh-pages/ - cd build/gh-pages && \ - git add --all . && \ - git diff --cached --quiet || \ - git commit -m "Sync with the source at $(GITLASTCOMMIT)." - cd build/gh-pages && \ - git push origin gh-pages diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index ac53d5bd..00000000 --- a/docs/make.bat +++ /dev/null @@ -1,36 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build -set SPHINXPROJ=PackagingScientificPython - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd diff --git a/docs/manual/Makefile b/docs/manual/Makefile deleted file mode 100644 index 80a79ab3..00000000 --- a/docs/manual/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = diffpy.structure -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/manual/requirements.txt b/docs/manual/requirements.txt deleted file mode 100644 index 5b12c4f2..00000000 --- a/docs/manual/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -m2r -sphinx_py3doc_enhanced_theme diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index e3c1fd99..00000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,322 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# diffpy.structure documentation build configuration file, created by # noqa: E501 -# sphinx-quickstart on Thu Jan 30 15:49:41 2014. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -import sys -import time -from importlib.metadata import version -from pathlib import Path - -# Attempt to import the version dynamically from GitHub tag. -try: - fullversion = version("diffpy.structure") -except Exception: - fullversion = "No version found. The correct version will appear in the released version." # noqa: E501 -autodoc_mock_imports = ["diffpy.utils"] -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501 -# sys.path.insert(0, str(Path(".").resolve())) -sys.path.insert(0, str(Path("../..").resolve())) -sys.path.insert(0, str(Path("../../src").resolve())) - -# abbreviations -ab_authors = "Chris Farrow, Pavol Juhas, Simon Billinge, Billinge Group members" - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - "sphinx.ext.autodoc", - "sphinx.ext.napoleon", - "sphinx.ext.todo", - "sphinx.ext.viewcode", - "sphinx.ext.intersphinx", - "sphinx_rtd_theme", - "sphinx_copybutton", - "m2r2", -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -source_suffix = [".rst", ".md"] - -# The encoding of source files. -# source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = "index" - -# General information about the project. -project = "diffpy.structure" -copyright = "%Y, The Trustees of Columbia University in the City of New York" - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. - -# The short X.Y version. -version = "".join(fullversion.split(".post")[:1]) -# The full version, including alpha/beta/rc tags. -release = fullversion - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -# today = '' -today = time.strftime("%B %d, %Y", time.localtime()) -year = today.split()[-1] -# Else, today_fmt is used as the format for a strftime call. -# today_fmt = '%B %d, %Y' -# substitute YEAR in the copyright string -copyright = copyright.replace("%Y", year) - -# For sphinx_copybutton extension. -# Do not copy "$" for shell commands in code-blocks. -copybutton_prompt_text = r"^\$ " -copybutton_prompt_is_regexp = True - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ["build"] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -# default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -# add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -# add_module_names = True - -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -# show_authors = False - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - -# A list of ignored prefixes for module index sorting. -modindex_common_prefix = ["diffpy.structure"] - -# Display all warnings for missing links. -nitpicky = True - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "sphinx_rtd_theme" - -html_context = { - "display_github": True, - "github_user": "diffpy", - "github_repo": "diffpy.structure", - "github_version": "main", - "conf_py_path": "/docs/source/", -} - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -html_theme_options = { - "navigation_with_keys": "true", -} - -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -# html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -# html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -# html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -# html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -# html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -# html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -# html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -# html_additional_pages = {} - -# If false, no module index is generated. -# html_domain_indices = True - -# If false, no index is generated. -# html_use_index = True - -# If true, the index is split into individual pages for each letter. -# html_split_index = False - -# If true, links to the reST sources are added to the pages. -# html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -# html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -# html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -# html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -# html_file_suffix = None - -# Output file base name for HTML help builder. -basename = "diffpy.structure".replace(" ", "").replace(".", "") -htmlhelp_basename = basename + "doc" - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). - # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. - # 'preamble': '', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - ( - "index", - "diffpy.structure.tex", - "diffpy.structure Documentation", - ab_authors, - "manual", - ), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -# latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -# latex_use_parts = False - -# If true, show page references after internal links. -# latex_show_pagerefs = False - -# If true, show URL addresses after external links. -# latex_show_urls = False - -# Documents to append as an appendix to all manuals. -# latex_appendices = [] - -# If false, no module index is generated. -# latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - ( - "index", - "diffpy.structure", - "diffpy.structure Documentation", - ab_authors, - 1, - ) -] - -# If true, show URL addresses after external links. -# man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - ( - "index", - "diffpy.structure", - "diffpy.structure Documentation", - ab_authors, - "diffpy.structure", - "One line description of project.", - "Miscellaneous", - ), -] - -# Documents to append as an appendix to all manuals. -# texinfo_appendices = [] - -# If false, no module index is generated. -# texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -# texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -# texinfo_no_detailmenu = False - - -# Example configuration for intersphinx: refer to the Python standard library. -# intersphinx_mapping = {'http://docs.python.org/': None} diff --git a/docs/source/img/.placeholder b/docs/source/img/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/source/snippets/.placeholder b/docs/source/snippets/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/genindex.html b/genindex.html new file mode 100644 index 00000000..18fb443d --- /dev/null +++ b/genindex.html @@ -0,0 +1,1610 @@ + + + + + + + + Index — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ + +

Index

+ +
+ _ + | A + | B + | C + | D + | E + | F + | G + | I + | L + | M + | N + | O + | P + | R + | S + | T + | U + | V + | W + | X + | Y + | Z + +
+

_

+ + + +
+ +

A

+ + + +
+ +

B

+ + + +
+ +

C

+ + + +
+ +

D

+ + + +
+ +

E

+ + + +
+ +

F

+ + + +
+ +

G

+ + + +
+ +

I

+ + + +
+ +

L

+ + + +
+ +

M

+ + + +
+ +

N

+ + + +
+ +

O

+ + + +
+ +

P

+ + + +
+ +

R

+ + + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

U

+ + + +
+ +

V

+ + + +
+ +

W

+ + + +
+ +

X

+ + + +
+ +

Y

+ + +
+ +

Z

+ + +
+ + + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 00000000..662adfbf --- /dev/null +++ b/index.html @@ -0,0 +1,196 @@ + + + + + + + + + diffpy.structure documentation — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure documentation

+

diffpy.structure - Crystal structure container and parsers for structure formats.

+
+
Software version 3.4.0
+
Last updated March 29, 2026.
+
+
+

Getting started

+

The diffpy.structure package provides objects for storing atomic +coordinates, displacement parameters and other crystal structure data. +diffpy.structure supports import and export of structure data in several +structure formats such as CIF, PDB, xyz. It provides conversion +between fractional and absolute Cartesian coordinates, functions for +symmetry expansion from asymmetric unit and generation of symmetry +constraints for atom positions and displacement parameters. diffpy.structure +includes definitions of all space groups in over 500 symmetry settings.

+
+
+

Authors

+

diffpy.structure is developed by Chris Farrow, Pavol Juhas, Simon Billinge, Billinge Group members. This project is maintained by Simon Billinge. For a detailed list of contributors see +https://github.com/diffpy/diffpy.structure/graphs/contributors.

+
+
+

Installation

+

See the README +file included with the distribution.

+
+
+

Acknowledgements

+

Space group codes in spacegroupmod.py and mmlibspacegroups.py +originate from the pymmlib project, http://pymmlib.sourceforge.net. +Less common settings of space groups were generating using the +Computational Crystallography Toolbox, +http://cctbx.sourceforge.net.

+

diffpy.structure is built and maintained with scikit-package.

+
+
+

Reference

+

If you use this program for a scientific research that leads +to publication, we ask that you acknowledge use of the program +by citing the following paper in your publication:

+
+

P. Juhás, C. L. Farrow, X. Yang, K. R. Knox and S. J. L. Billinge, +Complex modeling: a strategy and software program for combining +multiple information sources to solve ill posed structure and +nanostructure inverse problems, +Acta Crystallogr. A 71, 562-568 (2015).

+
+
+
+

Table of contents

+ +
+
+

Indices

+ +
+
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/license.html b/license.html new file mode 100644 index 00000000..f7793ee1 --- /dev/null +++ b/license.html @@ -0,0 +1,246 @@ + + + + + + + + + License — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

License

+
+

OPEN SOURCE LICENSE AGREEMENT

+

Copyright (c) 1989, 1991 Free Software Foundation, Inc.

+

Copyright (c) 2006, The Regents of the University of California through Lawrence Berkeley National Laboratory

+

Copyright (c) 2006-2007, Board of Trustees of Michigan State University

+

Copyright (c) 2008-2012, The Trustees of Columbia University in the City of New York

+

Copyright (c) 2009-2011, University of Tennessee

+

Copyright (c) 2014, Australian Synchrotron Research Program Inc., (“ASRP”)

+

Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National Laboratory

+

Copyright (c) 2024-2025, The Trustees of Columbia University in the City of New York. +All rights reserved.

+

Copyright (c) 2026-present, The Contributors to the diffpy.structure project. +All rights reserved.

+

The “DiffPy-CMI” is distributed subject to the following license conditions:

+
SOFTWARE LICENSE AGREEMENT
+
+Software: DiffPy-CMI
+
+
+(1) The "Software", below, refers to the aforementioned DiffPy-CMI (in either
+source code, or binary form and accompanying documentation).
+
+Part of the software was derived from the DANSE, ObjCryst++ (with permission),
+PyCifRW, Python periodictable, CCTBX, and SasView open source projects, of
+which the original Copyrights are contained in each individual file.
+
+Each licensee is addressed as "you" or "Licensee."
+
+
+(2) The copyright holders shown above and their third-party Licensors hereby
+grant licensee a royalty-free nonexclusive license, subject to the limitations
+stated herein and U.S. Government license rights.
+
+
+(3) You may modify and make a copy or copies of the software for use within
+your organization, if you meet the following conditions:
+
+    (a) Copies in source code must include the copyright notice and this
+        software license agreement.
+
+    (b) Copies in binary form must include the copyright notice and this
+        Software License Agreement in the documentation and/or other materials
+        provided with the copy.
+
+
+(4) You may modify a copy or copies of the Software or any portion of it, thus
+forming a work based on the Software, and distribute copies of such work
+outside your organization, if you meet all of the following conditions:
+
+    (a) Copies in source code must include the copyright notice and this
+        Software License Agreement;
+
+    (b) Copies in binary form must include the copyright notice and this
+        Software License Agreement in the documentation and/or other materials
+        provided with the copy;
+
+    (c) Modified copies and works based on the Software must carry prominent
+        notices stating that you changed specified portions of the Software.
+
+    (d) Neither the name of Brookhaven Science Associates or Brookhaven
+        National Laboratory nor the names of its contributors may be used to
+        endorse or promote products derived from this software without specific
+        written permission.
+
+
+(5) Portions of the Software resulted from work developed under a U.S.
+Government contract and are subject to the following license:
+The Government is granted for itself and others acting on its behalf a
+paid-up, nonexclusive, irrevocable worldwide license in this computer software
+to reproduce, prepare derivative works, and perform publicly and display
+publicly.
+
+
+(6) WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT
+WARRANTY OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY
+LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
+THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
+BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL
+LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF
+THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF THE SOFTWARE WOULD NOT INFRINGE
+PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
+UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED.
+
+
+(7) LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR
+THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
+ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR  ANY INDIRECT, INCIDENTAL,
+CONSEQUENTIAL, SPECIAL OR PUNITIVE  DAMAGES OF ANY KIND OR NATURE, INCLUDING
+BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER,
+WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING
+NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS
+BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES.
+
+
+
+
+

Brookhaven National Laboratory Notice

+
+

Acknowledgment of sponsorship

+

This software was produced by the Brookhaven National Laboratory, under +Contract DE-AC02-98CH10886 with the Department of Energy.

+
+
+

Government disclaimer of liability

+

Neither the United States nor the United States Department of Energy, nor +any of their employees, makes any warranty, express or implied, or assumes +any legal liability or responsibility for the accuracy, completeness, or +usefulness of any data, apparatus, product, or process disclosed, or +represents that its use would not infringe privately owned rights.

+
+
+

Brookhaven disclaimer of liability

+

Brookhaven National Laboratory makes no representations or warranties, +express or implied, nor assumes any liability for the use of this software.

+
+
+

Maintenance of notice

+

In the interest of clarity regarding the origin and status of this +software, Brookhaven National Laboratory requests that any recipient of it +maintain this notice affixed to any distribution by the recipient that +contains a copy or derivative of this software.

+

END OF LICENSE

+
+
+
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/mod-atom.html b/mod-atom.html new file mode 100644 index 00000000..ba86da4a --- /dev/null +++ b/mod-atom.html @@ -0,0 +1,575 @@ + + + + + + + + + diffpy.structure.atom — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.atom

+

Provide class Atom for managing properties of an atom in structure +model.

+
+
+class diffpy.structure.atom.Atom(atype=None, xyz=None, label=None, occupancy=None, anisotropy=None, U=None, Uisoequiv=None, lattice=None)[source]
+

Bases: object

+

Storage of structure information relevant for a single atom.

+

This class manages atom information such as element symbol, position +in fractional and Cartesian coordinates, atomic displacement parameters +and so forth.

+
+
Parameters:
+
    +
  • atype (str or Atom, Optional) – The string atom type to be set as the element attribute. +By default an empty string. When of the Atom type, create +a copy of atype and adjust it per other arguments.

  • +
  • xyz (numpy.ndarray, Optional) – Fractional coordinates within the associated lattice. +By default [0, 0, 0].

  • +
  • label (str, Optional) – A unique string label for referring to this Atom. +By default an empty string.

  • +
  • occupancy (float, Optional) – The initial occupancy of this atom, by default 1.

  • +
  • anisotropy (bool, Optional) – The flag for anisotropic thermal displacements parameters. +This overrides anisotropy implied by presence of the +U or Uisoequiv arguments. Defaults to False +when not set in any other way.

  • +
  • U (numpy.ndarray, Optional) – The 3x3 matrix of anisotropic thermal displacement parameters. +When present anisotropy defaults to True.

  • +
  • Uisoequiv (float, Optional) – The isotropic atomic displacement parameter. The anisotropy +defaults to False when present. Only one of the U and +Uisoequiv arguments may be provided at the same time. Assume +zero atomic displacements when U and Uisoequiv are unset.

  • +
  • lattice (Lattice, Optional) – Coordinate system for the fractional coordinates xyz. +Use the absolute Cartesian system when None.

  • +
+
+
+
+
+element
+

The string type of the atom. An element or ion symbol.

+
+
Type:
+

str

+
+
+
+ +
+
+xyz
+

The fractional coordinates in the associated lattice.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+label
+

A unique string label referring to this atom, for example, “C_1”. +The label can be used to reference this atom when contained in +a Structure object.

+
+
Type:
+

str

+
+
+
+ +
+
+occupancy
+

The fractional occupancy of this atom.

+
+
Type:
+

float

+
+
+
+ +
+
+lattice
+

Coordinate system for the fractional coordinates xyz and +the tensor of atomic displacement parameters U. +Use the absolute Cartesian coordinates when None.

+
+
Type:
+

Lattice

+
+
+
+ +
+

Note

+

Cannot use both U and Uisoequiv arguments at the same time.

+
+
+
+property B11
+

The B11 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U11. When anisotropy +is False setting a new value updates entire tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property B12
+

The B12 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U12. Setting a new +value updates U in a symmetric way. Assignment has no effect +when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property B13
+

The B13 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U13. Setting a new +value updates U in a symmetric way. Assignment has no effect +when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property B22
+

The B22 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U22. When anisotropy +is False setting a new value updates entire tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property B23
+

The B23 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U23. Setting a new +value updates U in a symmetric way. Assignment has no effect +when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property B33
+

The B33 element of the Debye-Waller matrix.

+

This is equivalent to 8 * pi**2 * U33. When anisotropy +is False setting a new value updates entire tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property Bisoequiv
+

The Debye-Waller isotropic displacement or an equivalent value.

+

This equals 8 * pi**2 * Uisoequiv. Setting a new value +rescales U tensor to yield equivalent direction-average of +Debye-Waller displacements.

+
+
Type:
+

float

+
+
+
+ +
+
+property U
+

The 3x3 matrix of anisotropic atomic +displacements.

+

For isotropic displacements (when anisotropy is False) +assignment to U uses only the first Unew[0, 0] element +and the remaining components of U are adjusted to obtain +isotropic tensor in the active lattice.

+
+

Note

+

Elements of the U tensor such as U[0, 1] should be +considered read-only as setting them directly leads to +undefined behavior. Use the U11, U22, …, or B11, +B22, …, descriptors to set only some U components.

+
+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+property U11
+

The U[0, 0] component of the displacement tensor U.

+

When anisotropy is False setting a new value updates entire +tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property U12
+

The U[0, 1] element of the displacement tensor U.

+

Sets U[1, 0] together with U[0, 1]. Assignment +has no effect when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property U13
+

The U[0, 2] element of the displacement tensor U.

+

Sets U[2, 0] together with U[0, 2]. Assignment +has no effect when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property U22
+

The U[1, 1] component of the displacement tensor U.

+

When anisotropy is False setting a new value updates entire +tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property U23
+

The U[1, 2] element of the displacement tensor U.

+

Sets U[2, 1] together with U[1, 2]. Assignment +has no effect when anisotropy is False.

+
+
Type:
+

float

+
+
+
+ +
+
+property U33
+

The U[2, 2] component of the displacement tensor U.

+

When anisotropy is False setting a new value updates entire +tensor U.

+
+
Type:
+

float

+
+
+
+ +
+
+property Uisoequiv
+

The isotropic displacement parameter or an equivalent value.

+

Setting a new value rescales tensor U so it yields equivalent +direction-averaged displacements.

+
+
Type:
+

float

+
+
+
+ +
+
+property anisotropy
+

Flag for allowing anisotropic displacement parameters.

+

When False the tensor of thermal displacement parameters U +must be isotropic and only its diagonal elements are taken into +account.

+
+
Type:
+

bool

+
+
+
+ +
+
+element = ''
+

Default values of element.

+
+
Type:
+

str

+
+
+
+ +
+
+label = ''
+

Default values of label.

+
+
Type:
+

str

+
+
+
+ +
+
+lattice = None
+

Default values of lattice.

+
+
Type:
+

None

+
+
+
+ +
+
+msdCart(vc)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Atom.msd_cart instead.

+
+ +
+
+msdLat(vl)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Atom.msd_latt instead.

+
+ +
+
+msd_cart(vc)[source]
+

Calculate mean square displacement along the Cartesian +vector.

+
+
Parameters:
+

vc (array_like) – Vector in Cartesian coordinates.

+
+
Returns:
+

The mean square displacement along vc.

+
+
Return type:
+

float

+
+
+
+ +
+
+msd_latt(vl)[source]
+

Calculate mean square displacement along the lattice vector.

+
+
Parameters:
+

vl (array_like) – The vector in lattice coordinates.

+
+
Returns:
+

The mean square displacement along vl.

+
+
Return type:
+

float

+
+
+
+ +
+
+occupancy = 1.0
+

Default values of occupancy.

+
+
Type:
+

float

+
+
+
+ +
+
+property x
+

fractional coordinate x, same as xyz[0].

+
+
Type:
+

float

+
+
+
+ +
+
+property xyz_cartn
+

Atom position in absolute Cartesian +coordinates.

+

This is computed from fractional coordinates xyz and the +current lattice setup. Assignment to xyz_cartn or +its components is applied on fractional coordinates xyz.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+property y
+

fractional coordinate y, same as xyz[1].

+
+
Type:
+

float

+
+
+
+ +
+
+property z
+

fractional coordinate z, same as xyz[2].

+
+
Type:
+

float

+
+
+
+ +
+ +
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/mod-lattice.html b/mod-lattice.html new file mode 100644 index 00000000..311f00b6 --- /dev/null +++ b/mod-lattice.html @@ -0,0 +1,705 @@ + + + + + + + + + diffpy.structure.lattice — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.lattice

+

Class Lattice stores properties and provides simple operations in +lattice coordinate system.

+
+
+diffpy.structure.lattice.cartesian
+

Constant instance of Lattice, default Cartesian system.

+
+
Type:
+

Lattice

+
+
+
+ +
+
+class diffpy.structure.lattice.Lattice(a=None, b=None, c=None, alpha=None, beta=None, gamma=None, baserot=None, base=None)[source]
+

Bases: object

+

General coordinate system and associated operations.

+
+
Parameters:
+
    +
  • a (float or Lattice, Optional) – The cell length a. When present, other cell parameters +must be also specified. When of the Lattice type, create +a duplicate Lattice.

  • +
  • b (float) – The cell length b.

  • +
  • c (float) – The cell length c.

  • +
  • alpha (float) – The angle between the b and c axes in degrees.

  • +
  • beta (float) – The angle between the b and c axes in degrees.

  • +
  • gamma (float) – The angle between the a and b axes in degrees.

  • +
  • baserot (array_like, Optional) – The 3x3 rotation matrix of the base vectors with respect +to their standard setting.

  • +
  • base (array_like, Optional) – The 3x3 array of row base vectors. This must be the +only argument when present.

  • +
+
+
+
+
+metrics
+

The metrics tensor.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+base
+

The 3x3 matrix of row base vectors in Cartesian coordinates, +which may be rotated, i.e., base = stdbase @ baserot.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+stdbase
+

The 3x3 matrix of row base vectors in standard orientation.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+baserot
+

The rotation matrix for the base.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+recbase
+

The inverse of the base matrix, where the columns give +reciprocal vectors in Cartesian coordinates.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+normbase
+

The base vectors scaled by magnitudes of reciprocal cell lengths.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+recnormbase
+

The inverse of the normbase matrix.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+isotropicunit
+

The 3x3 tensor for a unit isotropic displacement parameters in this +coordinate system. This is an identity matrix when this Lattice +is orthonormal.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+

Note

+

The array attributes are read-only. They get updated by changing +some lattice parameters or by calling the setLatPar() or +setLatBase() methods.

+
+

Examples

+

Create a Cartesian coordinate system:

+
>>> Lattice()
+
+
+

Create coordinate system with the cell lengths a, b, c +and cell angles alpha, beta, gamma in degrees:

+
>>> Lattice(a, b, c, alpha, beta, gamma)
+
+
+

Create a duplicate of an existing Lattice lat:

+
>>> Lattice(lat)
+
+
+

Create coordinate system with the base vectors given by rows +of the abc matrix:

+
>>> Lattice(base=abc)
+
+
+
+
+property a
+

The unit cell length a.

+
+ +
+
+abcABG()
+

‘diffpy.structure.Lattice.abcABG’ is deprecated and will be +removed in version 4.0.0.

+

Please use ‘diffpy.structure.Lattice.cell_parms’ instead.

+
+ +
+
+property alpha
+

The cell angle alpha in degrees.

+
+ +
+
+property alphar
+

The reciprocal cell angle alpha in degrees.

+
+ +
+
+angle(u, v)[source]
+

Calculate angle between 2 lattice vectors in degrees.

+
+
Parameters:
+
    +
  • u (array_like) – The first lattice vector.

  • +
  • v (array_like) – The second lattice vector.

  • +
+
+
Returns:
+

The angle between lattice vectors u and v in degrees.

+
+
Return type:
+

float

+
+
+
+ +
+
+property ar
+

The cell length a of the reciprocal lattice.

+
+ +
+
+property b
+

The unit cell length b.

+
+ +
+
+property beta
+

The cell angle beta in degrees.

+
+ +
+
+property betar
+

The reciprocal cell angle beta in degrees

+
+ +
+
+property br
+

The cell length b of the reciprocal lattice.

+
+ +
+
+property c
+

The unit cell length c.

+
+ +
+
+property ca
+

The cosine of the cell angle alpha.

+
+ +
+
+property car
+

The cosine of the reciprocal angle alpha.

+
+ +
+
+cartesian(u)[source]
+

Transform lattice vector to Cartesian coordinates.

+
+
Parameters:
+

u (array_like) – Vector of lattice coordinates or an Nx3 array +of lattice vectors.

+
+
Returns:
+

rc – Cartesian coordinates of the u vector.

+
+
Return type:
+

numpy.ndarray

+
+
+
+ +
+
+property cb
+

The cosine of the cell angle beta.

+
+ +
+
+property cbr
+

The cosine of the reciprocal angle beta.

+
+ +
+
+cell_parms()[source]
+

Return the cell parameters in the standard setting.

+
+
Returns:
+

A tuple of (a, b, c, alpha, beta, gamma).

+
+
Return type:
+

tuple

+
+
+
+ +
+
+property cg
+

The cosine of the cell angle gamma.

+
+ +
+
+property cgr
+

The cosine of the reciprocal angle gamma.

+
+ +
+
+property cr
+

The cell length c of the reciprocal lattice.

+
+ +
+
+dist(u, v)[source]
+

Calculate distance between 2 points in lattice coordinates.

+
+
Parameters:
+
    +
  • u (array_like) – A vector or an Nx3 matrix of fractional coordinates.

  • +
  • v (numpy.ndarray) – A vector or an Nx3 matrix of fractional coordinates.

  • +
+
+
+
+

Note

+

u and v must be of the same shape when matrices.

+
+
+
Returns:
+

The distance between lattice points u and v.

+
+
Return type:
+

float or numpy.ndarray

+
+
+
+ +
+
+dot(u, v)[source]
+

Calculate dot product of 2 lattice vectors.

+
+
Parameters:
+
    +
  • u (array_like) – The first lattice vector or an Nx3 array.

  • +
  • v (array_like) – The second lattice vector or an array of +the same shape as u.

  • +
+
+
Returns:
+

The dot product of lattice vectors u, v.

+
+
Return type:
+

float or numpy.ndarray

+
+
+
+ +
+
+fractional(rc)[source]
+

Transform Cartesian vector to fractional lattice coordinates.

+
+
Parameters:
+

rc (array_like) – A vector of Cartesian coordinates or an Nx3 array of +Cartesian vectors.

+
+
Returns:
+

u – Fractional coordinates of the Cartesian vector rc.

+
+
Return type:
+

numpy.ndarray

+
+
+
+ +
+
+property gamma
+

The cell angle gamma in degrees.

+
+ +
+
+property gammar
+

The reciprocal cell angle gamma in degrees

+
+ +
+
+isanisotropic(umx)[source]
+

True if displacement parameter matrix is anisotropic.

+

This checks if the specified matrix of anisotropic displacement +parameters (ADP) differs from isotropic values for this lattice +by more than a small round-off error.

+
+
Parameters:
+

umx (array_like) – The 3x3 matrix of displacement parameters.

+
+
Returns:
+

True when umx is anisotropic by more than a round-off error.

+
+
Return type:
+

bool

+
+
+
+ +
+
+norm(xyz)[source]
+

Calculate norm of a lattice vector.

+
+
Parameters:
+

xyz (array_like) – A vector or an Nx3 array of fractional coordinates.

+
+
Returns:
+

The magnitude of the lattice vector xyz.

+
+
Return type:
+

float or numpy.ndarray

+
+
+
+ +
+
+reciprocal()[source]
+

Return the reciprocal lattice of the current lattice.

+
+
Returns:
+

The reciprocal lattice of the current lattice.

+
+
Return type:
+

Lattice

+
+
+
+ +
+
+rnorm(hkl)[source]
+

Calculate norm of a reciprocal vector.

+
+
Parameters:
+

hkl (array_like) – A vector or an Nx3 array of reciprocal coordinates.

+
+
Returns:
+

The magnitude of the reciprocal vector hkl.

+
+
Return type:
+

float or numpy.ndarray

+
+
+
+ +
+
+property sa
+

The sine of the cell angle alpha.

+
+ +
+
+property sar
+

The sine of the reciprocal angle alpha.

+
+ +
+
+property sb
+

The sine of the cell angle beta.

+
+ +
+
+property sbr
+

The sine of the reciprocal angle beta.

+
+ +
+
+setLatBase(base)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Lattice.set_lat_base instead.

+
+ +
+
+setLatPar(a=None, b=None, c=None, alpha=None, beta=None, gamma=None, baserot=None)
+

This function has been deprecated and will be removed in +version 4.0.0.

+

Please use diffpy.structure.Lattice.set_lat_par instead.

+
+ +
+
+set_latt_parms(a=None, b=None, c=None, alpha=None, beta=None, gamma=None, baserot=None)[source]
+

Set one or more lattice parameters.

+

This updates all attributes that depend on the lattice parameters.

+
+
Parameters:
+
    +
  • a (float, Optional) – The new value of the cell length a.

  • +
  • b (float, Optional) – The new value of the cell length b.

  • +
  • c (float, Optional) – The new value of the cell length c.

  • +
  • alpha (float, Optional) – The new value of the cell angle alpha in degrees.

  • +
  • beta (float, Optional) – The new value of the cell angle beta in degrees.

  • +
  • gamma (float, Optional) – The new value of the cell angle gamma in degrees.

  • +
  • baserot (array_like, Optional) – The new 3x3 rotation matrix of the base vectors with respect +to their standard setting in Cartesian coordinates.

  • +
+
+
+
+

Note

+

Parameters that are not specified will keep their initial +values.

+
+
+ +
+
+set_new_latt_base_vec(base)[source]
+

Set new base vectors for this lattice.

+

This updates the cell lengths and cell angles according to the +new base. The stdbase, baserot, and metrics attributes +are also updated.

+
+
Parameters:
+

base (array_like) – The 3x3 matrix of row base vectors expressed +in Cartesian coordinates.

+
+
+
+ +
+
+property sg
+

The sine of the cell angle gamma.

+
+ +
+
+property sgr
+

The sine of the reciprocal angle gamma.

+
+ +
+
+property unitvolume
+

The unit cell volume when a = b = c = 1.

+
+ +
+
+property volume
+

The unit cell volume.

+
+ +
+ +
+
+diffpy.structure.lattice.cosd(x)[source]
+

Return the cosine of x (measured in degrees).

+

Avoid round-off errors for exact cosine values.

+
+
Parameters:
+

x (float) – The angle in degrees.

+
+
Returns:
+

The cosine of the angle x.

+
+
Return type:
+

float

+
+
+
+ +
+
+diffpy.structure.lattice.sind(x)[source]
+

Return the sine of x (measured in degrees).

+

Avoid round-off errors for exact sine values.

+
+
Parameters:
+

x (float) – The angle in degrees.

+
+
Returns:
+

The sine of the angle x.

+
+
Return type:
+

float

+
+
+
+ +
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/mod-spacegroup.html b/mod-spacegroup.html new file mode 100644 index 00000000..3ae0c8f5 --- /dev/null +++ b/mod-spacegroup.html @@ -0,0 +1,357 @@ + + + + + + + + + diffpy.structure.spacegroupmod — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

diffpy.structure.spacegroupmod

+

Symmetry operations as functions on vectors or arrays.

+
+
+class diffpy.structure.spacegroupmod.SpaceGroup(number=None, num_sym_equiv=None, num_primitive_sym_equiv=None, short_name=None, point_group_name=None, crystal_system=None, pdb_name=None, symop_list=None)[source]
+

Definition and basic operations for a specific space group.

+

Provide standard names and all symmetry operations contained in +one space group.

+
+
Parameters:
+
    +
  • number (int) – The space group number.

  • +
  • num_sym_equiv (int) – The number of symmetry equivalent sites for a general position.

  • +
  • num_primitive_sym_equiv (int) – The number of symmetry equivalent sites in a primitive unit cell.

  • +
  • short_name (str) – The short Hermann-Mauguin symbol of the space group.

  • +
  • point_group_name (str) – The point group of this space group.

  • +
  • crystal_system (str) – The crystal system of this space group.

  • +
  • pdb_name (str) – The full Hermann-Mauguin symbol of the space group.

  • +
  • symop_list (list of SymOp) – The symmetry operations contained in this space group.

  • +
+
+
+
+
+number
+

A unique space group number. This may be incremented by +several thousands to facilitate unique values for multiple +settings of the same space group. Use number % 1000 +to get the standard space group number from International +Tables.

+
+
Type:
+

int

+
+
+
+ +
+
+num_sym_equiv
+

The number of symmetry equivalent sites for a general position.

+
+
Type:
+

int

+
+
+
+ +
+
+num_primitive_sym_equiv
+

The number of symmetry equivalent sites in a primitive unit cell.

+
+
Type:
+

int

+
+
+
+ +
+
+short_name
+

The short Hermann-Mauguin symbol of the space group.

+
+
Type:
+

str

+
+
+
+ +
+
+point_group_name
+

The point group to which this space group belongs to.

+
+
Type:
+

str

+
+
+
+ +
+
+crystal_system
+

The crystal system of this space group. The possible values are +"TRICLINIC", "MONOCLINIC", "ORTHORHOMBIC", "TETRAGONAL", +"TRIGONAL" "HEXAGONAL", "CUBIC".

+
+
Type:
+

str

+
+
+
+ +
+
+pdb_name
+

The full Hermann-Mauguin symbol of the space group.

+
+
Type:
+

str

+
+
+
+ +
+
+symop_list
+

A list of SymOp objects for all symmetry operations +in this space group.

+
+
Type:
+

list of SymOp

+
+
+
+ +
+
+check_group_name(name)[source]
+

Check if given name matches this space group.

+
+
Parameters:
+

name (str or int) – The space group identifier, a string name or number.

+
+
Returns:
+

True if the specified name matches one of the recognized +names of this space group or if it equals its number. +Return False otherwise.

+
+
Return type:
+

bool

+
+
+
+ +
+
+iter_equivalent_positions(vec)[source]
+

Generate symmetry equivalent positions for the specified +position.

+

The initial position must be in fractional coordinates and so +are the symmetry equivalent positions yielded by iteration. +This generates num_sym_equiv positions regardless of initial +coordinates being a special symmetry position or not.

+
+
Parameters:
+

vec (numpy.ndarray) – The initial position in fractional coordinates.

+
+
Yields:
+

numpy.ndarray – The symmetry equivalent positions in fractional coordinates. +The positions may be duplicate or outside of the 0 <= x < 1 +unit cell bounds.

+
+
+
+ +
+
+iter_symops()[source]
+

Iterate over all symmetry operations in the space group.

+
+
Yields:
+

SymOp – Generate all symmetry operations for this space group.

+
+
+
+ +
+ +
+
+class diffpy.structure.spacegroupmod.SymOp(R, t)[source]
+

The transformation of coordinates to a symmetry-related position.

+

The SymOp operation involves rotation and translation in cell coordinates.

+
+
Parameters:
+
    +
  • R (numpy.ndarray) – The 3x3 matrix of rotation for this symmetry operation.

  • +
  • t (numpy.ndarray) – The vector of translation in this symmetry operation.

  • +
+
+
+
+
+R
+

The 3x3 matrix of rotation pertaining to unit cell coordinates. +This may be identity, simple rotation, improper rotation, mirror +or inversion. The determinant of R is either +1 or -1.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+t
+

The translation of cell coordinates applied after rotation R.

+
+
Type:
+

numpy.ndarray

+
+
+
+ +
+
+__call__(vec)[source]
+

Return symmetry-related position for the specified +coordinates.

+
+
Parameters:
+

vec (numpy.ndarray) – The initial position in fractional cell coordinates.

+
+
Returns:
+

The transformed position after this symmetry operation.

+
+
Return type:
+

numpy.ndarray

+
+
+
+ +
+
+__eq__(symop)[source]
+

Implement the self == symop test of equality.

+

Return True when self and symop difference is within +tiny round-off errors.

+
+ +
+
+is_identity()[source]
+

Check if this SymOp is an identity operation.

+
+
Returns:
+

True if this is an identity operation within a small round-off. +Return False otherwise.

+
+
Return type:
+

bool

+
+
+
+ +
+ +
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/news/CI-badge-fix.rst b/news/CI-badge-fix.rst deleted file mode 100644 index 2df63a8f..00000000 --- a/news/CI-badge-fix.rst +++ /dev/null @@ -1,23 +0,0 @@ -**Added:** - -* No News Added: fix CI badge and target in README.rst - -**Changed:** - -* - -**Deprecated:** - -* - -**Removed:** - -* - -**Fixed:** - -* - -**Security:** - -* diff --git a/news/TEMPLATE.rst b/news/TEMPLATE.rst deleted file mode 100644 index 790d30b1..00000000 --- a/news/TEMPLATE.rst +++ /dev/null @@ -1,23 +0,0 @@ -**Added:** - -* - -**Changed:** - -* - -**Deprecated:** - -* - -**Removed:** - -* - -**Fixed:** - -* - -**Security:** - -* diff --git a/news/ase-adapter.rst b/news/ase-adapter.rst deleted file mode 100644 index 30b585bd..00000000 --- a/news/ase-adapter.rst +++ /dev/null @@ -1,30 +0,0 @@ -**Added:** - -* Added ``Structure.get_lattice_vectors()`` method to return the lattice vectors. -* Added ``Structure.get_lattice_vector_angles()`` method to return the angles between the lattice vectors. -* Added ``Structure.get_isotropic_displacement_parameters()`` method to return the isotropic displacement parameters. -* Added ``Structure.get_anisotropic_displacement_parameters()`` method to return the anisotropic displacement parameters. -* Added ``Structure.get_occupancies()`` method to return the occupancies of the sites. -* Added ``Structure.get_cartesian_coordinates()`` method to return the Cartesian coordinates of the sites. -* Added ``Structure.get_fractional_coordinates()`` method to return the fractional coordinates of the sites. -* Added ``Structure.get_chemical_symbols()`` method to return the chemical symbols of the sites. - -**Changed:** - -* - -**Deprecated:** - -* - -**Removed:** - -* - -**Fixed:** - -* - -**Security:** - -* diff --git a/objects.inv b/objects.inv new file mode 100644 index 00000000..1ddd2bb0 Binary files /dev/null and b/objects.inv differ diff --git a/py-modindex.html b/py-modindex.html new file mode 100644 index 00000000..2787b285 --- /dev/null +++ b/py-modindex.html @@ -0,0 +1,298 @@ + + + + + + + + Python Module Index — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Python Module Index

+ +
+ . | + d +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+ .
    + diffpy.structure._legacy_importer +
    + diffpy.structure.apps +
    + diffpy.structure.apps.anyeye +
    + diffpy.structure.apps.transtru +
    + diffpy.structure.apps.vesta_viewer +
    + diffpy.structure.atom +
    + diffpy.structure.expansion +
    + diffpy.structure.expansion.makeellipsoid +
    + diffpy.structure.expansion.shapeutils +
    + diffpy.structure.expansion.supercell_mod +
    + diffpy.structure.lattice +
    + diffpy.structure.mmlibspacegroups +
    + diffpy.structure.parsers +
    + diffpy.structure.parsers.p_auto +
    + diffpy.structure.parsers.p_cif +
    + diffpy.structure.parsers.p_discus +
    + diffpy.structure.parsers.p_pdb +
    + diffpy.structure.parsers.p_pdffit +
    + diffpy.structure.parsers.p_rawxyz +
    + diffpy.structure.parsers.p_vesta +
    + diffpy.structure.parsers.p_xcfg +
    + diffpy.structure.parsers.p_xyz +
    + diffpy.structure.parsers.parser_index_mod +
    + diffpy.structure.parsers.structureparser +
    + diffpy.structure.pdffitstructure +
    + diffpy.structure.sgtbxspacegroups +
    + diffpy.structure.spacegroupmod +
    + diffpy.structure.spacegroups +
    + diffpy.structure.structure +
    + diffpy.structure.structure_app +
    + diffpy.structure.structureerrors +
    + diffpy.structure.symmetryutilities +
    + diffpy.structure.utils +
 
+ d
+ diffpy +
    + diffpy.structure +
+ + +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 40645c0b..00000000 --- a/pyproject.toml +++ /dev/null @@ -1,88 +0,0 @@ -[build-system] -requires = ["setuptools>=62.0", "setuptools-git-versioning>=2.0"] -build-backend = "setuptools.build_meta" - -[project] -name = "diffpy.structure" -dynamic=['version', 'dependencies'] -authors = [ - {name='Simon Billinge', email='sbillinge@ucsb.edu'}, -] -maintainers = [ - {name='Simon Billinge', email='sbillinge@ucsb.edu'}, -] -description = "Crystal structure container and parsers for structure formats." -keywords = ['diffpy', 'crystal structure data storage', 'CIF', 'PDB'] -readme = "README.rst" -requires-python = ">=3.12, <3.15" -classifiers = [ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Intended Audience :: Developers', - 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: BSD License', - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: Microsoft :: Windows', - 'Operating System :: POSIX', - 'Operating System :: Unix', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Programming Language :: Python :: 3.14', - 'Topic :: Scientific/Engineering :: Physics', - 'Topic :: Scientific/Engineering :: Chemistry', -] - -[project.urls] -Homepage = "https://github.com/diffpy/diffpy.structure/" -Issues = "https://github.com/diffpy/diffpy.structure/issues/" - -[tool.setuptools-git-versioning] -enabled = true -template = "{tag}" -dev_template = "{tag}" -dirty_template = "{tag}" - -[tool.setuptools.packages.find] -where = ["src"] # list of folders that contain the packages (["."] by default) -include = ["*"] # package names should match these glob patterns (["*"] by default) -exclude = [] # exclude packages matching these glob patterns (empty by default) -namespaces = false # to disable scanning PEP 420 namespaces (true by default) - -[project.scripts] -diffpy-structure = "diffpy.structure.app:main" - -[tool.setuptools.dynamic] -dependencies = {file = ["requirements/pip.txt"]} - -[tool.codespell] -exclude-file = ".codespell/ignore_lines.txt" -ignore-words = ".codespell/ignore_words.txt" -skip = "*.cif,*.dat" - -[tool.docformatter] -recursive = true -wrap-summaries = 72 -wrap-descriptions = 72 - -[tool.black] -line-length = 115 -include = '\.pyi?$' -exclude = ''' -/( - \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | \.rst - | \.txt - | _build - | buck-out - | build - | dist - - # The following are specific to Black, you probably don't want those. - | blib2to3 - | tests/data -)/ -''' diff --git a/release.html b/release.html new file mode 100644 index 00000000..9881e495 --- /dev/null +++ b/release.html @@ -0,0 +1,532 @@ + + + + + + + + + Release notes — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

Release notes

+
+

3.4.0

+

Added:

+
    +
  • Added set_latt_parms method into Lattice class

  • +
  • Added set_new_latt_base_vec method into Lattice class

  • +
  • Added parse_lines method in p_auto.py

  • +
  • Added parse_lines method in p_cif.py

  • +
  • Added parse_lines method in p_discus.py

  • +
  • Added parse_lines method in p_pdb.py

  • +
  • Added parse_lines method in p_pdffit.py

  • +
  • Added parse_lines method in p_rawxyz.py

  • +
  • Added parse_lines method in p_xcfg.py

  • +
  • Added parse_lines method in p_xyz.py

  • +
  • Added parse_lines method in structureparser.py

  • +
  • Added _suppress_cif_parser_output method in p_cif.py

  • +
  • Add deprecation warning for diffpy.Structure import.

  • +
  • Added diffpy.structure.Structure.add_new_atom in replace of addNewAtom

  • +
  • Added load_structure_file method in apps/anyeye.py

  • +
  • Added convert_structure_file method in apps/anyeye.py

  • +
  • Added watch_structure_file method in apps/anyeye.py

  • +
  • Added clean_up method in apps/anyeye.py

  • +
  • Added parse_formula method in apps/anyeye.py

  • +
  • Added signal_handler method in apps/anyeye.py

  • +
  • Added method load_structure in __init__.py

  • +
  • Added diffpy.structure.Structure.assign_unique_labels in replace of assignUniqueLabels

  • +
  • Support for Python 3.14

  • +
  • Added place_in_lattice method to Structure

  • +
  • Added read_structure method to Structure

  • +
  • Added write_structure method to Structure

  • +
  • Added position_formula method in GeneratorSite class

  • +
  • Added u_formula method in GeneratorSite class

  • +
  • Added eq_index method in GeneratorSite class

  • +
  • Added prune_formula_dictionary method in symmetryutilities.py

  • +
  • Added _link_atom_attribute method in diffpy.structure.utils

  • +
  • Added msd_latt method in atom.py

  • +
  • Added msd_cart method in atom.py

  • +
  • Added _get_uij method in atom.py

  • +
  • Added _set_uij method in atom.py

  • +
  • Added parse_file method in structureparser.py

  • +
  • Added parse_lines method in p_cif.py

  • +
  • Added parse_lines method in p_auto.py

  • +
  • Added parser for vesta specific files and viewer for vesta

  • +
  • Added atom_bare_symbol method in utils.py

  • +
  • Added _get_ordered_formats method in p_auto.py

  • +
  • Added _wrap_parse_method method in p_auto.py

  • +
  • Added _tr_atom_site_u_iso_or_equiv method in p_cif.py

  • +
  • Added _tr_atom_site_b_iso_or_equiv method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_u_11 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_u_22 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_u_33 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_u_12 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_u_13 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_u_23 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_b_11 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_b_22 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_b_33 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_b_12 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_b_13 method in p_cif.py

  • +
  • Added _tr_atom_site_aniso_b_23 method in p_cif.py

  • +
  • Added get_symop method in parsers/p_cif.py

  • +
  • Added get_space_group method in spacegroups.py

  • +
  • Added find_space_group method in spacegroups.py

  • +
  • Added is_space_group_identifier method in spacegroups.py

  • +
  • Added _hash_symop_list method in spacegroups.py

  • +
  • Added _build_sg_lookup_table method in spacegroups.py

  • +
  • Added _get_sg_hash_lookup_table method in spacegroups.py

  • +
  • Added read_structure method into PDFFitStructure class

  • +
  • Added cell_parms method into Lattice class

  • +
  • Added _find_constraints method in SymmetryConstraints class

  • +
  • Added pos_parm_symbols method in SymmetryConstraints class

  • +
  • Added pos_parm_values method in SymmetryConstraints class

  • +
  • Added u_parm_symbols method in SymmetryConstraints class

  • +
  • Added u_parm_values method in SymmetryConstraints class

  • +
  • Added u_formulas method in SymmetryConstraints class

  • +
  • Added diffpy.structure.Structure.get_last_atom in replace of getLastAtom

  • +
  • Added get_parser method in p_auto.py

  • +
  • Added get_parser method in p_cif.py

  • +
  • Added get_parser method in p_discus.py

  • +
  • Added get_parser method in p_pdb.py

  • +
  • Added get_parser method in p_pdffit.py

  • +
  • Added get_parser method in p_rawxyz.py

  • +
  • Added get_parser method in p_xcfg.py

  • +
  • Added get_parser method in p_xyz.py

  • +
  • Added get_parser method in parsers/__init__.py

  • +
  • Added position_formulas method in SymmetryConstraints class

  • +
  • Added position_formulas_pruned method in SymmetryConstraints class

  • +
  • Added u_formulas_pruned method in SymmetryConstraints class

  • +
  • Added _parse_cif_data_source method in p_cif.py

  • +
  • Added _parse_cif_block method in p_cif.py

  • +
  • Added to_lines method in p_cif.py

  • +
  • Added to_lines method in p_pdb.py

  • +
  • Added to_lines method in p_rawxyz.py

  • +
  • Added to_lines method in p_xcfg.py

  • +
  • Added to_lines method in p_xyz.py

  • +
  • Added to_lines method in structureparser.py

  • +
  • Added _lines_iterator method in p_discus.py

  • +
  • Added to_lines method in p_discus.py

  • +
  • Added is_space_group_latt_parms method in symmetryutilities.py

  • +
  • Added is_constant_formula method in symmetryutilities.py

  • +
  • Added find_center method in expansion/shapeutils.py

  • +
  • Added make_sphere method in expansion/makeellipsoid.py

  • +
  • Added make_ellipsoid method in expansion/makeellipsoid.py

  • +
  • Added position_difference method in symmetryutilities.py

  • +
  • Added nearest_site_index method in symmetryutilities.py

  • +
  • Added _find_invariants method in symmetryutilities.py

  • +
  • Added equal_positions method in symmetryutilities.py

  • +
  • Added expand_position method in symmetryutilities.py

  • +
  • Added null_space method in symmetryutilities.py

  • +
  • Added input_formats method in parsers/__init__.py

  • +
  • Added output_formats method in parsers/__init__.py

  • +
  • Added title_lines method in p_pdb.py

  • +
  • Added cryst1_lines method in p_pdb.py

  • +
  • Added atom_lines method in p_pdb.py

  • +
  • Added convert_fp_num_to_signed_rational method in GeneratorSite class

  • +
  • Added _find_null_space method in GeneratorSite class

  • +
  • Added _find_pos_parameters method in GeneratorSite class

  • +
  • Added _find_u_space method in GeneratorSite class

  • +
  • Added _find_u_parameters method in GeneratorSite class

  • +
  • Added _find_eq_uij method in GeneratorSite class

  • +
+

Changed:

+
    +
  • Changed private method __emptySharedStructure to __empty_shared_structure

  • +
+

Deprecated:

+
    +
  • Deprecated setLatPar method in Lattice class for removal in version 4.0.0

  • +
  • Deprecated setLatBase method in Lattice class for removal in version 4.0.0

  • +
  • Deprecated parseLines method in p_auto.py for removal in version 4.0.0

  • +
  • Deprecated parseLines method in p_cif.py for removal in version 4.0.0

  • +
  • Deprecated parseLines method in p_discus.py for removal in version 4.0.0

  • +
  • Deprecated parseLines method in p_pdb.py for removal in version 4.0.0

  • +
  • Deprecated parseLines method in p_pdffit.py for removal in version 4.0.0

  • +
  • Deprecated parseLines method in p_rawxyz.py for removal in version 4.0.0

  • +
  • Deprecated parseLines method in p_xcfg.py for removal in version 4.0.0

  • +
  • Deprecated parseLines method in p_xyz.py for removal in version 4.0.0

  • +
  • Deprecated parseLines method in structureparser.py for removal in version 4.0.0

  • +
  • Deprecated diffpy.structure.Structure.addNewAtom method for removal in version 4.0.0

  • +
  • Deprecated loadStructureFile method in apps/anyeye.py for removal in version 4.0.0

  • +
  • Deprecated convertStructureFile method in apps/anyeye.py for removal in version 4.0.0

  • +
  • Deprecated watchStructureFile method in apps/anyeye.py for removal in version 4.0.0

  • +
  • Deprecated cleanUp method in apps/anyeye.py for removal in version 4.0.0

  • +
  • Deprecated parseFormula method in apps/anyeye.py for removal in version 4.0.0

  • +
  • Deprecated signalHandler method in apps/anyeye.py for removal in version 4.0.0

  • +
  • Deprecated method loadStructure in __init__.py for removal in version 4.0.0

  • +
  • Deprecated diffpy.structure.Structure.assignUniqueLabels for removal in 4.0.0

  • +
  • Deprecated placeInLattice method of Structure for removal in version 4.0.0

  • +
  • Deprecated readStr method of Structure for removal in version 4.0.0

  • +
  • Deprecated writeStr method of Structure for removal in version 4.0.0

  • +
  • Deprecated positionFormula method in GeneratorSite class for removal in version 4.0.0

  • +
  • Deprecated UFormula method in GeneratorSite class for removal in version 4.0.0

  • +
  • Deprecated eqIndex method in GeneratorSite class for removal in version 4.0.0

  • +
  • Deprecated pruneFormulaDictionary method in symmetryutilities.py for removal in version 4.0.0

  • +
  • Derecated _linkAtomAttribute method in diffpy.structure.utils for removal in version 4.0.0

  • +
  • Deprecated msdLat method in atom.py for removal in version 4.0.0

  • +
  • Deprecated msdCart method in atom.py for removal in version 4.0.0

  • +
  • Deprecated parse_file method in structureparser.py for removal in version 4.0.0

  • +
  • Deprecated parse_file method in p_cif.py for removal in version 4.0.0

  • +
  • Deprecated parse_file method in p_auto.py for removal in version 4.0.0

  • +
  • Deprecated atomBareSymbol method in utils.py for removal in version 4.0.0

  • +
  • Deprecated getSymOp method in parsers/p_cif.py for removal in version 4.0.0

  • +
  • Deprecated GetSpaceGroup method in spacegroups.py for removal in version 4.0.0

  • +
  • Deprecated IsSpaceGroupIdentifier method in spacegroups.py for removal in version 4.0.0

  • +
  • Deprecated FindSpaceGroup method in spacegroups.py for removal in version 4.0.0

  • +
  • Deprecated _hashSymOpList method in spacegroups.py for removal in version 4.0.0

  • +
  • Deprecated readStr method in PDFFitStructure class for removal in version 4.0.0

  • +
  • Deprecated abcABG method in Lattice class for removal in version 4.0.0

  • +
  • Deprecated posparSymbols method in SymmetryConstraints class for removal in version 4.0.0

  • +
  • Deprecated posparValues method in SymmetryConstraints class for removal in version 4.0.0

  • +
  • Deprecated UparSymbols method in SymmetryConstraints class for removal in version 4.0.0

  • +
  • Deprecated UparValues method in SymmetryConstraints class for removal in version 4.0.0

  • +
  • Deprecated UFormulas method in SymmetryConstraints class for removal in version 4.0.0

  • +
  • Deprecated diffpy.structure.Structure.getLastAtom for removal in version 4.0.0

  • +
  • Deprecated getParser method in p_auto.py for removal in version 4.0.0

  • +
  • Deprecated getParser method in p_cif.py for removal in version 4.0.0

  • +
  • Deprecated getParser method in p_discus.py for removal in version 4.0.0

  • +
  • Deprecated getParser method in p_pdb.py for removal in version 4.0.0

  • +
  • Deprecated getParser method in p_pdffit.py for removal in version 4.0.0

  • +
  • Deprecated getParser method in p_rawxyz.py for removal in version 4.0.0

  • +
  • Deprecated getParser method in p_xcfg.py for removal in version 4.0.0

  • +
  • Deprecated getParser method in p_xyz.py for removal in version 4.0.0

  • +
  • Deprecated getParser method in parsers/__init__.py for removal in version 4.0.0

  • +
  • Deprecated positionFormulas method in SymmetryConstraints class for removal in version 4.0.0

  • +
  • Deprecated positionFormulasPruned method in SymmetryConstraints class for removal in version 4.0.0

  • +
  • Deprecated UFormulasPruned method in SymmetryConstraints class for removal in version 4.0.0

  • +
  • Deprecated toLines method in p_cif.py for removal in version 4.0.0

  • +
  • Deprecated toLines method in p_pdb.py for removal in version 4.0.0

  • +
  • Deprecated toLines method in p_rawxyz.py for removal in version 4.0.0

  • +
  • Deprecated toLines method in p_xcfg.py for removal in version 4.0.0

  • +
  • Deprecated toLines method in p_xyz.py for removal in version 4.0.0

  • +
  • Deprecated toLines method in structureparser.py for removal in version 4.0.0

  • +
  • Deprecated toLines method in p_discus.py for removal in version 4.0.0

  • +
  • Deprecated isSpaceGroupLatPar method in symmetryutilities.py for removal in version 4.0.0

  • +
  • Deprecated isconstantFormula method in symmetryutilities.py for removal in version 4.0.0

  • +
  • Deprecated findCenter method in expansion/shapeutils.py for removal in version 4.0.0

  • +
  • Deprecated makeSphere method in expansion/makeellipsoid.py for removal in version 4.0.0

  • +
  • Deprecated makeEllipsoid method in expansion/makeellipsoid.py for removal in version 4.0.0

  • +
  • Deprecated positionDifference method in symmetryutilities.py for removal in version 4.0.0

  • +
  • Deprecated nearestSiteIndex method in symmetryutilities.py for removal in version 4.0.0

  • +
  • Deprecated equalPositions method in symmetryutilities.py for removal in version 4.0.0

  • +
  • Deprecated expandPosition method in symmetryutilities.py for removal in version 4.0.0

  • +
  • Deprecated nullSpace method in symmetryutilities.py for removal in version 4.0.0

  • +
  • Deprecated inputFormats method in parsers/__init__.py for removal in version 4.0.0

  • +
  • Deprecated outputFormats method in parsers/__init__.py for removal in version 4.0.0

  • +
  • Deprecated titleLines method in p_pdb.py for removal in version 4.0.0

  • +
  • Deprecated crystl1Lines method in p_pdb.py for removal in version 4.0.0

  • +
  • Deprecated atomLines method in p_pdb.py for removal in version 4.0.0

  • +
  • Deprecated signedRatStr method in in GeneratorSite class for removal in version 4.0.0

  • +
+

Fixed:

+
    +
  • Fixed load_structure with successfully loading Path object

  • +
  • Fix deprecation for open file for Python 3.14

  • +
+

Removed:

+
    +
  • Support for Python 3.11

  • +
+
+
+

3.3.1

+

Added:

+
    +
  • Spelling check via Codespell in pre-commit

  • +
  • Coverage report in each PR

  • +
+

Changed:

+
    +
  • Use the names CODE-OF-CONDUCT.rst, docs and requirements/tests.txt according to the new group standard.

  • +
+

Fixed:

+
    +
  • Let diffpy.structure pass the tests with pycifrw installed from PyPI.

  • +
+
+
+

3.3.0

+

Added:

+
    +
  • Support for Python 3.13

  • +
+

Deprecated:

+
    +
  • Support for Python 3.10

  • +
+
+
+

3.2.3

+

Added:

+
    +
  • Use GitHub Actions to build, release, upload to PyPI

  • +
  • Added issue template for PyPI/GitHub release

  • +
  • Include GitHub Issues templates for bug report and feature request

  • +
+

Fixed:

+
    +
  • Add getting started section and re-arrange install success check instructions

  • +
  • Added terminal script for transtru app in pyproject.toml

  • +
  • Changed requires-python to align with classifiers

  • +
+
+
+

3.2.2

+

Added:

+
    +
  • Unit test for version.py

  • +
  • support for numpy >=2.0

  • +
+

Fixed:

+
    +
  • tests folder at the root of the repo

  • +
  • Add pip dependencies under pip.txt and conda dependencies under conda.txt

  • +
  • element/label itemsize to 5 in _linkAtomAttribute to support numpy >=2.0

  • +
  • Recookiecut package to the group standard

  • +
+
+
+

3.2.1

+
+
+

3.2.0

+

Changed:

+
    +
  • Removed support for Python 2

  • +
  • This version only supporting Python 3.10, 3.11, 3.12

  • +
  • All docstrings style updated to numpydoc

  • +
+

Deprecated:

+
    +
  • Deprecated the diffpy.structure.applications module. Use +diffpy.structure.apps instead

  • +
+

Removed:

+
    +
  • Removed all six compatibility code

  • +
+

Fixed:

+
    +
  • Repo structure modified to the new diffpy standard

  • +
+
+

Version 3.1.0 - 2022-12-04

+

Added

+
    +
  • Compatibility with Python 3.10, 3.9, 3.8

  • +
+

Changed

+

Deprecated

+

Removed

+
    +
  • Remove the support for Python 3.5, 3.6.

  • +
+

Fixed

+
+
+

Version 3.0.2 - 2022-10-12

+

Added

+
    +
  • A string representation of SpaceGroup with key information.

  • +
+

Changed

+
    +
  • Bumped minimum PyCifRW version to 4.4.3.

  • +
+

Deprecated

+

Removed

+

Fixed

+
    +
  • Handling of paths on Windows when using the P_cif parser.

  • +
+
+
+

Version 3.0.1 - 2019-06-27

+

Added

+
    +
  • Function FindSpaceGroup for space group lookup from its list +of symmetry operations.

  • +
+

Changed

+
    +
  • Reuse existing SpaceGroup instance when loading a CIF file.

  • +
  • Improve check of SpaceGroup identifiers in GetSpaceGroup.

  • +
  • When loading CIF file, preset Atom.anisotropy according +to symmetry constraints at each site. Adhere to specific +ADP type when specified in the CIF.

  • +
+

Removed

+
    +
  • Unused attribute SpaceGroup.alt_name.

  • +
+

Fixed

+
    +
  • Fix inconsistent (Atom, Structure) pickle. Preserve Atom +ownership in a Structure after pickling and unpickling.

  • +
  • Spuriously linked array-view values after stru.xyz = 0.

  • +
  • Preserve scalar value type when setting stru.occupancy = value.

  • +
  • Process unknown CIF occupancy “?” as an occupancy of 1.

  • +
  • Incorrect SymOp list for spacegroup “B11m” (number 1008).

  • +
+
+
+

Version 3.0.0 - 2019-03-11

+

Notable differences from version 1.3.5.

+

Added

+
    +
  • Compatibility with Python 3.7, 3.6, 3.5 in addition to 2.7.

  • +
  • Aliases for 17 non-standard space group names from cctbx.

  • +
  • Support for intersphinx links to Python and NumPy documentation.

  • +
  • Dependency and use of the six PY2/PY3 compatibility package.

  • +
  • Documentation hosting at readthedocs.org.

  • +
+

Changed

+
    +
  • Rename the package and all its module names to lowercase.

  • +
  • Use UTF-8 encoding when writing structure files.

  • +
  • Refactor parsing of XCFG format. Avoid use of generated code.

  • +
  • Refactor all starred imports to explicit so they can be checked.

  • +
  • Adopt napoleon style for docstrings.

  • +
  • Update docstrings for Atom, Lattice, SymOp, SpaceGroup.

  • +
  • Switch to platform-independent “noarch” Anaconda package.

  • +
+

Deprecated

+
    +
  • Old camel case module names such as diffpy.Structure.

  • +
  • Variable __gitsha__ in the version module which was renamed +to __git_commit__.

  • +
+

Removed

+
    +
  • Unused exception IsotropyError.

  • +
  • Unused class BRAtomsStructure and associated parser.

  • +
+

Fixed

+
    +
  • Loading of empty CIF files with no specified sites.

  • +
  • Parsing of CIFs with ? value for unknown displacement parameters.

  • +
  • Symmetry constraint equations for ADPs so they avoid self-reference.

  • +
  • Use StructureFormatError exception for CIF with unknown space group.

  • +
  • Open files within the with context so they get closed when done.

  • +
  • Invalid escape sequences in string values.

  • +
+
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/requirements/build.txt b/requirements/build.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/requirements/conda.txt b/requirements/conda.txt deleted file mode 100644 index 4c4ff50e..00000000 --- a/requirements/conda.txt +++ /dev/null @@ -1,3 +0,0 @@ -numpy -pycifrw -diffpy.utils diff --git a/requirements/docs.txt b/requirements/docs.txt deleted file mode 100644 index 1de813f9..00000000 --- a/requirements/docs.txt +++ /dev/null @@ -1,5 +0,0 @@ -sphinx -sphinx_rtd_theme -sphinx-copybutton -doctr -m2r2 diff --git a/requirements/pip.txt b/requirements/pip.txt deleted file mode 100644 index 4c4ff50e..00000000 --- a/requirements/pip.txt +++ /dev/null @@ -1,3 +0,0 @@ -numpy -pycifrw -diffpy.utils diff --git a/requirements/tests.txt b/requirements/tests.txt deleted file mode 100644 index a7277865..00000000 --- a/requirements/tests.txt +++ /dev/null @@ -1,6 +0,0 @@ -flake8 -pytest -codecov -coverage -pytest-cov -pytest-env diff --git a/search.html b/search.html new file mode 100644 index 00000000..423a1737 --- /dev/null +++ b/search.html @@ -0,0 +1,124 @@ + + + + + + + + Search — diffpy.structure 3.4.0 documentation + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + + + +
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2026, The Trustees of Columbia University in the City of New York.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 00000000..445f66a1 --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles":{"3.2.0":[[12,"id7"]],"3.2.1":[[12,"id6"]],"3.2.2":[[12,"id5"]],"3.2.3":[[12,"id4"]],"3.3.0":[[12,"id3"]],"3.3.1":[[12,"id2"]],"3.4.0":[[12,"id1"]],"Acknowledgements":[[7,"acknowledgements"]],"Acknowledgment of sponsorship":[[8,"acknowledgment-of-sponsorship"]],"Authors":[[7,"authors"]],"Brookhaven National Laboratory Notice":[[8,"brookhaven-national-laboratory-notice"]],"Brookhaven disclaimer of liability":[[8,"brookhaven-disclaimer-of-liability"]],"Getting started":[[7,"getting-started"]],"Government disclaimer of liability":[[8,"government-disclaimer-of-liability"]],"Indices":[[7,"indices"]],"Installation":[[7,"installation"]],"License":[[8,null]],"Maintenance of notice":[[8,"maintenance-of-notice"]],"Module contents":[[4,"module-diffpy.structure.apps"],[5,"module-diffpy.structure.expansion"],[6,"module-diffpy.structure.parsers"]],"OPEN SOURCE LICENSE AGREEMENT":[[8,"open-source-license-agreement"]],"Reference":[[7,"reference"]],"Release notes":[[12,null]],"Submodules":[[0,"submodules"],[1,"submodules"],[2,"submodules"],[3,"submodules"],[4,"submodules"],[5,"submodules"],[6,"submodules"]],"Subpackages":[[0,"subpackages"]],"Table of contents":[[7,"table-of-contents"]],"Version 3.0.0 - 2019-03-11":[[12,"version-3-0-0-2019-03-11"]],"Version 3.0.1 - 2019-06-27":[[12,"version-3-0-1-2019-06-27"]],"Version 3.0.2 - 2022-10-12":[[12,"version-3-0-2-2022-10-12"]],"Version 3.1.0 - 2022-12-04":[[12,"version-3-1-0-2022-12-04"]],"diffpy.structure documentation":[[7,null]],"diffpy.structure package":[[0,null]],"diffpy.structure._legacy_importer module":[[0,"module-diffpy.structure._legacy_importer"]],"diffpy.structure.apps package":[[1,null],[4,null]],"diffpy.structure.apps.anyeye module":[[1,"module-diffpy.structure.apps.anyeye"],[4,"module-diffpy.structure.apps.anyeye"]],"diffpy.structure.apps.transtru module":[[1,"module-diffpy.structure.apps.transtru"],[4,"module-diffpy.structure.apps.transtru"]],"diffpy.structure.apps.vesta_viewer module":[[1,"module-diffpy.structure.apps.vesta_viewer"]],"diffpy.structure.atom":[[9,null]],"diffpy.structure.atom module":[[0,"module-diffpy.structure.atom"]],"diffpy.structure.expansion package":[[2,null],[5,null]],"diffpy.structure.expansion.makeellipsoid module":[[2,"module-diffpy.structure.expansion.makeellipsoid"],[5,"module-diffpy.structure.expansion.makeellipsoid"]],"diffpy.structure.expansion.shapeutils module":[[2,"module-diffpy.structure.expansion.shapeutils"],[5,"module-diffpy.structure.expansion.shapeutils"]],"diffpy.structure.expansion.supercell_mod module":[[2,"module-diffpy.structure.expansion.supercell_mod"],[5,"module-diffpy.structure.expansion.supercell_mod"]],"diffpy.structure.lattice":[[10,null]],"diffpy.structure.lattice module":[[0,"module-diffpy.structure.lattice"]],"diffpy.structure.mmlibspacegroups module":[[0,"module-diffpy.structure.mmlibspacegroups"]],"diffpy.structure.parsers package":[[3,null],[6,null]],"diffpy.structure.parsers.p_auto module":[[3,"module-diffpy.structure.parsers.p_auto"],[6,"module-diffpy.structure.parsers.p_auto"]],"diffpy.structure.parsers.p_cif module":[[3,"module-diffpy.structure.parsers.p_cif"],[6,"module-diffpy.structure.parsers.p_cif"]],"diffpy.structure.parsers.p_discus module":[[3,"module-diffpy.structure.parsers.p_discus"],[6,"module-diffpy.structure.parsers.p_discus"]],"diffpy.structure.parsers.p_pdb module":[[3,"module-diffpy.structure.parsers.p_pdb"],[6,"module-diffpy.structure.parsers.p_pdb"]],"diffpy.structure.parsers.p_pdffit module":[[3,"module-diffpy.structure.parsers.p_pdffit"],[6,"module-diffpy.structure.parsers.p_pdffit"]],"diffpy.structure.parsers.p_rawxyz module":[[3,"module-diffpy.structure.parsers.p_rawxyz"],[6,"module-diffpy.structure.parsers.p_rawxyz"]],"diffpy.structure.parsers.p_vesta module":[[3,"module-diffpy.structure.parsers.p_vesta"]],"diffpy.structure.parsers.p_xcfg module":[[3,"module-diffpy.structure.parsers.p_xcfg"],[6,"module-diffpy.structure.parsers.p_xcfg"]],"diffpy.structure.parsers.p_xyz module":[[3,"module-diffpy.structure.parsers.p_xyz"],[6,"module-diffpy.structure.parsers.p_xyz"]],"diffpy.structure.parsers.parser_index_mod module":[[3,"module-diffpy.structure.parsers.parser_index_mod"],[6,"module-diffpy.structure.parsers.parser_index_mod"]],"diffpy.structure.parsers.structureparser module":[[3,"module-diffpy.structure.parsers.structureparser"],[6,"module-diffpy.structure.parsers.structureparser"]],"diffpy.structure.pdffitstructure module":[[0,"module-diffpy.structure.pdffitstructure"]],"diffpy.structure.sgtbxspacegroups module":[[0,"module-diffpy.structure.sgtbxspacegroups"]],"diffpy.structure.spacegroupmod":[[11,null]],"diffpy.structure.spacegroupmod module":[[0,"module-diffpy.structure.spacegroupmod"]],"diffpy.structure.spacegroups module":[[0,"module-diffpy.structure.spacegroups"]],"diffpy.structure.structure module":[[0,"module-diffpy.structure.structure"]],"diffpy.structure.structure_app module":[[0,"module-diffpy.structure.structure_app"]],"diffpy.structure.structureerrors module":[[0,"module-diffpy.structure.structureerrors"]],"diffpy.structure.symmetryutilities module":[[0,"module-diffpy.structure.symmetryutilities"]],"diffpy.structure.utils module":[[0,"module-diffpy.structure.utils"]]},"docnames":["api/diffpy.structure","api/diffpy.structure.apps","api/diffpy.structure.expansion","api/diffpy.structure.parsers","diffpy.structure.apps","diffpy.structure.expansion","diffpy.structure.parsers","index","license","mod-atom","mod-lattice","mod-spacegroup","release"],"envversion":{"sphinx":66,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2,"sphinx.ext.intersphinx":1,"sphinx.ext.todo":2,"sphinx.ext.viewcode":1},"filenames":["api/diffpy.structure.rst","api/diffpy.structure.apps.rst","api/diffpy.structure.expansion.rst","api/diffpy.structure.parsers.rst","diffpy.structure.apps.rst","diffpy.structure.expansion.rst","diffpy.structure.parsers.rst","index.rst","license.rst","mod-atom.rst","mod-lattice.rst","mod-spacegroup.rst","release.rst"],"indexentries":{"__call__() (diffpy.structure.spacegroupmod.symop method)":[[11,"diffpy.structure.spacegroupmod.SymOp.__call__",false]],"__eq__() (diffpy.structure.spacegroupmod.symop method)":[[11,"diffpy.structure.spacegroupmod.SymOp.__eq__",false]],"a (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.a",false],[10,"diffpy.structure.lattice.Lattice.a",false]],"abcabg() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.abcABG",false],[10,"diffpy.structure.lattice.Lattice.abcABG",false]],"add_new_atom() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.add_new_atom",false]],"addnewatom() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.addNewAtom",false]],"alpha (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.alpha",false],[10,"diffpy.structure.lattice.Lattice.alpha",false]],"alphar (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.alphar",false],[10,"diffpy.structure.lattice.Lattice.alphar",false]],"angle() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.angle",false],[10,"diffpy.structure.lattice.Lattice.angle",false]],"angle() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.angle",false]],"anisotropy (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.anisotropy",false],[9,"diffpy.structure.atom.Atom.anisotropy",false]],"anisotropy (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.anisotropy",false],[6,"diffpy.structure.parsers.p_cif.P_cif.anisotropy",false]],"anisotropy (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.anisotropy",false]],"append() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.append",false]],"ar (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.ar",false],[10,"diffpy.structure.lattice.Lattice.ar",false]],"assign_unique_labels() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.assign_unique_labels",false]],"assignuniquelabels() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.assignUniqueLabels",false]],"asymmetric_unit (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.asymmetric_unit",false],[6,"diffpy.structure.parsers.p_cif.P_cif.asymmetric_unit",false]],"atom (class in diffpy.structure.atom)":[[0,"diffpy.structure.atom.Atom",false],[9,"diffpy.structure.atom.Atom",false]],"atom_bare_symbol() (in module diffpy.structure.utils)":[[0,"diffpy.structure.utils.atom_bare_symbol",false]],"atom_lines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.atom_lines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.atom_lines",false]],"atombaresymbol() (in module diffpy.structure.utils)":[[0,"diffpy.structure.utils.atomBareSymbol",false]],"atomicmass (in module diffpy.structure.parsers.p_vesta)":[[3,"diffpy.structure.parsers.p_vesta.AtomicMass",false]],"atomicmass (in module diffpy.structure.parsers.p_xcfg)":[[3,"diffpy.structure.parsers.p_xcfg.AtomicMass",false],[6,"diffpy.structure.parsers.p_xcfg.AtomicMass",false]],"atomlines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.atomLines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.atomLines",false]],"b (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.b",false],[10,"diffpy.structure.lattice.Lattice.b",false]],"b11 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.B11",false],[9,"diffpy.structure.atom.Atom.B11",false]],"b11 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.B11",false]],"b12 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.B12",false],[9,"diffpy.structure.atom.Atom.B12",false]],"b12 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.B12",false]],"b13 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.B13",false],[9,"diffpy.structure.atom.Atom.B13",false]],"b13 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.B13",false]],"b22 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.B22",false],[9,"diffpy.structure.atom.Atom.B22",false]],"b22 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.B22",false]],"b23 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.B23",false],[9,"diffpy.structure.atom.Atom.B23",false]],"b23 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.B23",false]],"b33 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.B33",false],[9,"diffpy.structure.atom.Atom.B33",false]],"b33 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.B33",false]],"base (diffpy.structure.lattice.lattice attribute)":[[0,"diffpy.structure.lattice.Lattice.base",false],[10,"diffpy.structure.lattice.Lattice.base",false]],"baserot (diffpy.structure.lattice.lattice attribute)":[[0,"diffpy.structure.lattice.Lattice.baserot",false],[10,"diffpy.structure.lattice.Lattice.baserot",false]],"beta (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.beta",false],[10,"diffpy.structure.lattice.Lattice.beta",false]],"betar (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.betar",false],[10,"diffpy.structure.lattice.Lattice.betar",false]],"bisoequiv (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.Bisoequiv",false],[9,"diffpy.structure.atom.Atom.Bisoequiv",false]],"bisoequiv (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.Bisoequiv",false]],"br (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.br",false],[10,"diffpy.structure.lattice.Lattice.br",false]],"btou (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.BtoU",false],[6,"diffpy.structure.parsers.p_cif.P_cif.BtoU",false]],"c (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.c",false],[10,"diffpy.structure.lattice.Lattice.c",false]],"ca (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.ca",false],[10,"diffpy.structure.lattice.Lattice.ca",false]],"car (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.car",false],[10,"diffpy.structure.lattice.Lattice.car",false]],"cartesian (in module diffpy.structure.lattice)":[[0,"diffpy.structure.lattice.cartesian",false],[10,"diffpy.structure.lattice.cartesian",false]],"cartesian() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.cartesian",false],[10,"diffpy.structure.lattice.Lattice.cartesian",false]],"cb (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.cb",false],[10,"diffpy.structure.lattice.Lattice.cb",false]],"cbr (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.cbr",false],[10,"diffpy.structure.lattice.Lattice.cbr",false]],"cell_parms() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.cell_parms",false],[10,"diffpy.structure.lattice.Lattice.cell_parms",false]],"cell_read (diffpy.structure.parsers.p_discus.p_discus attribute)":[[3,"diffpy.structure.parsers.p_discus.P_discus.cell_read",false],[6,"diffpy.structure.parsers.p_discus.P_discus.cell_read",false]],"cg (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.cg",false],[10,"diffpy.structure.lattice.Lattice.cg",false]],"cgr (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.cgr",false],[10,"diffpy.structure.lattice.Lattice.cgr",false]],"check_group_name() (diffpy.structure.spacegroupmod.spacegroup method)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.check_group_name",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.check_group_name",false]],"cif_sgname (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.cif_sgname",false],[6,"diffpy.structure.parsers.p_cif.P_cif.cif_sgname",false]],"ciffile (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.ciffile",false],[6,"diffpy.structure.parsers.p_cif.P_cif.ciffile",false]],"citation":[[7,"index-0",false]],"clean_up() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.clean_up",false],[4,"diffpy.structure.apps.anyeye.clean_up",false]],"clean_up() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.clean_up",false]],"cleanup() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.cleanUp",false],[4,"diffpy.structure.apps.anyeye.cleanUp",false]],"cluster_boundary (diffpy.structure.parsers.p_vesta.p_vesta attribute)":[[3,"diffpy.structure.parsers.p_vesta.P_vesta.cluster_boundary",false]],"cluster_boundary (diffpy.structure.parsers.p_xcfg.p_xcfg attribute)":[[3,"diffpy.structure.parsers.p_xcfg.P_xcfg.cluster_boundary",false],[6,"diffpy.structure.parsers.p_xcfg.P_xcfg.cluster_boundary",false]],"composition (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.composition",false]],"convert_fp_num_to_signed_rational() (diffpy.structure.symmetryutilities.generatorsite method)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.convert_fp_num_to_signed_rational",false]],"convert_structure_file() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.convert_structure_file",false],[4,"diffpy.structure.apps.anyeye.convert_structure_file",false]],"convert_structure_file() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.convert_structure_file",false]],"convertstructurefile() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.convertStructureFile",false],[4,"diffpy.structure.apps.anyeye.convertStructureFile",false]],"copy() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.copy",false]],"coremap (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.coremap",false]],"corepos (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.corepos",false]],"corepos (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.corepos",false]],"coreuijs (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.coreUijs",false]],"cosd() (in module diffpy.structure.lattice)":[[0,"diffpy.structure.lattice.cosd",false],[10,"diffpy.structure.lattice.cosd",false]],"cr (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.cr",false],[10,"diffpy.structure.lattice.Lattice.cr",false]],"create_module() (diffpy.structure._legacy_importer.maprenamedstructuremodule method)":[[0,"diffpy.structure._legacy_importer.MapRenamedStructureModule.create_module",false]],"cryst1_lines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.cryst1_lines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.cryst1_lines",false]],"cryst1lines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.cryst1Lines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.cryst1Lines",false]],"crystal_system (diffpy.structure.spacegroupmod.spacegroup attribute)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.crystal_system",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.crystal_system",false]],"deprecatedstructuremodule (class in diffpy.structure)":[[0,"diffpy.structure.DeprecatedStructureModule",false]],"die() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.die",false],[4,"diffpy.structure.apps.anyeye.die",false]],"die() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.die",false]],"diffpy.structure":[[0,"module-diffpy.structure",false]],"diffpy.structure._legacy_importer":[[0,"module-diffpy.structure._legacy_importer",false]],"diffpy.structure.apps":[[1,"module-diffpy.structure.apps",false],[4,"module-diffpy.structure.apps",false]],"diffpy.structure.apps.anyeye":[[1,"module-diffpy.structure.apps.anyeye",false],[4,"module-diffpy.structure.apps.anyeye",false]],"diffpy.structure.apps.transtru":[[1,"module-diffpy.structure.apps.transtru",false],[4,"module-diffpy.structure.apps.transtru",false]],"diffpy.structure.apps.vesta_viewer":[[1,"module-diffpy.structure.apps.vesta_viewer",false]],"diffpy.structure.atom":[[0,"module-diffpy.structure.atom",false],[9,"module-diffpy.structure.atom",false]],"diffpy.structure.expansion":[[2,"module-diffpy.structure.expansion",false],[5,"module-diffpy.structure.expansion",false]],"diffpy.structure.expansion.makeellipsoid":[[2,"module-diffpy.structure.expansion.makeellipsoid",false],[5,"module-diffpy.structure.expansion.makeellipsoid",false]],"diffpy.structure.expansion.shapeutils":[[2,"module-diffpy.structure.expansion.shapeutils",false],[5,"module-diffpy.structure.expansion.shapeutils",false]],"diffpy.structure.expansion.supercell_mod":[[2,"module-diffpy.structure.expansion.supercell_mod",false],[5,"module-diffpy.structure.expansion.supercell_mod",false]],"diffpy.structure.lattice":[[0,"module-diffpy.structure.lattice",false],[10,"module-diffpy.structure.lattice",false]],"diffpy.structure.mmlibspacegroups":[[0,"module-diffpy.structure.mmlibspacegroups",false]],"diffpy.structure.parsers":[[3,"module-diffpy.structure.parsers",false],[6,"module-diffpy.structure.parsers",false]],"diffpy.structure.parsers.p_auto":[[3,"module-diffpy.structure.parsers.p_auto",false],[6,"module-diffpy.structure.parsers.p_auto",false]],"diffpy.structure.parsers.p_cif":[[3,"module-diffpy.structure.parsers.p_cif",false],[6,"module-diffpy.structure.parsers.p_cif",false]],"diffpy.structure.parsers.p_discus":[[3,"module-diffpy.structure.parsers.p_discus",false],[6,"module-diffpy.structure.parsers.p_discus",false]],"diffpy.structure.parsers.p_pdb":[[3,"module-diffpy.structure.parsers.p_pdb",false],[6,"module-diffpy.structure.parsers.p_pdb",false]],"diffpy.structure.parsers.p_pdffit":[[3,"module-diffpy.structure.parsers.p_pdffit",false],[6,"module-diffpy.structure.parsers.p_pdffit",false]],"diffpy.structure.parsers.p_rawxyz":[[3,"module-diffpy.structure.parsers.p_rawxyz",false],[6,"module-diffpy.structure.parsers.p_rawxyz",false]],"diffpy.structure.parsers.p_vesta":[[3,"module-diffpy.structure.parsers.p_vesta",false]],"diffpy.structure.parsers.p_xcfg":[[3,"module-diffpy.structure.parsers.p_xcfg",false],[6,"module-diffpy.structure.parsers.p_xcfg",false]],"diffpy.structure.parsers.p_xyz":[[3,"module-diffpy.structure.parsers.p_xyz",false],[6,"module-diffpy.structure.parsers.p_xyz",false]],"diffpy.structure.parsers.parser_index_mod":[[3,"module-diffpy.structure.parsers.parser_index_mod",false],[6,"module-diffpy.structure.parsers.parser_index_mod",false]],"diffpy.structure.parsers.structureparser":[[3,"module-diffpy.structure.parsers.structureparser",false],[6,"module-diffpy.structure.parsers.structureparser",false]],"diffpy.structure.pdffitstructure":[[0,"module-diffpy.structure.pdffitstructure",false]],"diffpy.structure.sgtbxspacegroups":[[0,"module-diffpy.structure.sgtbxspacegroups",false]],"diffpy.structure.spacegroupmod":[[0,"module-diffpy.structure.spacegroupmod",false],[11,"module-diffpy.structure.spacegroupmod",false]],"diffpy.structure.spacegroups":[[0,"module-diffpy.structure.spacegroups",false]],"diffpy.structure.structure":[[0,"module-diffpy.structure.structure",false]],"diffpy.structure.structure_app":[[0,"module-diffpy.structure.structure_app",false]],"diffpy.structure.structureerrors":[[0,"module-diffpy.structure.structureerrors",false]],"diffpy.structure.symmetryutilities":[[0,"module-diffpy.structure.symmetryutilities",false]],"diffpy.structure.utils":[[0,"module-diffpy.structure.utils",false]],"dist() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.dist",false],[10,"diffpy.structure.lattice.Lattice.dist",false]],"distance() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.distance",false]],"dot() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.dot",false],[10,"diffpy.structure.lattice.Lattice.dot",false]],"eau (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.eau",false],[6,"diffpy.structure.parsers.p_cif.P_cif.eau",false]],"element (diffpy.structure.atom.atom attribute)":[[0,"diffpy.structure.atom.Atom.element",false],[0,"id3",false],[9,"diffpy.structure.atom.Atom.element",false],[9,"id0",false]],"element (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.element",false]],"eps (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.eps",false],[6,"diffpy.structure.parsers.p_cif.P_cif.eps",false]],"eps (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.eps",false]],"eps (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.eps",false]],"eps (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.eps",false]],"epsilon (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.epsilon",false]],"eq_index() (diffpy.structure.symmetryutilities.generatorsite method)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.eq_index",false]],"eqindex() (diffpy.structure.symmetryutilities.generatorsite method)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.eqIndex",false]],"equal_positions() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.equal_positions",false]],"equalpositions() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.equalPositions",false]],"equij (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.eqUij",false]],"eqxyz (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.eqxyz",false]],"exec_module() (diffpy.structure._legacy_importer.maprenamedstructuremodule method)":[[0,"diffpy.structure._legacy_importer.MapRenamedStructureModule.exec_module",false]],"expand_position() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.expand_position",false]],"expandasymmetricunit (class in diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit",false]],"expandedpos (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.expandedpos",false]],"expandeduijs (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.expandedUijs",false]],"expandposition() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.expandPosition",false]],"extend() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.extend",false]],"filename (diffpy.structure.parsers.structureparser.structureparser attribute)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.filename",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.filename",false]],"find_center() (in module diffpy.structure.expansion.shapeutils)":[[2,"diffpy.structure.expansion.shapeutils.find_center",false],[5,"diffpy.structure.expansion.shapeutils.find_center",false]],"find_space_group() (in module diffpy.structure.spacegroups)":[[0,"diffpy.structure.spacegroups.find_space_group",false]],"find_spec() (diffpy.structure._legacy_importer.findrenamedstructuremodule method)":[[0,"diffpy.structure._legacy_importer.FindRenamedStructureModule.find_spec",false]],"findcenter() (in module diffpy.structure.expansion.shapeutils)":[[2,"diffpy.structure.expansion.shapeutils.findCenter",false],[5,"diffpy.structure.expansion.shapeutils.findCenter",false]],"findcenter_deprecation_msg (in module diffpy.structure.expansion.shapeutils)":[[2,"diffpy.structure.expansion.shapeutils.findCenter_deprecation_msg",false],[5,"diffpy.structure.expansion.shapeutils.findCenter_deprecation_msg",false]],"findrenamedstructuremodule (class in diffpy.structure._legacy_importer)":[[0,"diffpy.structure._legacy_importer.FindRenamedStructureModule",false]],"findspacegroup() (in module diffpy.structure.spacegroups)":[[0,"diffpy.structure.spacegroups.FindSpaceGroup",false]],"format (diffpy.structure.parsers.p_auto.p_auto attribute)":[[3,"diffpy.structure.parsers.p_auto.P_auto.format",false],[6,"diffpy.structure.parsers.p_auto.P_auto.format",false]],"format (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.format",false],[6,"diffpy.structure.parsers.p_cif.P_cif.format",false]],"format (diffpy.structure.parsers.p_discus.p_discus attribute)":[[3,"diffpy.structure.parsers.p_discus.P_discus.format",false],[6,"diffpy.structure.parsers.p_discus.P_discus.format",false]],"format (diffpy.structure.parsers.p_pdb.p_pdb attribute)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.format",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.format",false]],"format (diffpy.structure.parsers.p_pdffit.p_pdffit attribute)":[[3,"diffpy.structure.parsers.p_pdffit.P_pdffit.format",false],[6,"diffpy.structure.parsers.p_pdffit.P_pdffit.format",false]],"format (diffpy.structure.parsers.p_rawxyz.p_rawxyz attribute)":[[3,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.format",false],[6,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.format",false]],"format (diffpy.structure.parsers.p_vesta.p_vesta attribute)":[[3,"diffpy.structure.parsers.p_vesta.P_vesta.format",false]],"format (diffpy.structure.parsers.p_xcfg.p_xcfg attribute)":[[3,"diffpy.structure.parsers.p_xcfg.P_xcfg.format",false],[6,"diffpy.structure.parsers.p_xcfg.P_xcfg.format",false]],"format (diffpy.structure.parsers.p_xyz.p_xyz attribute)":[[3,"diffpy.structure.parsers.p_xyz.P_xyz.format",false],[6,"diffpy.structure.parsers.p_xyz.P_xyz.format",false]],"format (diffpy.structure.parsers.structureparser.structureparser attribute)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.format",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.format",false]],"fractional() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.fractional",false],[10,"diffpy.structure.lattice.Lattice.fractional",false]],"gamma (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.gamma",false],[10,"diffpy.structure.lattice.Lattice.gamma",false]],"gammar (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.gammar",false],[10,"diffpy.structure.lattice.Lattice.gammar",false]],"generatorsite (class in diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite",false]],"get_last_atom() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.get_last_atom",false]],"get_parser() (in module diffpy.structure.parsers)":[[3,"diffpy.structure.parsers.get_parser",false],[6,"diffpy.structure.parsers.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_auto)":[[3,"diffpy.structure.parsers.p_auto.get_parser",false],[6,"diffpy.structure.parsers.p_auto.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_cif)":[[3,"diffpy.structure.parsers.p_cif.get_parser",false],[6,"diffpy.structure.parsers.p_cif.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_discus)":[[3,"diffpy.structure.parsers.p_discus.get_parser",false],[6,"diffpy.structure.parsers.p_discus.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_pdb)":[[3,"diffpy.structure.parsers.p_pdb.get_parser",false],[6,"diffpy.structure.parsers.p_pdb.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_pdffit)":[[3,"diffpy.structure.parsers.p_pdffit.get_parser",false],[6,"diffpy.structure.parsers.p_pdffit.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_rawxyz)":[[3,"diffpy.structure.parsers.p_rawxyz.get_parser",false],[6,"diffpy.structure.parsers.p_rawxyz.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_vesta)":[[3,"diffpy.structure.parsers.p_vesta.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_xcfg)":[[3,"diffpy.structure.parsers.p_xcfg.get_parser",false],[6,"diffpy.structure.parsers.p_xcfg.get_parser",false]],"get_parser() (in module diffpy.structure.parsers.p_xyz)":[[3,"diffpy.structure.parsers.p_xyz.get_parser",false],[6,"diffpy.structure.parsers.p_xyz.get_parser",false]],"get_space_group() (in module diffpy.structure.spacegroups)":[[0,"diffpy.structure.spacegroups.get_space_group",false]],"get_symop() (in module diffpy.structure.parsers.p_cif)":[[3,"diffpy.structure.parsers.p_cif.get_symop",false],[6,"diffpy.structure.parsers.p_cif.get_symop",false]],"getlastatom() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.getLastAtom",false]],"getparser() (in module diffpy.structure.parsers)":[[3,"diffpy.structure.parsers.getParser",false],[6,"diffpy.structure.parsers.getParser",false]],"getparser() (in module diffpy.structure.parsers.p_auto)":[[3,"diffpy.structure.parsers.p_auto.getParser",false],[6,"diffpy.structure.parsers.p_auto.getParser",false]],"getparser() (in module diffpy.structure.parsers.p_cif)":[[3,"diffpy.structure.parsers.p_cif.getParser",false],[6,"diffpy.structure.parsers.p_cif.getParser",false]],"getparser() (in module diffpy.structure.parsers.p_discus)":[[3,"diffpy.structure.parsers.p_discus.getParser",false],[6,"diffpy.structure.parsers.p_discus.getParser",false]],"getparser() (in module diffpy.structure.parsers.p_pdb)":[[3,"diffpy.structure.parsers.p_pdb.getParser",false],[6,"diffpy.structure.parsers.p_pdb.getParser",false]],"getparser() (in module diffpy.structure.parsers.p_pdffit)":[[3,"diffpy.structure.parsers.p_pdffit.getParser",false],[6,"diffpy.structure.parsers.p_pdffit.getParser",false]],"getparser() (in module diffpy.structure.parsers.p_rawxyz)":[[3,"diffpy.structure.parsers.p_rawxyz.getParser",false],[6,"diffpy.structure.parsers.p_rawxyz.getParser",false]],"getparser() (in module diffpy.structure.parsers.p_xcfg)":[[3,"diffpy.structure.parsers.p_xcfg.getParser",false],[6,"diffpy.structure.parsers.p_xcfg.getParser",false]],"getparser() (in module diffpy.structure.parsers.p_xyz)":[[3,"diffpy.structure.parsers.p_xyz.getParser",false],[6,"diffpy.structure.parsers.p_xyz.getParser",false]],"getspacegroup() (in module diffpy.structure.spacegroups)":[[0,"diffpy.structure.spacegroups.GetSpaceGroup",false]],"getsymop() (in module diffpy.structure.parsers.p_cif)":[[3,"diffpy.structure.parsers.p_cif.getSymOp",false],[6,"diffpy.structure.parsers.p_cif.getSymOp",false]],"idx2usymbol (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.idx2Usymbol",false]],"ignored_lines (diffpy.structure.parsers.p_discus.p_discus attribute)":[[3,"diffpy.structure.parsers.p_discus.P_discus.ignored_lines",false],[6,"diffpy.structure.parsers.p_discus.P_discus.ignored_lines",false]],"ignored_lines (diffpy.structure.parsers.p_pdffit.p_pdffit attribute)":[[3,"diffpy.structure.parsers.p_pdffit.P_pdffit.ignored_lines",false],[6,"diffpy.structure.parsers.p_pdffit.P_pdffit.ignored_lines",false]],"input_formats() (in module diffpy.structure.parsers)":[[3,"diffpy.structure.parsers.input_formats",false],[6,"diffpy.structure.parsers.input_formats",false]],"inputformats() (in module diffpy.structure.parsers)":[[3,"diffpy.structure.parsers.inputFormats",false],[6,"diffpy.structure.parsers.inputFormats",false]],"insert() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.insert",false]],"invariants (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.invariants",false]],"is_constant_formula() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.is_constant_formula",false]],"is_identity() (diffpy.structure.spacegroupmod.symop method)":[[0,"diffpy.structure.spacegroupmod.SymOp.is_identity",false],[11,"diffpy.structure.spacegroupmod.SymOp.is_identity",false]],"is_space_group_identifier() (in module diffpy.structure.spacegroups)":[[0,"diffpy.structure.spacegroups.is_space_group_identifier",false]],"is_space_group_latt_parms() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.is_space_group_latt_parms",false]],"isanisotropic() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.isanisotropic",false],[10,"diffpy.structure.lattice.Lattice.isanisotropic",false]],"isconstantformula() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.isconstantFormula",false]],"isfloat() (in module diffpy.structure.utils)":[[0,"diffpy.structure.utils.isfloat",false]],"isiterable() (in module diffpy.structure.utils)":[[0,"diffpy.structure.utils.isiterable",false]],"isotropicunit (diffpy.structure.lattice.lattice attribute)":[[0,"diffpy.structure.lattice.Lattice.isotropicunit",false],[10,"diffpy.structure.lattice.Lattice.isotropicunit",false]],"isspacegroupidentifier() (in module diffpy.structure.spacegroups)":[[0,"diffpy.structure.spacegroups.IsSpaceGroupIdentifier",false]],"isspacegrouplatpar() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.isSpaceGroupLatPar",false]],"iter_equivalent_positions() (diffpy.structure.spacegroupmod.spacegroup method)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.iter_equivalent_positions",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.iter_equivalent_positions",false]],"iter_symops() (diffpy.structure.spacegroupmod.spacegroup method)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.iter_symops",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.iter_symops",false]],"label (diffpy.structure.atom.atom attribute)":[[0,"diffpy.structure.atom.Atom.label",false],[0,"id4",false],[9,"diffpy.structure.atom.Atom.label",false],[9,"id1",false]],"label (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.label",false]],"labelindex (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.labelindex",false],[6,"diffpy.structure.parsers.p_cif.P_cif.labelindex",false]],"lattice (class in diffpy.structure.lattice)":[[0,"diffpy.structure.lattice.Lattice",false],[10,"diffpy.structure.lattice.Lattice",false]],"lattice (diffpy.structure.atom.atom attribute)":[[0,"diffpy.structure.atom.Atom.lattice",false],[0,"id5",false],[9,"diffpy.structure.atom.Atom.lattice",false],[9,"id2",false]],"lattice (diffpy.structure.structure.structure attribute)":[[0,"diffpy.structure.structure.Structure.lattice",false]],"lattice (diffpy.structure.structure.structure property)":[[0,"id0",false]],"latticeerror":[[0,"diffpy.structure.structureerrors.LatticeError",false]],"leading_float() (in module diffpy.structure.parsers.p_cif)":[[3,"diffpy.structure.parsers.p_cif.leading_float",false],[6,"diffpy.structure.parsers.p_cif.leading_float",false]],"license":[[8,"index-0",false]],"line (diffpy.structure.parsers.p_discus.p_discus attribute)":[[3,"diffpy.structure.parsers.p_discus.P_discus.line",false],[6,"diffpy.structure.parsers.p_discus.P_discus.line",false]],"lines (diffpy.structure.parsers.p_discus.p_discus attribute)":[[3,"diffpy.structure.parsers.p_discus.P_discus.lines",false],[6,"diffpy.structure.parsers.p_discus.P_discus.lines",false]],"load_structure() (in module diffpy.structure)":[[0,"diffpy.structure.load_structure",false]],"load_structure_file() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.load_structure_file",false],[4,"diffpy.structure.apps.anyeye.load_structure_file",false]],"load_structure_file() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.load_structure_file",false]],"loadstructure() (in module diffpy.structure)":[[0,"diffpy.structure.loadStructure",false]],"loadstructurefile() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.loadStructureFile",false],[4,"diffpy.structure.apps.anyeye.loadStructureFile",false]],"main() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.main",false],[4,"diffpy.structure.apps.anyeye.main",false]],"main() (in module diffpy.structure.apps.transtru)":[[1,"diffpy.structure.apps.transtru.main",false],[4,"diffpy.structure.apps.transtru.main",false]],"main() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.main",false]],"main() (in module diffpy.structure.structure_app)":[[0,"diffpy.structure.structure_app.main",false]],"make_ellipsoid() (in module diffpy.structure.expansion.makeellipsoid)":[[2,"diffpy.structure.expansion.makeellipsoid.make_ellipsoid",false],[5,"diffpy.structure.expansion.makeellipsoid.make_ellipsoid",false]],"make_sphere() (in module diffpy.structure.expansion.makeellipsoid)":[[2,"diffpy.structure.expansion.makeellipsoid.make_sphere",false],[5,"diffpy.structure.expansion.makeellipsoid.make_sphere",false]],"makeellipsoid() (in module diffpy.structure.expansion.makeellipsoid)":[[2,"diffpy.structure.expansion.makeellipsoid.makeEllipsoid",false],[5,"diffpy.structure.expansion.makeellipsoid.makeEllipsoid",false]],"makesphere() (in module diffpy.structure.expansion.makeellipsoid)":[[2,"diffpy.structure.expansion.makeellipsoid.makeSphere",false],[5,"diffpy.structure.expansion.makeellipsoid.makeSphere",false]],"maprenamedstructuremodule (class in diffpy.structure._legacy_importer)":[[0,"diffpy.structure._legacy_importer.MapRenamedStructureModule",false]],"metrics (diffpy.structure.lattice.lattice attribute)":[[0,"diffpy.structure.lattice.Lattice.metrics",false],[10,"diffpy.structure.lattice.Lattice.metrics",false]],"module":[[0,"module-diffpy.structure",false],[0,"module-diffpy.structure._legacy_importer",false],[0,"module-diffpy.structure.atom",false],[0,"module-diffpy.structure.lattice",false],[0,"module-diffpy.structure.mmlibspacegroups",false],[0,"module-diffpy.structure.pdffitstructure",false],[0,"module-diffpy.structure.sgtbxspacegroups",false],[0,"module-diffpy.structure.spacegroupmod",false],[0,"module-diffpy.structure.spacegroups",false],[0,"module-diffpy.structure.structure",false],[0,"module-diffpy.structure.structure_app",false],[0,"module-diffpy.structure.structureerrors",false],[0,"module-diffpy.structure.symmetryutilities",false],[0,"module-diffpy.structure.utils",false],[1,"module-diffpy.structure.apps",false],[1,"module-diffpy.structure.apps.anyeye",false],[1,"module-diffpy.structure.apps.transtru",false],[1,"module-diffpy.structure.apps.vesta_viewer",false],[2,"module-diffpy.structure.expansion",false],[2,"module-diffpy.structure.expansion.makeellipsoid",false],[2,"module-diffpy.structure.expansion.shapeutils",false],[2,"module-diffpy.structure.expansion.supercell_mod",false],[3,"module-diffpy.structure.parsers",false],[3,"module-diffpy.structure.parsers.p_auto",false],[3,"module-diffpy.structure.parsers.p_cif",false],[3,"module-diffpy.structure.parsers.p_discus",false],[3,"module-diffpy.structure.parsers.p_pdb",false],[3,"module-diffpy.structure.parsers.p_pdffit",false],[3,"module-diffpy.structure.parsers.p_rawxyz",false],[3,"module-diffpy.structure.parsers.p_vesta",false],[3,"module-diffpy.structure.parsers.p_xcfg",false],[3,"module-diffpy.structure.parsers.p_xyz",false],[3,"module-diffpy.structure.parsers.parser_index_mod",false],[3,"module-diffpy.structure.parsers.structureparser",false],[4,"module-diffpy.structure.apps",false],[4,"module-diffpy.structure.apps.anyeye",false],[4,"module-diffpy.structure.apps.transtru",false],[5,"module-diffpy.structure.expansion",false],[5,"module-diffpy.structure.expansion.makeellipsoid",false],[5,"module-diffpy.structure.expansion.shapeutils",false],[5,"module-diffpy.structure.expansion.supercell_mod",false],[6,"module-diffpy.structure.parsers",false],[6,"module-diffpy.structure.parsers.p_auto",false],[6,"module-diffpy.structure.parsers.p_cif",false],[6,"module-diffpy.structure.parsers.p_discus",false],[6,"module-diffpy.structure.parsers.p_pdb",false],[6,"module-diffpy.structure.parsers.p_pdffit",false],[6,"module-diffpy.structure.parsers.p_rawxyz",false],[6,"module-diffpy.structure.parsers.p_xcfg",false],[6,"module-diffpy.structure.parsers.p_xyz",false],[6,"module-diffpy.structure.parsers.parser_index_mod",false],[6,"module-diffpy.structure.parsers.structureparser",false],[9,"module-diffpy.structure.atom",false],[10,"module-diffpy.structure.lattice",false],[11,"module-diffpy.structure.spacegroupmod",false]],"msd_cart() (diffpy.structure.atom.atom method)":[[0,"diffpy.structure.atom.Atom.msd_cart",false],[9,"diffpy.structure.atom.Atom.msd_cart",false]],"msd_latt() (diffpy.structure.atom.atom method)":[[0,"diffpy.structure.atom.Atom.msd_latt",false],[9,"diffpy.structure.atom.Atom.msd_latt",false]],"msdcart() (diffpy.structure.atom.atom method)":[[0,"diffpy.structure.atom.Atom.msdCart",false],[9,"diffpy.structure.atom.Atom.msdCart",false]],"msdlat() (diffpy.structure.atom.atom method)":[[0,"diffpy.structure.atom.Atom.msdLat",false],[9,"diffpy.structure.atom.Atom.msdLat",false]],"multiplicity (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.multiplicity",false]],"multiplicity (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.multiplicity",false]],"ncell_read (diffpy.structure.parsers.p_discus.p_discus attribute)":[[3,"diffpy.structure.parsers.p_discus.P_discus.ncell_read",false],[6,"diffpy.structure.parsers.p_discus.P_discus.ncell_read",false]],"nearest_site_index() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.nearest_site_index",false]],"nearestsiteindex() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.nearestSiteIndex",false]],"nl (diffpy.structure.parsers.p_discus.p_discus attribute)":[[3,"diffpy.structure.parsers.p_discus.P_discus.nl",false],[6,"diffpy.structure.parsers.p_discus.P_discus.nl",false]],"norm() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.norm",false],[10,"diffpy.structure.lattice.Lattice.norm",false]],"normbase (diffpy.structure.lattice.lattice attribute)":[[0,"diffpy.structure.lattice.Lattice.normbase",false],[10,"diffpy.structure.lattice.Lattice.normbase",false]],"null_space (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.null_space",false]],"null_space() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.null_space",false]],"nullspace() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.nullSpace",false]],"num_primitive_sym_equiv (diffpy.structure.spacegroupmod.spacegroup attribute)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.num_primitive_sym_equiv",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.num_primitive_sym_equiv",false]],"num_sym_equiv (diffpy.structure.spacegroupmod.spacegroup attribute)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.num_sym_equiv",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.num_sym_equiv",false]],"number (diffpy.structure.spacegroupmod.spacegroup attribute)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.number",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.number",false]],"occupancy (diffpy.structure.atom.atom attribute)":[[0,"diffpy.structure.atom.Atom.occupancy",false],[0,"id6",false],[9,"diffpy.structure.atom.Atom.occupancy",false],[9,"id3",false]],"occupancy (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.occupancy",false]],"orderofrecords (diffpy.structure.parsers.p_pdb.p_pdb attribute)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.orderOfRecords",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.orderOfRecords",false]],"output_formats() (in module diffpy.structure.parsers)":[[3,"diffpy.structure.parsers.output_formats",false],[6,"diffpy.structure.parsers.output_formats",false]],"outputformats() (in module diffpy.structure.parsers)":[[3,"diffpy.structure.parsers.outputFormats",false],[6,"diffpy.structure.parsers.outputFormats",false]],"p_auto (class in diffpy.structure.parsers.p_auto)":[[3,"diffpy.structure.parsers.p_auto.P_auto",false],[6,"diffpy.structure.parsers.p_auto.P_auto",false]],"p_cif (class in diffpy.structure.parsers.p_cif)":[[3,"diffpy.structure.parsers.p_cif.P_cif",false],[6,"diffpy.structure.parsers.p_cif.P_cif",false]],"p_discus (class in diffpy.structure.parsers.p_discus)":[[3,"diffpy.structure.parsers.p_discus.P_discus",false],[6,"diffpy.structure.parsers.p_discus.P_discus",false]],"p_pdb (class in diffpy.structure.parsers.p_pdb)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb",false]],"p_pdffit (class in diffpy.structure.parsers.p_pdffit)":[[3,"diffpy.structure.parsers.p_pdffit.P_pdffit",false],[6,"diffpy.structure.parsers.p_pdffit.P_pdffit",false]],"p_rawxyz (class in diffpy.structure.parsers.p_rawxyz)":[[3,"diffpy.structure.parsers.p_rawxyz.P_rawxyz",false],[6,"diffpy.structure.parsers.p_rawxyz.P_rawxyz",false]],"p_vesta (class in diffpy.structure.parsers.p_vesta)":[[3,"diffpy.structure.parsers.p_vesta.P_vesta",false]],"p_xcfg (class in diffpy.structure.parsers.p_xcfg)":[[3,"diffpy.structure.parsers.p_xcfg.P_xcfg",false],[6,"diffpy.structure.parsers.p_xcfg.P_xcfg",false]],"p_xyz (class in diffpy.structure.parsers.p_xyz)":[[3,"diffpy.structure.parsers.p_xyz.P_xyz",false],[6,"diffpy.structure.parsers.p_xyz.P_xyz",false]],"parse() (diffpy.structure.parsers.p_auto.p_auto method)":[[3,"diffpy.structure.parsers.p_auto.P_auto.parse",false],[6,"diffpy.structure.parsers.p_auto.P_auto.parse",false]],"parse() (diffpy.structure.parsers.p_cif.p_cif method)":[[3,"diffpy.structure.parsers.p_cif.P_cif.parse",false],[6,"diffpy.structure.parsers.p_cif.P_cif.parse",false]],"parse() (diffpy.structure.parsers.structureparser.structureparser method)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.parse",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.parse",false]],"parse_file() (diffpy.structure.parsers.p_auto.p_auto method)":[[3,"diffpy.structure.parsers.p_auto.P_auto.parse_file",false],[6,"diffpy.structure.parsers.p_auto.P_auto.parse_file",false]],"parse_file() (diffpy.structure.parsers.p_cif.p_cif method)":[[3,"diffpy.structure.parsers.p_cif.P_cif.parse_file",false],[6,"diffpy.structure.parsers.p_cif.P_cif.parse_file",false]],"parse_file() (diffpy.structure.parsers.structureparser.structureparser method)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.parse_file",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.parse_file",false]],"parse_formula() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.parse_formula",false],[4,"diffpy.structure.apps.anyeye.parse_formula",false]],"parse_formula() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.parse_formula",false]],"parse_lines() (diffpy.structure.parsers.p_auto.p_auto method)":[[3,"diffpy.structure.parsers.p_auto.P_auto.parse_lines",false],[6,"diffpy.structure.parsers.p_auto.P_auto.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.p_cif.p_cif method)":[[3,"diffpy.structure.parsers.p_cif.P_cif.parse_lines",false],[6,"diffpy.structure.parsers.p_cif.P_cif.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.p_discus.p_discus method)":[[3,"diffpy.structure.parsers.p_discus.P_discus.parse_lines",false],[6,"diffpy.structure.parsers.p_discus.P_discus.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.parse_lines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.p_pdffit.p_pdffit method)":[[3,"diffpy.structure.parsers.p_pdffit.P_pdffit.parse_lines",false],[6,"diffpy.structure.parsers.p_pdffit.P_pdffit.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.p_rawxyz.p_rawxyz method)":[[3,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.parse_lines",false],[6,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.p_vesta.p_vesta method)":[[3,"diffpy.structure.parsers.p_vesta.P_vesta.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.p_xcfg.p_xcfg method)":[[3,"diffpy.structure.parsers.p_xcfg.P_xcfg.parse_lines",false],[6,"diffpy.structure.parsers.p_xcfg.P_xcfg.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.p_xyz.p_xyz method)":[[3,"diffpy.structure.parsers.p_xyz.P_xyz.parse_lines",false],[6,"diffpy.structure.parsers.p_xyz.P_xyz.parse_lines",false]],"parse_lines() (diffpy.structure.parsers.structureparser.structureparser method)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.parse_lines",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.parse_lines",false]],"parsefile() (diffpy.structure.parsers.p_auto.p_auto method)":[[3,"diffpy.structure.parsers.p_auto.P_auto.parseFile",false],[6,"diffpy.structure.parsers.p_auto.P_auto.parseFile",false]],"parsefile() (diffpy.structure.parsers.p_cif.p_cif method)":[[3,"diffpy.structure.parsers.p_cif.P_cif.parseFile",false],[6,"diffpy.structure.parsers.p_cif.P_cif.parseFile",false]],"parsefile() (diffpy.structure.parsers.structureparser.structureparser method)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.parseFile",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.parseFile",false]],"parseformula() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.parseFormula",false],[4,"diffpy.structure.apps.anyeye.parseFormula",false]],"parselines() (diffpy.structure.parsers.p_auto.p_auto method)":[[3,"diffpy.structure.parsers.p_auto.P_auto.parseLines",false],[6,"diffpy.structure.parsers.p_auto.P_auto.parseLines",false]],"parselines() (diffpy.structure.parsers.p_cif.p_cif method)":[[3,"diffpy.structure.parsers.p_cif.P_cif.parseLines",false],[6,"diffpy.structure.parsers.p_cif.P_cif.parseLines",false]],"parselines() (diffpy.structure.parsers.p_discus.p_discus method)":[[3,"diffpy.structure.parsers.p_discus.P_discus.parseLines",false],[6,"diffpy.structure.parsers.p_discus.P_discus.parseLines",false]],"parselines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.parseLines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.parseLines",false]],"parselines() (diffpy.structure.parsers.p_pdffit.p_pdffit method)":[[3,"diffpy.structure.parsers.p_pdffit.P_pdffit.parseLines",false],[6,"diffpy.structure.parsers.p_pdffit.P_pdffit.parseLines",false]],"parselines() (diffpy.structure.parsers.p_rawxyz.p_rawxyz method)":[[3,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.parseLines",false],[6,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.parseLines",false]],"parselines() (diffpy.structure.parsers.p_xcfg.p_xcfg method)":[[3,"diffpy.structure.parsers.p_xcfg.P_xcfg.parseLines",false],[6,"diffpy.structure.parsers.p_xcfg.P_xcfg.parseLines",false]],"parselines() (diffpy.structure.parsers.p_xyz.p_xyz method)":[[3,"diffpy.structure.parsers.p_xyz.P_xyz.parseLines",false],[6,"diffpy.structure.parsers.p_xyz.P_xyz.parseLines",false]],"parselines() (diffpy.structure.parsers.structureparser.structureparser method)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.parseLines",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.parseLines",false]],"parser_index (in module diffpy.structure.parsers.parser_index_mod)":[[3,"diffpy.structure.parsers.parser_index_mod.parser_index",false],[6,"diffpy.structure.parsers.parser_index_mod.parser_index",false]],"pdb_name (diffpy.structure.spacegroupmod.spacegroup attribute)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.pdb_name",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.pdb_name",false]],"pdffit (diffpy.structure.pdffitstructure.pdffitstructure attribute)":[[0,"diffpy.structure.pdffitstructure.PDFFitStructure.pdffit",false]],"pdffit (diffpy.structure.structure.structure attribute)":[[0,"diffpy.structure.structure.Structure.pdffit",false],[0,"id1",false]],"pdffitstructure (class in diffpy.structure.pdffitstructure)":[[0,"diffpy.structure.pdffitstructure.PDFFitStructure",false]],"pkw (diffpy.structure.parsers.p_auto.p_auto attribute)":[[3,"diffpy.structure.parsers.p_auto.P_auto.pkw",false],[6,"diffpy.structure.parsers.p_auto.P_auto.pkw",false]],"place_in_lattice() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.place_in_lattice",false]],"placeinlattice() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.placeInLattice",false]],"point_group_name (diffpy.structure.spacegroupmod.spacegroup attribute)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.point_group_name",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.point_group_name",false]],"pos_parm_symbols() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.pos_parm_symbols",false]],"pos_parm_values() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.pos_parm_values",false]],"poseqns (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.poseqns",false]],"position_difference() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.position_difference",false]],"position_formula() (diffpy.structure.symmetryutilities.generatorsite method)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.position_formula",false]],"position_formulas() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.position_formulas",false]],"position_formulas_pruned() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.position_formulas_pruned",false]],"positiondifference() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.positionDifference",false]],"positionformula() (diffpy.structure.symmetryutilities.generatorsite method)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.positionFormula",false]],"positionformulas() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.positionFormulas",false]],"positionformulaspruned() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.positionFormulasPruned",false]],"positions (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.positions",false]],"pospars (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.pospars",false]],"posparsymbols() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.posparSymbols",false]],"posparvalues() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.posparValues",false]],"pparameters (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.pparameters",false]],"prefix (diffpy.structure._legacy_importer.findrenamedstructuremodule attribute)":[[0,"diffpy.structure._legacy_importer.FindRenamedStructureModule.prefix",false]],"prune_formula_dictionary() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.prune_formula_dictionary",false]],"pruneformuladictionary() (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.pruneFormulaDictionary",false]],"r (diffpy.structure.spacegroupmod.symop attribute)":[[0,"diffpy.structure.spacegroupmod.SymOp.R",false],[11,"diffpy.structure.spacegroupmod.SymOp.R",false]],"read() (diffpy.structure.pdffitstructure.pdffitstructure method)":[[0,"diffpy.structure.pdffitstructure.PDFFitStructure.read",false]],"read() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.read",false]],"read_structure() (diffpy.structure.pdffitstructure.pdffitstructure method)":[[0,"diffpy.structure.pdffitstructure.PDFFitStructure.read_structure",false]],"read_structure() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.read_structure",false]],"readstr() (diffpy.structure.pdffitstructure.pdffitstructure method)":[[0,"diffpy.structure.pdffitstructure.PDFFitStructure.readStr",false]],"readstr() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.readStr",false]],"recbase (diffpy.structure.lattice.lattice attribute)":[[0,"diffpy.structure.lattice.Lattice.recbase",false],[10,"diffpy.structure.lattice.Lattice.recbase",false]],"reciprocal() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.reciprocal",false],[10,"diffpy.structure.lattice.Lattice.reciprocal",false]],"recnormbase (diffpy.structure.lattice.lattice attribute)":[[0,"diffpy.structure.lattice.Lattice.recnormbase",false],[10,"diffpy.structure.lattice.Lattice.recnormbase",false]],"reference":[[7,"index-0",false]],"release notes":[[12,"index-0",false]],"rnorm() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.rnorm",false],[10,"diffpy.structure.lattice.Lattice.rnorm",false]],"rx_float (in module diffpy.structure.parsers.p_cif)":[[3,"diffpy.structure.parsers.p_cif.rx_float",false],[6,"diffpy.structure.parsers.p_cif.rx_float",false]],"sa (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.sa",false],[10,"diffpy.structure.lattice.Lattice.sa",false]],"sar (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.sar",false],[10,"diffpy.structure.lattice.Lattice.sar",false]],"sb (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.sb",false],[10,"diffpy.structure.lattice.Lattice.sb",false]],"sbr (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.sbr",false],[10,"diffpy.structure.lattice.Lattice.sbr",false]],"set_latt_parms() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.set_latt_parms",false],[10,"diffpy.structure.lattice.Lattice.set_latt_parms",false]],"set_new_latt_base_vec() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.set_new_latt_base_vec",false],[10,"diffpy.structure.lattice.Lattice.set_new_latt_base_vec",false]],"setlatbase() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.setLatBase",false],[10,"diffpy.structure.lattice.Lattice.setLatBase",false]],"setlatpar() (diffpy.structure.lattice.lattice method)":[[0,"diffpy.structure.lattice.Lattice.setLatPar",false],[10,"diffpy.structure.lattice.Lattice.setLatPar",false]],"sg (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.sg",false],[10,"diffpy.structure.lattice.Lattice.sg",false]],"sgoffset (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.sgoffset",false]],"sgoffset (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.sgoffset",false]],"sgoffset (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.sgoffset",false]],"sgr (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.sgr",false],[10,"diffpy.structure.lattice.Lattice.sgr",false]],"sgtbxspacegrouplist (in module diffpy.structure.sgtbxspacegroups)":[[0,"diffpy.structure.sgtbxspacegroups.sgtbxSpaceGroupList",false]],"short_name (diffpy.structure.spacegroupmod.spacegroup attribute)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.short_name",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.short_name",false]],"signal_handler() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.signal_handler",false],[4,"diffpy.structure.apps.anyeye.signal_handler",false]],"signal_handler() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.signal_handler",false]],"signalhandler() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.signalHandler",false],[4,"diffpy.structure.apps.anyeye.signalHandler",false]],"signedratstr() (diffpy.structure.symmetryutilities.generatorsite method)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.signedRatStr",false]],"sind() (in module diffpy.structure.lattice)":[[0,"diffpy.structure.lattice.sind",false],[10,"diffpy.structure.lattice.sind",false]],"spacegroup (class in diffpy.structure.spacegroupmod)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup",false]],"spacegroup (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.spacegroup",false],[6,"diffpy.structure.parsers.p_cif.P_cif.spacegroup",false]],"spacegroup (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.spacegroup",false]],"spacegroup (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.spacegroup",false]],"spacegrouplist (in module diffpy.structure.spacegroups)":[[0,"diffpy.structure.spacegroups.SpaceGroupList",false]],"stdbase (diffpy.structure.lattice.lattice attribute)":[[0,"diffpy.structure.lattice.Lattice.stdbase",false],[10,"diffpy.structure.lattice.Lattice.stdbase",false]],"stdusymbols (in module diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.stdUsymbols",false]],"stru (diffpy.structure.parsers.p_cif.p_cif attribute)":[[3,"diffpy.structure.parsers.p_cif.P_cif.stru",false],[6,"diffpy.structure.parsers.p_cif.P_cif.stru",false]],"stru (diffpy.structure.parsers.p_discus.p_discus attribute)":[[3,"diffpy.structure.parsers.p_discus.P_discus.stru",false],[6,"diffpy.structure.parsers.p_discus.P_discus.stru",false]],"stru (diffpy.structure.parsers.p_pdffit.p_pdffit attribute)":[[3,"diffpy.structure.parsers.p_pdffit.P_pdffit.stru",false],[6,"diffpy.structure.parsers.p_pdffit.P_pdffit.stru",false]],"structure (class in diffpy.structure.structure)":[[0,"diffpy.structure.structure.Structure",false]],"structureformaterror":[[0,"diffpy.structure.structureerrors.StructureFormatError",false]],"structureparser (class in diffpy.structure.parsers.structureparser)":[[3,"diffpy.structure.parsers.structureparser.StructureParser",false],[6,"diffpy.structure.parsers.structureparser.StructureParser",false]],"supercell() (in module diffpy.structure.expansion.supercell_mod)":[[2,"diffpy.structure.expansion.supercell_mod.supercell",false],[5,"diffpy.structure.expansion.supercell_mod.supercell",false]],"symmetryconstraints (class in diffpy.structure.symmetryutilities)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints",false]],"symmetryerror":[[0,"diffpy.structure.structureerrors.SymmetryError",false]],"symop (class in diffpy.structure.spacegroupmod)":[[0,"diffpy.structure.spacegroupmod.SymOp",false],[11,"diffpy.structure.spacegroupmod.SymOp",false]],"symop_list (diffpy.structure.spacegroupmod.spacegroup attribute)":[[0,"diffpy.structure.spacegroupmod.SpaceGroup.symop_list",false],[11,"diffpy.structure.spacegroupmod.SpaceGroup.symop_list",false]],"symops (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.symops",false]],"symvec (in module diffpy.structure.parsers.p_cif)":[[3,"diffpy.structure.parsers.p_cif.symvec",false],[6,"diffpy.structure.parsers.p_cif.symvec",false]],"t (diffpy.structure.spacegroupmod.symop attribute)":[[0,"diffpy.structure.spacegroupmod.SymOp.t",false],[11,"diffpy.structure.spacegroupmod.SymOp.t",false]],"title (diffpy.structure.structure.structure attribute)":[[0,"diffpy.structure.structure.Structure.title",false],[0,"id2",false]],"title_lines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.title_lines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.title_lines",false]],"titlelines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.titleLines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.titleLines",false]],"to_lines() (diffpy.structure.parsers.p_cif.p_cif method)":[[3,"diffpy.structure.parsers.p_cif.P_cif.to_lines",false],[6,"diffpy.structure.parsers.p_cif.P_cif.to_lines",false]],"to_lines() (diffpy.structure.parsers.p_discus.p_discus method)":[[3,"diffpy.structure.parsers.p_discus.P_discus.to_lines",false],[6,"diffpy.structure.parsers.p_discus.P_discus.to_lines",false]],"to_lines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.to_lines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.to_lines",false]],"to_lines() (diffpy.structure.parsers.p_pdffit.p_pdffit method)":[[3,"diffpy.structure.parsers.p_pdffit.P_pdffit.to_lines",false],[6,"diffpy.structure.parsers.p_pdffit.P_pdffit.to_lines",false]],"to_lines() (diffpy.structure.parsers.p_rawxyz.p_rawxyz method)":[[3,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.to_lines",false],[6,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.to_lines",false]],"to_lines() (diffpy.structure.parsers.p_vesta.p_vesta method)":[[3,"diffpy.structure.parsers.p_vesta.P_vesta.to_lines",false]],"to_lines() (diffpy.structure.parsers.p_xcfg.p_xcfg method)":[[3,"diffpy.structure.parsers.p_xcfg.P_xcfg.to_lines",false],[6,"diffpy.structure.parsers.p_xcfg.P_xcfg.to_lines",false]],"to_lines() (diffpy.structure.parsers.p_xyz.p_xyz method)":[[3,"diffpy.structure.parsers.p_xyz.P_xyz.to_lines",false],[6,"diffpy.structure.parsers.p_xyz.P_xyz.to_lines",false]],"to_lines() (diffpy.structure.parsers.structureparser.structureparser method)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.to_lines",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.to_lines",false]],"tolines() (diffpy.structure.parsers.p_cif.p_cif method)":[[3,"diffpy.structure.parsers.p_cif.P_cif.toLines",false],[6,"diffpy.structure.parsers.p_cif.P_cif.toLines",false]],"tolines() (diffpy.structure.parsers.p_discus.p_discus method)":[[3,"diffpy.structure.parsers.p_discus.P_discus.toLines",false],[6,"diffpy.structure.parsers.p_discus.P_discus.toLines",false]],"tolines() (diffpy.structure.parsers.p_pdb.p_pdb method)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.toLines",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.toLines",false]],"tolines() (diffpy.structure.parsers.p_pdffit.p_pdffit method)":[[3,"diffpy.structure.parsers.p_pdffit.P_pdffit.toLines",false],[6,"diffpy.structure.parsers.p_pdffit.P_pdffit.toLines",false]],"tolines() (diffpy.structure.parsers.p_rawxyz.p_rawxyz method)":[[3,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.toLines",false],[6,"diffpy.structure.parsers.p_rawxyz.P_rawxyz.toLines",false]],"tolines() (diffpy.structure.parsers.p_xcfg.p_xcfg method)":[[3,"diffpy.structure.parsers.p_xcfg.P_xcfg.toLines",false],[6,"diffpy.structure.parsers.p_xcfg.P_xcfg.toLines",false]],"tolines() (diffpy.structure.parsers.p_xyz.p_xyz method)":[[3,"diffpy.structure.parsers.p_xyz.P_xyz.toLines",false],[6,"diffpy.structure.parsers.p_xyz.P_xyz.toLines",false]],"tolines() (diffpy.structure.parsers.structureparser.structureparser method)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.toLines",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.toLines",false]],"tolist() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.tolist",false]],"tostring() (diffpy.structure.parsers.structureparser.structureparser method)":[[3,"diffpy.structure.parsers.structureparser.StructureParser.tostring",false],[6,"diffpy.structure.parsers.structureparser.StructureParser.tostring",false]],"u (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.U",false],[9,"diffpy.structure.atom.Atom.U",false]],"u (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.U",false]],"u11 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.U11",false],[9,"diffpy.structure.atom.Atom.U11",false]],"u11 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.U11",false]],"u12 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.U12",false],[9,"diffpy.structure.atom.Atom.U12",false]],"u12 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.U12",false]],"u13 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.U13",false],[9,"diffpy.structure.atom.Atom.U13",false]],"u13 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.U13",false]],"u22 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.U22",false],[9,"diffpy.structure.atom.Atom.U22",false]],"u22 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.U22",false]],"u23 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.U23",false],[9,"diffpy.structure.atom.Atom.U23",false]],"u23 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.U23",false]],"u33 (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.U33",false],[9,"diffpy.structure.atom.Atom.U33",false]],"u33 (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.U33",false]],"u_formula() (diffpy.structure.symmetryutilities.generatorsite method)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.u_formula",false]],"u_formulas() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.u_formulas",false]],"u_formulas_pruned() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.u_formulas_pruned",false]],"u_parm_symbols() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.u_parm_symbols",false]],"u_parm_values() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.u_parm_values",false]],"ucomponents (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.Ucomponents",false]],"ueqns (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.Ueqns",false]],"uformula() (diffpy.structure.symmetryutilities.generatorsite method)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.UFormula",false]],"uformulas() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.UFormulas",false]],"uformulaspruned() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.UFormulasPruned",false]],"uij (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.Uij",false]],"uijs (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.Uijs",false]],"uisoequiv (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.Uisoequiv",false],[9,"diffpy.structure.atom.Atom.Uisoequiv",false]],"uisoequiv (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.Uisoequiv",false]],"uisotropy (diffpy.structure.symmetryutilities.expandasymmetricunit attribute)":[[0,"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit.Uisotropy",false]],"uisotropy (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.Uisotropy",false]],"uisotropy (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.Uisotropy",false]],"unitvolume (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.unitvolume",false],[10,"diffpy.structure.lattice.Lattice.unitvolume",false]],"uparameters (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.Uparameters",false]],"upars (diffpy.structure.symmetryutilities.symmetryconstraints attribute)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.Upars",false]],"uparsymbols() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.UparSymbols",false]],"uparvalues() (diffpy.structure.symmetryutilities.symmetryconstraints method)":[[0,"diffpy.structure.symmetryutilities.SymmetryConstraints.UparValues",false]],"usage() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.usage",false],[4,"diffpy.structure.apps.anyeye.usage",false]],"usage() (in module diffpy.structure.apps.transtru)":[[1,"diffpy.structure.apps.transtru.usage",false],[4,"diffpy.structure.apps.transtru.usage",false]],"usage() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.usage",false]],"uspace (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.Uspace",false]],"validrecords (diffpy.structure.parsers.p_pdb.p_pdb attribute)":[[3,"diffpy.structure.parsers.p_pdb.P_pdb.validRecords",false],[6,"diffpy.structure.parsers.p_pdb.P_pdb.validRecords",false]],"version() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.version",false],[4,"diffpy.structure.apps.anyeye.version",false]],"version() (in module diffpy.structure.apps.transtru)":[[1,"diffpy.structure.apps.transtru.version",false],[4,"diffpy.structure.apps.transtru.version",false]],"version() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.version",false]],"volume (diffpy.structure.lattice.lattice property)":[[0,"diffpy.structure.lattice.Lattice.volume",false],[10,"diffpy.structure.lattice.Lattice.volume",false]],"watch_structure_file() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.watch_structure_file",false],[4,"diffpy.structure.apps.anyeye.watch_structure_file",false]],"watch_structure_file() (in module diffpy.structure.apps.vesta_viewer)":[[1,"diffpy.structure.apps.vesta_viewer.watch_structure_file",false]],"watchstructurefile() (in module diffpy.structure.apps.anyeye)":[[1,"diffpy.structure.apps.anyeye.watchStructureFile",false],[4,"diffpy.structure.apps.anyeye.watchStructureFile",false]],"write() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.write",false]],"write_structure() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.write_structure",false]],"writestr() (diffpy.structure.structure.structure method)":[[0,"diffpy.structure.structure.Structure.writeStr",false]],"x (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.x",false],[9,"diffpy.structure.atom.Atom.x",false]],"x (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.x",false]],"xyz (diffpy.structure.atom.atom attribute)":[[0,"diffpy.structure.atom.Atom.xyz",false],[9,"diffpy.structure.atom.Atom.xyz",false]],"xyz (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.xyz",false]],"xyz (diffpy.structure.symmetryutilities.generatorsite attribute)":[[0,"diffpy.structure.symmetryutilities.GeneratorSite.xyz",false]],"xyz_cartn (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.xyz_cartn",false],[9,"diffpy.structure.atom.Atom.xyz_cartn",false]],"xyz_cartn (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.xyz_cartn",false]],"y (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.y",false],[9,"diffpy.structure.atom.Atom.y",false]],"y (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.y",false]],"z (diffpy.structure.atom.atom property)":[[0,"diffpy.structure.atom.Atom.z",false],[9,"diffpy.structure.atom.Atom.z",false]],"z (diffpy.structure.structure.structure property)":[[0,"diffpy.structure.structure.Structure.z",false]]},"objects":{"diffpy":[[0,0,0,"-","structure"]],"diffpy.structure":[[0,1,1,"","DeprecatedStructureModule"],[0,0,0,"-","_legacy_importer"],[4,0,0,"-","apps"],[9,0,0,"-","atom"],[5,0,0,"-","expansion"],[10,0,0,"-","lattice"],[0,4,1,"","loadStructure"],[0,4,1,"","load_structure"],[0,0,0,"-","mmlibspacegroups"],[6,0,0,"-","parsers"],[0,0,0,"-","pdffitstructure"],[0,0,0,"-","sgtbxspacegroups"],[11,0,0,"-","spacegroupmod"],[0,0,0,"-","spacegroups"],[0,0,0,"-","structure"],[0,0,0,"-","structure_app"],[0,0,0,"-","structureerrors"],[0,0,0,"-","symmetryutilities"],[0,0,0,"-","utils"]],"diffpy.structure._legacy_importer":[[0,1,1,"","FindRenamedStructureModule"],[0,1,1,"","MapRenamedStructureModule"]],"diffpy.structure._legacy_importer.FindRenamedStructureModule":[[0,2,1,"","find_spec"],[0,3,1,"","prefix"]],"diffpy.structure._legacy_importer.MapRenamedStructureModule":[[0,2,1,"","create_module"],[0,2,1,"","exec_module"]],"diffpy.structure.apps":[[4,0,0,"-","anyeye"],[4,0,0,"-","transtru"],[1,0,0,"-","vesta_viewer"]],"diffpy.structure.apps.anyeye":[[4,4,1,"","cleanUp"],[4,4,1,"","clean_up"],[4,4,1,"","convertStructureFile"],[4,4,1,"","convert_structure_file"],[4,4,1,"","die"],[4,4,1,"","loadStructureFile"],[4,4,1,"","load_structure_file"],[4,4,1,"","main"],[4,4,1,"","parseFormula"],[4,4,1,"","parse_formula"],[4,4,1,"","signalHandler"],[4,4,1,"","signal_handler"],[4,4,1,"","usage"],[4,4,1,"","version"],[4,4,1,"","watchStructureFile"],[4,4,1,"","watch_structure_file"]],"diffpy.structure.apps.transtru":[[4,4,1,"","main"],[4,4,1,"","usage"],[4,4,1,"","version"]],"diffpy.structure.apps.vesta_viewer":[[1,4,1,"","clean_up"],[1,4,1,"","convert_structure_file"],[1,4,1,"","die"],[1,4,1,"","load_structure_file"],[1,4,1,"","main"],[1,4,1,"","parse_formula"],[1,4,1,"","signal_handler"],[1,4,1,"","usage"],[1,4,1,"","version"],[1,4,1,"","watch_structure_file"]],"diffpy.structure.atom":[[9,1,1,"","Atom"]],"diffpy.structure.atom.Atom":[[9,5,1,"","B11"],[9,5,1,"","B12"],[9,5,1,"","B13"],[9,5,1,"","B22"],[9,5,1,"","B23"],[9,5,1,"","B33"],[9,5,1,"","Bisoequiv"],[9,5,1,"","U"],[9,5,1,"","U11"],[9,5,1,"","U12"],[9,5,1,"","U13"],[9,5,1,"","U22"],[9,5,1,"","U23"],[9,5,1,"","U33"],[9,5,1,"","Uisoequiv"],[9,5,1,"","anisotropy"],[9,3,1,"id0","element"],[9,3,1,"id1","label"],[9,3,1,"id2","lattice"],[9,2,1,"","msdCart"],[9,2,1,"","msdLat"],[9,2,1,"","msd_cart"],[9,2,1,"","msd_latt"],[9,3,1,"id3","occupancy"],[9,5,1,"","x"],[9,3,1,"","xyz"],[9,5,1,"","xyz_cartn"],[9,5,1,"","y"],[9,5,1,"","z"]],"diffpy.structure.expansion":[[5,0,0,"-","makeellipsoid"],[5,0,0,"-","shapeutils"],[5,0,0,"-","supercell_mod"]],"diffpy.structure.expansion.makeellipsoid":[[5,4,1,"","makeEllipsoid"],[5,4,1,"","makeSphere"],[5,4,1,"","make_ellipsoid"],[5,4,1,"","make_sphere"]],"diffpy.structure.expansion.shapeutils":[[5,4,1,"","findCenter"],[5,6,1,"","findCenter_deprecation_msg"],[5,4,1,"","find_center"]],"diffpy.structure.expansion.supercell_mod":[[5,4,1,"","supercell"]],"diffpy.structure.lattice":[[10,1,1,"","Lattice"],[10,3,1,"","cartesian"],[10,4,1,"","cosd"],[10,4,1,"","sind"]],"diffpy.structure.lattice.Lattice":[[10,5,1,"","a"],[10,2,1,"","abcABG"],[10,5,1,"","alpha"],[10,5,1,"","alphar"],[10,2,1,"","angle"],[10,5,1,"","ar"],[10,5,1,"","b"],[10,3,1,"","base"],[10,3,1,"","baserot"],[10,5,1,"","beta"],[10,5,1,"","betar"],[10,5,1,"","br"],[10,5,1,"","c"],[10,5,1,"","ca"],[10,5,1,"","car"],[10,2,1,"","cartesian"],[10,5,1,"","cb"],[10,5,1,"","cbr"],[10,2,1,"","cell_parms"],[10,5,1,"","cg"],[10,5,1,"","cgr"],[10,5,1,"","cr"],[10,2,1,"","dist"],[10,2,1,"","dot"],[10,2,1,"","fractional"],[10,5,1,"","gamma"],[10,5,1,"","gammar"],[10,2,1,"","isanisotropic"],[10,3,1,"","isotropicunit"],[10,3,1,"","metrics"],[10,2,1,"","norm"],[10,3,1,"","normbase"],[10,3,1,"","recbase"],[10,2,1,"","reciprocal"],[10,3,1,"","recnormbase"],[10,2,1,"","rnorm"],[10,5,1,"","sa"],[10,5,1,"","sar"],[10,5,1,"","sb"],[10,5,1,"","sbr"],[10,2,1,"","setLatBase"],[10,2,1,"","setLatPar"],[10,2,1,"","set_latt_parms"],[10,2,1,"","set_new_latt_base_vec"],[10,5,1,"","sg"],[10,5,1,"","sgr"],[10,3,1,"","stdbase"],[10,5,1,"","unitvolume"],[10,5,1,"","volume"]],"diffpy.structure.parsers":[[6,4,1,"","getParser"],[6,4,1,"","get_parser"],[6,4,1,"","inputFormats"],[6,4,1,"","input_formats"],[6,4,1,"","outputFormats"],[6,4,1,"","output_formats"],[6,0,0,"-","p_auto"],[6,0,0,"-","p_cif"],[6,0,0,"-","p_discus"],[6,0,0,"-","p_pdb"],[6,0,0,"-","p_pdffit"],[6,0,0,"-","p_rawxyz"],[3,0,0,"-","p_vesta"],[6,0,0,"-","p_xcfg"],[6,0,0,"-","p_xyz"],[6,0,0,"-","parser_index_mod"],[6,0,0,"-","structureparser"]],"diffpy.structure.parsers.p_auto":[[6,1,1,"","P_auto"],[6,4,1,"","getParser"],[6,4,1,"","get_parser"]],"diffpy.structure.parsers.p_auto.P_auto":[[6,3,1,"","format"],[6,2,1,"","parse"],[6,2,1,"","parseFile"],[6,2,1,"","parseLines"],[6,2,1,"","parse_file"],[6,2,1,"","parse_lines"],[6,3,1,"","pkw"]],"diffpy.structure.parsers.p_cif":[[6,1,1,"","P_cif"],[6,4,1,"","getParser"],[6,4,1,"","getSymOp"],[6,4,1,"","get_parser"],[6,4,1,"","get_symop"],[6,4,1,"","leading_float"],[6,3,1,"","rx_float"],[6,3,1,"","symvec"]],"diffpy.structure.parsers.p_cif.P_cif":[[6,3,1,"","BtoU"],[6,3,1,"","anisotropy"],[6,3,1,"","asymmetric_unit"],[6,3,1,"","cif_sgname"],[6,3,1,"","ciffile"],[6,3,1,"","eau"],[6,3,1,"","eps"],[6,3,1,"","format"],[6,3,1,"","labelindex"],[6,2,1,"","parse"],[6,2,1,"","parseFile"],[6,2,1,"","parseLines"],[6,2,1,"","parse_file"],[6,2,1,"","parse_lines"],[6,3,1,"","spacegroup"],[6,3,1,"","stru"],[6,2,1,"","toLines"],[6,2,1,"","to_lines"]],"diffpy.structure.parsers.p_discus":[[6,1,1,"","P_discus"],[6,4,1,"","getParser"],[6,4,1,"","get_parser"]],"diffpy.structure.parsers.p_discus.P_discus":[[6,3,1,"","cell_read"],[6,3,1,"","format"],[6,3,1,"","ignored_lines"],[6,3,1,"","line"],[6,3,1,"","lines"],[6,3,1,"","ncell_read"],[6,3,1,"","nl"],[6,2,1,"","parseLines"],[6,2,1,"","parse_lines"],[6,3,1,"","stru"],[6,2,1,"","toLines"],[6,2,1,"","to_lines"]],"diffpy.structure.parsers.p_pdb":[[6,1,1,"","P_pdb"],[6,4,1,"","getParser"],[6,4,1,"","get_parser"]],"diffpy.structure.parsers.p_pdb.P_pdb":[[6,2,1,"","atomLines"],[6,2,1,"","atom_lines"],[6,2,1,"","cryst1Lines"],[6,2,1,"","cryst1_lines"],[6,3,1,"","format"],[6,3,1,"","orderOfRecords"],[6,2,1,"","parseLines"],[6,2,1,"","parse_lines"],[6,2,1,"","titleLines"],[6,2,1,"","title_lines"],[6,2,1,"","toLines"],[6,2,1,"","to_lines"],[6,3,1,"","validRecords"]],"diffpy.structure.parsers.p_pdffit":[[6,1,1,"","P_pdffit"],[6,4,1,"","getParser"],[6,4,1,"","get_parser"]],"diffpy.structure.parsers.p_pdffit.P_pdffit":[[6,3,1,"","format"],[6,3,1,"","ignored_lines"],[6,2,1,"","parseLines"],[6,2,1,"","parse_lines"],[6,3,1,"","stru"],[6,2,1,"","toLines"],[6,2,1,"","to_lines"]],"diffpy.structure.parsers.p_rawxyz":[[6,1,1,"","P_rawxyz"],[6,4,1,"","getParser"],[6,4,1,"","get_parser"]],"diffpy.structure.parsers.p_rawxyz.P_rawxyz":[[6,3,1,"","format"],[6,2,1,"","parseLines"],[6,2,1,"","parse_lines"],[6,2,1,"","toLines"],[6,2,1,"","to_lines"]],"diffpy.structure.parsers.p_vesta":[[3,3,1,"","AtomicMass"],[3,1,1,"","P_vesta"],[3,4,1,"","get_parser"]],"diffpy.structure.parsers.p_vesta.P_vesta":[[3,3,1,"","cluster_boundary"],[3,3,1,"","format"],[3,2,1,"","parse_lines"],[3,2,1,"","to_lines"]],"diffpy.structure.parsers.p_xcfg":[[6,3,1,"","AtomicMass"],[6,1,1,"","P_xcfg"],[6,4,1,"","getParser"],[6,4,1,"","get_parser"]],"diffpy.structure.parsers.p_xcfg.P_xcfg":[[6,3,1,"","cluster_boundary"],[6,3,1,"","format"],[6,2,1,"","parseLines"],[6,2,1,"","parse_lines"],[6,2,1,"","toLines"],[6,2,1,"","to_lines"]],"diffpy.structure.parsers.p_xyz":[[6,1,1,"","P_xyz"],[6,4,1,"","getParser"],[6,4,1,"","get_parser"]],"diffpy.structure.parsers.p_xyz.P_xyz":[[6,3,1,"","format"],[6,2,1,"","parseLines"],[6,2,1,"","parse_lines"],[6,2,1,"","toLines"],[6,2,1,"","to_lines"]],"diffpy.structure.parsers.parser_index_mod":[[6,3,1,"","parser_index"]],"diffpy.structure.parsers.structureparser":[[6,1,1,"","StructureParser"]],"diffpy.structure.parsers.structureparser.StructureParser":[[6,3,1,"","filename"],[6,3,1,"","format"],[6,2,1,"","parse"],[6,2,1,"","parseFile"],[6,2,1,"","parseLines"],[6,2,1,"","parse_file"],[6,2,1,"","parse_lines"],[6,2,1,"","toLines"],[6,2,1,"","to_lines"],[6,2,1,"","tostring"]],"diffpy.structure.pdffitstructure":[[0,1,1,"","PDFFitStructure"]],"diffpy.structure.pdffitstructure.PDFFitStructure":[[0,3,1,"","pdffit"],[0,2,1,"","read"],[0,2,1,"","readStr"],[0,2,1,"","read_structure"]],"diffpy.structure.sgtbxspacegroups":[[0,3,1,"","sgtbxSpaceGroupList"]],"diffpy.structure.spacegroupmod":[[11,1,1,"","SpaceGroup"],[11,1,1,"","SymOp"]],"diffpy.structure.spacegroupmod.SpaceGroup":[[11,2,1,"","check_group_name"],[11,3,1,"","crystal_system"],[11,2,1,"","iter_equivalent_positions"],[11,2,1,"","iter_symops"],[11,3,1,"","num_primitive_sym_equiv"],[11,3,1,"","num_sym_equiv"],[11,3,1,"","number"],[11,3,1,"","pdb_name"],[11,3,1,"","point_group_name"],[11,3,1,"","short_name"],[11,3,1,"","symop_list"]],"diffpy.structure.spacegroupmod.SymOp":[[11,3,1,"","R"],[11,2,1,"","__call__"],[11,2,1,"","__eq__"],[11,2,1,"","is_identity"],[11,3,1,"","t"]],"diffpy.structure.spacegroups":[[0,4,1,"","FindSpaceGroup"],[0,4,1,"","GetSpaceGroup"],[0,4,1,"","IsSpaceGroupIdentifier"],[0,3,1,"","SpaceGroupList"],[0,4,1,"","find_space_group"],[0,4,1,"","get_space_group"],[0,4,1,"","is_space_group_identifier"]],"diffpy.structure.structure":[[0,1,1,"","Structure"]],"diffpy.structure.structure.Structure":[[0,5,1,"","B11"],[0,5,1,"","B12"],[0,5,1,"","B13"],[0,5,1,"","B22"],[0,5,1,"","B23"],[0,5,1,"","B33"],[0,5,1,"","Bisoequiv"],[0,5,1,"","U"],[0,5,1,"","U11"],[0,5,1,"","U12"],[0,5,1,"","U13"],[0,5,1,"","U22"],[0,5,1,"","U23"],[0,5,1,"","U33"],[0,5,1,"","Uisoequiv"],[0,2,1,"","addNewAtom"],[0,2,1,"","add_new_atom"],[0,2,1,"","angle"],[0,5,1,"","anisotropy"],[0,2,1,"","append"],[0,2,1,"","assignUniqueLabels"],[0,2,1,"","assign_unique_labels"],[0,5,1,"","composition"],[0,2,1,"","copy"],[0,2,1,"","distance"],[0,5,1,"","element"],[0,2,1,"","extend"],[0,2,1,"","getLastAtom"],[0,2,1,"","get_last_atom"],[0,2,1,"","insert"],[0,5,1,"","label"],[0,5,1,"id0","lattice"],[0,5,1,"","occupancy"],[0,3,1,"id1","pdffit"],[0,2,1,"","placeInLattice"],[0,2,1,"","place_in_lattice"],[0,2,1,"","read"],[0,2,1,"","readStr"],[0,2,1,"","read_structure"],[0,3,1,"id2","title"],[0,2,1,"","tolist"],[0,2,1,"","write"],[0,2,1,"","writeStr"],[0,2,1,"","write_structure"],[0,5,1,"","x"],[0,5,1,"","xyz"],[0,5,1,"","xyz_cartn"],[0,5,1,"","y"],[0,5,1,"","z"]],"diffpy.structure.structure_app":[[0,4,1,"","main"]],"diffpy.structure.structureerrors":[[0,7,1,"","LatticeError"],[0,7,1,"","StructureFormatError"],[0,7,1,"","SymmetryError"]],"diffpy.structure.symmetryutilities":[[0,1,1,"","ExpandAsymmetricUnit"],[0,1,1,"","GeneratorSite"],[0,1,1,"","SymmetryConstraints"],[0,3,1,"","epsilon"],[0,4,1,"","equalPositions"],[0,4,1,"","equal_positions"],[0,4,1,"","expandPosition"],[0,4,1,"","expand_position"],[0,4,1,"","isSpaceGroupLatPar"],[0,4,1,"","is_constant_formula"],[0,4,1,"","is_space_group_latt_parms"],[0,4,1,"","isconstantFormula"],[0,4,1,"","nearestSiteIndex"],[0,4,1,"","nearest_site_index"],[0,4,1,"","nullSpace"],[0,4,1,"","null_space"],[0,4,1,"","positionDifference"],[0,4,1,"","position_difference"],[0,4,1,"","pruneFormulaDictionary"],[0,4,1,"","prune_formula_dictionary"],[0,3,1,"","stdUsymbols"]],"diffpy.structure.symmetryutilities.ExpandAsymmetricUnit":[[0,3,1,"","Uisotropy"],[0,3,1,"","coreUijs"],[0,3,1,"","corepos"],[0,3,1,"","eps"],[0,3,1,"","expandedUijs"],[0,3,1,"","expandedpos"],[0,3,1,"","multiplicity"],[0,3,1,"","sgoffset"],[0,3,1,"","spacegroup"]],"diffpy.structure.symmetryutilities.GeneratorSite":[[0,2,1,"","UFormula"],[0,3,1,"","Ucomponents"],[0,3,1,"","Uij"],[0,3,1,"","Uisotropy"],[0,3,1,"","Uparameters"],[0,3,1,"","Uspace"],[0,2,1,"","convert_fp_num_to_signed_rational"],[0,3,1,"","eps"],[0,2,1,"","eqIndex"],[0,3,1,"","eqUij"],[0,2,1,"","eq_index"],[0,3,1,"","eqxyz"],[0,3,1,"","idx2Usymbol"],[0,3,1,"","invariants"],[0,3,1,"","multiplicity"],[0,3,1,"","null_space"],[0,2,1,"","positionFormula"],[0,2,1,"","position_formula"],[0,3,1,"","pparameters"],[0,3,1,"","sgoffset"],[0,2,1,"","signedRatStr"],[0,3,1,"","symops"],[0,2,1,"","u_formula"],[0,3,1,"","xyz"]],"diffpy.structure.symmetryutilities.SymmetryConstraints":[[0,2,1,"","UFormulas"],[0,2,1,"","UFormulasPruned"],[0,3,1,"","Ueqns"],[0,3,1,"","Uijs"],[0,3,1,"","Uisotropy"],[0,2,1,"","UparSymbols"],[0,2,1,"","UparValues"],[0,3,1,"","Upars"],[0,3,1,"","coremap"],[0,3,1,"","corepos"],[0,3,1,"","eps"],[0,2,1,"","pos_parm_symbols"],[0,2,1,"","pos_parm_values"],[0,3,1,"","poseqns"],[0,2,1,"","positionFormulas"],[0,2,1,"","positionFormulasPruned"],[0,2,1,"","position_formulas"],[0,2,1,"","position_formulas_pruned"],[0,3,1,"","positions"],[0,2,1,"","posparSymbols"],[0,2,1,"","posparValues"],[0,3,1,"","pospars"],[0,3,1,"","sgoffset"],[0,3,1,"","spacegroup"],[0,2,1,"","u_formulas"],[0,2,1,"","u_formulas_pruned"],[0,2,1,"","u_parm_symbols"],[0,2,1,"","u_parm_values"]],"diffpy.structure.utils":[[0,4,1,"","atomBareSymbol"],[0,4,1,"","atom_bare_symbol"],[0,4,1,"","isfloat"],[0,4,1,"","isiterable"]]},"objnames":{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","attribute","Python attribute"],"4":["py","function","Python function"],"5":["py","property","Python property"],"6":["py","data","Python data"],"7":["py","exception","Python exception"]},"objtypes":{"0":"py:module","1":"py:class","2":"py:method","3":"py:attribute","4":"py:function","5":"py:property","6":"py:data","7":"py:exception"},"terms":{"0e":[0,3,6],"3d":0,"3x3":[0,9,10,11],"6x3x3":0,"98ch10886":8,"A":[0,1,2,3,4,5,6,7,8,9,10,11,12],"AND":8,"AS":8,"All":[0,8,12],"An":[0,2,5,9],"BE":8,"BEEN":8,"BUT":8,"By":[0,9],"Cannot":[0,3,6,9],"DO":8,"Each":8,"FOR":8,"For":[0,3,6,7,9],"HAS":8,"IF":8,"IN":8,"IS":8,"IT":8,"If":[0,2,3,5,6,7],"In":8,"It":[0,1,4,7],"NO":8,"NOT":8,"OF":[8,12],"ON":8,"OR":8,"OWNED":8,"On":1,"Other":0,"SUCH":8,"Same":0,"THAT":8,"THE":8,"THEIR":8,"TO":8,"The":[0,1,2,3,4,5,6,7,8,9,10,11],"Their":0,"These":0,"They":[0,10],"This":[0,2,3,5,6,7,8,9,10,11,12],"To":[1,4],"WOULD":8,"When":[0,1,3,6,9,10,12],"You":8,"__call__":11,"__empty_shared_structur":12,"__emptysharedstructur":12,"__eq__":11,"__git_commit__":12,"__gitsha__":12,"__init__":12,"__name__":0,"_atom_site_label":[3,6],"_build_sg_lookup_t":12,"_find_constraint":12,"_find_eq_uij":12,"_find_invari":12,"_find_null_spac":12,"_find_pos_paramet":12,"_find_u_paramet":12,"_find_u_spac":12,"_get_ordered_format":12,"_get_sg_hash_lookup_t":12,"_get_uij":12,"_hash_symop_list":12,"_hashsymoplist":12,"_lines_iter":12,"_link_atom_attribut":12,"_linkatomattribut":12,"_parse_cif_block":12,"_parse_cif_data_sourc":12,"_set_uij":12,"_space_group_name_h":[3,6],"_space_group_name_hal":[3,6],"_suppress_cif_parser_output":12,"_symmetry_space_group_name_h":[3,6],"_symmetry_space_group_name_hal":[3,6],"_tr_atom_site_aniso_b_11":12,"_tr_atom_site_aniso_b_12":12,"_tr_atom_site_aniso_b_13":12,"_tr_atom_site_aniso_b_22":12,"_tr_atom_site_aniso_b_23":12,"_tr_atom_site_aniso_b_33":12,"_tr_atom_site_aniso_u_11":12,"_tr_atom_site_aniso_u_12":12,"_tr_atom_site_aniso_u_13":12,"_tr_atom_site_aniso_u_22":12,"_tr_atom_site_aniso_u_23":12,"_tr_atom_site_aniso_u_33":12,"_tr_atom_site_b_iso_or_equiv":12,"_tr_atom_site_u_iso_or_equiv":12,"_wrap_parse_method":12,"abc":[0,10],"abcabg":[0,10,12],"abov":8,"absolut":[0,7,9],"ac02":8,"accompani":8,"accord":[0,3,6,10,12],"account":[0,9],"accuraci":8,"act":8,"acta":7,"action":12,"activ":[0,1,3,9],"add":[0,1,3,6,12],"add_new_atom":[0,12],"addit":12,"addnewatom":[0,12],"address":8,"adher":12,"adjust":[0,9],"adopt":12,"adp":[0,10,12],"affix":8,"aforement":8,"agreement":7,"aid0":0,"aid1":0,"aid2":0,"aidx":[3,6],"alia":0,"alias":[0,12],"align":12,"allow":[0,9],"along":[0,2,5,9],"alpha":[0,10],"alphar":[0,10],"alreadi":[0,1],"also":[0,10],"alt_nam":12,"anaconda":12,"analysi":3,"angl":[0,10],"angstrom":0,"ani":[0,3,6,8,9],"anisotrop":[0,9,10],"anisotropi":[0,3,6,9,12],"anisou":[3,6],"anoth":[2,5],"anyey":12,"anyth":0,"api":[3,7],"app":[0,12],"apparatus":8,"append":0,"appli":[0,9,11],"applic":[1,4,12],"approxim":[2,5],"ar":[0,10],"arg":0,"argument":[0,2,3,5,6,9,10],"around":[3,6],"arrang":12,"array":[0,10,11,12],"array_lik":[0,2,5,9,10],"ask":7,"asrp":8,"assert":8,"assign":[0,9],"assign_unique_label":[0,12],"assignuniquelabel":[0,12],"associ":[0,3,6,8,9,10,12],"assum":[0,8,9],"asymmetr":[0,3,6,7],"asymmetric_unit":[3,6],"atom":[2,3,5,6,7,12],"atom_bare_symbol":[0,12],"atom_lin":[3,6,12],"atombaresymbol":[0,12],"atomey":[1,3,4,6],"atomicmass":[3,6],"atomlin":[3,6,12],"atomt":3,"attempt":[3,6],"attribut":[0,3,6,9,10,12],"atyp":[0,9],"australian":8,"author":[3,6],"auto":[0,1,3,4,6],"automat":[3,6],"avail":[0,1,3,6],"averag":[0,9],"avoid":[0,3,6,10,12],"axe":[0,2,5,10],"axi":[2,5],"b":[0,2,3,5,6,8,10],"b11":[0,9],"b11m":12,"b12":[0,9],"b13":[0,9],"b22":[0,9],"b23":[0,9],"b33":[0,9],"backward":[0,1,3],"bare":0,"baresymbol":0,"base":[0,3,6,8,9,10],"baserot":[0,10],"basi":8,"basic":[0,3,6,11],"becaus":3,"becom":0,"befor":0,"behalf":8,"behavior":[0,9],"belong":[0,11],"benjamin":0,"berkeley":8,"beta":[0,10],"betar":[0,10],"billing":7,"binari":8,"bisoequiv":[0,9],"blank":0,"block":[3,6],"board":8,"bond":0,"bool":[0,3,6,9,10,11],"boolean":0,"bound":[0,11],"boundari":[0,3,6],"br":[0,10],"bratomsstructur":12,"brief":[1,4],"brookhaven":7,"btou":[3,6],"bug":12,"build":[3,6,12],"built":7,"bump":12,"c":[0,2,5,7,8,10],"c_1":[0,9],"ca":[0,10],"ca2":0,"calcul":[0,9,10],"california":8,"call":[0,1,10],"camel":[0,12],"can":[0,3,6,9,12],"capabl":[3,6],"car":[0,10],"carri":8,"cartesian":[0,3,6,7,9,10],"case":[0,12],"caveat":[3,6],"cb":[0,10],"cbr":[0,10],"cctbx":[0,7,8,12],"cell":[0,2,3,5,6,10,11],"cell_parm":[0,10,12],"cell_read":[3,6],"center":[2,5],"cfg":[3,6],"cg":[0,10],"cgr":[0,10],"chang":[0,1,4,8,10,12],"charact":[0,3,6],"charg":0,"check":[0,10,11,12],"check_group_nam":[0,11],"chemic":[0,1,4],"child":1,"choke":[3,6],"chris":7,"cif":[0,1,3,6,7,12],"cif_sgnam":[3,6],"ciffil":[3,6],"cispep":[3,6],"cite":7,"citi":8,"cl":0,"clariti":8,"class":[0,2,3,5,6,9,10,11,12],"classifi":12,"clean":1,"clean_up":[1,4,12],"cleanup":[1,4,12],"close":[0,12],"closer":0,"closest":[2,5],"cluster":[3,6],"cluster_boundari":[3,6],"cmi":8,"code":[1,7,8,12],"codespel":12,"columbia":8,"column":[0,3,6,10],"com":7,"combin":7,"comma":[1,4],"command":1,"commit":12,"common":7,"compat":[0,1,3,12],"complet":8,"complex":7,"compnd":[3,6],"compon":[0,9],"composit":0,"comput":[0,7,8,9],"concret":[3,6],"conda":12,"condit":[0,8],"conduct":12,"conect":[3,6],"configur":0,"conform":3,"consequenti":8,"consid":[0,9],"constant":[0,3,6,10],"constitut":[3,6],"constrain":0,"constraint":[0,7,12],"constructor":0,"contain":[0,1,2,3,5,6,7,8,9,11],"content":[0,2,3],"context":12,"contract":8,"contributor":[7,8],"convent":[3,6],"convers":[1,3,6,7],"convert":[0,1,3,4,6],"convert_fp_num_to_signed_r":[0,12],"convert_structure_fil":[1,4,12],"convertstructurefil":[1,4,12],"coord":3,"coordin":[0,2,3,5,6,7,9,10,11],"copi":[0,1,8,9],"copyright":8,"copystru":0,"core":0,"coremap":0,"corepo":0,"coreuij":0,"corner":[3,6],"correct":8,"correspond":[0,2,3,5,6],"cosd":[0,10],"cosin":[0,10],"count":1,"coverag":12,"cr":[0,10],"creat":[0,1,2,3,5,6,9,10],"create_modul":0,"cryst1":[3,6],"cryst1_lin":[3,6,12],"cryst1lin":[3,6],"crystal":[0,7,11],"crystal_system":[0,11],"crystallogr":7,"crystallograph":1,"crystallographi":[0,7],"crystl1lin":12,"cubic":[0,11],"current":[0,1,3,6,9,10],"custom":0,"cut":[2,5],"cutoff":[0,3,6],"d":[3,6,8],"damag":8,"dans":8,"data":[0,3,6,7,8],"dbref":[3,6],"dcell":0,"de":8,"deby":[0,9],"dedic":0,"default":[0,1,2,3,4,5,6,9,10],"defin":[0,1,3,4,6],"definit":[0,3,6,7,11],"degre":[0,10],"delta1":0,"delta2":0,"denot":0,"depart":8,"depend":[0,10,12],"deprec":[0,2,3,5,6,9,10,12],"deprecatedstructuremodul":[0,7],"deprecationwarn":0,"derec":12,"deriv":[0,3,6,8],"descript":0,"descriptor":[0,9],"detail":7,"detect":[3,6],"determin":[0,11],"develop":[7,8],"diagon":[0,9],"dict":[0,1,3,6],"dictionari":[0,1,3,6],"die":[1,4],"differ":[0,1,4,10,11,12],"diffpi":[8,12],"direct":[0,9],"directori":1,"disclos":8,"discus":[0,3,6],"displac":[0,3,6,7,9,10,12],"display":[1,4,8],"dist":[0,10],"distanc":[0,10],"distribut":[7,8],"divid":[2,5],"doc":12,"docstr":12,"document":[3,6,8,12],"doe":[1,3,6],"done":12,"dot":[0,3,6,10],"duplic":[0,3,6,10,11],"dure":[1,3,6],"dxyz":0,"e":[0,1,4,10],"eau":[3,6],"effect":[0,3,6,9],"either":[0,8,11],"electron":3,"element":[0,1,3,4,6,9,12],"employe":8,"empti":[0,3,6,9,12],"encod":12,"end":[0,3,6,8],"endmdl":[3,6],"endors":8,"energi":8,"entir":[0,9],"entri":1,"ep":[0,3,6],"epsilon":0,"eq_index":[0,12],"eqdict":0,"eqindex":[0,12],"equal":[0,2,3,5,6,9,11],"equal_posit":[0,12],"equalposit":[0,12],"equat":12,"equatori":[2,5],"equij":0,"equival":[0,3,6,9,11],"eqxyz":0,"error":[0,8,10,11],"escap":12,"even":8,"event":8,"exact":[0,10],"exampl":[0,3,6,9,10],"except":[0,3,6,12],"exec_modul":0,"execut":[1,4],"exist":[0,2,3,5,6,10,12],"exit":[1,4],"exit_status":[1,4],"expand":[0,2,5],"expand_posit":[0,12],"expandasymmetricunit":[0,3,6],"expandedpo":0,"expandeduij":0,"expandposit":[0,12],"expans":[0,3,6,7,12],"expdta":[3,6],"explicit":12,"export":7,"express":[0,3,6,8,10],"extend":[0,3,6],"extens":[3,6],"extra":0,"extract":[3,6],"f":[1,4],"facilit":[0,11],"factor":[0,3,6],"factori":[3,6],"fail":0,"fals":[0,9,11],"farrow":7,"featur":12,"file":[0,1,3,4,6,7,8,12],"file_extens":[3,6],"file_pattern":[3,6],"fileformat":[1,4],"filenam":[0,1,3,4,6],"find":[0,2,5],"find_cent":[2,5,12],"find_space_group":[0,12],"find_spec":0,"findcent":[2,5,12],"findcenter_deprecation_msg":[2,5],"findrenamedstructuremodul":0,"findspacegroup":[0,12],"first":[0,1,3,4,6,9,10],"fit":8,"fix":12,"flag":[0,9],"float":[0,2,3,5,6,9,10],"fmt":0,"folder":12,"follow":[0,3,6,7,8],"form":[0,8],"format":[0,1,3,4,6,7,12],"format23":[3,6],"format30":[3,6],"formul":[3,6],"formula":[0,1,3,4,6],"forth":[0,9],"forward":1,"found":0,"foundat":8,"fraction":[0,2,3,5,6,7,9,10,11],"frame":1,"free":8,"full":[0,11],"fullnam":0,"function":[0,2,3,5,6,7,8,9,10,11,12],"futur":0,"g":[0,1,4],"gamma":[0,10],"gammar":[0,10],"general":[0,10,11],"generat":[0,3,6,7,11,12],"generatorsit":[0,12],"get":[0,10,11,12],"get_last_atom":[0,12],"get_pars":[3,6,12],"get_space_group":[0,12],"get_symop":[3,6,12],"getlastatom":[0,12],"getpars":[0,3,6,12],"getspacegroup":[0,12],"getsymop":[3,6,12],"github":[7,12],"give":[0,3,6,10],"given":[0,3,6,10,11],"grant":8,"graph":7,"group":[0,2,3,5,6,7,11,12],"h":[1,4],"h2o":1,"handl":[1,3,12],"handler":1,"harvest":1,"has_input":[3,6],"has_output":[3,6],"header":[3,6],"helix":[3,6],"help":[1,4],"helper":[3,6],"herebi":8,"herein":8,"hermann":[0,11],"het":[3,6],"hetatm":[3,6],"hetnam":[3,6],"hetsyn":[3,6],"hexagon":[0,11],"hkl":[0,10],"holder":8,"host":12,"html":[3,6],"http":7,"https":[3,6,7],"hydbnd":[3,6],"hyphen":0,"ident":[0,10,11],"identif":0,"identifi":[0,11,12],"idx":[0,3,6],"idx2usymbol":0,"ignor":[0,3,6],"ignored_lin":[3,6],"ill":7,"implement":[3,6,11],"impli":[0,8,9],"import":[0,7,12],"importerror":0,"imposs":0,"improp":[0,11],"improv":12,"inapplic":[3,6],"inc":8,"incident":8,"includ":[0,3,6,7,8,12],"inconsist":12,"incorrect":12,"increment":[0,11],"independ":[0,12],"index":[0,2,3,5,6,7],"indexerror":0,"indic":0,"indirect":8,"individu":8,"infmt":[1,4],"info":[0,1,4],"inform":[0,7,9,12],"infring":8,"inherit":0,"init":[3,6],"initi":[0,3,6,9,10,11],"input":[0,1,3,4,6],"input_format":[3,6,12],"inputformat":[0,1,3,4,6,12],"insert":0,"inspect":0,"instal":12,"instanc":[0,2,3,5,6,10,12],"instead":[0,2,3,5,6,9,10,12],"instruct":12,"int":[0,1,2,3,5,6,11],"integ":[0,1,2,5],"interest":8,"intern":[0,11],"intersphinx":12,"introduc":0,"introduct":0,"invalid":[0,2,3,5,6,12],"invari":0,"invers":[0,7,10,11],"involv":[0,11],"io":[0,3,6],"ioerror":[3,6],"ion":[0,9],"irrevoc":8,"is_constant_formula":[0,12],"is_ident":[0,11],"is_space_group_identifi":[0,12],"is_space_group_latt_parm":[0,12],"isanisotrop":[0,10],"isconstantformula":[0,12],"isfloat":0,"isiter":0,"isotop":0,"isotrop":[0,9,10],"isotropicunit":[0,10],"isotropyerror":12,"isspacegroupidentifi":[0,12],"isspacegrouplatpar":[0,12],"issu":12,"item":[0,3,6],"items":12,"iter":[0,11],"iter_equivalent_posit":[0,11],"iter_symop":[0,11],"iucr":[3,6],"j":7,"jrnl":[3,6],"juha":7,"juh\u00e1":7,"k":7,"keep":[0,10],"key":[0,1,3,6,12],"keywd":[3,6],"keyword":[0,3,6],"kind":8,"known":[0,3,6],"knox":7,"kw":[0,3,6],"kwarg":0,"l":7,"label":[0,3,6,9,12],"labelindex":[3,6],"laboratori":7,"last":[0,7],"lat":[0,10],"later":3,"lattic":[2,3,5,9,12],"latticeerror":0,"lawrenc":8,"lead":[0,3,6,7,9],"leading_float":[3,6],"legal":8,"length":[0,10],"less":7,"let":12,"letter":1,"liabl":8,"licens":7,"license":8,"licensor":8,"limit":8,"line":[1,3,4,6],"link":[3,6,12],"list":[0,1,3,4,6,7,11,12],"load":[0,1,4,12],"load_structur":[0,7,12],"load_structure_fil":[1,4,12],"loader":0,"loadstructur":[0,7,12],"loadstructurefil":[1,4,12],"longer":1,"look":[3,6],"lookup":[0,12],"loss":8,"lost":0,"lower":0,"lowercas":12,"m":[3,6],"m_alt":[3,6],"magnitud":[0,10],"main":[0,1,4],"maintain":[1,3,7,8],"make":[0,2,5,8],"make_ellipsoid":[2,5,12],"make_spher":[2,5,12],"makeellipsoid":12,"makespher":[2,5,12],"manag":[0,9],"manipul":[2,5],"map":[0,3,6],"maprenamedstructuremodul":0,"march":7,"mass":[3,6],"master":[3,6],"match":[0,1,11],"materi":[0,8],"matric":[0,10],"matrix":[0,9,10,11],"mauguin":[0,11],"maximum":0,"may":[0,1,8,9,10,11],"mean":[0,9],"measur":[0,10],"meet":8,"member":[0,7],"merchant":8,"messag":[1,4],"metadata":0,"metapathfind":0,"method":[0,2,3,5,6,10,12],"metric":[0,10],"michigan":8,"minimum":[1,12],"mirror":[0,11],"mmlib":0,"mmlibspacegroup":7,"mno":[2,5],"mode":1,"model":[0,3,6,7,9],"modif":1,"modifi":[1,8,12],"modr":[3,6],"modul":12,"molecul":[3,6],"monoclin":[0,11],"msd_cart":[0,9,12],"msd_latt":[0,9,12],"msdcart":[0,9,12],"msdlat":[0,9,12],"mtrix1":[3,6],"mtrix2":[3,6],"mtrix3":[3,6],"multipl":[0,3,6,7,11],"multipli":[2,5],"must":[0,8,9,10,11],"na4cl4":[1,4],"name":[0,3,6,8,11,12],"nanoparticl":[2,5],"nanostructur":7,"napoleon":12,"nation":7,"nativ":[1,3],"natur":8,"ncell":[0,3,6],"ncell_read":[3,6],"ndarray":[0,9,10,11],"nearest":0,"nearest_site_index":[0,12],"nearestsiteindex":[0,12],"need":[3,6],"neglig":8,"neither":[3,6,8],"nest":0,"net":7,"new":[0,2,3,5,6,8,9,10,12],"new_lattic":0,"newer":1,"nl":[3,6],"noarch":12,"non":[1,3,6,8,12],"none":[0,1,2,3,4,5,6,9,10,11],"nonexclus":8,"norm":[0,10],"normal":[3,6],"normbas":[0,10],"notabl":12,"note":[1,3,7],"notic":7,"null":0,"null_spac":[0,12],"nullspac":[0,12],"num_primitive_sym_equiv":[0,11],"num_sym_equiv":[0,11],"number":[0,1,3,6,11,12],"numpi":[0,9,10,11,12],"numpydoc":12,"nx3":[0,10],"o":0,"obj":0,"objcryst":8,"object":[0,3,6,7,9,10,11,12],"obslt":[3,6],"obtain":[0,3,6,9],"occup":[0,9,12],"offset":0,"old":[0,12],"onc":1,"one":[0,1,2,5,9,10,11],"onli":[0,1,4,9,10,12],"open":[1,3,4,6,7,12],"oper":[0,10,11,12],"option":[0,1,2,3,4,5,6,9,10],"order":[0,1,3,4,6],"orderofrecord":[3,6],"org":[3,6,12],"organiz":8,"orient":[0,10],"origin":[0,2,3,5,6,7,8],"origx1":[3,6],"origx2":[3,6],"origx3":[3,6],"orthonorm":[0,10],"orthorhomb":[0,11],"os":1,"others":8,"otherwis":[0,1,8,11],"outfmt":[1,4],"output":[1,3,4,6],"output_format":[3,6,12],"outputformat":[1,3,4,6,12],"outsid":[0,8,11],"overload":[0,3,6],"overrid":[0,1,3,4,6,9],"owned":8,"ownership":12,"oxygen_atom":0,"oxygen_stru":0,"p":[0,7],"p_":[3,6],"p_auto":12,"p_cif":12,"p_discus":12,"p_pdb":12,"p_pdffit":12,"p_rawxyz":12,"p_xcfg":[1,12],"p_xyz":12,"packag":[7,12],"page":7,"paid":8,"pair":[0,1],"paper":7,"paramet":[0,1,2,3,4,5,6,7,9,10,11,12],"parametr":0,"pars":[1,3,4,6,12],"parse_fil":[3,6,12],"parse_formula":[1,4,12],"parse_lin":[3,6,12],"parsefil":[3,6],"parseformula":[1,4,12],"parselin":[3,6,12],"parser":[0,1,7,12],"parser_index":[3,6],"part":[0,8],"parti":8,"particular":[0,3,6,8],"pass":[0,1,3,6,12],"path":[0,1,3,4,6,12],"pattern":[3,6],"pavol":7,"pbc":[3,6],"pd":[1,4],"pdb":[1,3,4,6,7],"pdb_name":[0,11],"pdffit":[0,3,6],"pdffitstructur":[3,6,12],"per":[0,1,9],"perform":[2,5,8],"period":[0,3,6],"periodict":8,"permiss":8,"pertain":[0,11],"pi":[0,9],"pickl":12,"pip":12,"pkw":[3,6],"place":[0,1],"place_in_lattic":[0,12],"placeinlattic":[0,12],"platform":12,"pleas":[0,2,3,5,6,9,10],"plugin":[3,6],"point":[0,1,3,6,10,11],"point_group_nam":[0,11],"polar":[2,5],"poll":1,"portion":8,"pos":0,"pos_parm_symbol":[0,12],"pos_parm_valu":[0,12],"pose":7,"poseqn":0,"posit":[0,3,6,7,9,11],"position_differ":[0,12],"position_formula":[0,12],"position_formulas_prun":[0,12],"positiondiffer":[0,12],"positionformula":[0,12],"positionformulasprun":[0,12],"pospar":0,"posparsymbol":[0,12],"posparvalu":[0,12],"possibl":[0,3,6,8,11],"pparamet":0,"pr":12,"pre":12,"predefin":0,"prefix":0,"prepar":8,"presenc":[0,9],"present":[0,8,9,10],"preserv":[3,12],"preset":12,"prevent":0,"primari":[2,5],"primit":[0,11],"print":[1,4],"privat":[8,12],"problem":7,"process":[0,3,6,8,12],"produc":[3,8],"product":[0,8,10],"profit":8,"program":[1,4,7,8],"project":[7,8],"promin":8,"promot":8,"properti":[0,9,10],"provid":[0,3,6,7,8,9,10,11],"proxi":0,"prune":0,"prune_formula_dictionari":[0,12],"pruneformuladictionari":[0,12],"public":[7,8],"punit":8,"purpos":8,"py":[3,6,7,12],"py2":12,"py3":12,"pycifrw":[3,6,8,12],"pymmlib":[0,7],"pypi":12,"pyproject":12,"python":[0,8,12],"r":[0,7,11],"radius":[2,5],"rais":[0,1,2,3,5,6],"ration":0,"raw":[3,6],"rawxyz":[3,6],"rc":[0,10],"rcut":0,"re":[1,3,6,12],"read":[0,1,3,4,6,9,10],"read_structur":[0,12],"readabl":3,"readm":7,"readstr":[0,12],"readthedoc":12,"reason":8,"recalcul":0,"recbas":[0,10],"recipi":8,"reciproc":[0,10],"recnormbas":[0,10],"recogn":[0,3,6,11],"reconstruct":3,"reconvert":1,"recookiecut":12,"record":[3,6],"refactor":12,"refer":[0,3,6,8,9,12],"regard":8,"regardless":[0,11],"regent":8,"regist":[3,6],"regular":[3,6],"relat":[0,11],"releas":7,"relev":[0,9],"remain":[0,1,3,6,9],"remark":[3,6],"remov":[0,1,2,3,5,6,9,10,12],"renam":12,"repeat":0,"repetit":1,"replac":[3,12],"repo":12,"report":12,"repres":[2,5,8],"represent":[0,8,12],"reproduc":8,"request":[1,8,12],"requir":[1,12],"rescal":[0,9],"research":[7,8],"reserv":8,"resolut":[3,6],"resolv":[3,6],"resourc":[3,6],"respect":[0,3,6,10],"respons":8,"result":8,"retain":3,"return":[0,1,2,3,4,5,6,9,10,11],"reus":[1,12],"revdat":[3,6],"revert":1,"right":[0,8],"rnorm":[0,10],"root":12,"rotat":[0,10,11],"round":[0,10,11],"routin":[3,6],"row":[0,10],"royalti":8,"rst":12,"rule":0,"runtimeerror":1,"rx_float":[3,6],"s":[0,2,3,5,6,7,8],"sa":[0,10],"said":8,"sar":[0,10],"sasview":8,"save":[0,1,4],"sb":[0,10],"sbr":[0,10],"scalar":12,"scale":[0,10],"scale1":[3,6],"scale2":[3,6],"scale3":[3,6],"scan":[3,6],"scienc":8,"scientif":7,"scikit":7,"screen":[1,4],"script":[1,4,12],"search":7,"second":[0,1,3,6,10],"secondari":[2,5],"section":[3,12],"see":[0,1,3,4,6,7],"self":[0,3,6,11,12],"separ":[1,3,4,6],"seqadv":[3,6],"seqr":[3,6],"sequenc":[0,2,5,12],"set":[0,1,2,3,5,6,7,9,10,11,12],"set_lat_bas":[0,10],"set_lat_par":[0,10],"set_latt_parm":[0,10,12],"set_new_latt_base_vec":[0,10,12],"setitem":0,"setlatbas":[0,10,12],"setlatpar":[0,10,12],"setslic":0,"setup":[0,9],"sever":[0,1,7,11],"sg":[0,10],"sgid":0,"sgoffset":0,"sgr":[0,10],"sgtbx":0,"sgtbxspacegrouplist":0,"shape":[0,2,5,10],"shapeutil":12,"share":0,"sheet":[3,6],"shift":0,"short":[0,11],"short_nam":[0,11],"show":[1,4],"shown":8,"shuffl":0,"sigatm":[3,6],"sigchld":1,"sign":0,"signal":1,"signal_handl":[1,4,12],"signalhandl":[1,4,12],"signedratstr":[0,12],"signum":[1,4],"siguij":[3,6],"simon":7,"simpl":[0,2,3,5,6,10,11],"sind":[0,10],"sine":[0,10],"singl":[0,9],"site":[0,3,6,11,12],"six":12,"sltbrg":[3,6],"small":[0,10,11],"smallest":0,"smbl":0,"softwar":[7,8],"solv":7,"sourc":[0,1,2,3,4,5,6,7,9,10,11],"sourceforg":7,"space":[0,3,6,7,11,12],"spacegroup":[3,6,11,12],"spacegrouplist":0,"spacegroupmod":7,"spcgr":0,"spec":0,"special":[0,8,11],"specif":[0,3,6,8,11,12],"specifi":[0,1,4,8,10,11,12],"spell":12,"spheric":[2,5],"spheroid":[2,5],"sprsde":[3,6],"spurious":12,"squar":[0,9],"sratio":0,"ssbond":[3,6],"stack":1,"stackfram":[1,4],"stand":[3,6],"standard":[0,1,3,4,6,10,11,12],"star":12,"start":[1,3,6,12],"state":8,"status":[1,8],"std":[3,6],"stdbase":[0,10],"stdusymbol":0,"storag":[0,9],"store":[0,1,7,10],"str":[0,1,3,4,6,9,11],"strategi":7,"strict":8,"string":[0,1,3,6,9,11,12],"strip":[0,3,6],"stru":[0,3,6,12],"struc":3,"structur":[8,12],"structurefil":[1,4],"structureformaterror":[0,3,6,12],"structurepars":[0,12],"strufil":[1,4],"style":[1,4,12],"subclass":[3,6],"subject":8,"submodul":7,"subpackag":7,"subsequ":1,"success":[3,6,12],"successor":[1,3],"suffici":[3,6],"supercel":[2,5],"suppli":8,"support":[0,1,4,7,12],"switch":12,"sym":0,"symbol":[0,1,9,11],"symmetr":[0,9],"symmetri":[0,3,6,7,11,12],"symmetryconstraint":[0,12],"symmetryerror":0,"symmetryutil":[3,6,12],"symop":[0,3,6,11,12],"symop_list":[0,11],"symvec":[3,6],"synchrotron":8,"syntax":[3,6],"sys":1,"system":[0,9,10,11],"t":[0,11],"tabl":[0,11],"taken":[0,9],"target":[0,1],"templat":[2,5,12],"temporari":[1,4],"tennesse":8,"tensor":[0,9,10],"ter":[3,6],"termin":[3,6,12],"test":[11,12],"tetragon":[0,11],"text":[3,6],"thermal":[0,9],"third":[0,8],"thousand":[0,11],"three":0,"thus":[0,8],"time":[0,9],"timestamp":1,"tini":11,"titl":[0,3,6,8],"title_lin":[3,6,12],"titlelin":[3,6,12],"tmpdir":1,"tmpfile":1,"to_lin":[3,6,12],"togeth":[0,9],"toler":0,"tolin":[3,6,12],"tolist":0,"toml":12,"tool":1,"toolbox":7,"tort":8,"tostr":[3,6],"total":0,"trail":[3,6],"transform":[0,10,11],"translat":[0,1,4,11],"transtru":12,"tri":0,"triclin":[0,11],"trigon":[0,11],"true":[0,3,6,9,10,11],"truste":8,"tupl":[0,1,4,10],"turn":[3,6],"tvect":[3,6],"two":0,"txt":12,"type":[0,1,2,3,4,5,6,9,10,11,12],"typeerror":[2,5],"u":[0,3,6,8,9,10],"u11":[0,9],"u110":0,"u12":[0,9],"u13":[0,9],"u22":[0,9],"u2213":0,"u23":[0,9],"u33":[0,9],"u_formula":[0,12],"u_formulas_prun":[0,12],"u_parm_symbol":[0,12],"u_parm_valu":[0,12],"ucompon":0,"ueqn":0,"uformula":[0,12],"uformulasprun":[0,12],"uij":0,"uisoequiv":[0,9],"uisotropi":0,"umx":[0,10],"unchang":[0,1],"undefin":[0,9],"understand":[1,3,4,6],"understood":[1,3,4],"unew":[0,9],"uninterrupt":8,"uniqu":[0,3,6,9,11],"unit":[0,3,6,7,8,10,11,12],"unitvolum":[0,10],"universiti":8,"unknown":[3,6,12],"unlik":1,"unpickl":12,"unset":[0,9],"unus":[1,12],"upar":0,"uparamet":0,"uparsymbol":[0,12],"uparvalu":[0,12],"updat":[0,3,6,7,9,10,12],"upload":12,"uppercas":1,"usag":[1,3,4,6],"use":[0,1,2,3,4,5,6,7,8,9,10,11,12],"userwarn":0,"uspac":0,"usymbol":0,"utf":12,"util":[2,5,12],"v":[0,1,4,10],"v2":[3,6],"valid":[3,6],"validrecord":[3,6],"valu":[0,3,6,9,10,11,12],"valueerror":[0,2,3,5,6],"variabl":[0,12],"various":[3,6],"vc":[0,9],"vec":[0,11],"vector":[0,9,10,11],"version":[0,1,2,3,4,5,6,7,9,10],"vesta":[1,3,12],"vestaview":1,"via":[1,12],"view":[1,4,12],"viewer":[1,3,4,12],"visual":3,"vl":[0,9],"volum":[0,10],"w":[0,1,4],"wait":1,"waller":[0,9],"warn":[8,12],"warrant":8,"warranti":8,"watch":[1,4],"watch_structure_fil":[1,4,12],"watchstructurefil":[1,4,12],"way":[0,9],"whatev":0,"whatsoev":8,"whether":8,"width":[3,6],"will":[0,1,2,3,4,5,6,8,9,10],"window":12,"within":[0,8,9,11,12],"without":8,"work":8,"worldwid":8,"write":[0,3,6,12],"write_structur":[0,12],"writestr":[0,12],"written":[1,3,6,8],"wwpdb":[3,6],"www":[3,6],"x":[0,2,3,5,6,7,9,10,11],"x0":0,"x3":0,"xcfg":[1,3,4,6,12],"xyz":[0,3,6,7,9,10,12],"xyz0":0,"xyz1":0,"xyz_cartn":[0,9],"xyzsymbol":0,"y":[0,2,3,5,6,9],"yang":7,"yield":[0,9,11],"york":[0,8],"z":[0,2,3,5,6,9],"z7":0,"zero":[0,9]},"titles":["diffpy.structure package","diffpy.structure.apps package","diffpy.structure.expansion package","diffpy.structure.parsers package","diffpy.structure.apps package","diffpy.structure.expansion package","diffpy.structure.parsers package","diffpy.structure documentation","License","diffpy.structure.atom","diffpy.structure.lattice","diffpy.structure.spacegroupmod","Release notes"],"titleterms":{"_legacy_import":0,"acknowledg":[7,8],"agreement":8,"anyey":[1,4],"app":[1,4],"atom":[0,9],"author":7,"brookhaven":8,"content":[4,5,6,7],"diffpi":[0,1,2,3,4,5,6,7,9,10,11],"disclaim":8,"document":7,"expans":[2,5],"get":7,"govern":8,"indic":7,"instal":7,"laboratori":8,"lattic":[0,10],"liabil":8,"licens":8,"mainten":8,"makeellipsoid":[2,5],"mmlibspacegroup":0,"modul":[0,1,2,3,4,5,6],"nation":8,"note":12,"notic":8,"open":8,"p_auto":[3,6],"p_cif":[3,6],"p_discus":[3,6],"p_pdb":[3,6],"p_pdffit":[3,6],"p_rawxyz":[3,6],"p_vesta":3,"p_xcfg":[3,6],"p_xyz":[3,6],"packag":[0,1,2,3,4,5,6],"parser":[3,6],"parser_index_mod":[3,6],"pdffitstructur":0,"refer":7,"releas":12,"sgtbxspacegroup":0,"shapeutil":[2,5],"sourc":8,"spacegroup":0,"spacegroupmod":[0,11],"sponsorship":8,"start":7,"structur":[0,1,2,3,4,5,6,7,9,10,11],"structure_app":0,"structureerror":0,"structurepars":[3,6],"submodul":[0,1,2,3,4,5,6],"subpackag":0,"supercell_mod":[2,5],"symmetryutil":0,"tabl":7,"transtru":[1,4],"util":0,"version":12,"vesta_view":1}}) \ No newline at end of file diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py deleted file mode 100644 index 1cd13da0..00000000 --- a/src/diffpy/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2024-2026 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Billinge Group members and community contributors. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.structure/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## diff --git a/src/diffpy/structure/__init__.py b/src/diffpy/structure/__init__.py deleted file mode 100644 index 0b07bb8c..00000000 --- a/src/diffpy/structure/__init__.py +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2024-2026 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Chris Farrow, Pavol Juhas, Simon Billinge, Billinge Group members. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.structure/graphs/contributors -# -# See LICENSE.rst for license information. -# -############################################################################## -"""Crystal structure container and parsers for structure formats. - -Classes related to the structure of materials: - * Atom - * Lattice - * Structure - * PDFFitStructure - -Other classes: - * SpaceGroup - * SymOp - * ExpandAsymmetricUnit - * GeneratorSite - * SymmetryConstraints - -Exceptions: - * StructureFormatError - * LatticeError - * SymmetryError -""" - - -import os -import sys - -import diffpy.structure as _structure -from diffpy.structure.atom import Atom -from diffpy.structure.lattice import Lattice -from diffpy.structure.parsers import get_parser -from diffpy.structure.pdffitstructure import PDFFitStructure -from diffpy.structure.structure import Structure -from diffpy.structure.structureerrors import LatticeError, StructureFormatError, SymmetryError - -# package version -from diffpy.structure.version import __version__ -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -# Deprecations ------------------------------------------------------- -base = "diffpy.structure" -removal_version = "4.0.0" -loadStructure_deprecation_msg = build_deprecation_message( - base, - "loadStructure", - "load_structure", - removal_version, -) - - -# @deprecated -# custom deprecator for diffpy.Structure module -class DeprecatedStructureModule: - """Proxy for backward compatibility of diffpy.Structure.""" - - def __getattr__(self, name): - import warnings - - warnings.warn( - "Module 'diffpy.Structure' is deprecated and will be removed in version 4.0. " - "Use 'diffpy.structure' instead.", - DeprecationWarning, - stacklevel=2, - ) - return getattr(_structure, name) - - -sys.modules["diffpy.Structure"] = DeprecatedStructureModule() - -# top level routines - - -@deprecated(loadStructure_deprecation_msg) -def loadStructure(filename, fmt="auto", **kw): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.load_structure instead. - """ - return load_structure(filename, fmt, **kw) - - -def load_structure(filename, fmt="auto", **kw): - """Load new structure object from the specified file. - - Parameters - ---------- - - filename : str - Path to the file to be loaded. - fmt : str, Optional - Format of the structure file such as 'cif' or 'xyz'. Must be - one of the formats listed by the `parsers.inputFormats` function. - When 'auto', all supported formats are tried in a sequence. - kw : Optional - Extra keyword arguments that are passed to `parsers.getParser` - function. These configure the dedicated Parser object that - is used to read content in filename. - - Returns - ------- - stru : `Structure`, `PDFFitStructure` - The new Structure object loaded from the specified file. - Return a more specific PDFFitStructure type for 'pdffit' - and 'discus' formats. - """ - filename = os.fspath(filename) - p = get_parser(fmt, **kw) - rv = p.parse_file(filename) - return rv - - -# silence pyflakes checker -assert StructureFormatError and LatticeError and SymmetryError -assert Atom -assert Lattice -assert Structure -assert PDFFitStructure - -# silence the pyflakes syntax checker -assert __version__ or True - -# End of file diff --git a/src/diffpy/structure/_legacy_importer.py b/src/diffpy/structure/_legacy_importer.py deleted file mode 100644 index 672d0835..00000000 --- a/src/diffpy/structure/_legacy_importer.py +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure Complex Modeling Initiative -# (c) 2017 Brookhaven Science Associates, -# Brookhaven National Laboratory. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## -"""Support import of old camel-case module names with -DeprecationWarning. - -The imported camel-case modules are aliases for the current module -instances. Their `__name__` attributes are thus all in lower-case. - -Note ----- -this module must be only imported from `diffpy.Structure`. - -Warning -------- -This module is deprecated and will be removed in the future. -""" - - -import importlib.abc -import sys -from warnings import warn - -WMSG = "Module {!r} is deprecated. Use {!r} instead." - -# ---------------------------------------------------------------------------- - - -class FindRenamedStructureModule(importlib.abc.MetaPathFinder): - - prefix = "diffpy.Structure." - - def find_spec(self, fullname, path=None, target=None): - # only handle submodules of diffpy.Structure - if not fullname.startswith(self.prefix): - return None - lcname = fullname.lower() - spec = importlib.util.find_spec(lcname) - if spec is not None: - spec.name = fullname - spec.loader = MapRenamedStructureModule() - return spec - - -# end of class FindRenamedStructureModule - -# ---------------------------------------------------------------------------- - - -class MapRenamedStructureModule(importlib.abc.Loader): - """Loader for old camel-case module names. - - Import the current module and alias it under the old name. - """ - - def create_module(self, spec): - lcname = spec.name.lower() - mod = importlib.import_module(lcname) - sys.modules[spec.name] = mod - warn(WMSG.format(spec.name, lcname), DeprecationWarning, stacklevel=2) - return mod - - def exec_module(self, module): - return - - -# end of class MapRenamedStructureModule - -# ---------------------------------------------------------------------------- - -# show deprecation warning for diffpy.Structure -warn( - WMSG.format("diffpy.Structure", "diffpy.structure"), - DeprecationWarning, - stacklevel=2, -) - -# install meta path finder for diffpy.Structure submodules -sys.meta_path.append(FindRenamedStructureModule()) - -# End of file diff --git a/src/diffpy/structure/apps/__init__.py b/src/diffpy/structure/apps/__init__.py deleted file mode 100644 index 98aa2feb..00000000 --- a/src/diffpy/structure/apps/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Script applications that use the `diffpy.structure` package.""" diff --git a/src/diffpy/structure/apps/anyeye.py b/src/diffpy/structure/apps/anyeye.py deleted file mode 100755 index c00756c6..00000000 --- a/src/diffpy/structure/apps/anyeye.py +++ /dev/null @@ -1,375 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Anyeye view structure file in atomeye. - -Usage: ``anyeye [options] strufile`` - -Anyeye understands more `Structure` formats than atomeye. It converts `strufile` -to a temporary XCFG file which is opened in atomeye. See supported file formats: -``inputFormats`` - -Options: - -f, --formula - Override chemical formula in `strufile`. The formula defines - elements in the same order as in `strufile`, e.g., ``Na4Cl4``. - - -w, --watch - Watch input file for changes. - - --viewer=VIEWER - The structure viewer program, by default "atomeye". - The program will be executed as "VIEWER structurefile". - - --formats=FORMATS - Comma-separated list of file formats that are understood - by the VIEWER, by default ``"xcfg,pdb"``. Files of other - formats will be converted to the first listed format. - - -h, --help - Display this message and exit. - - -V, --version - Show script version and exit. -""" - -from __future__ import print_function - -import os -import re -import signal -import sys - -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure" -removal_version = "4.0.0" -loadStructureFile_deprecation_msg = build_deprecation_message( - base, - "loadStructureFile", - "load_structure_file", - removal_version, -) -convertStructureFile_deprecation_msg = build_deprecation_message( - base, - "loadStructureFile", - "load_structure_file", - removal_version, -) -watchStructureFile_deprecation_msg = build_deprecation_message( - base, - "watchStructureFile", - "watch_structure_file", - removal_version, -) -cleanUp_deprecation_msg = build_deprecation_message( - base, - "cleanUp", - "clean_up", - removal_version, -) -parseFormula_deprecation_msg = build_deprecation_message( - base, - "parseFormula", - "parse_formula", - removal_version, -) -signalHandler_deprecation_msg = build_deprecation_message( - base, - "signalHandler", - "signal_handler", - removal_version, -) - -# parameter dictionary -pd = { - "formula": None, - "watch": False, - "viewer": "atomeye", - "formats": ["xcfg", "pdb"], -} - - -def usage(style=None): - """Show usage info, for ``style=="brief"`` show only first 2 - lines.""" - import os.path - - myname = os.path.basename(sys.argv[0]) - msg = __doc__.replace("anyeye", myname) - if style == "brief": - msg = msg.split("\n")[1] + "\n" + "Try `%s --help' for more information." % myname - else: - from diffpy.structure.parsers import input_formats - - fmts = [f for f in input_formats() if f != "auto"] - msg = msg.replace("inputFormats", " ".join(fmts)) - print(msg) - return - - -def version(): - from diffpy.structure import __version__ - - print("anyeye", __version__) - return - - -@deprecated(loadStructureFile_deprecation_msg) -def loadStructureFile(filename, format="auto"): - """Load structure from specified file. - - Parameters - ---------- - filename : str - Path to the structure file. - format : str, Optional - File format, by default "auto". - - Returns - ------- - tuple - A tuple of (Structure, fileformat). - """ - return load_structure_file(filename, format) - - -def load_structure_file(filename, format="auto"): - """Load structure from specified file. - - Parameters - ---------- - filename : str - Path to the structure file. - format : str, Optional - File format, by default "auto". - - Returns - ------- - tuple - A tuple of (Structure, fileformat). - """ - from diffpy.structure import Structure - - stru = Structure() - p = stru.read(filename, format) - fileformat = p.format - return (stru, fileformat) - - -@deprecated(convertStructureFile_deprecation_msg) -def convertStructureFile(pd): - return convert_structure_file(pd) - - -def convert_structure_file(pd): - # make temporary directory on the first pass - if "tmpdir" not in pd: - from tempfile import mkdtemp - - pd["tmpdir"] = mkdtemp() - strufile = pd["strufile"] - tmpfile = os.path.join(pd["tmpdir"], os.path.basename(strufile)) - pd["tmpfile"] = tmpfile - # speed up file processing in the watch mode - fmt = pd.get("format", "auto") - stru = None - if fmt == "auto": - stru, fmt = loadStructureFile(strufile) - pd["fmt"] = fmt - # if fmt is recognized by the viewer, use as is - if fmt in pd["formats"] and pd["formula"] is None: - import shutil - - shutil.copyfile(strufile, tmpfile + ".tmp") - os.rename(tmpfile + ".tmp", tmpfile) - return - # otherwise convert to the first recognized viewer format - if stru is None: - stru = load_structure_file(strufile, fmt)[0] - if pd["formula"]: - formula = pd["formula"] - if len(formula) != len(stru): - emsg = "Formula has %i atoms while structure %i" % ( - len(formula), - len(stru), - ) - raise RuntimeError(emsg) - for a, el in zip(stru, formula): - a.element = el - elif format == "rawxyz": - for a in stru: - if a.element == "": - a.element = "C" - stru.write(tmpfile + ".tmp", pd["formats"][0]) - os.rename(tmpfile + ".tmp", tmpfile) - return - - -@deprecated(watchStructureFile_deprecation_msg) -def watchStructureFile(pd): - return watch_structure_file(pd) - - -def watch_structure_file(pd): - from time import sleep - - strufile = pd["strufile"] - tmpfile = pd["tmpfile"] - while pd["watch"]: - if os.path.getmtime(tmpfile) < os.path.getmtime(strufile): - convert_structure_file(pd) - sleep(1) - return - - -@deprecated(cleanUp_deprecation_msg) -def cleanUp(pd): - return clean_up(pd) - - -def clean_up(pd): - if "tmpfile" in pd: - os.remove(pd["tmpfile"]) - del pd["tmpfile"] - if "tmpdir" in pd: - os.rmdir(pd["tmpdir"]) - del pd["tmpdir"] - return - - -@deprecated(parseFormula_deprecation_msg) -def parseFormula(formula): - """Parse chemical formula and return a list of elements.""" - # remove all blanks - return parse_formula(formula) - - -def parse_formula(formula): - """Parse chemical formula and return a list of elements.""" - # remove all blanks - formula = re.sub(r"\s", "", formula) - if not re.match("^[A-Z]", formula): - raise RuntimeError("InvalidFormula '%s'" % formula) - elcnt = re.split("([A-Z][a-z]?)", formula)[1:] - ellst = [] - try: - for i in range(0, len(elcnt), 2): - el = elcnt[i] - cnt = elcnt[i + 1] - cnt = (cnt == "") and 1 or int(cnt) - ellst.extend(cnt * [el]) - except ValueError: - emsg = "Invalid formula, %r is not valid count" % elcnt[i + 1] - raise RuntimeError(emsg) - return ellst - - -def die(exit_status=0, pd={}): - clean_up(pd) - sys.exit(exit_status) - - -@deprecated(signalHandler_deprecation_msg) -def signalHandler(signum, stackframe): - # revert to default handler - return signal_handler(signum, stackframe) - - -def signal_handler(signum, stackframe): - # revert to default handler - signal.signal(signum, signal.SIG_DFL) - if signum == signal.SIGCHLD: - pid, exit_status = os.wait() - exit_status = (exit_status >> 8) + (exit_status & 0x00FF) - die(exit_status, pd) - else: - die(1, pd) - return - - -def main(): - import getopt - - # default parameters - pd["watch"] = False - try: - opts, args = getopt.getopt( - sys.argv[1:], - "f:whV", - ["formula=", "watch", "viewer=", "formats=", "help", "version"], - ) - except getopt.GetoptError as errmsg: - print(errmsg, file=sys.stderr) - die(2) - # process options - for o, a in opts: - if o in ("-f", "--formula"): - try: - pd["formula"] = parse_formula(a) - except RuntimeError as msg: - print(msg, file=sys.stderr) - die(2) - elif o in ("-w", "--watch"): - pd["watch"] = True - elif o == "--viewer": - pd["viewer"] = a - elif o == "--formats": - pd["formats"] = [w.strip() for w in a.split(",")] - elif o in ("-h", "--help"): - usage() - die() - elif o in ("-V", "--version"): - version() - die() - if len(args) < 1: - usage("brief") - die() - elif len(args) > 1: - print("too many structure files", file=sys.stderr) - die(2) - pd["strufile"] = args[0] - # trap the following signals - signal.signal(signal.SIGHUP, signal_handler) - signal.signal(signal.SIGQUIT, signal_handler) - signal.signal(signal.SIGSEGV, signal_handler) - signal.signal(signal.SIGTERM, signal_handler) - signal.signal(signal.SIGINT, signal_handler) - env = os.environ.copy() - if os.path.basename(pd["viewer"]).startswith("atomeye"): - env["XLIB_SKIP_ARGB_VISUALS"] = "1" - # try to run the thing: - try: - convert_structure_file(pd) - spawnargs = (pd["viewer"], pd["viewer"], pd["tmpfile"], env) - # load strufile in atomeye - if pd["watch"]: - signal.signal(signal.SIGCHLD, signal_handler) - os.spawnlpe(os.P_NOWAIT, *spawnargs) - watch_structure_file(pd) - else: - status = os.spawnlpe(os.P_WAIT, *spawnargs) - die(status, pd) - except IOError as e: - print("%s: %s" % (args[0], e.strerror), file=sys.stderr) - die(1, pd) - except StructureFormatError as e: - print("%s: %s" % (args[0], e), file=sys.stderr) - die(1, pd) - return - - -if __name__ == "__main__": - main() diff --git a/src/diffpy/structure/apps/transtru.py b/src/diffpy/structure/apps/transtru.py deleted file mode 100755 index d942564e..00000000 --- a/src/diffpy/structure/apps/transtru.py +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Translate structure file to different format. - -Usage: ``transtru INFMT..OUTFMT strufile`` - -Translates structure file strufile from `INFMT` to `OUTFMT` format and prints it -to the screen. Use "-" as `strufile` to read from standard input. To save the -translated file, use - - ``transtru INFMT..OUTFMT strufile > strufile.out`` - -Supported input and output structure formats are - * `INFMT`: ``inputFormats`` - * `OUTFMT`: ``outputFormats`` - -Options: - -h, --help - Display this message. - - -V, --version - Show script version. -""" - -from __future__ import print_function - -import sys - -from diffpy.structure import Structure -from diffpy.structure.structureerrors import StructureFormatError - - -def usage(style=None): - """Show usage info, for ``style=="brief"`` show only first 2 - lines.""" - import os.path - - myname = os.path.basename(sys.argv[0]) - msg = __doc__.replace("transtru", myname) - if style == "brief": - msg = msg.split("\n")[1] + "\n" + "Try `%s --help' for more information." % myname - else: - from diffpy.structure.parsers import input_formats, output_formats - - msg = msg.replace("inputFormats", " ".join(input_formats())) - msg = msg.replace("outputFormats", " ".join(output_formats())) - print(msg) - return - - -def version(): - from diffpy.structure import __version__ - - print("diffpy.structure", __version__) - return - - -def main(): - import getopt - - # default parameters - try: - opts, args = getopt.getopt(sys.argv[1:], "hV", ["help", "version"]) - except getopt.GetoptError as errmsg: - print(errmsg, file=sys.stderr) - sys.exit(2) - # process options - for o, a in opts: - if o in ("-h", "--help"): - usage() - sys.exit() - elif o in ("-V", "--version"): - version() - sys.exit() - if len(args) < 1: - usage("brief") - sys.exit() - # process arguments - from diffpy.structure.parsers import input_formats, output_formats - - try: - infmt, outfmt = args[0].split("..", 1) - if infmt not in input_formats(): - print("'%s' is not valid input format" % infmt, file=sys.stderr) - sys.exit(2) - if outfmt not in output_formats(): - print("'%s' is not valid output format" % outfmt, file=sys.stderr) - sys.exit(2) - except ValueError: - print( - "invalid format specification '%s' does not contain .." % args[0], - file=sys.stderr, - ) - sys.exit(2) - # ready to do some real work - try: - strufile = args[1] - stru = Structure() - if args[1] == "-": - stru.read_structure(sys.stdin.read(), infmt) - else: - stru.read(strufile, infmt) - sys.stdout.write(stru.write_structure(outfmt)) - except IndexError: - print("strufile not specified", file=sys.stderr) - sys.exit(2) - except IOError as e: - print("%s: %s" % (strufile, e.strerror), file=sys.stderr) - sys.exit(1) - except StructureFormatError as e: - print("%s: %s" % (strufile, e), file=sys.stderr) - sys.exit(1) - return - - -if __name__ == "__main__": - main() diff --git a/src/diffpy/structure/apps/vesta_viewer.py b/src/diffpy/structure/apps/vesta_viewer.py deleted file mode 100644 index b90ae0f4..00000000 --- a/src/diffpy/structure/apps/vesta_viewer.py +++ /dev/null @@ -1,366 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2026 University of California, Santa Barbara. -# All rights reserved. -# -# File coded by: Simon J. L. Billinge, Rundong Hua -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""View structure file in VESTA. - -Usage: ``vestaview [options] strufile`` - -Vestaview understands more `Structure` formats than VESTA. It converts -`strufile` to a temporary VESTA or CIF file which is opened in VESTA. -See supported file formats: ``inputFormats`` - -Options: - -f, --formula - Override chemical formula in `strufile`. The formula defines - elements in the same order as in `strufile`, e.g., ``Na4Cl4``. - - -w, --watch - Watch input file for changes. - - --viewer=VIEWER - The structure viewer program, by default "vesta". - The program will be executed as "VIEWER structurefile". - - --formats=FORMATS - Comma-separated list of file formats that are understood - by the VIEWER, by default ``"vesta,cif"``. Files of other - formats will be converted to the first listed format. - - -h, --help - Display this message and exit. - - -V, --version - Show script version and exit. - -Notes ------ -VESTA is the actively maintained successor to AtomEye. Unlike AtomEye, -VESTA natively reads CIF, its own ``.vesta`` format, and several other -crystallographic file types, so format conversion is only required for -formats not in that set. - -AtomEye XCFG format is no longer a default target format but the XCFG -parser (``P_xcfg``) remains available in ``diffpy.structure.parsers`` -for backward compatibility. -""" - -import os -import re -import signal -import sys -from pathlib import Path - -from diffpy.structure.structureerrors import StructureFormatError - -pd = { - "formula": None, - "watch": False, - "viewer": "vesta", - "formats": ["vesta", "cif"], -} - - -def usage(style=None): - """Show usage info. for ``style=="brief"`` show only first 2 lines. - - Parameters - ---------- - style : str, optional - The usage display style. - """ - myname = Path(sys.argv[0]).name - msg = __doc__.replace("vestaview", myname) - if style == "brief": - msg = f"{msg.splitlines()[1]}\n" f"Try `{myname} --help' for more information." - else: - from diffpy.structure.parsers import input_formats - - fmts = [fmt for fmt in input_formats() if fmt != "auto"] - msg = msg.replace("inputFormats", " ".join(fmts)) - print(msg) - - -def version(): - """Print the script version.""" - from diffpy.structure import __version__ - - print(f"vestaview {__version__}") - - -def load_structure_file(filename, format="auto"): - """Load structure from the specified file. - - Parameters - ---------- - filename : str or Path - The path to the structure file. - format : str, optional - The file format, by default ``"auto"``. - - Returns - ------- - tuple - The loaded ``(Structure, fileformat)`` pair. - """ - from diffpy.structure import Structure - - stru = Structure() - parser = stru.read(str(filename), format) - return stru, parser.format - - -def convert_structure_file(pd): - """Convert ``strufile`` to a temporary file understood by the - viewer. - - On the first call, a temporary directory is created and stored in - ``pd``. Subsequent calls in watch mode reuse the directory. - - The VESTA viewer natively reads ``.vesta`` and ``.cif`` files, so if - the source is already in one of the formats listed in - ``pd["formats"]`` and no formula override is requested, the file is - copied unchanged. Otherwise the structure is loaded and re-written in - the first format listed in ``pd["formats"]``. - - Parameters - ---------- - pd : dict - The parameter dictionary containing at minimum ``"strufile"`` - and ``"formats"`` keys. It is modified in place to add - ``"tmpdir"`` and ``"tmpfile"`` on the first call. - """ - if "tmpdir" not in pd: - from tempfile import mkdtemp - - pd["tmpdir"] = Path(mkdtemp()) - strufile = Path(pd["strufile"]) - tmpfile = pd["tmpdir"] / strufile.name - tmpfile_tmp = Path(f"{tmpfile}.tmp") - pd["tmpfile"] = tmpfile - stru = None - fmt = pd.get("fmt", "auto") - if fmt == "auto": - stru, fmt = load_structure_file(strufile) - pd["fmt"] = fmt - if fmt in pd["formats"] and pd["formula"] is None: - import shutil - - shutil.copyfile(strufile, tmpfile_tmp) - tmpfile_tmp.replace(tmpfile) - return - if stru is None: - stru = load_structure_file(strufile, fmt)[0] - if pd["formula"]: - formula = pd["formula"] - if len(formula) != len(stru): - emsg = f"Formula has {len(formula)} atoms while structure has " f"{len(stru)}" - raise RuntimeError(emsg) - for atom, element in zip(stru, formula): - atom.element = element - elif fmt == "rawxyz": - for atom in stru: - if atom.element == "": - atom.element = "C" - stru.write(str(tmpfile_tmp), pd["formats"][0]) - tmpfile_tmp.replace(tmpfile) - - -def watch_structure_file(pd): - """Watch ``strufile`` for modifications and reconvert when changed. - - Polls the modification timestamps of ``pd["strufile"]`` and - ``pd["tmpfile"]`` once per second. When the source is newer, the - file is reconverted via :func:`convert_structure_file`. - - Parameters - ---------- - pd : dict - The parameter dictionary as used by - :func:`convert_structure_file`. - """ - from time import sleep - - strufile = Path(pd["strufile"]) - tmpfile = Path(pd["tmpfile"]) - while pd["watch"]: - if tmpfile.stat().st_mtime < strufile.stat().st_mtime: - convert_structure_file(pd) - sleep(1) - - -def clean_up(pd): - """Remove temporary file and directory created during conversion. - - Parameters - ---------- - pd : dict - The parameter dictionary that may contain ``"tmpfile"`` and - ``"tmpdir"`` entries to be removed. - """ - tmpfile = pd.pop("tmpfile", None) - if tmpfile is not None and Path(tmpfile).exists(): - Path(tmpfile).unlink() - tmpdir = pd.pop("tmpdir", None) - if tmpdir is not None and Path(tmpdir).exists(): - Path(tmpdir).rmdir() - - -def parse_formula(formula): - """Parse chemical formula and return a list of elements. - - Parameters - ---------- - formula : str - The chemical formula string such as ``"Na4Cl4"`` or ``"H2O"``. - - Returns - ------- - list of str - The ordered list of element symbols with repetition matching the - formula. - - Raises - ------ - RuntimeError - Raised when ``formula`` does not start with an uppercase letter - or contains a non-integer count. - """ - formula = re.sub(r"\s", "", formula) - if not re.match(r"^[A-Z]", formula): - raise RuntimeError(f"InvalidFormula '{formula}'") - - elcnt = re.split(r"([A-Z][a-z]?)", formula)[1:] - ellst = [] - try: - for i in range(0, len(elcnt), 2): - element = elcnt[i] - count = int(elcnt[i + 1]) if elcnt[i + 1] else 1 - ellst.extend([element] * count) - except ValueError: - emsg = f"Invalid formula, {elcnt[i + 1]!r} is not valid count" - raise RuntimeError(emsg) - return ellst - - -def die(exit_status=0, pd=None): - """Clean up temporary files and exit with ``exit_status``. - - Parameters - ---------- - exit_status : int, optional - The exit code passed to :func:`sys.exit`, by default 0. - pd : dict, optional - The parameter dictionary forwarded to :func:`clean_up`. - """ - clean_up({} if pd is None else pd) - sys.exit(exit_status) - - -def signal_handler(signum, stackframe): - """Handle OS signals by reverting to the default handler and - exiting. - - On ``SIGCHLD`` the child exit status is harvested via - :func:`os.wait`; on all other signals :func:`die` is called with - exit status 1. - - Parameters - ---------- - signum : int - The signal number. - stackframe : frame - The current stack frame. Unused. - """ - del stackframe - signal.signal(signum, signal.SIG_DFL) - if signum == signal.SIGCHLD: - _, exit_status = os.wait() - exit_status = (exit_status >> 8) + (exit_status & 0x00FF) - die(exit_status, pd) - else: - die(1, pd) - - -def main(): - """Entry point for the ``vestaview`` command-line tool.""" - import getopt - - pd["watch"] = False - try: - opts, args = getopt.getopt( - sys.argv[1:], - "f:whV", - ["formula=", "watch", "viewer=", "formats=", "help", "version"], - ) - except getopt.GetoptError as errmsg: - print(errmsg, file=sys.stderr) - die(2) - - for option, argument in opts: - if option in ("-f", "--formula"): - try: - pd["formula"] = parse_formula(argument) - except RuntimeError as err: - print(err, file=sys.stderr) - die(2) - elif option in ("-w", "--watch"): - pd["watch"] = True - elif option == "--viewer": - pd["viewer"] = argument - elif option == "--formats": - pd["formats"] = [word.strip() for word in argument.split(",")] - elif option in ("-h", "--help"): - usage() - die() - elif option in ("-V", "--version"): - version() - die() - if len(args) < 1: - usage("brief") - die() - if len(args) > 1: - print("too many structure files", file=sys.stderr) - die(2) - pd["strufile"] = Path(args[0]) - signal.signal(signal.SIGHUP, signal_handler) - signal.signal(signal.SIGQUIT, signal_handler) - signal.signal(signal.SIGSEGV, signal_handler) - signal.signal(signal.SIGTERM, signal_handler) - signal.signal(signal.SIGINT, signal_handler) - env = os.environ.copy() - try: - convert_structure_file(pd) - spawnargs = ( - pd["viewer"], - pd["viewer"], - str(pd["tmpfile"]), - env, - ) - if pd["watch"]: - signal.signal(signal.SIGCHLD, signal_handler) - os.spawnlpe(os.P_NOWAIT, *spawnargs) - watch_structure_file(pd) - else: - status = os.spawnlpe(os.P_WAIT, *spawnargs) - die(status, pd) - except IOError as err: - print(f"{args[0]}: {err.strerror}", file=sys.stderr) - die(1, pd) - except StructureFormatError as err: - print(f"{args[0]}: {err}", file=sys.stderr) - die(1, pd) - - -if __name__ == "__main__": - main() diff --git a/src/diffpy/structure/atom.py b/src/diffpy/structure/atom.py deleted file mode 100644 index 75581454..00000000 --- a/src/diffpy/structure/atom.py +++ /dev/null @@ -1,597 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Provide class Atom for managing properties of an atom in structure -model.""" - -import numpy - -from diffpy.structure.lattice import cartesian as cartesian_lattice -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -# conversion constants -_BtoU = 1.0 / (8 * numpy.pi**2) -_UtoB = 1.0 / _BtoU - -# ---------------------------------------------------------------------------- -base = "diffpy.structure.Atom" -removal_version = "4.0.0" -msdLat_deprecation_msg = build_deprecation_message( - base, - "msdLat", - "msd_latt", - removal_version, -) -msdCart_deprecation_msg = build_deprecation_message( - base, - "msdCart", - "msd_cart", - removal_version, -) - - -class Atom(object): - """Storage of structure information relevant for a single atom. - - This class manages atom information such as element symbol, position - in fractional and Cartesian coordinates, atomic displacement parameters - and so forth. - - Parameters - ---------- - atype : str or Atom, Optional - The string atom type to be set as the `element` attribute. - By default an empty string. When of the `Atom` type, create - a copy of `atype` and adjust it per other arguments. - xyz : numpy.ndarray, Optional - Fractional coordinates within the associated `lattice`. - By default ``[0, 0, 0]``. - label : str, Optional - A unique string `label` for referring to this `Atom`. - By default an empty string. - occupancy : float, Optional - The initial `occupancy` of this atom, by default ``1``. - anisotropy : bool, Optional - The flag for anisotropic thermal displacements parameters. - This overrides `anisotropy` implied by presence of the - *U* or *Uisoequiv* arguments. Defaults to ``False`` - when not set in any other way. - U : numpy.ndarray, Optional - The 3x3 matrix of anisotropic thermal displacement parameters. - When present `anisotropy` defaults to ``True``. - Uisoequiv: float, Optional - The isotropic atomic displacement parameter. The `anisotropy` - defaults to ``False`` when present. Only one of the *U* and - *Uisoequiv* arguments may be provided at the same time. Assume - zero atomic displacements when *U* and *Uisoequiv* are unset. - lattice : Lattice, Optional - Coordinate system for the fractional coordinates `xyz`. - Use the absolute Cartesian system when ``None``. - - Attributes - ---------- - element : str - The string type of the atom. An element or ion symbol. - xyz : numpy.ndarray - The fractional coordinates in the associated `lattice`. - label : str - A unique string label referring to this atom, for example, "C_1". - The *label* can be used to reference this atom when contained in - a `Structure` object. - occupancy : float - The fractional occupancy of this atom. - lattice : Lattice - Coordinate system for the fractional coordinates `xyz` and - the tensor of atomic displacement parameters `U`. - Use the absolute Cartesian coordinates when ``None``. - - Note - ---- - Cannot use both U and Uisoequiv arguments at the same time. - """ - - # Private attributes - # - # _U : 3-by-3 ndarray - # Internal storage of the displacement parameters. - - # instance attributes that have immutable default values - element = "" - """str: Default values of `element`.""" - - label = "" - """str: Default values of `label`.""" - - occupancy = 1.0 - """float: Default values of `occupancy`.""" - - _anisotropy = False - lattice = None - """None: Default values of `lattice`.""" - - def __init__( - self, - atype=None, - xyz=None, - label=None, - occupancy=None, - anisotropy=None, - U=None, - Uisoequiv=None, - lattice=None, - ): - # check arguments - if U is not None and Uisoequiv is not None: - emsg = "Cannot use both U and Uisoequiv arguments." - raise ValueError(emsg) - # declare data members - self.xyz = numpy.zeros(3, dtype=float) - self._U = numpy.zeros((3, 3), dtype=float) - # assign them as needed - if isinstance(atype, Atom): - atype.__copy__(target=self) - elif atype is not None: - self.element = atype - # take care of remaining arguments - if xyz is not None: - self.xyz[:] = xyz - if label is not None: - self.label = label - if occupancy is not None: - self.occupancy = float(occupancy) - if U is not None: - self.anisotropy = True - self._U[:] = U - if Uisoequiv is not None: - self.anisotropy = False - self.Uisoequiv = Uisoequiv - # lattice needs to be set before anisotropy - if lattice is not None: - self.lattice = lattice - # process anisotropy after U, Uisoequiv and lattice. - if anisotropy is not None: - self.anisotropy = bool(anisotropy) - return - - @deprecated(msdLat_deprecation_msg) - def msdLat(self, vl): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Atom.msd_latt instead. - """ - return self.msd_latt(vl) - - def msd_latt(self, vl): - """Calculate mean square displacement along the lattice vector. - - Parameters - ---------- - vl : array_like - The vector in lattice coordinates. - - Returns - ------- - float - The mean square displacement along *vl*. - """ - if not self.anisotropy: - return self.Uisoequiv - # here we need to calculate msd - lat = self.lattice or cartesian_lattice - vln = numpy.array(vl, dtype=float) / lat.norm(vl) - G = lat.metrics - rhs = numpy.array([G[0] * lat.ar, G[1] * lat.br, G[2] * lat.cr], dtype=float) - rhs = numpy.dot(rhs, vln) - msd = numpy.dot(rhs, numpy.dot(self.U, rhs)) - return msd - - @deprecated(msdLat_deprecation_msg) - def msdCart(self, vc): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Atom.msd_cart instead. - """ - return self.msd_cart(vc) - - def msd_cart(self, vc): - """Calculate mean square displacement along the Cartesian - vector. - - Parameters - ---------- - vc : array_like - Vector in Cartesian coordinates. - - Returns - ------- - float - The mean square displacement along *vc*. - """ - if not self.anisotropy: - return self.Uisoequiv - # here we need to calculate msd - lat = self.lattice or cartesian_lattice - vcn = numpy.array(vc, dtype=float) - vcn /= numpy.sqrt(numpy.sum(vcn**2)) - F1 = lat.normbase - Uc = numpy.dot(numpy.transpose(F1), numpy.dot(self._U, F1)) - msd = numpy.dot(vcn, numpy.dot(Uc, vcn)) - return msd - - def __repr__(self): - """String representation of this Atom.""" - xyz = self.xyz - s = "%-4s %8.6f %8.6f %8.6f %6.4f" % ( - self.element, - xyz[0], - xyz[1], - xyz[2], - self.occupancy, - ) - return s - - def __copy__(self, target=None): - """Create a copy of this instance. - - Parameters - ---------- - target : Atom, Optional - An already existing `Atom` object to be updated to a duplicate - of this `Atom`. Create a new Atom object when not specified. - This facilitates extension of the `__copy__` method - in a derived class. - - Returns - ------- - Atom - The copy of this object. - """ - if target is None: - target = Atom() - elif target is self: - return target - target.__dict__.update(self.__dict__) - target.xyz = numpy.copy(self.xyz) - target._U = numpy.copy(self._U) - return target - - # property handlers ------------------------------------------------------ - - x = property( - lambda self: self.xyz[0], - lambda self, val: self.xyz.__setitem__(0, val), - doc="float : fractional coordinate *x*, same as ``xyz[0]``.", - ) - y = property( - lambda self: self.xyz[1], - lambda self, val: self.xyz.__setitem__(1, val), - doc="float : fractional coordinate *y*, same as ``xyz[1]``.", - ) - z = property( - lambda self: self.xyz[2], - lambda self, val: self.xyz.__setitem__(2, val), - doc="float : fractional coordinate *z*, same as ``xyz[2]``.", - ) - - # xyz_cartn - - @property - def xyz_cartn(self): - """numpy.ndarray: Atom position in absolute Cartesian - coordinates. - - This is computed from fractional coordinates `xyz` and the - current `lattice` setup. Assignment to *xyz_cartn* or - its components is applied on fractional coordinates `xyz`. - """ - if not self.lattice: - rv = self.xyz - else: - rv = _AtomCartesianCoordinates(self) - return rv - - @xyz_cartn.setter - def xyz_cartn(self, value): - if not self.lattice: - self.xyz[:] = value - else: - self.xyz[:] = self.lattice.fractional(value) - return - - # anisotropy - - @property - def anisotropy(self): - """bool : Flag for allowing anisotropic displacement parameters. - - When ``False`` the tensor of thermal displacement parameters `U` - must be isotropic and only its diagonal elements are taken into - account. - """ - return self._anisotropy - - @anisotropy.setter - def anisotropy(self, value): - if bool(value) is self._anisotropy: - return - # convert from isotropic to anisotropic - if value: - self._U = self.U - # otherwise convert from anisotropic to isotropic - else: - self._U[0, 0] = self.Uisoequiv - self._anisotropy = bool(value) - return - - # U - - @property - def U(self): - """numpy.ndarray : The 3x3 matrix of anisotropic atomic - displacements. - - For isotropic displacements (when `anisotropy` is ``False``) - assignment to *U* uses only the first ``Unew[0, 0]`` element - and the remaining components of *U* are adjusted to obtain - isotropic tensor in the active `lattice`. - - Note - ---- - Elements of the *U* tensor such as ``U[0, 1]`` should be - considered read-only as setting them directly leads to - undefined behavior. Use the `U11`, `U22`, ..., or `B11`, - `B22`, ..., descriptors to set only some *U* components. - """ - if not self.anisotropy: - # for isotropic displacements assume first element - # to be equal to the displacement value - lat = self.lattice or cartesian_lattice - numpy.multiply(self._U[0, 0], lat.isotropicunit, out=self._U) - return self._U - - @U.setter - def U(self, value): - self._U[:] = value - return - - # Uij elements - - def _get_uij(self, i, j): - """The getter function for the `U11`, `U22`, ..., properties.""" - if self.anisotropy: - return self._U[i, j] - lat = self.lattice or cartesian_lattice - return self._U[0, 0] * lat.isotropicunit[i, j] - - def _set_uij(self, i, j, value): - """The setter function for the `U11`, `U22`, ..., properties.""" - self._U[i, j] = value - self._U[j, i] = value - if not self._anisotropy and i == j != 0: - self._U[0, 0] = value - return - - # _doc_uii, _doc_uij are temporary local variables. - - _doc_uii = """ - float : The ``U[{0}, {0}]`` component of the displacement tensor `U`. - - When `anisotropy` is ``False`` setting a new value updates entire - tensor *U*. - """ - - U11 = property( - lambda self: self._get_uij(0, 0), - lambda self, value: self._set_uij(0, 0, value), - doc=_doc_uii.format(0), - ) - U22 = property( - lambda self: self._get_uij(1, 1), - lambda self, value: self._set_uij(1, 1, value), - doc=_doc_uii.format(1), - ) - U33 = property( - lambda self: self._get_uij(2, 2), - lambda self, value: self._set_uij(2, 2, value), - doc=_doc_uii.format(2), - ) - - _doc_uij = """ - float : The ``U[{0}, {1}]`` element of the displacement tensor `U`. - - Sets ``U[{1}, {0}]`` together with ``U[{0}, {1}]``. Assignment - has no effect when `anisotropy` is ``False``. - """ - - U12 = property( - lambda self: self._get_uij(0, 1), - lambda self, value: self._set_uij(0, 1, value), - doc=_doc_uij.format(0, 1), - ) - U13 = property( - lambda self: self._get_uij(0, 2), - lambda self, value: self._set_uij(0, 2, value), - doc=_doc_uij.format(0, 2), - ) - U23 = property( - lambda self: self._get_uij(1, 2), - lambda self, value: self._set_uij(1, 2, value), - doc=_doc_uij.format(1, 2), - ) - - # clean local variables - del _doc_uii, _doc_uij - - # Uisoequiv - - @property - def Uisoequiv(self): - """float : The isotropic displacement parameter or an equivalent value. - - Setting a new value rescales tensor `U` so it yields equivalent - direction-averaged displacements. - """ - if not self.anisotropy: - return self._U[0, 0] - if self.lattice is None: - return numpy.trace(self._U) / 3.0 - lat = self.lattice - rv = ( - 1.0 - / 3.0 - * ( - self._U[0, 0] * lat.ar * lat.ar * lat.a * lat.a - + self._U[1, 1] * lat.br * lat.br * lat.b * lat.b - + self._U[2, 2] * lat.cr * lat.cr * lat.c * lat.c - + 2 * self._U[0, 1] * lat.ar * lat.br * lat.a * lat.b * lat.cg - + 2 * self._U[0, 2] * lat.ar * lat.cr * lat.a * lat.c * lat.cb - + 2 * self._U[1, 2] * lat.br * lat.cr * lat.b * lat.c * lat.ca - ) - ) - return rv - - @Uisoequiv.setter - def Uisoequiv(self, value): - if self.anisotropy: - lat = self.lattice or cartesian_lattice - uequiv = self.Uisoequiv - if abs(uequiv) < lat._epsilon: - self._U = value * lat.isotropicunit - else: - self._U *= value / uequiv - else: - self._U[0, 0] = value - return - - # Bij elements - - # _doc_bii, _doc_bij are local variables. - - _doc_bii = """ - float : The ``B{0}{0}`` element of the Debye-Waller matrix. - - This is equivalent to ``8 * pi**2 * U{0}{0}``. When `anisotropy` - is ``False`` setting a new value updates entire tensor `U`. - """ - - _doc_bij = """ - float : The ``B{0}{1}`` element of the Debye-Waller matrix. - - This is equivalent to ``8 * pi**2 * U{0}{1}``. Setting a new - value updates `U` in a symmetric way. Assignment has no effect - when `anisotropy` is ``False``. - """ - - B11 = property( - lambda self: _UtoB * self._get_uij(0, 0), - lambda self, value: self._set_uij(0, 0, _BtoU * value), - doc=_doc_bii.format(1), - ) - B22 = property( - lambda self: _UtoB * self._get_uij(1, 1), - lambda self, value: self._set_uij(1, 1, _BtoU * value), - doc=_doc_bii.format(2), - ) - B33 = property( - lambda self: _UtoB * self._get_uij(2, 2), - lambda self, value: self._set_uij(2, 2, _BtoU * value), - doc=_doc_bii.format(3), - ) - B12 = property( - lambda self: _UtoB * self._get_uij(0, 1), - lambda self, value: self._set_uij(0, 1, _BtoU * value), - doc=_doc_bij.format(1, 2), - ) - B13 = property( - lambda self: _UtoB * self._get_uij(0, 2), - lambda self, value: self._set_uij(0, 2, _BtoU * value), - doc=_doc_bij.format(1, 3), - ) - B23 = property( - lambda self: _UtoB * self._get_uij(1, 2), - lambda self, value: self._set_uij(1, 2, _BtoU * value), - doc=_doc_bij.format(2, 3), - ) - - # clean local variables - del _doc_bii, _doc_bij - - # Bisoequiv - - @property - def Bisoequiv(self): - """float : The Debye-Waller isotropic displacement or an equivalent value. - - This equals ``8 * pi**2 * Uisoequiv``. Setting a new value - rescales `U` tensor to yield equivalent direction-average of - Debye-Waller displacements. - """ - return _UtoB * self.Uisoequiv - - @Bisoequiv.setter - def Bisoequiv(self, value): - self.Uisoequiv = _BtoU * value - return - - -# End of class Atom - -# Local Helpers -------------------------------------------------------------- - - -class _AtomCartesianCoordinates(numpy.ndarray): - """Specialized `numpy.ndarray` for accessing Cartesian coordinates. - - Inplace assignments to this array are applied on the *xyz* position - position of owner `Atom` as per the associated `Atom.lattice`. - - Parameters - ---------- - atom : Atom - `Atom` instance to be linked to these coordinate array. - """ - - def __new__(self, atom): - """Create the underlying numpy array base object.""" - return numpy.empty(3, dtype=float).view(self) - - def __init__(self, atom): - self._atom = atom - self.asarray[:] = atom.lattice.cartesian(atom.xyz) - return - - @property - def asarray(self): - """ndarray : This array viewed as standard numpy array.""" - return self.view(numpy.ndarray) - - def __setitem__(self, idx, value): - """Set some element or slice of this Cartesian coordinates. - - This overrides inplace array assignment to update the - *xyz* fractional coordinate of the linked `Atom`. - """ - self.asarray[idx] = value - self._atom.xyz[:] = self._atom.lattice.fractional(self) - return - - def __array_wrap__(self, out_arr, context=None, return_scalar=None): - """Ensure math operations on this type yield standard numpy - array.""" - return out_arr.view(numpy.ndarray) - - -# End of _AtomCartesianCoordinates diff --git a/src/diffpy/structure/expansion/__init__.py b/src/diffpy/structure/expansion/__init__.py deleted file mode 100644 index 8e6d02c1..00000000 --- a/src/diffpy/structure/expansion/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Chris Farrow, Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Methods and classes for manipulating `Structure` instances. - -Package content: - * supercell -- create a supercell from an existing `Structure`. -""" - -# Import below whatever should be available at package namespace. - -from diffpy.structure.expansion.supercell_mod import supercell - -# silence pyflakes checker -assert supercell diff --git a/src/diffpy/structure/expansion/makeellipsoid.py b/src/diffpy/structure/expansion/makeellipsoid.py deleted file mode 100644 index 217b1dd3..00000000 --- a/src/diffpy/structure/expansion/makeellipsoid.py +++ /dev/null @@ -1,163 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Chris Farrow -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Make a spheroid nanoparticle from a template structure.""" - -from math import ceil - -from numpy import array - -from diffpy.structure import Structure -from diffpy.structure.expansion.shapeutils import find_center -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure" -removal_version = "4.0.0" -makeSphere_deprecation_msg = build_deprecation_message( - base, - "makeSphere", - "make_sphere", - removal_version, -) -makeEllipsoid_deprecation_msg = build_deprecation_message( - base, - "makeEllipsoid", - "make_ellipsoid", - removal_version, -) - - -@deprecated(makeSphere_deprecation_msg) -def makeSphere(S, radius): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.make_sphere instead. - """ - return make_sphere(S, radius) - - -def make_sphere(S, radius): - """Create a spherical nanoparticle. - - Parameters - ---------- - S : Structure - A `Structure` instance. - radius : float - Primary equatorial radius (along x-axis). - - Returns - ------- - Structure - A new `Structure` instance. - """ - return make_ellipsoid(S, radius) - - -@deprecated(makeEllipsoid_deprecation_msg) -def makeEllipsoid(S, a, b=None, c=None): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.make_ellipsoid instead. - """ - return make_ellipsoid(S, a, b, c) - - -def make_ellipsoid(S, a, b=None, c=None): - """Cut a `Structure` out of another one. - - Parameters - ---------- - S : Structure - A `Structure` instance. - a : float - Primary equatorial radius (along x-axis). - b : float, Optional - Secondary equatorial radius (along y-axis). If `b` is ``None`` - (default), then it is set equal to `a`. - c : float, Optional - Polar radius (along z-axis). If `c` is ``None`` (default), then it is - set equal to `a`. - - Returns - ------- - Structure : - A new `Structure` instance. - """ - if b is None: - b = a - if c is None: - c = a - sabc = array([a, b, c]) - - # Create a supercell large enough for the ellipsoid - frac = S.lattice.fractional(sabc) - # FIXME - this looks fishy for non-orthogonal lattices - mno = max(ceil(2 * xi) for xi in frac) * array([1, 1, 1]) - # Make the supercell - from diffpy.structure.expansion import supercell - - newS = supercell(S, mno) - lat = newS.lattice - - # Find the central atom - ncenter = find_center(newS) - - cxyz = lat.cartesian(newS[ncenter].xyz) - - delList = [] - N = len(newS) - j = N - for i in range(N): - j -= 1 - - # Calculate (x/a)**2 + (y/b)**2 + (z/c)**2 - xyz = lat.cartesian(newS[j].xyz) - darray = ((xyz - cxyz) / sabc) ** 2 - d = sum(darray) ** 0.5 - - # Discard atom if (x/a)**2 + (y/b)**2 + (z/c)**2 > 1 - if d > 1: - delList.append(j) - - for i in delList: - newS.pop(i) - - return newS - - -# ---------------------------------------------------------------------------- - -if __name__ == "__main__": - import os.path - - datadir = "../../tests/testdata" - S = Structure() - S.read(os.path.join(datadir, "CdSe_bulk.stru"), "pdffit") - newS = make_ellipsoid(S, 12) - newS.write("CdSe_d24.stru", "pdffit") - newS = make_ellipsoid(S, 20, 10, 10) - newS.write("CdSe_a20_b10_c10.stru", "pdffit") - newS = make_ellipsoid(S, 20, 15, 10) - newS.write("CdSe_a20_b15_c10.stru", "pdffit") - S = Structure() - S.read(os.path.join(datadir, "Ni.stru"), "pdffit") - newS = make_ellipsoid(S, 10) - newS.write("Ni_d20.stru", "pdffit") - newS = make_ellipsoid(S, 20, 4) - newS.write("Ni_a20_b4_c20.stru", "pdffit") - newS = make_ellipsoid(S, 20, 15, 10) - newS.write("Ni_a20_b15_c10.stru", "pdffit") diff --git a/src/diffpy/structure/expansion/shapeutils.py b/src/diffpy/structure/expansion/shapeutils.py deleted file mode 100644 index 0b1de0c0..00000000 --- a/src/diffpy/structure/expansion/shapeutils.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Chris Farrow -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure" -removal_version = "4.0.0" -findCenter_deprecation_msg = build_deprecation_message( - base, - "findCenter", - "find_center", - removal_version, -) -"""Utilities for making shapes.""" - - -@deprecated(findCenter_deprecation_msg) -def findCenter(S): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.find_center instead. - """ - return find_center(S) - - -def find_center(S): - """Find the approximate center `Atom` of a `Structure`. - - The center of the `Structure` is the `Atom` closest to ``(0.5, 0.5, 0.5)``. - - Parameters - ---------- - S : Structure - A `Structure` instance. - - Returns - ------- - int - The index of the center `Atom`. - """ - best = -1 - bestd = len(S) - center = [0.5, 0.5, 0.5] # the canonical center - - for i in range(len(S)): - d = S.lattice.dist(S[i].xyz, center) - if d < bestd: - bestd = d - best = i - - return best diff --git a/src/diffpy/structure/expansion/supercell_mod.py b/src/diffpy/structure/expansion/supercell_mod.py deleted file mode 100644 index bcaceb70..00000000 --- a/src/diffpy/structure/expansion/supercell_mod.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Chris Farrow, Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""This module contains functions for simple `Structure` -manipulation.""" - -import numpy - -from diffpy.structure import Atom, Structure - - -def supercell(S, mno): - """Perform supercell expansion for a `Structure`. - - New `lattice` parameters are multiplied and fractional coordinates - divided by corresponding multiplier. New `Atoms` are grouped with - their source in the original cell. - - Parameters - ---------- - S : Structure - An instance of `Structure` from `diffpy.structure`. - mno : array_like - Sequence of 3 integers for cell multipliers along - the `a`, `b` and `c` axes. - - Returns - ------- - Structure - A new `Structure` instance representing the expanded supercell. - - Raises - ------ - TypeError - `S` is not a `Structure` instance. - ValueError - Invalid `mno` argument. - """ - # check arguments - if len(mno) != 3: - emsg = "Argument mno must contain 3 numbers." - raise ValueError(emsg) - elif min(mno) < 1: - emsg = "Multipliers must be greater or equal 1" - raise ValueError(emsg) - if not isinstance(S, Structure): - emsg = "The first argument must be a Structure instance." - raise TypeError(emsg) - - # convert mno to a tuple of integers so it can be used as range limit. - mno = (int(mno[0]), int(mno[1]), int(mno[2])) - - # create return instance - newS = Structure(S) - if mno == (1, 1, 1): - return newS - - # back to business - ijklist = [(i, j, k) for i in range(mno[0]) for j in range(mno[1]) for k in range(mno[2])] - # numpy.floor returns float array - mnofloats = numpy.array(mno, dtype=float) - - # build a list of new atoms - newAtoms = [] - for a in S: - for ijk in ijklist: - adup = Atom(a) - adup.xyz = (a.xyz + ijk) / mnofloats - newAtoms.append(adup) - # newS can own references in newAtoms, no need to make copies - newS.__setitem__(slice(None), newAtoms, copy=False) - - # take care of lattice parameters - newS.lattice.set_latt_parms(a=mno[0] * S.lattice.a, b=mno[1] * S.lattice.b, c=mno[2] * S.lattice.c) - return newS - - -# End of supercell diff --git a/src/diffpy/structure/lattice.py b/src/diffpy/structure/lattice.py deleted file mode 100644 index bdef059a..00000000 --- a/src/diffpy/structure/lattice.py +++ /dev/null @@ -1,799 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Class Lattice stores properties and provides simple operations in -lattice coordinate system. - -Attributes ----------- -cartesian : Lattice - Constant instance of Lattice, default Cartesian system. -""" - -import math - -import numpy -import numpy.linalg as numalg - -from diffpy.structure.structureerrors import LatticeError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.Lattice" -removal_version = "4.0.0" -setLatPar_deprecation_msg = build_deprecation_message( - base, - "setLatPar", - "set_latt_parms", - removal_version, -) -setLatBase_deprecation_msg = build_deprecation_message( - base, - "setLatBase", - "set_new_latt_base_vec", - removal_version, -) -abcABG_deprecation_msg = build_deprecation_message( - base, - "abcABG", - "cell_parms", - removal_version, -) - -# Helper Functions ----------------------------------------------------------- - -# exact values of cosd -_EXACT_COSD = { - 0.0: +1.0, - 60.0: +0.5, - 90.0: 0.0, - 120.0: -0.5, - 180.0: -1.0, - 240.0: -0.5, - 270.0: 0.0, - 300.0: +0.5, -} - - -def cosd(x): - """Return the cosine of *x* (measured in degrees). - - Avoid round-off errors for exact cosine values. - - Parameters - ---------- - x : float - The angle in degrees. - - Returns - ------- - float - The cosine of the angle *x*. - """ - rv = _EXACT_COSD.get(x % 360.0) - if rv is None: - rv = math.cos(math.radians(x)) - return rv - - -def sind(x): - """Return the sine of *x* (measured in degrees). - - Avoid round-off errors for exact sine values. - - Parameters - ---------- - x : float - The angle in degrees. - - Returns - ------- - float - The sine of the angle *x*. - """ - return cosd(90.0 - x) - - -# ---------------------------------------------------------------------------- - - -class Lattice(object): - """General coordinate system and associated operations. - - Parameters - ---------- - a : float or Lattice, Optional - The cell length *a*. When present, other cell parameters - must be also specified. When of the *Lattice* type, create - a duplicate Lattice. - b : float - The cell length *b*. - c : float - The cell length *c*. - alpha : float - The angle between the *b* and *c* axes in degrees. - beta : float - The angle between the *b* and *c* axes in degrees. - gamma : float - The angle between the *a* and *b* axes in degrees. - baserot : array_like, Optional - The 3x3 rotation matrix of the base vectors with respect - to their standard setting. - base : array_like, Optional - The 3x3 array of row base vectors. This must be the - only argument when present. - - Attributes - ---------- - metrics : numpy.ndarray - The metrics tensor. - base : numpy.ndarray - The 3x3 matrix of row base vectors in Cartesian coordinates, - which may be rotated, i.e., ``base = stdbase @ baserot``. - stdbase : numpy.ndarray - The 3x3 matrix of row base vectors in standard orientation. - baserot : numpy.ndarray - The rotation matrix for the `base`. - recbase : numpy.ndarray - The inverse of the `base` matrix, where the columns give - reciprocal vectors in Cartesian coordinates. - normbase : numpy.ndarray - The `base` vectors scaled by magnitudes of reciprocal cell lengths. - recnormbase : numpy.ndarray - The inverse of the `normbase` matrix. - isotropicunit : numpy.ndarray - The 3x3 tensor for a unit isotropic displacement parameters in this - coordinate system. This is an identity matrix when this Lattice - is orthonormal. - - Note - ---- - The array attributes are read-only. They get updated by changing - some lattice parameters or by calling the `setLatPar()` or - `setLatBase()` methods. - - Examples - -------- - Create a Cartesian coordinate system: - - >>> Lattice() - - Create coordinate system with the cell lengths `a`, `b`, `c` - and cell angles `alpha`, `beta`, `gamma` in degrees: - - >>> Lattice(a, b, c, alpha, beta, gamma) - - Create a duplicate of an existing Lattice `lat`: - - >>> Lattice(lat) - - Create coordinate system with the base vectors given by rows - of the `abc` matrix: - - >>> Lattice(base=abc) - """ - - # round-off tolerance - _epsilon = 1.0e-8 - - # properties ------------------------------------------------------------- - - a = property( - lambda self: self._a, - lambda self, value: self.set_latt_parms(a=value), - doc="The unit cell length *a*.", - ) - - b = property( - lambda self: self._b, - lambda self, value: self.set_latt_parms(b=value), - doc="The unit cell length *b*.", - ) - - c = property( - lambda self: self._c, - lambda self, value: self.set_latt_parms(c=value), - doc="The unit cell length *c*.", - ) - - alpha = property( - lambda self: self._alpha, - lambda self, value: self.set_latt_parms(alpha=value), - doc="The cell angle *alpha* in degrees.", - ) - - beta = property( - lambda self: self._beta, - lambda self, value: self.set_latt_parms(beta=value), - doc="The cell angle *beta* in degrees.", - ) - - gamma = property( - lambda self: self._gamma, - lambda self, value: self.set_latt_parms(gamma=value), - doc="The cell angle *gamma* in degrees.", - ) - - # read-only derived properties - - @property - def unitvolume(self): - """The unit cell volume when `a = b = c = 1`.""" - # Recalculate lattice cosines to ensure this is right - # even if ca, cb, cg data were not yet updated. - ca = cosd(self.alpha) - cb = cosd(self.beta) - cg = cosd(self.gamma) - rv = math.sqrt(1.0 + 2.0 * ca * cb * cg - ca * ca - cb * cb - cg * cg) - return rv - - volume = property( - lambda self: self.a * self.b * self.c * self.unitvolume, - doc="The unit cell volume.", - ) - - ar = property( - lambda self: self._ar, - doc="The cell length *a* of the reciprocal lattice.", - ) - - br = property( - lambda self: self._br, - doc="The cell length *b* of the reciprocal lattice.", - ) - - cr = property( - lambda self: self._cr, - doc="The cell length *c* of the reciprocal lattice.", - ) - - alphar = property( - lambda self: self._alphar, - doc="The reciprocal cell angle *alpha* in degrees.", - ) - - betar = property( - lambda self: self._betar, - doc="The reciprocal cell angle *beta* in degrees", - ) - - gammar = property( - lambda self: self._gammar, - doc="The reciprocal cell angle *gamma* in degrees", - ) - - ca = property(lambda self: self._ca, doc="The cosine of the cell angle *alpha*.") - - cb = property(lambda self: self._cb, doc="The cosine of the cell angle *beta*.") - - cg = property(lambda self: self._cg, doc="The cosine of the cell angle *gamma*.") - - sa = property(lambda self: self._sa, doc="The sine of the cell angle *alpha*.") - - sb = property(lambda self: self._sb, doc="The sine of the cell angle *beta*.") - - sg = property(lambda self: self._sg, doc="The sine of the cell angle *gamma*.") - - car = property( - lambda self: self._car, - doc="The cosine of the reciprocal angle *alpha*.", - ) - - cbr = property( - lambda self: self._cbr, - doc="The cosine of the reciprocal angle *beta*.", - ) - - cgr = property( - lambda self: self._cgr, - doc="The cosine of the reciprocal angle *gamma*.", - ) - - sar = property(lambda self: self._sar, doc="The sine of the reciprocal angle *alpha*.") - - sbr = property(lambda self: self._sbr, doc="The sine of the reciprocal angle *beta*.") - - sgr = property(lambda self: self._sgr, doc="The sine of the reciprocal angle *gamma*.") - - # done with properties --------------------------------------------------- - - def __init__( - self, - a=None, - b=None, - c=None, - alpha=None, - beta=None, - gamma=None, - baserot=None, - base=None, - ): - # build a set of provided argument names for later use. - apairs = ( - ("a", a), - ("b", b), - ("c", c), - ("alpha", alpha), - ("beta", beta), - ("gamma", gamma), - ("baserot", baserot), - ("base", base), - ) - argset = set(n for n, v in apairs if v is not None) - # initialize data members, they values will be set by setLatPar() - self._a = self._b = self._c = None - self._alpha = self._beta = self._gamma = None - self._ca = self._cb = self._cg = None - self._sa = self._sb = self._sg = None - self._ar = self._br = self._cr = None - self._alphar = self._betar = self._gammar = None - self._car = self._cbr = self._cgr = None - self._sar = self._sbr = self._sgr = None - self.baserot = numpy.identity(3) - self.base = self.recbase = None - self.normbase = self.recnormbase = None - # work out argument variants - # Lattice() - if not argset: - self.set_latt_parms(1.0, 1.0, 1.0, 90.0, 90.0, 90.0, baserot) - # Lattice(base=abc) - elif base is not None: - if len(argset) > 1: - raise ValueError("'base' must be the only argument.") - self.set_new_latt_base_vec(base) - # Lattice(lat) - elif isinstance(a, Lattice): - if len(argset) > 1: - raise ValueError("Lattice object must be the only argument.") - self.__dict__.update(a.__dict__) - # otherwise do default Lattice(a, b, c, alpha, beta, gamma) - else: - abcabg = ("a", "b", "c", "alpha", "beta", "gamma") - if not argset.issuperset(abcabg): - raise ValueError("Provide all 6 cell parameters.") - self.set_latt_parms(a, b, c, alpha, beta, gamma, baserot=baserot) - return - - def set_latt_parms( - self, - a=None, - b=None, - c=None, - alpha=None, - beta=None, - gamma=None, - baserot=None, - ): - """Set one or more lattice parameters. - - This updates all attributes that depend on the lattice parameters. - - Parameters - ---------- - a : float, Optional - The new value of the cell length *a*. - b : float, Optional - The new value of the cell length *b*. - c : float, Optional - The new value of the cell length *c*. - alpha : float, Optional - The new value of the cell angle *alpha* in degrees. - beta : float, Optional - The new value of the cell angle *beta* in degrees. - gamma : float, Optional - The new value of the cell angle *gamma* in degrees. - baserot : array_like, Optional - The new 3x3 rotation matrix of the base vectors with respect - to their standard setting in Cartesian coordinates. - - Note - ---- - Parameters that are not specified will keep their initial - values. - """ - if a is not None: - self._a = float(a) - if b is not None: - self._b = float(b) - if c is not None: - self._c = float(c) - if alpha is not None: - self._alpha = float(alpha) - if beta is not None: - self._beta = float(beta) - if gamma is not None: - self._gamma = float(gamma) - if baserot is not None: - self.baserot = numpy.array(baserot) - self._ca = ca = cosd(self.alpha) - self._cb = cb = cosd(self.beta) - self._cg = cg = cosd(self.gamma) - self._sa = sa = sind(self.alpha) - self._sb = sb = sind(self.beta) - self._sg = sg = sind(self.gamma) - # cache the unit volume value - Vunit = self.unitvolume - # reciprocal lattice - self._ar = ar = sa / (self.a * Vunit) - self._br = br = sb / (self.b * Vunit) - self._cr = cr = sg / (self.c * Vunit) - self._car = car = (cb * cg - ca) / (sb * sg) - self._cbr = cbr = (ca * cg - cb) / (sa * sg) - self._cgr = cgr = (ca * cb - cg) / (sa * sb) - self._sar = math.sqrt(1.0 - car * car) - self._sbr = math.sqrt(1.0 - cbr * cbr) - self._sgr = sgr = math.sqrt(1.0 - cgr * cgr) - self._alphar = math.degrees(math.acos(car)) - self._betar = math.degrees(math.acos(cbr)) - self._gammar = math.degrees(math.acos(cgr)) - # metrics tensor - self.metrics = numpy.array( - [ - [self.a * self.a, self.a * self.b * cg, self.a * self.c * cb], - [self.b * self.a * cg, self.b * self.b, self.b * self.c * ca], - [self.c * self.a * cb, self.c * self.b * ca, self.c * self.c], - ], - dtype=float, - ) - # standard Cartesian coordinates of lattice vectors - self.stdbase = numpy.array( - [ - [1.0 / ar, -cgr / sgr / ar, cb * self.a], - [0.0, self.b * sa, self.b * ca], - [0.0, 0.0, self.c], - ], - dtype=float, - ) - # Cartesian coordinates of lattice vectors - self.base = numpy.dot(self.stdbase, self.baserot) - self.recbase = numalg.inv(self.base) - # bases normalized to unit reciprocal vectors - self.normbase = self.base * [[ar], [br], [cr]] - self.recnormbase = self.recbase / [ar, br, cr] - self.isotropicunit = _isotropicunit(self.recnormbase) - return - - @deprecated(setLatPar_deprecation_msg) - def setLatPar( - self, - a=None, - b=None, - c=None, - alpha=None, - beta=None, - gamma=None, - baserot=None, - ): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Lattice.set_lat_par instead. - """ - return self.set_latt_parms(a, b, c, alpha, beta, gamma, baserot) - - @deprecated(setLatBase_deprecation_msg) - def setLatBase(self, base): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Lattice.set_lat_base instead. - """ - return self.set_new_latt_base_vec(base) - - def set_new_latt_base_vec(self, base): - """Set new base vectors for this lattice. - - This updates the cell lengths and cell angles according to the - new base. The `stdbase`, `baserot`, and `metrics` attributes - are also updated. - - Parameters - ---------- - base : array_like - The 3x3 matrix of row base vectors expressed - in Cartesian coordinates. - """ - self.base = numpy.array(base) - detbase = numalg.det(self.base) - if abs(detbase) < 1.0e-8: - emsg = "base vectors are degenerate" - raise LatticeError(emsg) - elif detbase < 0.0: - emsg = "base is not right-handed" - raise LatticeError(emsg) - self._a = a = math.sqrt(numpy.dot(self.base[0, :], self.base[0, :])) - self._b = b = math.sqrt(numpy.dot(self.base[1, :], self.base[1, :])) - self._c = c = math.sqrt(numpy.dot(self.base[2, :], self.base[2, :])) - self._ca = ca = numpy.dot(self.base[1, :], self.base[2, :]) / (b * c) - self._cb = cb = numpy.dot(self.base[0, :], self.base[2, :]) / (a * c) - self._cg = cg = numpy.dot(self.base[0, :], self.base[1, :]) / (a * b) - self._sa = sa = math.sqrt(1.0 - ca**2) - self._sb = sb = math.sqrt(1.0 - cb**2) - self._sg = sg = math.sqrt(1.0 - cg**2) - self._alpha = math.degrees(math.acos(ca)) - self._beta = math.degrees(math.acos(cb)) - self._gamma = math.degrees(math.acos(cg)) - # cache the unit volume value - Vunit = self.unitvolume - # reciprocal lattice - self._ar = ar = sa / (self.a * Vunit) - self._br = br = sb / (self.b * Vunit) - self._cr = cr = sg / (self.c * Vunit) - self._car = car = (cb * cg - ca) / (sb * sg) - self._cbr = cbr = (ca * cg - cb) / (sa * sg) - self._cgr = cgr = (ca * cb - cg) / (sa * sb) - self._sar = math.sqrt(1.0 - car**2) - self._sbr = math.sqrt(1.0 - cbr**2) - self._sgr = sgr = math.sqrt(1.0 - cgr**2) - self._alphar = math.degrees(math.acos(car)) - self._betar = math.degrees(math.acos(cbr)) - self._gammar = math.degrees(math.acos(cgr)) - # standard orientation of lattice vectors - self.stdbase = numpy.array( - [ - [1.0 / ar, -cgr / sgr / ar, cb * a], - [0.0, b * sa, b * ca], - [0.0, 0.0, c], - ], - dtype=float, - ) - # calculate unit cell rotation matrix, base = stdbase @ baserot - self.baserot = numpy.dot(numalg.inv(self.stdbase), self.base) - self.recbase = numalg.inv(self.base) - # bases normalized to unit reciprocal vectors - self.normbase = self.base * [[ar], [br], [cr]] - self.recnormbase = self.recbase / [ar, br, cr] - self.isotropicunit = _isotropicunit(self.recnormbase) - # update metrics tensor - self.metrics = numpy.array( - [ - [a * a, a * b * cg, a * c * cb], - [b * a * cg, b * b, b * c * ca], - [c * a * cb, c * b * ca, c * c], - ], - dtype=float, - ) - return - - @deprecated(abcABG_deprecation_msg) - def abcABG(self): - """'diffpy.structure.Lattice.abcABG' is deprecated and will be - removed in version 4.0.0. - - Please use 'diffpy.structure.Lattice.cell_parms' instead. - """ - return self.cell_parms() - - def cell_parms(self): - """Return the cell parameters in the standard setting. - - Returns - ------- - tuple : - A tuple of ``(a, b, c, alpha, beta, gamma)``. - """ - rv = (self.a, self.b, self.c, self.alpha, self.beta, self.gamma) - return rv - - def reciprocal(self): - """Return the reciprocal lattice of the current lattice. - - Returns - ------- - Lattice - The reciprocal lattice of the current lattice. - """ - rv = Lattice(base=numpy.transpose(self.recbase)) - return rv - - def cartesian(self, u): - """Transform lattice vector to Cartesian coordinates. - - Parameters - ---------- - u : array_like - Vector of lattice coordinates or an Nx3 array - of lattice vectors. - - Returns - ------- - rc : numpy.ndarray - Cartesian coordinates of the *u* vector. - """ - rc = numpy.dot(u, self.base) - return rc - - def fractional(self, rc): - """Transform Cartesian vector to fractional lattice coordinates. - - Parameters - ---------- - rc : array_like - A vector of Cartesian coordinates or an Nx3 array of - Cartesian vectors. - - Returns - ------- - u : numpy.ndarray - Fractional coordinates of the Cartesian vector *rc*. - """ - u = numpy.dot(rc, self.recbase) - return u - - def dot(self, u, v): - """Calculate dot product of 2 lattice vectors. - - Parameters - ---------- - u : array_like - The first lattice vector or an Nx3 array. - v : array_like - The second lattice vector or an array of - the same shape as *u*. - - Returns - ------- - float or numpy.ndarray - The dot product of lattice vectors *u*, *v*. - """ - dp = (u * numpy.dot(v, self.metrics)).sum(axis=-1) - return dp - - def norm(self, xyz): - """Calculate norm of a lattice vector. - - Parameters - ---------- - xyz : array_like - A vector or an Nx3 array of fractional coordinates. - - Returns - ------- - float or numpy.ndarray - The magnitude of the lattice vector *xyz*. - """ - # this is a few percent faster than sqrt(dot(u, u)). - return numpy.sqrt((self.cartesian(xyz) ** 2).sum(axis=-1)) - - def rnorm(self, hkl): - """Calculate norm of a reciprocal vector. - - Parameters - ---------- - hkl : array_like - A vector or an Nx3 array of reciprocal coordinates. - - Returns - ------- - float or numpy.ndarray - The magnitude of the reciprocal vector *hkl*. - """ - hklcartn = numpy.dot(hkl, self.recbase.T) - return numpy.sqrt((hklcartn**2).sum(axis=-1)) - - def dist(self, u, v): - """Calculate distance between 2 points in lattice coordinates. - - Parameters - ---------- - u : array_like - A vector or an Nx3 matrix of fractional coordinates. - v : numpy.ndarray - A vector or an Nx3 matrix of fractional coordinates. - - Note - ---- - *u* and *v* must be of the same shape when matrices. - - Returns - ------- - float or numpy.ndarray - The distance between lattice points *u* and *v*. - """ - duv = numpy.asarray(u) - v - return self.norm(duv) - - def angle(self, u, v): - """Calculate angle between 2 lattice vectors in degrees. - - Parameters - ---------- - u : array_like - The first lattice vector. - v : array_like - The second lattice vector. - - Returns - ------- - float - The angle between lattice vectors *u* and *v* in degrees. - """ - ca = self.dot(u, v) / (self.norm(u) * self.norm(v)) - # avoid round-off errors that would make abs(ca) greater than 1 - if numpy.isscalar(ca): - ca = max(min(ca, 1), -1) - rv = math.degrees(math.acos(ca)) - else: - ca[ca < -1] = -1 - ca[ca > +1] = +1 - rv = numpy.degrees(numpy.arccos(ca)) - return rv - - def isanisotropic(self, umx): - """True if displacement parameter matrix is anisotropic. - - This checks if the specified matrix of anisotropic displacement - parameters (ADP) differs from isotropic values for this lattice - by more than a small round-off error. - - Parameters - ---------- - umx : array_like - The 3x3 matrix of displacement parameters. - - Returns - ------- - bool - True when *umx* is anisotropic by more than a round-off error. - """ - umx = numpy.asarray(umx) - utr = numpy.trace(umx) / umx.shape[0] - udmax = numpy.fabs(umx - utr * self.isotropicunit).max() - rv = udmax > self._epsilon - return rv - - def __repr__(self): - """String representation of this lattice.""" - I3 = numpy.identity(3, dtype=float) - rotbaseI3diff = max(numpy.reshape(numpy.fabs(self.baserot - I3), 9)) - cartlatpar = numpy.array([1.0, 1.0, 1.0, 90.0, 90.0, 90.0]) - latpardiff = cartlatpar - self.abcABG() - if rotbaseI3diff > self._epsilon: - s = "Lattice(base=%r)" % self.base - elif numpy.fabs(latpardiff).max() < self._epsilon: - s = "Lattice()" - else: - s = "Lattice(a=%g, b=%g, c=%g, alpha=%g, beta=%g, gamma=%g)" % self.abcABG() - return s - - -# End of class Lattice - -# Local Helpers -------------------------------------------------------------- - - -def _isotropicunit(recnormbase): - """Calculate tensor of unit isotropic displacement parameters. - - Parameters - ---------- - recnormbase : numpy.ndarray - The inverse of normalized base vectors of some lattice. - - Returns - ------- - numpy.ndarray - The 3x3 matrix of displacement parameters corresponding to - a unit isotropic displacements. - """ - isounit = numpy.dot(recnormbase.T, recnormbase) - # ensure there are no round-off deviations on the diagonal - isounit[0, 0] = 1 - isounit[1, 1] = 1 - isounit[2, 2] = 1 - return isounit - - -# Module Constants ----------------------------------------------------------- - -cartesian = Lattice() diff --git a/src/diffpy/structure/mmlibspacegroups.py b/src/diffpy/structure/mmlibspacegroups.py deleted file mode 100644 index c3507f92..00000000 --- a/src/diffpy/structure/mmlibspacegroups.py +++ /dev/null @@ -1,8169 +0,0 @@ -#!/usr/bin/env python -# Copyright 2002 by PyMMLib Development Group, http://pymmlib.sourceforge.net/ -# This code is part of the PyMMLib distribution and governed by -# its license.Please see the LICENSE_pymmlib file that should have been -# included as part of this package. -"""Space groups defined as a part of the pymmlib.""" - -from diffpy.structure.spacegroupmod import ( - Rot_mX_mXY_mZ, - Rot_mX_mXY_Z, - Rot_mX_mY_mZ, - Rot_mX_mY_Z, - Rot_mX_mZ_mY, - Rot_mX_mZ_Y, - Rot_mX_Y_mZ, - Rot_mX_Y_Z, - Rot_mX_Z_mY, - Rot_mX_Z_Y, - Rot_mXY_mX_mZ, - Rot_mXY_mX_Z, - Rot_mXY_Y_mZ, - Rot_mXY_Y_Z, - Rot_mY_mX_mZ, - Rot_mY_mX_Z, - Rot_mY_mZ_mX, - Rot_mY_mZ_X, - Rot_mY_X_mZ, - Rot_mY_X_Z, - Rot_mY_XmY_mZ, - Rot_mY_XmY_Z, - Rot_mY_Z_mX, - Rot_mY_Z_X, - Rot_mZ_mX_mY, - Rot_mZ_mX_Y, - Rot_mZ_mY_mX, - Rot_mZ_mY_X, - Rot_mZ_X_mY, - Rot_mZ_X_Y, - Rot_mZ_Y_mX, - Rot_mZ_Y_X, - Rot_X_mY_mZ, - Rot_X_mY_Z, - Rot_X_mZ_mY, - Rot_X_mZ_Y, - Rot_X_XmY_mZ, - Rot_X_XmY_Z, - Rot_X_Y_mZ, - Rot_X_Y_Z, - Rot_X_Z_mY, - Rot_X_Z_Y, - Rot_XmY_mY_mZ, - Rot_XmY_mY_Z, - Rot_XmY_X_mZ, - Rot_XmY_X_Z, - Rot_Y_mX_mZ, - Rot_Y_mX_Z, - Rot_Y_mXY_mZ, - Rot_Y_mXY_Z, - Rot_Y_mZ_mX, - Rot_Y_mZ_X, - Rot_Y_X_mZ, - Rot_Y_X_Z, - Rot_Y_Z_mX, - Rot_Y_Z_X, - Rot_Z_mX_mY, - Rot_Z_mX_Y, - Rot_Z_mY_mX, - Rot_Z_mY_X, - Rot_Z_X_mY, - Rot_Z_X_Y, - Rot_Z_Y_mX, - Rot_Z_Y_X, - SpaceGroup, - SymOp, - Tr_0_0_0, - Tr_0_0_12, - Tr_0_0_13, - Tr_0_0_14, - Tr_0_0_16, - Tr_0_0_23, - Tr_0_0_34, - Tr_0_0_56, - Tr_0_12_0, - Tr_0_12_12, - Tr_0_12_14, - Tr_0_12_34, - Tr_12_0_0, - Tr_12_0_12, - Tr_12_0_14, - Tr_12_0_34, - Tr_12_12_0, - Tr_12_12_12, - Tr_12_12_14, - Tr_12_12_34, - Tr_13_23_16, - Tr_13_23_23, - Tr_14_14_14, - Tr_14_14_34, - Tr_14_34_14, - Tr_14_34_34, - Tr_23_13_13, - Tr_23_13_56, - Tr_34_14_14, - Tr_34_14_34, - Tr_34_34_14, - Tr_34_34_34, -) - -# spacegroup definitions -sg1 = SpaceGroup( - number=1, - num_sym_equiv=1, - num_primitive_sym_equiv=1, - short_name="P1", - point_group_name="PG1", - crystal_system="TRICLINIC", - pdb_name="P 1", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0)], -) - -sg2 = SpaceGroup( - number=2, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P-1", - point_group_name="PG1bar", - crystal_system="TRICLINIC", - pdb_name="P -1", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_mX_mY_mZ, Tr_0_0_0)], -) - -sg3 = SpaceGroup( - number=3, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P2", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="P 1 2 1", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_mX_Y_mZ, Tr_0_0_0)], -) - -sg4 = SpaceGroup( - number=4, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P21", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="P 1 21 1", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_mX_Y_mZ, Tr_0_12_0)], -) - -sg5 = SpaceGroup( - number=5, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="C2", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="C 1 2 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - ], -) - -sg6 = SpaceGroup( - number=6, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="Pm", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P 1 m 1", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_X_mY_Z, Tr_0_0_0)], -) - -sg7 = SpaceGroup( - number=7, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="Pc", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P 1 c 1", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_X_mY_Z, Tr_0_0_12)], -) - -sg8 = SpaceGroup( - number=8, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="Cm", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="C 1 m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - ], -) - -sg9 = SpaceGroup( - number=9, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="Cc", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="C 1 c 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg10 = SpaceGroup( - number=10, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2/m", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 2/m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - ], -) - -sg11 = SpaceGroup( - number=11, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21/m", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 21/m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - ], -) - -sg12 = SpaceGroup( - number=12, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="C2/m", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="C 1 2/m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - ], -) - -sg13 = SpaceGroup( - number=13, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2/c", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 2/c 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - ], -) - -sg14 = SpaceGroup( - number=14, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21/c", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 21/c 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg15 = SpaceGroup( - number=15, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="C2/c", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="C 1 2/c 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg16 = SpaceGroup( - number=16, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P222", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - ], -) - -sg17 = SpaceGroup( - number=17, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2221", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 2 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - ], -) - -sg18 = SpaceGroup( - number=18, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21212", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 21 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - ], -) - -sg19 = SpaceGroup( - number=19, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P212121", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 21 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - ], -) - -sg20 = SpaceGroup( - number=20, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="C2221", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2 2 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - ], -) - -sg21 = SpaceGroup( - number=21, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="C222", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - ], -) - -sg22 = SpaceGroup( - number=22, - num_sym_equiv=16, - num_primitive_sym_equiv=4, - short_name="F222", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="F 2 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - ], -) - -sg23 = SpaceGroup( - number=23, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="I222", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="I 2 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - ], -) - -sg24 = SpaceGroup( - number=24, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="I212121", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="I 21 21 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - ], -) - -sg25 = SpaceGroup( - number=25, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pmm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P m m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - ], -) - -sg26 = SpaceGroup( - number=26, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pmc21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P m c 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - ], -) - -sg27 = SpaceGroup( - number=27, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pcc2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P c c 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - ], -) - -sg28 = SpaceGroup( - number=28, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pma2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P m a 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - ], -) - -sg29 = SpaceGroup( - number=29, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pca21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P c a 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg30 = SpaceGroup( - number=30, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pnc2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P n c 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg31 = SpaceGroup( - number=31, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pmn21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P m n 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - ], -) - -sg32 = SpaceGroup( - number=32, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pba2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P b a 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg33 = SpaceGroup( - number=33, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pna21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P n a 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg34 = SpaceGroup( - number=34, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pnn2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P n n 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg35 = SpaceGroup( - number=35, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Cmm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C m m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg36 = SpaceGroup( - number=36, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Cmc21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C m c 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg37 = SpaceGroup( - number=37, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Ccc2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C c c 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg38 = SpaceGroup( - number=38, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Amm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A m m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg39 = SpaceGroup( - number=39, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Abm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A b m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - ], -) - -sg40 = SpaceGroup( - number=40, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Ama2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A m a 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg41 = SpaceGroup( - number=41, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Aba2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A b a 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg42 = SpaceGroup( - number=42, - num_sym_equiv=16, - num_primitive_sym_equiv=4, - short_name="Fmm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="F m m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg43 = SpaceGroup( - number=43, - num_sym_equiv=16, - num_primitive_sym_equiv=4, - short_name="Fdd2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="F d d 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_14_14_14), - SymOp(Rot_mX_Y_Z, Tr_14_14_14), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_14_34_34), - SymOp(Rot_mX_Y_Z, Tr_14_34_34), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_34_14_34), - SymOp(Rot_mX_Y_Z, Tr_34_14_34), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_34_34_14), - SymOp(Rot_mX_Y_Z, Tr_34_34_14), - ], -) - -sg44 = SpaceGroup( - number=44, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Imm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I m m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg45 = SpaceGroup( - number=45, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Iba2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I b a 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - ], -) - -sg46 = SpaceGroup( - number=46, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="Ima2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I m a 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg47 = SpaceGroup( - number=47, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2/m 2/m 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - ], -) - -sg48 = SpaceGroup( - number=48, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnnn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2/n 2/n 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg49 = SpaceGroup( - number=49, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pccm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2/c 2/c 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - ], -) - -sg50 = SpaceGroup( - number=50, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pban", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2/b 2/a 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg51 = SpaceGroup( - number=51, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/m 2/m 2/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - ], -) - -sg52 = SpaceGroup( - number=52, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnna", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2/n 21/n 2/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg53 = SpaceGroup( - number=53, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmna", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2/m 2/n 21/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - ], -) - -sg54 = SpaceGroup( - number=54, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcca", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/c 2/c 2/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg55 = SpaceGroup( - number=55, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/b 21/a 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg56 = SpaceGroup( - number=56, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pccn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/c 21/c 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg57 = SpaceGroup( - number=57, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbcm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2/b 21/c 21/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - ], -) - -sg58 = SpaceGroup( - number=58, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnnm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/n 21/n 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg59 = SpaceGroup( - number=59, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmmn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/m 21/m 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - ], -) - -sg60 = SpaceGroup( - number=60, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbcn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/b 2/c 21/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg61 = SpaceGroup( - number=61, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbca", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/b 21/c 21/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg62 = SpaceGroup( - number=62, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/n 21/m 21/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg63 = SpaceGroup( - number=63, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Cmcm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2/m 2/c 21/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg64 = SpaceGroup( - number=64, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Cmca", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2/m 2/c 21/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg65 = SpaceGroup( - number=65, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Cmmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2/m 2/m 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg66 = SpaceGroup( - number=66, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Cccm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2/c 2/c 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg67 = SpaceGroup( - number=67, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Cmma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2/m 2/m 2/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg68 = SpaceGroup( - number=68, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Ccca", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2/c 2/c 2/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg69 = SpaceGroup( - number=69, - num_sym_equiv=32, - num_primitive_sym_equiv=8, - short_name="Fmmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="F 2/m 2/m 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg70 = SpaceGroup( - number=70, - num_sym_equiv=32, - num_primitive_sym_equiv=8, - short_name="Fddd", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="F 2/d 2/d 2/d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_14_14_14), - SymOp(Rot_X_Y_mZ, Tr_14_14_14), - SymOp(Rot_X_mY_Z, Tr_14_14_14), - SymOp(Rot_mX_Y_Z, Tr_14_14_14), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_14_34_34), - SymOp(Rot_X_Y_mZ, Tr_14_34_34), - SymOp(Rot_X_mY_Z, Tr_14_34_34), - SymOp(Rot_mX_Y_Z, Tr_14_34_34), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_34_14_34), - SymOp(Rot_X_Y_mZ, Tr_34_14_34), - SymOp(Rot_X_mY_Z, Tr_34_14_34), - SymOp(Rot_mX_Y_Z, Tr_34_14_34), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_34_34_14), - SymOp(Rot_X_Y_mZ, Tr_34_34_14), - SymOp(Rot_X_mY_Z, Tr_34_34_14), - SymOp(Rot_mX_Y_Z, Tr_34_34_14), - ], -) - -sg71 = SpaceGroup( - number=71, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Immm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I 2/m 2/m 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg72 = SpaceGroup( - number=72, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Ibam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I 2/b 2/a 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - ], -) - -sg73 = SpaceGroup( - number=73, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Ibca", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I 21/b 21/c 21/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - ], -) - -sg74 = SpaceGroup( - number=74, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="Imma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I 21/m 21/m 21/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg75 = SpaceGroup( - number=75, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P4", - point_group_name="PG4", - crystal_system="TETRAGONAL", - pdb_name="P 4", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - ], -) - -sg76 = SpaceGroup( - number=76, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P41", - point_group_name="PG4", - crystal_system="TETRAGONAL", - pdb_name="P 41", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mY_X_Z, Tr_0_0_14), - SymOp(Rot_Y_mX_Z, Tr_0_0_34), - ], -) - -sg77 = SpaceGroup( - number=77, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P42", - point_group_name="PG4", - crystal_system="TETRAGONAL", - pdb_name="P 42", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - ], -) - -sg78 = SpaceGroup( - number=78, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P43", - point_group_name="PG4", - crystal_system="TETRAGONAL", - pdb_name="P 43", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mY_X_Z, Tr_0_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_0_14), - ], -) - -sg79 = SpaceGroup( - number=79, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="I4", - point_group_name="PG4", - crystal_system="TETRAGONAL", - pdb_name="I 4", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - ], -) - -sg80 = SpaceGroup( - number=80, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="I41", - point_group_name="PG4", - crystal_system="TETRAGONAL", - pdb_name="I 41", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_14), - SymOp(Rot_Y_mX_Z, Tr_12_0_34), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_12_14), - ], -) - -sg81 = SpaceGroup( - number=81, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P-4", - point_group_name="PG4bar", - crystal_system="TETRAGONAL", - pdb_name="P -4", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - ], -) - -sg82 = SpaceGroup( - number=82, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="I-4", - point_group_name="PG4bar", - crystal_system="TETRAGONAL", - pdb_name="I -4", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - ], -) - -sg83 = SpaceGroup( - number=83, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4/m", - point_group_name="PG4/m", - crystal_system="TETRAGONAL", - pdb_name="P 4/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - ], -) - -sg84 = SpaceGroup( - number=84, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P42/m", - point_group_name="PG4/m", - crystal_system="TETRAGONAL", - pdb_name="P 42/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_12), - ], -) - -sg85 = SpaceGroup( - number=85, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4/n", - point_group_name="PG4/m", - crystal_system="TETRAGONAL", - pdb_name="P 4/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_0), - SymOp(Rot_Y_mX_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - ], -) - -sg86 = SpaceGroup( - number=86, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P42/n", - point_group_name="PG4/m", - crystal_system="TETRAGONAL", - pdb_name="P 42/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - ], -) - -sg87 = SpaceGroup( - number=87, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I4/m", - point_group_name="PG4/m", - crystal_system="TETRAGONAL", - pdb_name="I 4/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - ], -) - -sg88 = SpaceGroup( - number=88, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I41/a", - point_group_name="PG4/m", - crystal_system="TETRAGONAL", - pdb_name="I 41/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_14), - SymOp(Rot_Y_mX_Z, Tr_12_0_34), - SymOp(Rot_mX_mY_mZ, Tr_0_12_14), - SymOp(Rot_X_Y_mZ, Tr_12_0_34), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_12_14), - SymOp(Rot_mX_mY_mZ, Tr_12_0_34), - SymOp(Rot_X_Y_mZ, Tr_0_12_14), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - ], -) - -sg89 = SpaceGroup( - number=89, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P422", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 4 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - ], -) - -sg90 = SpaceGroup( - number=90, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4212", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 4 21 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_0), - SymOp(Rot_Y_mX_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - ], -) - -sg91 = SpaceGroup( - number=91, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4122", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 41 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mY_X_Z, Tr_0_0_14), - SymOp(Rot_Y_mX_Z, Tr_0_0_34), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_34), - SymOp(Rot_mY_mX_mZ, Tr_0_0_14), - ], -) - -sg92 = SpaceGroup( - number=92, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P41212", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 41 21 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mY_X_Z, Tr_12_12_14), - SymOp(Rot_Y_mX_Z, Tr_12_12_34), - SymOp(Rot_mX_Y_mZ, Tr_12_12_14), - SymOp(Rot_X_mY_mZ, Tr_12_12_34), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - ], -) - -sg93 = SpaceGroup( - number=93, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4222", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 42 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - ], -) - -sg94 = SpaceGroup( - number=94, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P42212", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 42 21 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - ], -) - -sg95 = SpaceGroup( - number=95, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4322", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 43 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mY_X_Z, Tr_0_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_0_14), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_14), - SymOp(Rot_mY_mX_mZ, Tr_0_0_34), - ], -) - -sg96 = SpaceGroup( - number=96, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P43212", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 43 21 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mY_X_Z, Tr_12_12_34), - SymOp(Rot_Y_mX_Z, Tr_12_12_14), - SymOp(Rot_mX_Y_mZ, Tr_12_12_34), - SymOp(Rot_X_mY_mZ, Tr_12_12_14), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - ], -) - -sg97 = SpaceGroup( - number=97, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I422", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="I 4 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - ], -) - -sg98 = SpaceGroup( - number=98, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I4122", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="I 41 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_14), - SymOp(Rot_Y_mX_Z, Tr_12_0_34), - SymOp(Rot_mX_Y_mZ, Tr_12_0_34), - SymOp(Rot_X_mY_mZ, Tr_0_12_14), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_12_14), - SymOp(Rot_mX_Y_mZ, Tr_0_12_14), - SymOp(Rot_X_mY_mZ, Tr_12_0_34), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - ], -) - -sg99 = SpaceGroup( - number=99, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4mm", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="P 4 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - ], -) - -sg100 = SpaceGroup( - number=100, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4bm", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="P 4 b m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - ], -) - -sg101 = SpaceGroup( - number=101, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P42cm", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="P 42 c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - ], -) - -sg102 = SpaceGroup( - number=102, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P42nm", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="P 42 n m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - ], -) - -sg103 = SpaceGroup( - number=103, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4cc", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="P 4 c c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - ], -) - -sg104 = SpaceGroup( - number=104, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P4nc", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="P 4 n c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg105 = SpaceGroup( - number=105, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P42mc", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="P 42 m c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - ], -) - -sg106 = SpaceGroup( - number=106, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P42bc", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="P 42 b c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg107 = SpaceGroup( - number=107, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I4mm", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="I 4 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg108 = SpaceGroup( - number=108, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I4cm", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="I 4 c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - ], -) - -sg109 = SpaceGroup( - number=109, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I41md", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="I 41 m d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_14), - SymOp(Rot_Y_mX_Z, Tr_12_0_34), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_0_12_14), - SymOp(Rot_Y_X_Z, Tr_12_0_34), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_12_14), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_12_0_34), - SymOp(Rot_Y_X_Z, Tr_0_12_14), - ], -) - -sg110 = SpaceGroup( - number=110, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I41cd", - point_group_name="PG4mm", - crystal_system="TETRAGONAL", - pdb_name="I 41 c d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_14), - SymOp(Rot_Y_mX_Z, Tr_12_0_34), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_0_12_34), - SymOp(Rot_Y_X_Z, Tr_12_0_14), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_12_14), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_12_0_14), - SymOp(Rot_Y_X_Z, Tr_0_12_34), - ], -) - -sg111 = SpaceGroup( - number=111, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P-42m", - point_group_name="PG4bar2m", - crystal_system="TETRAGONAL", - pdb_name="P -4 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - ], -) - -sg112 = SpaceGroup( - number=112, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P-42c", - point_group_name="PG4bar2m", - crystal_system="TETRAGONAL", - pdb_name="P -4 2 c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - ], -) - -sg113 = SpaceGroup( - number=113, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P-421m", - point_group_name="PG4bar2m", - crystal_system="TETRAGONAL", - pdb_name="P -4 21 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - ], -) - -sg114 = SpaceGroup( - number=114, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P-421c", - point_group_name="PG4bar2m", - crystal_system="TETRAGONAL", - pdb_name="P -4 21 c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg115 = SpaceGroup( - number=115, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P-4m2", - point_group_name="PG4barm2", - crystal_system="TETRAGONAL", - pdb_name="P -4 m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - ], -) - -sg116 = SpaceGroup( - number=116, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P-4c2", - point_group_name="PG4barm2", - crystal_system="TETRAGONAL", - pdb_name="P -4 c 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - ], -) - -sg117 = SpaceGroup( - number=117, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P-4b2", - point_group_name="PG4barm2", - crystal_system="TETRAGONAL", - pdb_name="P -4 b 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_0), - ], -) - -sg118 = SpaceGroup( - number=118, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P-4n2", - point_group_name="PG4barm2", - crystal_system="TETRAGONAL", - pdb_name="P -4 n 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - ], -) - -sg119 = SpaceGroup( - number=119, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I-4m2", - point_group_name="PG4barm2", - crystal_system="TETRAGONAL", - pdb_name="I -4 m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - ], -) - -sg120 = SpaceGroup( - number=120, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I-4c2", - point_group_name="PG4barm2", - crystal_system="TETRAGONAL", - pdb_name="I -4 c 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_0), - ], -) - -sg121 = SpaceGroup( - number=121, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I-42m", - point_group_name="PG4bar2m", - crystal_system="TETRAGONAL", - pdb_name="I -4 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg122 = SpaceGroup( - number=122, - num_sym_equiv=16, - num_primitive_sym_equiv=8, - short_name="I-42d", - point_group_name="PG4bar2m", - crystal_system="TETRAGONAL", - pdb_name="I -4 2 d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_34), - SymOp(Rot_X_mY_mZ, Tr_12_0_34), - SymOp(Rot_mY_mX_Z, Tr_12_0_34), - SymOp(Rot_Y_X_Z, Tr_12_0_34), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_14), - SymOp(Rot_X_mY_mZ, Tr_0_12_14), - SymOp(Rot_mY_mX_Z, Tr_0_12_14), - SymOp(Rot_Y_X_Z, Tr_0_12_14), - ], -) - -sg123 = SpaceGroup( - number=123, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P4/mmm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 4/m 2/m 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - ], -) - -sg124 = SpaceGroup( - number=124, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P4/mcc", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 4/m 2/c 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - ], -) - -sg125 = SpaceGroup( - number=125, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P4/nbm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 4/n 2/b 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_Y_mX_mZ, Tr_12_12_0), - SymOp(Rot_mY_X_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - ], -) - -sg126 = SpaceGroup( - number=126, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P4/nnc", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 4/n 2/n 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg127 = SpaceGroup( - number=127, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P4/mbm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 4/m 21/b 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - ], -) - -sg128 = SpaceGroup( - number=128, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P4/mnc", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 4/m 21/n 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg129 = SpaceGroup( - number=129, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P4/nmm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 4/n 21/m 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_0), - SymOp(Rot_Y_mX_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - ], -) - -sg130 = SpaceGroup( - number=130, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P4/ncc", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 4/n 2/c 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_0), - SymOp(Rot_Y_mX_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg131 = SpaceGroup( - number=131, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P42/mmc", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 42/m 2/m 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - ], -) - -sg132 = SpaceGroup( - number=132, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P42/mcm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 42/m 2/c 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - ], -) - -sg133 = SpaceGroup( - number=133, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P42/nbc", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 42/n 2/b 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - ], -) - -sg134 = SpaceGroup( - number=134, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P42/nnm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 42/n 2/n 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - ], -) - -sg135 = SpaceGroup( - number=135, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P42/mbc", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 42/m 21/b 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg136 = SpaceGroup( - number=136, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P42/mnm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 42/m 21/n 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - ], -) - -sg137 = SpaceGroup( - number=137, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P42/nmc", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 42/n 21/m 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg138 = SpaceGroup( - number=138, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="P42/ncm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="P 42/n 21/c 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - ], -) - -sg139 = SpaceGroup( - number=139, - num_sym_equiv=32, - num_primitive_sym_equiv=16, - short_name="I4/mmm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="I 4/m 2/m 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - ], -) - -sg140 = SpaceGroup( - number=140, - num_sym_equiv=32, - num_primitive_sym_equiv=16, - short_name="I4/mcm", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="I 4/m 2/c 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - ], -) - -sg141 = SpaceGroup( - number=141, - num_sym_equiv=32, - num_primitive_sym_equiv=16, - short_name="I41/amd", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="I 41/a 2/m 2/d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_14), - SymOp(Rot_Y_mX_Z, Tr_12_0_34), - SymOp(Rot_mX_Y_mZ, Tr_12_0_34), - SymOp(Rot_X_mY_mZ, Tr_0_12_14), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_12_14), - SymOp(Rot_X_Y_mZ, Tr_12_0_34), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_12_0_34), - SymOp(Rot_Y_X_Z, Tr_0_12_14), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_12_14), - SymOp(Rot_mX_Y_mZ, Tr_0_12_14), - SymOp(Rot_X_mY_mZ, Tr_12_0_34), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_34), - SymOp(Rot_X_Y_mZ, Tr_0_12_14), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_0_12_14), - SymOp(Rot_Y_X_Z, Tr_12_0_34), - ], -) - -sg142 = SpaceGroup( - number=142, - num_sym_equiv=32, - num_primitive_sym_equiv=16, - short_name="I41/acd", - point_group_name="PG4/mmm", - crystal_system="TETRAGONAL", - pdb_name="I 41/a 2/c 2/d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_14), - SymOp(Rot_Y_mX_Z, Tr_12_0_34), - SymOp(Rot_mX_Y_mZ, Tr_12_0_14), - SymOp(Rot_X_mY_mZ, Tr_0_12_34), - SymOp(Rot_Y_X_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_14), - SymOp(Rot_X_Y_mZ, Tr_12_0_34), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_12_0_14), - SymOp(Rot_Y_X_Z, Tr_0_12_34), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_12_0_34), - SymOp(Rot_Y_mX_Z, Tr_0_12_14), - SymOp(Rot_mX_Y_mZ, Tr_0_12_34), - SymOp(Rot_X_mY_mZ, Tr_12_0_14), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_0_34), - SymOp(Rot_X_Y_mZ, Tr_0_12_14), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_0_12_34), - SymOp(Rot_Y_X_Z, Tr_12_0_14), - ], -) - -sg143 = SpaceGroup( - number=143, - num_sym_equiv=3, - num_primitive_sym_equiv=3, - short_name="P3", - point_group_name="PG3", - crystal_system="TRIGONAL", - pdb_name="P 3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - ], -) - -sg144 = SpaceGroup( - number=144, - num_sym_equiv=3, - num_primitive_sym_equiv=3, - short_name="P31", - point_group_name="PG3", - crystal_system="TRIGONAL", - pdb_name="P 31", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_13), - SymOp(Rot_mXY_mX_Z, Tr_0_0_23), - ], -) - -sg145 = SpaceGroup( - number=145, - num_sym_equiv=3, - num_primitive_sym_equiv=3, - short_name="P32", - point_group_name="PG3", - crystal_system="TRIGONAL", - pdb_name="P 32", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_23), - SymOp(Rot_mXY_mX_Z, Tr_0_0_13), - ], -) - -sg146 = SpaceGroup( - number=146, - num_sym_equiv=9, - num_primitive_sym_equiv=3, - short_name="H3", - point_group_name="PG3", - crystal_system="TRIGONAL", - pdb_name="H 3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_23_13_13), - SymOp(Rot_mY_XmY_Z, Tr_23_13_13), - SymOp(Rot_mXY_mX_Z, Tr_23_13_13), - SymOp(Rot_X_Y_Z, Tr_13_23_23), - SymOp(Rot_mY_XmY_Z, Tr_13_23_23), - SymOp(Rot_mXY_mX_Z, Tr_13_23_23), - ], -) - -sg1146 = SpaceGroup( - number=1146, - num_sym_equiv=3, - num_primitive_sym_equiv=3, - short_name="R3", - point_group_name="PG3", - crystal_system="TRIGONAL", - pdb_name="R 3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - ], -) - -sg147 = SpaceGroup( - number=147, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P-3", - point_group_name="PG3bar", - crystal_system="TRIGONAL", - pdb_name="P -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - ], -) - -sg148 = SpaceGroup( - number=148, - num_sym_equiv=18, - num_primitive_sym_equiv=6, - short_name="H-3", - point_group_name="PG3bar", - crystal_system="TRIGONAL", - pdb_name="H -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_23_13_13), - SymOp(Rot_mY_XmY_Z, Tr_23_13_13), - SymOp(Rot_mXY_mX_Z, Tr_23_13_13), - SymOp(Rot_mX_mY_mZ, Tr_23_13_13), - SymOp(Rot_Y_mXY_mZ, Tr_23_13_13), - SymOp(Rot_XmY_X_mZ, Tr_23_13_13), - SymOp(Rot_X_Y_Z, Tr_13_23_23), - SymOp(Rot_mY_XmY_Z, Tr_13_23_23), - SymOp(Rot_mXY_mX_Z, Tr_13_23_23), - SymOp(Rot_mX_mY_mZ, Tr_13_23_23), - SymOp(Rot_Y_mXY_mZ, Tr_13_23_23), - SymOp(Rot_XmY_X_mZ, Tr_13_23_23), - ], -) - -sg1148 = SpaceGroup( - number=1148, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="R-3", - point_group_name="PG3bar", - crystal_system="TRIGONAL", - pdb_name="R -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - ], -) - -sg149 = SpaceGroup( - number=149, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P312", - point_group_name="PG312", - crystal_system="TRIGONAL", - pdb_name="P 3 1 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - ], -) - -sg150 = SpaceGroup( - number=150, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P321", - point_group_name="PG321", - crystal_system="TRIGONAL", - pdb_name="P 3 2 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - ], -) - -sg151 = SpaceGroup( - number=151, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P3112", - point_group_name="PG312", - crystal_system="TRIGONAL", - pdb_name="P 31 1 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_13), - SymOp(Rot_mXY_mX_Z, Tr_0_0_23), - SymOp(Rot_mY_mX_mZ, Tr_0_0_23), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_13), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - ], -) - -sg152 = SpaceGroup( - number=152, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P3121", - point_group_name="PG321", - crystal_system="TRIGONAL", - pdb_name="P 31 2 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_13), - SymOp(Rot_mXY_mX_Z, Tr_0_0_23), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_23), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_13), - ], -) - -sg153 = SpaceGroup( - number=153, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P3212", - point_group_name="PG312", - crystal_system="TRIGONAL", - pdb_name="P 32 1 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_23), - SymOp(Rot_mXY_mX_Z, Tr_0_0_13), - SymOp(Rot_mY_mX_mZ, Tr_0_0_13), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_23), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - ], -) - -sg154 = SpaceGroup( - number=154, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P3221", - point_group_name="PG321", - crystal_system="TRIGONAL", - pdb_name="P 32 2 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_23), - SymOp(Rot_mXY_mX_Z, Tr_0_0_13), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_13), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_23), - ], -) - -sg155 = SpaceGroup( - number=155, - num_sym_equiv=18, - num_primitive_sym_equiv=6, - short_name="H32", - point_group_name="PG321", - crystal_system="TRIGONAL", - pdb_name="H 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_23_13_13), - SymOp(Rot_mY_XmY_Z, Tr_23_13_13), - SymOp(Rot_mXY_mX_Z, Tr_23_13_13), - SymOp(Rot_Y_X_mZ, Tr_23_13_13), - SymOp(Rot_XmY_mY_mZ, Tr_23_13_13), - SymOp(Rot_mX_mXY_mZ, Tr_23_13_13), - SymOp(Rot_X_Y_Z, Tr_13_23_23), - SymOp(Rot_mY_XmY_Z, Tr_13_23_23), - SymOp(Rot_mXY_mX_Z, Tr_13_23_23), - SymOp(Rot_Y_X_mZ, Tr_13_23_23), - SymOp(Rot_XmY_mY_mZ, Tr_13_23_23), - SymOp(Rot_mX_mXY_mZ, Tr_13_23_23), - ], -) - -sg1155 = SpaceGroup( - number=1155, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="R32", - point_group_name="PG32", - crystal_system="TRIGONAL", - pdb_name="R 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - ], -) - -sg156 = SpaceGroup( - number=156, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P3m1", - point_group_name="PG3m1", - crystal_system="TRIGONAL", - pdb_name="P 3 m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - ], -) - -sg157 = SpaceGroup( - number=157, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P31m", - point_group_name="PG31m", - crystal_system="TRIGONAL", - pdb_name="P 3 1 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_XmY_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mXY_Z, Tr_0_0_0), - ], -) - -sg158 = SpaceGroup( - number=158, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P3c1", - point_group_name="PG3m1", - crystal_system="TRIGONAL", - pdb_name="P 3 c 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - ], -) - -sg159 = SpaceGroup( - number=159, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P31c", - point_group_name="PG31m", - crystal_system="TRIGONAL", - pdb_name="P 3 1 c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_XmY_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mXY_Z, Tr_0_0_12), - ], -) - -sg160 = SpaceGroup( - number=160, - num_sym_equiv=18, - num_primitive_sym_equiv=6, - short_name="H3m", - point_group_name="PG3m", - crystal_system="TRIGONAL", - pdb_name="H 3 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_23_13_13), - SymOp(Rot_mY_XmY_Z, Tr_23_13_13), - SymOp(Rot_mXY_mX_Z, Tr_23_13_13), - SymOp(Rot_mY_mX_Z, Tr_23_13_13), - SymOp(Rot_mXY_Y_Z, Tr_23_13_13), - SymOp(Rot_X_XmY_Z, Tr_23_13_13), - SymOp(Rot_X_Y_Z, Tr_13_23_23), - SymOp(Rot_mY_XmY_Z, Tr_13_23_23), - SymOp(Rot_mXY_mX_Z, Tr_13_23_23), - SymOp(Rot_mY_mX_Z, Tr_13_23_23), - SymOp(Rot_mXY_Y_Z, Tr_13_23_23), - SymOp(Rot_X_XmY_Z, Tr_13_23_23), - ], -) - -sg1160 = SpaceGroup( - number=1160, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="R3m", - point_group_name="PG3m", - crystal_system="TRIGONAL", - pdb_name="R 3 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - ], -) - -sg161 = SpaceGroup( - number=161, - num_sym_equiv=18, - num_primitive_sym_equiv=6, - short_name="H3c", - point_group_name="PG3m", - crystal_system="TRIGONAL", - pdb_name="H 3 c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_23_13_13), - SymOp(Rot_mY_XmY_Z, Tr_23_13_13), - SymOp(Rot_mXY_mX_Z, Tr_23_13_13), - SymOp(Rot_mY_mX_Z, Tr_23_13_56), - SymOp(Rot_mXY_Y_Z, Tr_23_13_56), - SymOp(Rot_X_XmY_Z, Tr_23_13_56), - SymOp(Rot_X_Y_Z, Tr_13_23_23), - SymOp(Rot_mY_XmY_Z, Tr_13_23_23), - SymOp(Rot_mXY_mX_Z, Tr_13_23_23), - SymOp(Rot_mY_mX_Z, Tr_13_23_16), - SymOp(Rot_mXY_Y_Z, Tr_13_23_16), - SymOp(Rot_X_XmY_Z, Tr_13_23_16), - ], -) - -sg1161 = SpaceGroup( - number=1161, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="R3c", - point_group_name="PG3m", - crystal_system="TRIGONAL", - pdb_name="R 3 c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - ], -) - -sg162 = SpaceGroup( - number=162, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P-31m", - point_group_name="PG3bar1m", - crystal_system="TRIGONAL", - pdb_name="P -3 1 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_XmY_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mXY_Z, Tr_0_0_0), - ], -) - -sg163 = SpaceGroup( - number=163, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P-31c", - point_group_name="PG3bar1m", - crystal_system="TRIGONAL", - pdb_name="P -3 1 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_XmY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_XmY_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mXY_Z, Tr_0_0_12), - ], -) - -sg164 = SpaceGroup( - number=164, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P-3m1", - point_group_name="PG3barm1", - crystal_system="TRIGONAL", - pdb_name="P -3 2/m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - ], -) - -sg165 = SpaceGroup( - number=165, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P-3c1", - point_group_name="PG3barm1", - crystal_system="TRIGONAL", - pdb_name="P -3 2/c 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - ], -) - -sg166 = SpaceGroup( - number=166, - num_sym_equiv=36, - num_primitive_sym_equiv=12, - short_name="H-3m", - point_group_name="PG3barm", - crystal_system="TRIGONAL", - pdb_name="H -3 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_23_13_13), - SymOp(Rot_mY_XmY_Z, Tr_23_13_13), - SymOp(Rot_mXY_mX_Z, Tr_23_13_13), - SymOp(Rot_Y_X_mZ, Tr_23_13_13), - SymOp(Rot_XmY_mY_mZ, Tr_23_13_13), - SymOp(Rot_mX_mXY_mZ, Tr_23_13_13), - SymOp(Rot_mX_mY_mZ, Tr_23_13_13), - SymOp(Rot_Y_mXY_mZ, Tr_23_13_13), - SymOp(Rot_XmY_X_mZ, Tr_23_13_13), - SymOp(Rot_mY_mX_Z, Tr_23_13_13), - SymOp(Rot_mXY_Y_Z, Tr_23_13_13), - SymOp(Rot_X_XmY_Z, Tr_23_13_13), - SymOp(Rot_X_Y_Z, Tr_13_23_23), - SymOp(Rot_mY_XmY_Z, Tr_13_23_23), - SymOp(Rot_mXY_mX_Z, Tr_13_23_23), - SymOp(Rot_Y_X_mZ, Tr_13_23_23), - SymOp(Rot_XmY_mY_mZ, Tr_13_23_23), - SymOp(Rot_mX_mXY_mZ, Tr_13_23_23), - SymOp(Rot_mX_mY_mZ, Tr_13_23_23), - SymOp(Rot_Y_mXY_mZ, Tr_13_23_23), - SymOp(Rot_XmY_X_mZ, Tr_13_23_23), - SymOp(Rot_mY_mX_Z, Tr_13_23_23), - SymOp(Rot_mXY_Y_Z, Tr_13_23_23), - SymOp(Rot_X_XmY_Z, Tr_13_23_23), - ], -) - -sg1166 = SpaceGroup( - number=1166, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="R-3m", - point_group_name="PG3barm", - crystal_system="TRIGONAL", - pdb_name="R -3 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - ], -) - -sg167 = SpaceGroup( - number=167, - num_sym_equiv=36, - num_primitive_sym_equiv=12, - short_name="H-3c", - point_group_name="PG3barm", - crystal_system="TRIGONAL", - pdb_name="H -3 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_23_13_13), - SymOp(Rot_mY_XmY_Z, Tr_23_13_13), - SymOp(Rot_mXY_mX_Z, Tr_23_13_13), - SymOp(Rot_Y_X_mZ, Tr_23_13_56), - SymOp(Rot_XmY_mY_mZ, Tr_23_13_56), - SymOp(Rot_mX_mXY_mZ, Tr_23_13_56), - SymOp(Rot_mX_mY_mZ, Tr_23_13_13), - SymOp(Rot_Y_mXY_mZ, Tr_23_13_13), - SymOp(Rot_XmY_X_mZ, Tr_23_13_13), - SymOp(Rot_mY_mX_Z, Tr_23_13_56), - SymOp(Rot_mXY_Y_Z, Tr_23_13_56), - SymOp(Rot_X_XmY_Z, Tr_23_13_56), - SymOp(Rot_X_Y_Z, Tr_13_23_23), - SymOp(Rot_mY_XmY_Z, Tr_13_23_23), - SymOp(Rot_mXY_mX_Z, Tr_13_23_23), - SymOp(Rot_Y_X_mZ, Tr_13_23_16), - SymOp(Rot_XmY_mY_mZ, Tr_13_23_16), - SymOp(Rot_mX_mXY_mZ, Tr_13_23_16), - SymOp(Rot_mX_mY_mZ, Tr_13_23_23), - SymOp(Rot_Y_mXY_mZ, Tr_13_23_23), - SymOp(Rot_XmY_X_mZ, Tr_13_23_23), - SymOp(Rot_mY_mX_Z, Tr_13_23_16), - SymOp(Rot_mXY_Y_Z, Tr_13_23_16), - SymOp(Rot_X_XmY_Z, Tr_13_23_16), - ], -) - -sg1167 = SpaceGroup( - number=1167, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="R-3c", - point_group_name="PG3barm", - crystal_system="TRIGONAL", - pdb_name="R -3 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mZ_mY, Tr_12_12_12), - SymOp(Rot_mZ_mY_mX, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - ], -) - -sg168 = SpaceGroup( - number=168, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P6", - point_group_name="PG6", - crystal_system="HEXAGONAL", - pdb_name="P 6", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_0), - SymOp(Rot_XmY_X_Z, Tr_0_0_0), - ], -) - -sg169 = SpaceGroup( - number=169, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P61", - point_group_name="PG6", - crystal_system="HEXAGONAL", - pdb_name="P 61", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_13), - SymOp(Rot_mXY_mX_Z, Tr_0_0_23), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_56), - SymOp(Rot_XmY_X_Z, Tr_0_0_16), - ], -) - -sg170 = SpaceGroup( - number=170, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P65", - point_group_name="PG6", - crystal_system="HEXAGONAL", - pdb_name="P 65", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_23), - SymOp(Rot_mXY_mX_Z, Tr_0_0_13), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_16), - SymOp(Rot_XmY_X_Z, Tr_0_0_56), - ], -) - -sg171 = SpaceGroup( - number=171, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P62", - point_group_name="PG6", - crystal_system="HEXAGONAL", - pdb_name="P 62", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_23), - SymOp(Rot_mXY_mX_Z, Tr_0_0_13), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_23), - SymOp(Rot_XmY_X_Z, Tr_0_0_13), - ], -) - -sg172 = SpaceGroup( - number=172, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P64", - point_group_name="PG6", - crystal_system="HEXAGONAL", - pdb_name="P 64", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_13), - SymOp(Rot_mXY_mX_Z, Tr_0_0_23), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_13), - SymOp(Rot_XmY_X_Z, Tr_0_0_23), - ], -) - -sg173 = SpaceGroup( - number=173, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P63", - point_group_name="PG6", - crystal_system="HEXAGONAL", - pdb_name="P 63", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_12), - SymOp(Rot_XmY_X_Z, Tr_0_0_12), - ], -) - -sg174 = SpaceGroup( - number=174, - num_sym_equiv=6, - num_primitive_sym_equiv=6, - short_name="P-6", - point_group_name="PG6bar", - crystal_system="HEXAGONAL", - pdb_name="P -6", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_0), - ], -) - -sg175 = SpaceGroup( - number=175, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P6/m", - point_group_name="PG6/m", - crystal_system="HEXAGONAL", - pdb_name="P 6/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_0), - SymOp(Rot_XmY_X_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_0), - ], -) - -sg176 = SpaceGroup( - number=176, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P63/m", - point_group_name="PG6/m", - crystal_system="HEXAGONAL", - pdb_name="P 63/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_12), - SymOp(Rot_XmY_X_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_12), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_12), - ], -) - -sg177 = SpaceGroup( - number=177, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P622", - point_group_name="PG622", - crystal_system="HEXAGONAL", - pdb_name="P 6 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_0), - SymOp(Rot_XmY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - ], -) - -sg178 = SpaceGroup( - number=178, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P6122", - point_group_name="PG622", - crystal_system="HEXAGONAL", - pdb_name="P 61 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_13), - SymOp(Rot_mXY_mX_Z, Tr_0_0_23), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_56), - SymOp(Rot_XmY_X_Z, Tr_0_0_16), - SymOp(Rot_Y_X_mZ, Tr_0_0_13), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_23), - SymOp(Rot_mY_mX_mZ, Tr_0_0_56), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_XmY_mZ, Tr_0_0_16), - ], -) - -sg179 = SpaceGroup( - number=179, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P6522", - point_group_name="PG622", - crystal_system="HEXAGONAL", - pdb_name="P 65 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_23), - SymOp(Rot_mXY_mX_Z, Tr_0_0_13), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_16), - SymOp(Rot_XmY_X_Z, Tr_0_0_56), - SymOp(Rot_Y_X_mZ, Tr_0_0_23), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_13), - SymOp(Rot_mY_mX_mZ, Tr_0_0_16), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_XmY_mZ, Tr_0_0_56), - ], -) - -sg180 = SpaceGroup( - number=180, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P6222", - point_group_name="PG622", - crystal_system="HEXAGONAL", - pdb_name="P 62 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_23), - SymOp(Rot_mXY_mX_Z, Tr_0_0_13), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_23), - SymOp(Rot_XmY_X_Z, Tr_0_0_13), - SymOp(Rot_Y_X_mZ, Tr_0_0_23), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_13), - SymOp(Rot_mY_mX_mZ, Tr_0_0_23), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_13), - ], -) - -sg181 = SpaceGroup( - number=181, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P6422", - point_group_name="PG622", - crystal_system="HEXAGONAL", - pdb_name="P 64 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_13), - SymOp(Rot_mXY_mX_Z, Tr_0_0_23), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_13), - SymOp(Rot_XmY_X_Z, Tr_0_0_23), - SymOp(Rot_Y_X_mZ, Tr_0_0_13), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_23), - SymOp(Rot_mY_mX_mZ, Tr_0_0_13), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_23), - ], -) - -sg182 = SpaceGroup( - number=182, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P6322", - point_group_name="PG622", - crystal_system="HEXAGONAL", - pdb_name="P 63 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_12), - SymOp(Rot_XmY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_XmY_mZ, Tr_0_0_12), - ], -) - -sg183 = SpaceGroup( - number=183, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P6mm", - point_group_name="PG6mm", - crystal_system="HEXAGONAL", - pdb_name="P 6 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_0), - SymOp(Rot_XmY_X_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_XmY_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mXY_Z, Tr_0_0_0), - ], -) - -sg184 = SpaceGroup( - number=184, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P6cc", - point_group_name="PG6mm", - crystal_system="HEXAGONAL", - pdb_name="P 6 c c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_0), - SymOp(Rot_XmY_X_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_XmY_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mXY_Z, Tr_0_0_12), - ], -) - -sg185 = SpaceGroup( - number=185, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P63cm", - point_group_name="PG6mm", - crystal_system="HEXAGONAL", - pdb_name="P 63 c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_12), - SymOp(Rot_XmY_X_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_XmY_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mXY_Z, Tr_0_0_0), - ], -) - -sg186 = SpaceGroup( - number=186, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P63mc", - point_group_name="PG6mm", - crystal_system="HEXAGONAL", - pdb_name="P 63 m c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_12), - SymOp(Rot_XmY_X_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_XmY_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mXY_Z, Tr_0_0_12), - ], -) - -sg187 = SpaceGroup( - number=187, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P-6m2", - point_group_name="PG6barm2", - crystal_system="HEXAGONAL", - pdb_name="P -6 m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - ], -) - -sg188 = SpaceGroup( - number=188, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P-6c2", - point_group_name="PG6barm2", - crystal_system="HEXAGONAL", - pdb_name="P -6 c 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_12), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - ], -) - -sg189 = SpaceGroup( - number=189, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P-62m", - point_group_name="PG6bar2m", - crystal_system="HEXAGONAL", - pdb_name="P -6 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_XmY_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mXY_Z, Tr_0_0_0), - ], -) - -sg190 = SpaceGroup( - number=190, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P-62c", - point_group_name="PG6bar2m", - crystal_system="HEXAGONAL", - pdb_name="P -6 2 c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_12), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_XmY_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mXY_Z, Tr_0_0_12), - ], -) - -sg191 = SpaceGroup( - number=191, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P6/mmm", - point_group_name="PG6/mmm", - crystal_system="HEXAGONAL", - pdb_name="P 6/m 2/m 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_0), - SymOp(Rot_XmY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_XmY_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mXY_Z, Tr_0_0_0), - ], -) - -sg192 = SpaceGroup( - number=192, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P6/mcc", - point_group_name="PG6/mmm", - crystal_system="HEXAGONAL", - pdb_name="P 6/m 2/c 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_Y_mXY_Z, Tr_0_0_0), - SymOp(Rot_XmY_X_Z, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_XmY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_XmY_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mXY_Z, Tr_0_0_12), - ], -) - -sg193 = SpaceGroup( - number=193, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P63/mcm", - point_group_name="PG6/mmm", - crystal_system="HEXAGONAL", - pdb_name="P 63/m 2/c 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_12), - SymOp(Rot_XmY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_XmY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_mXY_Y_Z, Tr_0_0_12), - SymOp(Rot_X_XmY_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_XmY_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mXY_Z, Tr_0_0_0), - ], -) - -sg194 = SpaceGroup( - number=194, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P63/mmc", - point_group_name="PG6/mmm", - crystal_system="HEXAGONAL", - pdb_name="P 63/m 2/m 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mY_XmY_Z, Tr_0_0_0), - SymOp(Rot_mXY_mX_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_Y_mXY_Z, Tr_0_0_12), - SymOp(Rot_XmY_X_Z, Tr_0_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_XmY_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mXY_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mXY_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_XmY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_Y_mXY_mZ, Tr_0_0_0), - SymOp(Rot_XmY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_mXY_mX_mZ, Tr_0_0_12), - SymOp(Rot_mY_XmY_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_mXY_Y_Z, Tr_0_0_0), - SymOp(Rot_X_XmY_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_XmY_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mXY_Z, Tr_0_0_12), - ], -) - -sg195 = SpaceGroup( - number=195, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P23", - point_group_name="PG23", - crystal_system="CUBIC", - pdb_name="P 2 3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - ], -) - -sg196 = SpaceGroup( - number=196, - num_sym_equiv=48, - num_primitive_sym_equiv=12, - short_name="F23", - point_group_name="PG23", - crystal_system="CUBIC", - pdb_name="F 2 3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - ], -) - -sg197 = SpaceGroup( - number=197, - num_sym_equiv=24, - num_primitive_sym_equiv=12, - short_name="I23", - point_group_name="PG23", - crystal_system="CUBIC", - pdb_name="I 2 3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_mX_Y, Tr_12_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_12_12), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_12), - SymOp(Rot_mY_mZ_X, Tr_12_12_12), - ], -) - -sg198 = SpaceGroup( - number=198, - num_sym_equiv=12, - num_primitive_sym_equiv=12, - short_name="P213", - point_group_name="PG23", - crystal_system="CUBIC", - pdb_name="P 21 3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - ], -) - -sg199 = SpaceGroup( - number=199, - num_sym_equiv=24, - num_primitive_sym_equiv=12, - short_name="I213", - point_group_name="PG23", - crystal_system="CUBIC", - pdb_name="I 21 3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_0_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_0_0), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_0), - ], -) - -sg200 = SpaceGroup( - number=200, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="Pm-3", - point_group_name="PGm3bar", - crystal_system="CUBIC", - pdb_name="P 2/m -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_0_0_0), - SymOp(Rot_Z_X_mY, Tr_0_0_0), - SymOp(Rot_Z_mX_Y, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_0), - SymOp(Rot_Y_Z_mX, Tr_0_0_0), - ], -) - -sg201 = SpaceGroup( - number=201, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="Pn-3", - point_group_name="PGm3bar", - crystal_system="CUBIC", - pdb_name="P 2/n -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mZ_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_X_Y, Tr_12_12_12), - SymOp(Rot_Z_X_mY, Tr_12_12_12), - SymOp(Rot_Z_mX_Y, Tr_12_12_12), - SymOp(Rot_mY_mZ_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_X, Tr_12_12_12), - SymOp(Rot_mY_Z_X, Tr_12_12_12), - SymOp(Rot_Y_Z_mX, Tr_12_12_12), - ], -) - -sg202 = SpaceGroup( - number=202, - num_sym_equiv=96, - num_primitive_sym_equiv=24, - short_name="Fm-3", - point_group_name="PGm3bar", - crystal_system="CUBIC", - pdb_name="F 2/m -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_0_0_0), - SymOp(Rot_Z_X_mY, Tr_0_0_0), - SymOp(Rot_Z_mX_Y, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_0), - SymOp(Rot_Y_Z_mX, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_mZ_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_X_Y, Tr_0_12_12), - SymOp(Rot_Z_X_mY, Tr_0_12_12), - SymOp(Rot_Z_mX_Y, Tr_0_12_12), - SymOp(Rot_mY_mZ_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_X, Tr_0_12_12), - SymOp(Rot_mY_Z_X, Tr_0_12_12), - SymOp(Rot_Y_Z_mX, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_mZ_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_X_Y, Tr_12_0_12), - SymOp(Rot_Z_X_mY, Tr_12_0_12), - SymOp(Rot_Z_mX_Y, Tr_12_0_12), - SymOp(Rot_mY_mZ_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_X, Tr_12_0_12), - SymOp(Rot_mY_Z_X, Tr_12_0_12), - SymOp(Rot_Y_Z_mX, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mZ_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_X_Y, Tr_12_12_0), - SymOp(Rot_Z_X_mY, Tr_12_12_0), - SymOp(Rot_Z_mX_Y, Tr_12_12_0), - SymOp(Rot_mY_mZ_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_X, Tr_12_12_0), - SymOp(Rot_mY_Z_X, Tr_12_12_0), - SymOp(Rot_Y_Z_mX, Tr_12_12_0), - ], -) - -sg203 = SpaceGroup( - number=203, - num_sym_equiv=96, - num_primitive_sym_equiv=24, - short_name="Fd-3", - point_group_name="PGm3bar", - crystal_system="CUBIC", - pdb_name="F 2/d -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_14_14_14), - SymOp(Rot_X_Y_mZ, Tr_14_14_14), - SymOp(Rot_X_mY_Z, Tr_14_14_14), - SymOp(Rot_mX_Y_Z, Tr_14_14_14), - SymOp(Rot_mZ_mX_mY, Tr_14_14_14), - SymOp(Rot_mZ_X_Y, Tr_14_14_14), - SymOp(Rot_Z_X_mY, Tr_14_14_14), - SymOp(Rot_Z_mX_Y, Tr_14_14_14), - SymOp(Rot_mY_mZ_mX, Tr_14_14_14), - SymOp(Rot_Y_mZ_X, Tr_14_14_14), - SymOp(Rot_mY_Z_X, Tr_14_14_14), - SymOp(Rot_Y_Z_mX, Tr_14_14_14), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_14_34_34), - SymOp(Rot_X_Y_mZ, Tr_14_34_34), - SymOp(Rot_X_mY_Z, Tr_14_34_34), - SymOp(Rot_mX_Y_Z, Tr_14_34_34), - SymOp(Rot_mZ_mX_mY, Tr_14_34_34), - SymOp(Rot_mZ_X_Y, Tr_14_34_34), - SymOp(Rot_Z_X_mY, Tr_14_34_34), - SymOp(Rot_Z_mX_Y, Tr_14_34_34), - SymOp(Rot_mY_mZ_mX, Tr_14_34_34), - SymOp(Rot_Y_mZ_X, Tr_14_34_34), - SymOp(Rot_mY_Z_X, Tr_14_34_34), - SymOp(Rot_Y_Z_mX, Tr_14_34_34), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_34_14_34), - SymOp(Rot_X_Y_mZ, Tr_34_14_34), - SymOp(Rot_X_mY_Z, Tr_34_14_34), - SymOp(Rot_mX_Y_Z, Tr_34_14_34), - SymOp(Rot_mZ_mX_mY, Tr_34_14_34), - SymOp(Rot_mZ_X_Y, Tr_34_14_34), - SymOp(Rot_Z_X_mY, Tr_34_14_34), - SymOp(Rot_Z_mX_Y, Tr_34_14_34), - SymOp(Rot_mY_mZ_mX, Tr_34_14_34), - SymOp(Rot_Y_mZ_X, Tr_34_14_34), - SymOp(Rot_mY_Z_X, Tr_34_14_34), - SymOp(Rot_Y_Z_mX, Tr_34_14_34), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_34_34_14), - SymOp(Rot_X_Y_mZ, Tr_34_34_14), - SymOp(Rot_X_mY_Z, Tr_34_34_14), - SymOp(Rot_mX_Y_Z, Tr_34_34_14), - SymOp(Rot_mZ_mX_mY, Tr_34_34_14), - SymOp(Rot_mZ_X_Y, Tr_34_34_14), - SymOp(Rot_Z_X_mY, Tr_34_34_14), - SymOp(Rot_Z_mX_Y, Tr_34_34_14), - SymOp(Rot_mY_mZ_mX, Tr_34_34_14), - SymOp(Rot_Y_mZ_X, Tr_34_34_14), - SymOp(Rot_mY_Z_X, Tr_34_34_14), - SymOp(Rot_Y_Z_mX, Tr_34_34_14), - ], -) - -sg204 = SpaceGroup( - number=204, - num_sym_equiv=48, - num_primitive_sym_equiv=24, - short_name="Im-3", - point_group_name="PGm3bar", - crystal_system="CUBIC", - pdb_name="I 2/m -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_0_0_0), - SymOp(Rot_Z_X_mY, Tr_0_0_0), - SymOp(Rot_Z_mX_Y, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_0), - SymOp(Rot_Y_Z_mX, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_mX_Y, Tr_12_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_12_12), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_12), - SymOp(Rot_mY_mZ_X, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mZ_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_X_Y, Tr_12_12_12), - SymOp(Rot_Z_X_mY, Tr_12_12_12), - SymOp(Rot_Z_mX_Y, Tr_12_12_12), - SymOp(Rot_mY_mZ_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_X, Tr_12_12_12), - SymOp(Rot_mY_Z_X, Tr_12_12_12), - SymOp(Rot_Y_Z_mX, Tr_12_12_12), - ], -) - -sg205 = SpaceGroup( - number=205, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="Pa-3", - point_group_name="PGm3bar", - crystal_system="CUBIC", - pdb_name="P 21/a -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_12_12_0), - SymOp(Rot_Z_X_mY, Tr_12_0_12), - SymOp(Rot_Z_mX_Y, Tr_0_12_12), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_12_12), - SymOp(Rot_mY_Z_X, Tr_12_12_0), - SymOp(Rot_Y_Z_mX, Tr_12_0_12), - ], -) - -sg206 = SpaceGroup( - number=206, - num_sym_equiv=48, - num_primitive_sym_equiv=24, - short_name="Ia-3", - point_group_name="PGm3bar", - crystal_system="CUBIC", - pdb_name="I 21/a -3", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_12_12_0), - SymOp(Rot_Z_X_mY, Tr_12_0_12), - SymOp(Rot_Z_mX_Y, Tr_0_12_12), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_12_12), - SymOp(Rot_mY_Z_X, Tr_12_12_0), - SymOp(Rot_Y_Z_mX, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_0_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_0_0), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mZ_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_X_Y, Tr_0_0_12), - SymOp(Rot_Z_X_mY, Tr_0_12_0), - SymOp(Rot_Z_mX_Y, Tr_12_0_0), - SymOp(Rot_mY_mZ_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_X, Tr_12_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_12), - SymOp(Rot_Y_Z_mX, Tr_0_12_0), - ], -) - -sg207 = SpaceGroup( - number=207, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P432", - point_group_name="PG432", - crystal_system="CUBIC", - pdb_name="P 4 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_mZ_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_X, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - ], -) - -sg208 = SpaceGroup( - number=208, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P4232", - point_group_name="PG432", - crystal_system="CUBIC", - pdb_name="P 42 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_X_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_mZ_Y, Tr_12_12_12), - SymOp(Rot_Z_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_X, Tr_12_12_12), - SymOp(Rot_mZ_mY_mX, Tr_12_12_12), - ], -) - -sg209 = SpaceGroup( - number=209, - num_sym_equiv=96, - num_primitive_sym_equiv=24, - short_name="F432", - point_group_name="PG432", - crystal_system="CUBIC", - pdb_name="F 4 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_mZ_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_X, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_Y_X_mZ, Tr_0_12_12), - SymOp(Rot_mY_mX_mZ, Tr_0_12_12), - SymOp(Rot_Y_mX_Z, Tr_0_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_12), - SymOp(Rot_X_Z_mY, Tr_0_12_12), - SymOp(Rot_mX_Z_Y, Tr_0_12_12), - SymOp(Rot_mX_mZ_mY, Tr_0_12_12), - SymOp(Rot_X_mZ_Y, Tr_0_12_12), - SymOp(Rot_Z_Y_mX, Tr_0_12_12), - SymOp(Rot_Z_mY_X, Tr_0_12_12), - SymOp(Rot_mZ_Y_X, Tr_0_12_12), - SymOp(Rot_mZ_mY_mX, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_12_0_12), - SymOp(Rot_mY_mX_mZ, Tr_12_0_12), - SymOp(Rot_Y_mX_Z, Tr_12_0_12), - SymOp(Rot_mY_X_Z, Tr_12_0_12), - SymOp(Rot_X_Z_mY, Tr_12_0_12), - SymOp(Rot_mX_Z_Y, Tr_12_0_12), - SymOp(Rot_mX_mZ_mY, Tr_12_0_12), - SymOp(Rot_X_mZ_Y, Tr_12_0_12), - SymOp(Rot_Z_Y_mX, Tr_12_0_12), - SymOp(Rot_Z_mY_X, Tr_12_0_12), - SymOp(Rot_mZ_Y_X, Tr_12_0_12), - SymOp(Rot_mZ_mY_mX, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_0), - SymOp(Rot_Y_mX_Z, Tr_12_12_0), - SymOp(Rot_mY_X_Z, Tr_12_12_0), - SymOp(Rot_X_Z_mY, Tr_12_12_0), - SymOp(Rot_mX_Z_Y, Tr_12_12_0), - SymOp(Rot_mX_mZ_mY, Tr_12_12_0), - SymOp(Rot_X_mZ_Y, Tr_12_12_0), - SymOp(Rot_Z_Y_mX, Tr_12_12_0), - SymOp(Rot_Z_mY_X, Tr_12_12_0), - SymOp(Rot_mZ_Y_X, Tr_12_12_0), - SymOp(Rot_mZ_mY_mX, Tr_12_12_0), - ], -) - -sg210 = SpaceGroup( - number=210, - num_sym_equiv=96, - num_primitive_sym_equiv=24, - short_name="F4132", - point_group_name="PG432", - crystal_system="CUBIC", - pdb_name="F 41 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_Y_X_mZ, Tr_34_14_34), - SymOp(Rot_mY_mX_mZ, Tr_14_14_14), - SymOp(Rot_Y_mX_Z, Tr_14_34_34), - SymOp(Rot_mY_X_Z, Tr_34_34_14), - SymOp(Rot_X_Z_mY, Tr_34_14_34), - SymOp(Rot_mX_Z_Y, Tr_34_34_14), - SymOp(Rot_mX_mZ_mY, Tr_14_14_14), - SymOp(Rot_X_mZ_Y, Tr_14_34_34), - SymOp(Rot_Z_Y_mX, Tr_34_14_34), - SymOp(Rot_Z_mY_X, Tr_14_34_34), - SymOp(Rot_mZ_Y_X, Tr_34_34_14), - SymOp(Rot_mZ_mY_mX, Tr_14_14_14), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_34_34_14), - SymOp(Rot_mY_mX_mZ, Tr_14_34_34), - SymOp(Rot_Y_mX_Z, Tr_14_14_14), - SymOp(Rot_mY_X_Z, Tr_34_14_34), - SymOp(Rot_X_Z_mY, Tr_34_34_14), - SymOp(Rot_mX_Z_Y, Tr_34_14_34), - SymOp(Rot_mX_mZ_mY, Tr_14_34_34), - SymOp(Rot_X_mZ_Y, Tr_14_14_14), - SymOp(Rot_Z_Y_mX, Tr_34_34_14), - SymOp(Rot_Z_mY_X, Tr_14_14_14), - SymOp(Rot_mZ_Y_X, Tr_34_14_34), - SymOp(Rot_mZ_mY_mX, Tr_14_34_34), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_14_14_14), - SymOp(Rot_mY_mX_mZ, Tr_34_14_34), - SymOp(Rot_Y_mX_Z, Tr_34_34_14), - SymOp(Rot_mY_X_Z, Tr_14_34_34), - SymOp(Rot_X_Z_mY, Tr_14_14_14), - SymOp(Rot_mX_Z_Y, Tr_14_34_34), - SymOp(Rot_mX_mZ_mY, Tr_34_14_34), - SymOp(Rot_X_mZ_Y, Tr_34_34_14), - SymOp(Rot_Z_Y_mX, Tr_14_14_14), - SymOp(Rot_Z_mY_X, Tr_34_34_14), - SymOp(Rot_mZ_Y_X, Tr_14_34_34), - SymOp(Rot_mZ_mY_mX, Tr_34_14_34), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_14_34_34), - SymOp(Rot_mY_mX_mZ, Tr_34_34_14), - SymOp(Rot_Y_mX_Z, Tr_34_14_34), - SymOp(Rot_mY_X_Z, Tr_14_14_14), - SymOp(Rot_X_Z_mY, Tr_14_34_34), - SymOp(Rot_mX_Z_Y, Tr_14_14_14), - SymOp(Rot_mX_mZ_mY, Tr_34_34_14), - SymOp(Rot_X_mZ_Y, Tr_34_14_34), - SymOp(Rot_Z_Y_mX, Tr_14_34_34), - SymOp(Rot_Z_mY_X, Tr_34_14_34), - SymOp(Rot_mZ_Y_X, Tr_14_14_14), - SymOp(Rot_mZ_mY_mX, Tr_34_34_14), - ], -) - -sg211 = SpaceGroup( - number=211, - num_sym_equiv=48, - num_primitive_sym_equiv=24, - short_name="I432", - point_group_name="PG432", - crystal_system="CUBIC", - pdb_name="I 4 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_mZ_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_X, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_mX_Y, Tr_12_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_12_12), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_12), - SymOp(Rot_mY_mZ_X, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_X_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_mZ_Y, Tr_12_12_12), - SymOp(Rot_Z_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_X, Tr_12_12_12), - SymOp(Rot_mZ_mY_mX, Tr_12_12_12), - ], -) - -sg212 = SpaceGroup( - number=212, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P4332", - point_group_name="PG432", - crystal_system="CUBIC", - pdb_name="P 43 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_14_34_34), - SymOp(Rot_mY_mX_mZ, Tr_14_14_14), - SymOp(Rot_Y_mX_Z, Tr_34_34_14), - SymOp(Rot_mY_X_Z, Tr_34_14_34), - SymOp(Rot_X_Z_mY, Tr_14_34_34), - SymOp(Rot_mX_Z_Y, Tr_34_14_34), - SymOp(Rot_mX_mZ_mY, Tr_14_14_14), - SymOp(Rot_X_mZ_Y, Tr_34_34_14), - SymOp(Rot_Z_Y_mX, Tr_14_34_34), - SymOp(Rot_Z_mY_X, Tr_34_34_14), - SymOp(Rot_mZ_Y_X, Tr_34_14_34), - SymOp(Rot_mZ_mY_mX, Tr_14_14_14), - ], -) - -sg213 = SpaceGroup( - number=213, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P4132", - point_group_name="PG432", - crystal_system="CUBIC", - pdb_name="P 41 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_34_14_14), - SymOp(Rot_mY_mX_mZ, Tr_34_34_34), - SymOp(Rot_Y_mX_Z, Tr_14_14_34), - SymOp(Rot_mY_X_Z, Tr_14_34_14), - SymOp(Rot_X_Z_mY, Tr_34_14_14), - SymOp(Rot_mX_Z_Y, Tr_14_34_14), - SymOp(Rot_mX_mZ_mY, Tr_34_34_34), - SymOp(Rot_X_mZ_Y, Tr_14_14_34), - SymOp(Rot_Z_Y_mX, Tr_34_14_14), - SymOp(Rot_Z_mY_X, Tr_14_14_34), - SymOp(Rot_mZ_Y_X, Tr_14_34_14), - SymOp(Rot_mZ_mY_mX, Tr_34_34_34), - ], -) - -sg214 = SpaceGroup( - number=214, - num_sym_equiv=48, - num_primitive_sym_equiv=24, - short_name="I4132", - point_group_name="PG432", - crystal_system="CUBIC", - pdb_name="I 41 3 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_34_14_14), - SymOp(Rot_mY_mX_mZ, Tr_34_34_34), - SymOp(Rot_Y_mX_Z, Tr_14_14_34), - SymOp(Rot_mY_X_Z, Tr_14_34_14), - SymOp(Rot_X_Z_mY, Tr_34_14_14), - SymOp(Rot_mX_Z_Y, Tr_14_34_14), - SymOp(Rot_mX_mZ_mY, Tr_34_34_34), - SymOp(Rot_X_mZ_Y, Tr_14_14_34), - SymOp(Rot_Z_Y_mX, Tr_34_14_14), - SymOp(Rot_Z_mY_X, Tr_14_14_34), - SymOp(Rot_mZ_Y_X, Tr_14_34_14), - SymOp(Rot_mZ_mY_mX, Tr_34_34_34), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_0_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_0_0), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_0), - SymOp(Rot_Y_X_mZ, Tr_14_34_34), - SymOp(Rot_mY_mX_mZ, Tr_14_14_14), - SymOp(Rot_Y_mX_Z, Tr_34_34_14), - SymOp(Rot_mY_X_Z, Tr_34_14_34), - SymOp(Rot_X_Z_mY, Tr_14_34_34), - SymOp(Rot_mX_Z_Y, Tr_34_14_34), - SymOp(Rot_mX_mZ_mY, Tr_14_14_14), - SymOp(Rot_X_mZ_Y, Tr_34_34_14), - SymOp(Rot_Z_Y_mX, Tr_14_34_34), - SymOp(Rot_Z_mY_X, Tr_34_34_14), - SymOp(Rot_mZ_Y_X, Tr_34_14_34), - SymOp(Rot_mZ_mY_mX, Tr_14_14_14), - ], -) - -sg215 = SpaceGroup( - number=215, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P-43m", - point_group_name="PG4bar3m", - crystal_system="CUBIC", - pdb_name="P -4 3 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_mZ_Y, Tr_0_0_0), - SymOp(Rot_X_mZ_mY, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - SymOp(Rot_Z_mY_mX, Tr_0_0_0), - SymOp(Rot_mZ_Y_mX, Tr_0_0_0), - SymOp(Rot_mZ_mY_X, Tr_0_0_0), - ], -) - -sg216 = SpaceGroup( - number=216, - num_sym_equiv=96, - num_primitive_sym_equiv=24, - short_name="F-43m", - point_group_name="PG4bar3m", - crystal_system="CUBIC", - pdb_name="F -4 3 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_mZ_Y, Tr_0_0_0), - SymOp(Rot_X_mZ_mY, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - SymOp(Rot_Z_mY_mX, Tr_0_0_0), - SymOp(Rot_mZ_Y_mX, Tr_0_0_0), - SymOp(Rot_mZ_mY_X, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_Y_X_Z, Tr_0_12_12), - SymOp(Rot_mY_mX_Z, Tr_0_12_12), - SymOp(Rot_Y_mX_mZ, Tr_0_12_12), - SymOp(Rot_mY_X_mZ, Tr_0_12_12), - SymOp(Rot_X_Z_Y, Tr_0_12_12), - SymOp(Rot_mX_Z_mY, Tr_0_12_12), - SymOp(Rot_mX_mZ_Y, Tr_0_12_12), - SymOp(Rot_X_mZ_mY, Tr_0_12_12), - SymOp(Rot_Z_Y_X, Tr_0_12_12), - SymOp(Rot_Z_mY_mX, Tr_0_12_12), - SymOp(Rot_mZ_Y_mX, Tr_0_12_12), - SymOp(Rot_mZ_mY_X, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_Z, Tr_12_0_12), - SymOp(Rot_mY_mX_Z, Tr_12_0_12), - SymOp(Rot_Y_mX_mZ, Tr_12_0_12), - SymOp(Rot_mY_X_mZ, Tr_12_0_12), - SymOp(Rot_X_Z_Y, Tr_12_0_12), - SymOp(Rot_mX_Z_mY, Tr_12_0_12), - SymOp(Rot_mX_mZ_Y, Tr_12_0_12), - SymOp(Rot_X_mZ_mY, Tr_12_0_12), - SymOp(Rot_Z_Y_X, Tr_12_0_12), - SymOp(Rot_Z_mY_mX, Tr_12_0_12), - SymOp(Rot_mZ_Y_mX, Tr_12_0_12), - SymOp(Rot_mZ_mY_X, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_mX_mZ, Tr_12_12_0), - SymOp(Rot_mY_X_mZ, Tr_12_12_0), - SymOp(Rot_X_Z_Y, Tr_12_12_0), - SymOp(Rot_mX_Z_mY, Tr_12_12_0), - SymOp(Rot_mX_mZ_Y, Tr_12_12_0), - SymOp(Rot_X_mZ_mY, Tr_12_12_0), - SymOp(Rot_Z_Y_X, Tr_12_12_0), - SymOp(Rot_Z_mY_mX, Tr_12_12_0), - SymOp(Rot_mZ_Y_mX, Tr_12_12_0), - SymOp(Rot_mZ_mY_X, Tr_12_12_0), - ], -) - -sg217 = SpaceGroup( - number=217, - num_sym_equiv=48, - num_primitive_sym_equiv=24, - short_name="I-43m", - point_group_name="PG4bar3m", - crystal_system="CUBIC", - pdb_name="I -4 3 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_mZ_Y, Tr_0_0_0), - SymOp(Rot_X_mZ_mY, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - SymOp(Rot_Z_mY_mX, Tr_0_0_0), - SymOp(Rot_mZ_Y_mX, Tr_0_0_0), - SymOp(Rot_mZ_mY_X, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_mX_Y, Tr_12_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_12_12), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_12), - SymOp(Rot_mY_mZ_X, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_mZ_Y, Tr_12_12_12), - SymOp(Rot_X_mZ_mY, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - SymOp(Rot_Z_mY_mX, Tr_12_12_12), - SymOp(Rot_mZ_Y_mX, Tr_12_12_12), - SymOp(Rot_mZ_mY_X, Tr_12_12_12), - ], -) - -sg218 = SpaceGroup( - number=218, - num_sym_equiv=24, - num_primitive_sym_equiv=24, - short_name="P-43n", - point_group_name="PG4bar3m", - crystal_system="CUBIC", - pdb_name="P -4 3 n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_mZ_Y, Tr_12_12_12), - SymOp(Rot_X_mZ_mY, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - SymOp(Rot_Z_mY_mX, Tr_12_12_12), - SymOp(Rot_mZ_Y_mX, Tr_12_12_12), - SymOp(Rot_mZ_mY_X, Tr_12_12_12), - ], -) - -sg219 = SpaceGroup( - number=219, - num_sym_equiv=96, - num_primitive_sym_equiv=24, - short_name="F-43c", - point_group_name="PG4bar3m", - crystal_system="CUBIC", - pdb_name="F -4 3 c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_mZ_Y, Tr_12_12_12), - SymOp(Rot_X_mZ_mY, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - SymOp(Rot_Z_mY_mX, Tr_12_12_12), - SymOp(Rot_mZ_Y_mX, Tr_12_12_12), - SymOp(Rot_mZ_mY_X, Tr_12_12_12), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_Y_X_Z, Tr_12_0_0), - SymOp(Rot_mY_mX_Z, Tr_12_0_0), - SymOp(Rot_Y_mX_mZ, Tr_12_0_0), - SymOp(Rot_mY_X_mZ, Tr_12_0_0), - SymOp(Rot_X_Z_Y, Tr_12_0_0), - SymOp(Rot_mX_Z_mY, Tr_12_0_0), - SymOp(Rot_mX_mZ_Y, Tr_12_0_0), - SymOp(Rot_X_mZ_mY, Tr_12_0_0), - SymOp(Rot_Z_Y_X, Tr_12_0_0), - SymOp(Rot_Z_mY_mX, Tr_12_0_0), - SymOp(Rot_mZ_Y_mX, Tr_12_0_0), - SymOp(Rot_mZ_mY_X, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_Z, Tr_0_12_0), - SymOp(Rot_mY_mX_Z, Tr_0_12_0), - SymOp(Rot_Y_mX_mZ, Tr_0_12_0), - SymOp(Rot_mY_X_mZ, Tr_0_12_0), - SymOp(Rot_X_Z_Y, Tr_0_12_0), - SymOp(Rot_mX_Z_mY, Tr_0_12_0), - SymOp(Rot_mX_mZ_Y, Tr_0_12_0), - SymOp(Rot_X_mZ_mY, Tr_0_12_0), - SymOp(Rot_Z_Y_X, Tr_0_12_0), - SymOp(Rot_Z_mY_mX, Tr_0_12_0), - SymOp(Rot_mZ_Y_mX, Tr_0_12_0), - SymOp(Rot_mZ_mY_X, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_mX_mZ, Tr_0_0_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_12), - SymOp(Rot_X_Z_Y, Tr_0_0_12), - SymOp(Rot_mX_Z_mY, Tr_0_0_12), - SymOp(Rot_mX_mZ_Y, Tr_0_0_12), - SymOp(Rot_X_mZ_mY, Tr_0_0_12), - SymOp(Rot_Z_Y_X, Tr_0_0_12), - SymOp(Rot_Z_mY_mX, Tr_0_0_12), - SymOp(Rot_mZ_Y_mX, Tr_0_0_12), - SymOp(Rot_mZ_mY_X, Tr_0_0_12), - ], -) - -sg220 = SpaceGroup( - number=220, - num_sym_equiv=48, - num_primitive_sym_equiv=24, - short_name="I-43d", - point_group_name="PG4bar3m", - crystal_system="CUBIC", - pdb_name="I -4 3 d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_Z, Tr_14_14_14), - SymOp(Rot_mY_mX_Z, Tr_14_34_34), - SymOp(Rot_Y_mX_mZ, Tr_34_14_34), - SymOp(Rot_mY_X_mZ, Tr_34_34_14), - SymOp(Rot_X_Z_Y, Tr_14_14_14), - SymOp(Rot_mX_Z_mY, Tr_34_34_14), - SymOp(Rot_mX_mZ_Y, Tr_14_34_34), - SymOp(Rot_X_mZ_mY, Tr_34_14_34), - SymOp(Rot_Z_Y_X, Tr_14_14_14), - SymOp(Rot_Z_mY_mX, Tr_34_14_34), - SymOp(Rot_mZ_Y_mX, Tr_34_34_14), - SymOp(Rot_mZ_mY_X, Tr_14_34_34), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_0_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_0_0), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_0), - SymOp(Rot_Y_X_Z, Tr_34_34_34), - SymOp(Rot_mY_mX_Z, Tr_34_14_14), - SymOp(Rot_Y_mX_mZ, Tr_14_34_14), - SymOp(Rot_mY_X_mZ, Tr_14_14_34), - SymOp(Rot_X_Z_Y, Tr_34_34_34), - SymOp(Rot_mX_Z_mY, Tr_14_14_34), - SymOp(Rot_mX_mZ_Y, Tr_34_14_14), - SymOp(Rot_X_mZ_mY, Tr_14_34_14), - SymOp(Rot_Z_Y_X, Tr_34_34_34), - SymOp(Rot_Z_mY_mX, Tr_14_34_14), - SymOp(Rot_mZ_Y_mX, Tr_14_14_34), - SymOp(Rot_mZ_mY_X, Tr_34_14_14), - ], -) - -sg221 = SpaceGroup( - number=221, - num_sym_equiv=48, - num_primitive_sym_equiv=48, - short_name="Pm-3m", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="P 4/m -3 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_mZ_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_X, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_0_0_0), - SymOp(Rot_Z_X_mY, Tr_0_0_0), - SymOp(Rot_Z_mX_Y, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_0), - SymOp(Rot_Y_Z_mX, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mZ_Y, Tr_0_0_0), - SymOp(Rot_X_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_Z_mY, Tr_0_0_0), - SymOp(Rot_mZ_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_mX, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - ], -) - -sg222 = SpaceGroup( - number=222, - num_sym_equiv=48, - num_primitive_sym_equiv=48, - short_name="Pn-3n", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="P 4/n -3 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_mZ_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_X, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mZ_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_X_Y, Tr_12_12_12), - SymOp(Rot_Z_X_mY, Tr_12_12_12), - SymOp(Rot_Z_mX_Y, Tr_12_12_12), - SymOp(Rot_mY_mZ_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_X, Tr_12_12_12), - SymOp(Rot_mY_Z_X, Tr_12_12_12), - SymOp(Rot_Y_Z_mX, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mZ_Y, Tr_12_12_12), - SymOp(Rot_X_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_Z_mY, Tr_12_12_12), - SymOp(Rot_mZ_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_mX, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - ], -) - -sg223 = SpaceGroup( - number=223, - num_sym_equiv=48, - num_primitive_sym_equiv=48, - short_name="Pm-3n", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="P 42/m -3 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_X_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_mZ_Y, Tr_12_12_12), - SymOp(Rot_Z_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_X, Tr_12_12_12), - SymOp(Rot_mZ_mY_mX, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_0_0_0), - SymOp(Rot_Z_X_mY, Tr_0_0_0), - SymOp(Rot_Z_mX_Y, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_0), - SymOp(Rot_Y_Z_mX, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mZ_Y, Tr_12_12_12), - SymOp(Rot_X_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_Z_mY, Tr_12_12_12), - SymOp(Rot_mZ_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_mX, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - ], -) - -sg224 = SpaceGroup( - number=224, - num_sym_equiv=48, - num_primitive_sym_equiv=48, - short_name="Pn-3m", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="P 42/n -3 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_X_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_mZ_Y, Tr_12_12_12), - SymOp(Rot_Z_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_X, Tr_12_12_12), - SymOp(Rot_mZ_mY_mX, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mZ_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_X_Y, Tr_12_12_12), - SymOp(Rot_Z_X_mY, Tr_12_12_12), - SymOp(Rot_Z_mX_Y, Tr_12_12_12), - SymOp(Rot_mY_mZ_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_X, Tr_12_12_12), - SymOp(Rot_mY_Z_X, Tr_12_12_12), - SymOp(Rot_Y_Z_mX, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mZ_Y, Tr_0_0_0), - SymOp(Rot_X_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_Z_mY, Tr_0_0_0), - SymOp(Rot_mZ_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_mX, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - ], -) - -sg225 = SpaceGroup( - number=225, - num_sym_equiv=192, - num_primitive_sym_equiv=48, - short_name="Fm-3m", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="F 4/m -3 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_mZ_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_X, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_0_0_0), - SymOp(Rot_Z_X_mY, Tr_0_0_0), - SymOp(Rot_Z_mX_Y, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_0), - SymOp(Rot_Y_Z_mX, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mZ_Y, Tr_0_0_0), - SymOp(Rot_X_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_Z_mY, Tr_0_0_0), - SymOp(Rot_mZ_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_mX, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_Y_X_mZ, Tr_0_12_12), - SymOp(Rot_mY_mX_mZ, Tr_0_12_12), - SymOp(Rot_Y_mX_Z, Tr_0_12_12), - SymOp(Rot_mY_X_Z, Tr_0_12_12), - SymOp(Rot_X_Z_mY, Tr_0_12_12), - SymOp(Rot_mX_Z_Y, Tr_0_12_12), - SymOp(Rot_mX_mZ_mY, Tr_0_12_12), - SymOp(Rot_X_mZ_Y, Tr_0_12_12), - SymOp(Rot_Z_Y_mX, Tr_0_12_12), - SymOp(Rot_Z_mY_X, Tr_0_12_12), - SymOp(Rot_mZ_Y_X, Tr_0_12_12), - SymOp(Rot_mZ_mY_mX, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_mZ_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_X_Y, Tr_0_12_12), - SymOp(Rot_Z_X_mY, Tr_0_12_12), - SymOp(Rot_Z_mX_Y, Tr_0_12_12), - SymOp(Rot_mY_mZ_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_X, Tr_0_12_12), - SymOp(Rot_mY_Z_X, Tr_0_12_12), - SymOp(Rot_Y_Z_mX, Tr_0_12_12), - SymOp(Rot_mY_mX_Z, Tr_0_12_12), - SymOp(Rot_Y_X_Z, Tr_0_12_12), - SymOp(Rot_mY_X_mZ, Tr_0_12_12), - SymOp(Rot_Y_mX_mZ, Tr_0_12_12), - SymOp(Rot_mX_mZ_Y, Tr_0_12_12), - SymOp(Rot_X_mZ_mY, Tr_0_12_12), - SymOp(Rot_X_Z_Y, Tr_0_12_12), - SymOp(Rot_mX_Z_mY, Tr_0_12_12), - SymOp(Rot_mZ_mY_X, Tr_0_12_12), - SymOp(Rot_mZ_Y_mX, Tr_0_12_12), - SymOp(Rot_Z_mY_mX, Tr_0_12_12), - SymOp(Rot_Z_Y_X, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_12_0_12), - SymOp(Rot_mY_mX_mZ, Tr_12_0_12), - SymOp(Rot_Y_mX_Z, Tr_12_0_12), - SymOp(Rot_mY_X_Z, Tr_12_0_12), - SymOp(Rot_X_Z_mY, Tr_12_0_12), - SymOp(Rot_mX_Z_Y, Tr_12_0_12), - SymOp(Rot_mX_mZ_mY, Tr_12_0_12), - SymOp(Rot_X_mZ_Y, Tr_12_0_12), - SymOp(Rot_Z_Y_mX, Tr_12_0_12), - SymOp(Rot_Z_mY_X, Tr_12_0_12), - SymOp(Rot_mZ_Y_X, Tr_12_0_12), - SymOp(Rot_mZ_mY_mX, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_mZ_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_X_Y, Tr_12_0_12), - SymOp(Rot_Z_X_mY, Tr_12_0_12), - SymOp(Rot_Z_mX_Y, Tr_12_0_12), - SymOp(Rot_mY_mZ_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_X, Tr_12_0_12), - SymOp(Rot_mY_Z_X, Tr_12_0_12), - SymOp(Rot_Y_Z_mX, Tr_12_0_12), - SymOp(Rot_mY_mX_Z, Tr_12_0_12), - SymOp(Rot_Y_X_Z, Tr_12_0_12), - SymOp(Rot_mY_X_mZ, Tr_12_0_12), - SymOp(Rot_Y_mX_mZ, Tr_12_0_12), - SymOp(Rot_mX_mZ_Y, Tr_12_0_12), - SymOp(Rot_X_mZ_mY, Tr_12_0_12), - SymOp(Rot_X_Z_Y, Tr_12_0_12), - SymOp(Rot_mX_Z_mY, Tr_12_0_12), - SymOp(Rot_mZ_mY_X, Tr_12_0_12), - SymOp(Rot_mZ_Y_mX, Tr_12_0_12), - SymOp(Rot_Z_mY_mX, Tr_12_0_12), - SymOp(Rot_Z_Y_X, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_0), - SymOp(Rot_mY_mX_mZ, Tr_12_12_0), - SymOp(Rot_Y_mX_Z, Tr_12_12_0), - SymOp(Rot_mY_X_Z, Tr_12_12_0), - SymOp(Rot_X_Z_mY, Tr_12_12_0), - SymOp(Rot_mX_Z_Y, Tr_12_12_0), - SymOp(Rot_mX_mZ_mY, Tr_12_12_0), - SymOp(Rot_X_mZ_Y, Tr_12_12_0), - SymOp(Rot_Z_Y_mX, Tr_12_12_0), - SymOp(Rot_Z_mY_X, Tr_12_12_0), - SymOp(Rot_mZ_Y_X, Tr_12_12_0), - SymOp(Rot_mZ_mY_mX, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mZ_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_X_Y, Tr_12_12_0), - SymOp(Rot_Z_X_mY, Tr_12_12_0), - SymOp(Rot_Z_mX_Y, Tr_12_12_0), - SymOp(Rot_mY_mZ_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_X, Tr_12_12_0), - SymOp(Rot_mY_Z_X, Tr_12_12_0), - SymOp(Rot_Y_Z_mX, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - SymOp(Rot_mY_X_mZ, Tr_12_12_0), - SymOp(Rot_Y_mX_mZ, Tr_12_12_0), - SymOp(Rot_mX_mZ_Y, Tr_12_12_0), - SymOp(Rot_X_mZ_mY, Tr_12_12_0), - SymOp(Rot_X_Z_Y, Tr_12_12_0), - SymOp(Rot_mX_Z_mY, Tr_12_12_0), - SymOp(Rot_mZ_mY_X, Tr_12_12_0), - SymOp(Rot_mZ_Y_mX, Tr_12_12_0), - SymOp(Rot_Z_mY_mX, Tr_12_12_0), - SymOp(Rot_Z_Y_X, Tr_12_12_0), - ], -) - -sg226 = SpaceGroup( - number=226, - num_sym_equiv=192, - num_primitive_sym_equiv=48, - short_name="Fm-3c", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="F 4/m -3 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_X_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_mZ_Y, Tr_12_12_12), - SymOp(Rot_Z_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_X, Tr_12_12_12), - SymOp(Rot_mZ_mY_mX, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_0_0_0), - SymOp(Rot_Z_X_mY, Tr_0_0_0), - SymOp(Rot_Z_mX_Y, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_0), - SymOp(Rot_Y_Z_mX, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mZ_Y, Tr_12_12_12), - SymOp(Rot_X_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_Z_mY, Tr_12_12_12), - SymOp(Rot_mZ_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_mX, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_Y_X_mZ, Tr_12_0_0), - SymOp(Rot_mY_mX_mZ, Tr_12_0_0), - SymOp(Rot_Y_mX_Z, Tr_12_0_0), - SymOp(Rot_mY_X_Z, Tr_12_0_0), - SymOp(Rot_X_Z_mY, Tr_12_0_0), - SymOp(Rot_mX_Z_Y, Tr_12_0_0), - SymOp(Rot_mX_mZ_mY, Tr_12_0_0), - SymOp(Rot_X_mZ_Y, Tr_12_0_0), - SymOp(Rot_Z_Y_mX, Tr_12_0_0), - SymOp(Rot_Z_mY_X, Tr_12_0_0), - SymOp(Rot_mZ_Y_X, Tr_12_0_0), - SymOp(Rot_mZ_mY_mX, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_mZ_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_X_Y, Tr_0_12_12), - SymOp(Rot_Z_X_mY, Tr_0_12_12), - SymOp(Rot_Z_mX_Y, Tr_0_12_12), - SymOp(Rot_mY_mZ_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_X, Tr_0_12_12), - SymOp(Rot_mY_Z_X, Tr_0_12_12), - SymOp(Rot_Y_Z_mX, Tr_0_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_0_0), - SymOp(Rot_Y_X_Z, Tr_12_0_0), - SymOp(Rot_mY_X_mZ, Tr_12_0_0), - SymOp(Rot_Y_mX_mZ, Tr_12_0_0), - SymOp(Rot_mX_mZ_Y, Tr_12_0_0), - SymOp(Rot_X_mZ_mY, Tr_12_0_0), - SymOp(Rot_X_Z_Y, Tr_12_0_0), - SymOp(Rot_mX_Z_mY, Tr_12_0_0), - SymOp(Rot_mZ_mY_X, Tr_12_0_0), - SymOp(Rot_mZ_Y_mX, Tr_12_0_0), - SymOp(Rot_Z_mY_mX, Tr_12_0_0), - SymOp(Rot_Z_Y_X, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_0_12_0), - SymOp(Rot_mY_mX_mZ, Tr_0_12_0), - SymOp(Rot_Y_mX_Z, Tr_0_12_0), - SymOp(Rot_mY_X_Z, Tr_0_12_0), - SymOp(Rot_X_Z_mY, Tr_0_12_0), - SymOp(Rot_mX_Z_Y, Tr_0_12_0), - SymOp(Rot_mX_mZ_mY, Tr_0_12_0), - SymOp(Rot_X_mZ_Y, Tr_0_12_0), - SymOp(Rot_Z_Y_mX, Tr_0_12_0), - SymOp(Rot_Z_mY_X, Tr_0_12_0), - SymOp(Rot_mZ_Y_X, Tr_0_12_0), - SymOp(Rot_mZ_mY_mX, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_mZ_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_X_Y, Tr_12_0_12), - SymOp(Rot_Z_X_mY, Tr_12_0_12), - SymOp(Rot_Z_mX_Y, Tr_12_0_12), - SymOp(Rot_mY_mZ_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_X, Tr_12_0_12), - SymOp(Rot_mY_Z_X, Tr_12_0_12), - SymOp(Rot_Y_Z_mX, Tr_12_0_12), - SymOp(Rot_mY_mX_Z, Tr_0_12_0), - SymOp(Rot_Y_X_Z, Tr_0_12_0), - SymOp(Rot_mY_X_mZ, Tr_0_12_0), - SymOp(Rot_Y_mX_mZ, Tr_0_12_0), - SymOp(Rot_mX_mZ_Y, Tr_0_12_0), - SymOp(Rot_X_mZ_mY, Tr_0_12_0), - SymOp(Rot_X_Z_Y, Tr_0_12_0), - SymOp(Rot_mX_Z_mY, Tr_0_12_0), - SymOp(Rot_mZ_mY_X, Tr_0_12_0), - SymOp(Rot_mZ_Y_mX, Tr_0_12_0), - SymOp(Rot_Z_mY_mX, Tr_0_12_0), - SymOp(Rot_Z_Y_X, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_0_0_12), - SymOp(Rot_Y_mX_Z, Tr_0_0_12), - SymOp(Rot_mY_X_Z, Tr_0_0_12), - SymOp(Rot_X_Z_mY, Tr_0_0_12), - SymOp(Rot_mX_Z_Y, Tr_0_0_12), - SymOp(Rot_mX_mZ_mY, Tr_0_0_12), - SymOp(Rot_X_mZ_Y, Tr_0_0_12), - SymOp(Rot_Z_Y_mX, Tr_0_0_12), - SymOp(Rot_Z_mY_X, Tr_0_0_12), - SymOp(Rot_mZ_Y_X, Tr_0_0_12), - SymOp(Rot_mZ_mY_mX, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mZ_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_X_Y, Tr_12_12_0), - SymOp(Rot_Z_X_mY, Tr_12_12_0), - SymOp(Rot_Z_mX_Y, Tr_12_12_0), - SymOp(Rot_mY_mZ_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_X, Tr_12_12_0), - SymOp(Rot_mY_Z_X, Tr_12_12_0), - SymOp(Rot_Y_Z_mX, Tr_12_12_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_12), - SymOp(Rot_Y_mX_mZ, Tr_0_0_12), - SymOp(Rot_mX_mZ_Y, Tr_0_0_12), - SymOp(Rot_X_mZ_mY, Tr_0_0_12), - SymOp(Rot_X_Z_Y, Tr_0_0_12), - SymOp(Rot_mX_Z_mY, Tr_0_0_12), - SymOp(Rot_mZ_mY_X, Tr_0_0_12), - SymOp(Rot_mZ_Y_mX, Tr_0_0_12), - SymOp(Rot_Z_mY_mX, Tr_0_0_12), - SymOp(Rot_Z_Y_X, Tr_0_0_12), - ], -) - -sg227 = SpaceGroup( - number=227, - num_sym_equiv=192, - num_primitive_sym_equiv=48, - short_name="Fd-3m", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="F 41/d -3 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_Y_X_mZ, Tr_34_14_34), - SymOp(Rot_mY_mX_mZ, Tr_14_14_14), - SymOp(Rot_Y_mX_Z, Tr_14_34_34), - SymOp(Rot_mY_X_Z, Tr_34_34_14), - SymOp(Rot_X_Z_mY, Tr_34_14_34), - SymOp(Rot_mX_Z_Y, Tr_34_34_14), - SymOp(Rot_mX_mZ_mY, Tr_14_14_14), - SymOp(Rot_X_mZ_Y, Tr_14_34_34), - SymOp(Rot_Z_Y_mX, Tr_34_14_34), - SymOp(Rot_Z_mY_X, Tr_14_34_34), - SymOp(Rot_mZ_Y_X, Tr_34_34_14), - SymOp(Rot_mZ_mY_mX, Tr_14_14_14), - SymOp(Rot_mX_mY_mZ, Tr_14_14_14), - SymOp(Rot_X_Y_mZ, Tr_14_34_34), - SymOp(Rot_X_mY_Z, Tr_34_34_14), - SymOp(Rot_mX_Y_Z, Tr_34_14_34), - SymOp(Rot_mZ_mX_mY, Tr_14_14_14), - SymOp(Rot_mZ_X_Y, Tr_34_14_34), - SymOp(Rot_Z_X_mY, Tr_14_34_34), - SymOp(Rot_Z_mX_Y, Tr_34_34_14), - SymOp(Rot_mY_mZ_mX, Tr_14_14_14), - SymOp(Rot_Y_mZ_X, Tr_34_34_14), - SymOp(Rot_mY_Z_X, Tr_34_14_34), - SymOp(Rot_Y_Z_mX, Tr_14_34_34), - SymOp(Rot_mY_mX_Z, Tr_12_0_12), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_0), - SymOp(Rot_mX_mZ_Y, Tr_12_0_12), - SymOp(Rot_X_mZ_mY, Tr_12_12_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_Z_mY, Tr_0_12_12), - SymOp(Rot_mZ_mY_X, Tr_12_0_12), - SymOp(Rot_mZ_Y_mX, Tr_0_12_12), - SymOp(Rot_Z_mY_mX, Tr_12_12_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_34_34_14), - SymOp(Rot_mY_mX_mZ, Tr_14_34_34), - SymOp(Rot_Y_mX_Z, Tr_14_14_14), - SymOp(Rot_mY_X_Z, Tr_34_14_34), - SymOp(Rot_X_Z_mY, Tr_34_34_14), - SymOp(Rot_mX_Z_Y, Tr_34_14_34), - SymOp(Rot_mX_mZ_mY, Tr_14_34_34), - SymOp(Rot_X_mZ_Y, Tr_14_14_14), - SymOp(Rot_Z_Y_mX, Tr_34_34_14), - SymOp(Rot_Z_mY_X, Tr_14_14_14), - SymOp(Rot_mZ_Y_X, Tr_34_14_34), - SymOp(Rot_mZ_mY_mX, Tr_14_34_34), - SymOp(Rot_mX_mY_mZ, Tr_14_34_34), - SymOp(Rot_X_Y_mZ, Tr_14_14_14), - SymOp(Rot_X_mY_Z, Tr_34_14_34), - SymOp(Rot_mX_Y_Z, Tr_34_34_14), - SymOp(Rot_mZ_mX_mY, Tr_14_34_34), - SymOp(Rot_mZ_X_Y, Tr_34_34_14), - SymOp(Rot_Z_X_mY, Tr_14_14_14), - SymOp(Rot_Z_mX_Y, Tr_34_14_34), - SymOp(Rot_mY_mZ_mX, Tr_14_34_34), - SymOp(Rot_Y_mZ_X, Tr_34_14_34), - SymOp(Rot_mY_Z_X, Tr_34_34_14), - SymOp(Rot_Y_Z_mX, Tr_14_14_14), - SymOp(Rot_mY_mX_Z, Tr_12_12_0), - SymOp(Rot_Y_X_Z, Tr_0_12_12), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_12_0_12), - SymOp(Rot_mX_mZ_Y, Tr_12_12_0), - SymOp(Rot_X_mZ_mY, Tr_12_0_12), - SymOp(Rot_X_Z_Y, Tr_0_12_12), - SymOp(Rot_mX_Z_mY, Tr_0_0_0), - SymOp(Rot_mZ_mY_X, Tr_12_12_0), - SymOp(Rot_mZ_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_mX, Tr_12_0_12), - SymOp(Rot_Z_Y_X, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_14_14_14), - SymOp(Rot_mY_mX_mZ, Tr_34_14_34), - SymOp(Rot_Y_mX_Z, Tr_34_34_14), - SymOp(Rot_mY_X_Z, Tr_14_34_34), - SymOp(Rot_X_Z_mY, Tr_14_14_14), - SymOp(Rot_mX_Z_Y, Tr_14_34_34), - SymOp(Rot_mX_mZ_mY, Tr_34_14_34), - SymOp(Rot_X_mZ_Y, Tr_34_34_14), - SymOp(Rot_Z_Y_mX, Tr_14_14_14), - SymOp(Rot_Z_mY_X, Tr_34_34_14), - SymOp(Rot_mZ_Y_X, Tr_14_34_34), - SymOp(Rot_mZ_mY_mX, Tr_34_14_34), - SymOp(Rot_mX_mY_mZ, Tr_34_14_34), - SymOp(Rot_X_Y_mZ, Tr_34_34_14), - SymOp(Rot_X_mY_Z, Tr_14_34_34), - SymOp(Rot_mX_Y_Z, Tr_14_14_14), - SymOp(Rot_mZ_mX_mY, Tr_34_14_34), - SymOp(Rot_mZ_X_Y, Tr_14_14_14), - SymOp(Rot_Z_X_mY, Tr_34_34_14), - SymOp(Rot_Z_mX_Y, Tr_14_34_34), - SymOp(Rot_mY_mZ_mX, Tr_34_14_34), - SymOp(Rot_Y_mZ_X, Tr_14_34_34), - SymOp(Rot_mY_Z_X, Tr_14_14_14), - SymOp(Rot_Y_Z_mX, Tr_34_34_14), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_12_0_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_0), - SymOp(Rot_Y_mX_mZ, Tr_0_12_12), - SymOp(Rot_mX_mZ_Y, Tr_0_0_0), - SymOp(Rot_X_mZ_mY, Tr_0_12_12), - SymOp(Rot_X_Z_Y, Tr_12_0_12), - SymOp(Rot_mX_Z_mY, Tr_12_12_0), - SymOp(Rot_mZ_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_mX, Tr_12_12_0), - SymOp(Rot_Z_mY_mX, Tr_0_12_12), - SymOp(Rot_Z_Y_X, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_14_34_34), - SymOp(Rot_mY_mX_mZ, Tr_34_34_14), - SymOp(Rot_Y_mX_Z, Tr_34_14_34), - SymOp(Rot_mY_X_Z, Tr_14_14_14), - SymOp(Rot_X_Z_mY, Tr_14_34_34), - SymOp(Rot_mX_Z_Y, Tr_14_14_14), - SymOp(Rot_mX_mZ_mY, Tr_34_34_14), - SymOp(Rot_X_mZ_Y, Tr_34_14_34), - SymOp(Rot_Z_Y_mX, Tr_14_34_34), - SymOp(Rot_Z_mY_X, Tr_34_14_34), - SymOp(Rot_mZ_Y_X, Tr_14_14_14), - SymOp(Rot_mZ_mY_mX, Tr_34_34_14), - SymOp(Rot_mX_mY_mZ, Tr_34_34_14), - SymOp(Rot_X_Y_mZ, Tr_34_14_34), - SymOp(Rot_X_mY_Z, Tr_14_14_14), - SymOp(Rot_mX_Y_Z, Tr_14_34_34), - SymOp(Rot_mZ_mX_mY, Tr_34_34_14), - SymOp(Rot_mZ_X_Y, Tr_14_34_34), - SymOp(Rot_Z_X_mY, Tr_34_14_34), - SymOp(Rot_Z_mX_Y, Tr_14_14_14), - SymOp(Rot_mY_mZ_mX, Tr_34_34_14), - SymOp(Rot_Y_mZ_X, Tr_14_14_14), - SymOp(Rot_mY_Z_X, Tr_14_34_34), - SymOp(Rot_Y_Z_mX, Tr_34_14_34), - SymOp(Rot_mY_mX_Z, Tr_0_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_0), - SymOp(Rot_mY_X_mZ, Tr_12_0_12), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mZ_Y, Tr_0_12_12), - SymOp(Rot_X_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_12_12_0), - SymOp(Rot_mX_Z_mY, Tr_12_0_12), - SymOp(Rot_mZ_mY_X, Tr_0_12_12), - SymOp(Rot_mZ_Y_mX, Tr_12_0_12), - SymOp(Rot_Z_mY_mX, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_12_12_0), - ], -) - -sg228 = SpaceGroup( - number=228, - num_sym_equiv=192, - num_primitive_sym_equiv=48, - short_name="Fd-3c", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="F 41/d -3 2/c", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_0_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_12_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_0_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_12), - SymOp(Rot_Y_X_mZ, Tr_34_14_34), - SymOp(Rot_mY_mX_mZ, Tr_14_14_14), - SymOp(Rot_Y_mX_Z, Tr_14_34_34), - SymOp(Rot_mY_X_Z, Tr_34_34_14), - SymOp(Rot_X_Z_mY, Tr_34_14_34), - SymOp(Rot_mX_Z_Y, Tr_34_34_14), - SymOp(Rot_mX_mZ_mY, Tr_14_14_14), - SymOp(Rot_X_mZ_Y, Tr_14_34_34), - SymOp(Rot_Z_Y_mX, Tr_34_14_34), - SymOp(Rot_Z_mY_X, Tr_14_34_34), - SymOp(Rot_mZ_Y_X, Tr_34_34_14), - SymOp(Rot_mZ_mY_mX, Tr_14_14_14), - SymOp(Rot_mX_mY_mZ, Tr_34_34_34), - SymOp(Rot_X_Y_mZ, Tr_34_14_14), - SymOp(Rot_X_mY_Z, Tr_14_14_34), - SymOp(Rot_mX_Y_Z, Tr_14_34_14), - SymOp(Rot_mZ_mX_mY, Tr_34_34_34), - SymOp(Rot_mZ_X_Y, Tr_14_34_14), - SymOp(Rot_Z_X_mY, Tr_34_14_14), - SymOp(Rot_Z_mX_Y, Tr_14_14_34), - SymOp(Rot_mY_mZ_mX, Tr_34_34_34), - SymOp(Rot_Y_mZ_X, Tr_14_14_34), - SymOp(Rot_mY_Z_X, Tr_14_34_14), - SymOp(Rot_Y_Z_mX, Tr_34_14_14), - SymOp(Rot_mY_mX_Z, Tr_0_12_0), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_12), - SymOp(Rot_mX_mZ_Y, Tr_0_12_0), - SymOp(Rot_X_mZ_mY, Tr_0_0_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_Z_mY, Tr_12_0_0), - SymOp(Rot_mZ_mY_X, Tr_0_12_0), - SymOp(Rot_mZ_Y_mX, Tr_12_0_0), - SymOp(Rot_Z_mY_mX, Tr_0_0_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_12_12), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_34_34_14), - SymOp(Rot_mY_mX_mZ, Tr_14_34_34), - SymOp(Rot_Y_mX_Z, Tr_14_14_14), - SymOp(Rot_mY_X_Z, Tr_34_14_34), - SymOp(Rot_X_Z_mY, Tr_34_34_14), - SymOp(Rot_mX_Z_Y, Tr_34_14_34), - SymOp(Rot_mX_mZ_mY, Tr_14_34_34), - SymOp(Rot_X_mZ_Y, Tr_14_14_14), - SymOp(Rot_Z_Y_mX, Tr_34_34_14), - SymOp(Rot_Z_mY_X, Tr_14_14_14), - SymOp(Rot_mZ_Y_X, Tr_34_14_34), - SymOp(Rot_mZ_mY_mX, Tr_14_34_34), - SymOp(Rot_mX_mY_mZ, Tr_34_14_14), - SymOp(Rot_X_Y_mZ, Tr_34_34_34), - SymOp(Rot_X_mY_Z, Tr_14_34_14), - SymOp(Rot_mX_Y_Z, Tr_14_14_34), - SymOp(Rot_mZ_mX_mY, Tr_34_14_14), - SymOp(Rot_mZ_X_Y, Tr_14_14_34), - SymOp(Rot_Z_X_mY, Tr_34_34_34), - SymOp(Rot_Z_mX_Y, Tr_14_34_14), - SymOp(Rot_mY_mZ_mX, Tr_34_14_14), - SymOp(Rot_Y_mZ_X, Tr_14_34_14), - SymOp(Rot_mY_Z_X, Tr_14_14_34), - SymOp(Rot_Y_Z_mX, Tr_34_34_34), - SymOp(Rot_mY_mX_Z, Tr_0_0_12), - SymOp(Rot_Y_X_Z, Tr_12_0_0), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_0_12_0), - SymOp(Rot_mX_mZ_Y, Tr_0_0_12), - SymOp(Rot_X_mZ_mY, Tr_0_12_0), - SymOp(Rot_X_Z_Y, Tr_12_0_0), - SymOp(Rot_mX_Z_mY, Tr_12_12_12), - SymOp(Rot_mZ_mY_X, Tr_0_0_12), - SymOp(Rot_mZ_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_mX, Tr_0_12_0), - SymOp(Rot_Z_Y_X, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_12_0_12), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_12_0_12), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_X_mZ, Tr_14_14_14), - SymOp(Rot_mY_mX_mZ, Tr_34_14_34), - SymOp(Rot_Y_mX_Z, Tr_34_34_14), - SymOp(Rot_mY_X_Z, Tr_14_34_34), - SymOp(Rot_X_Z_mY, Tr_14_14_14), - SymOp(Rot_mX_Z_Y, Tr_14_34_34), - SymOp(Rot_mX_mZ_mY, Tr_34_14_34), - SymOp(Rot_X_mZ_Y, Tr_34_34_14), - SymOp(Rot_Z_Y_mX, Tr_14_14_14), - SymOp(Rot_Z_mY_X, Tr_34_34_14), - SymOp(Rot_mZ_Y_X, Tr_14_34_34), - SymOp(Rot_mZ_mY_mX, Tr_34_14_34), - SymOp(Rot_mX_mY_mZ, Tr_14_34_14), - SymOp(Rot_X_Y_mZ, Tr_14_14_34), - SymOp(Rot_X_mY_Z, Tr_34_14_14), - SymOp(Rot_mX_Y_Z, Tr_34_34_34), - SymOp(Rot_mZ_mX_mY, Tr_14_34_14), - SymOp(Rot_mZ_X_Y, Tr_34_34_34), - SymOp(Rot_Z_X_mY, Tr_14_14_34), - SymOp(Rot_Z_mX_Y, Tr_34_14_14), - SymOp(Rot_mY_mZ_mX, Tr_14_34_14), - SymOp(Rot_Y_mZ_X, Tr_34_14_14), - SymOp(Rot_mY_Z_X, Tr_34_34_34), - SymOp(Rot_Y_Z_mX, Tr_14_14_34), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_0_12_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_12), - SymOp(Rot_Y_mX_mZ, Tr_12_0_0), - SymOp(Rot_mX_mZ_Y, Tr_12_12_12), - SymOp(Rot_X_mZ_mY, Tr_12_0_0), - SymOp(Rot_X_Z_Y, Tr_0_12_0), - SymOp(Rot_mX_Z_mY, Tr_0_0_12), - SymOp(Rot_mZ_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_mX, Tr_0_0_12), - SymOp(Rot_Z_mY_mX, Tr_12_0_0), - SymOp(Rot_Z_Y_X, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_Z_X_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_12_12_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_14_34_34), - SymOp(Rot_mY_mX_mZ, Tr_34_34_14), - SymOp(Rot_Y_mX_Z, Tr_34_14_34), - SymOp(Rot_mY_X_Z, Tr_14_14_14), - SymOp(Rot_X_Z_mY, Tr_14_34_34), - SymOp(Rot_mX_Z_Y, Tr_14_14_14), - SymOp(Rot_mX_mZ_mY, Tr_34_34_14), - SymOp(Rot_X_mZ_Y, Tr_34_14_34), - SymOp(Rot_Z_Y_mX, Tr_14_34_34), - SymOp(Rot_Z_mY_X, Tr_34_14_34), - SymOp(Rot_mZ_Y_X, Tr_14_14_14), - SymOp(Rot_mZ_mY_mX, Tr_34_34_14), - SymOp(Rot_mX_mY_mZ, Tr_14_14_34), - SymOp(Rot_X_Y_mZ, Tr_14_34_14), - SymOp(Rot_X_mY_Z, Tr_34_34_34), - SymOp(Rot_mX_Y_Z, Tr_34_14_14), - SymOp(Rot_mZ_mX_mY, Tr_14_14_34), - SymOp(Rot_mZ_X_Y, Tr_34_14_14), - SymOp(Rot_Z_X_mY, Tr_14_34_14), - SymOp(Rot_Z_mX_Y, Tr_34_34_34), - SymOp(Rot_mY_mZ_mX, Tr_14_14_34), - SymOp(Rot_Y_mZ_X, Tr_34_34_34), - SymOp(Rot_mY_Z_X, Tr_34_14_14), - SymOp(Rot_Y_Z_mX, Tr_14_34_14), - SymOp(Rot_mY_mX_Z, Tr_12_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_12), - SymOp(Rot_mY_X_mZ, Tr_0_12_0), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mZ_Y, Tr_12_0_0), - SymOp(Rot_X_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_0_0_12), - SymOp(Rot_mX_Z_mY, Tr_0_12_0), - SymOp(Rot_mZ_mY_X, Tr_12_0_0), - SymOp(Rot_mZ_Y_mX, Tr_0_12_0), - SymOp(Rot_Z_mY_mX, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_0_0_12), - ], -) - -sg229 = SpaceGroup( - number=229, - num_sym_equiv=96, - num_primitive_sym_equiv=48, - short_name="Im-3m", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="I 4/m -3 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_0_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_0_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_0_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_0), - SymOp(Rot_mY_mX_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_Z, Tr_0_0_0), - SymOp(Rot_mY_X_Z, Tr_0_0_0), - SymOp(Rot_X_Z_mY, Tr_0_0_0), - SymOp(Rot_mX_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_mZ_Y, Tr_0_0_0), - SymOp(Rot_Z_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_X, Tr_0_0_0), - SymOp(Rot_mZ_mY_mX, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_0_0_0), - SymOp(Rot_Z_X_mY, Tr_0_0_0), - SymOp(Rot_Z_mX_Y, Tr_0_0_0), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_0), - SymOp(Rot_Y_Z_mX, Tr_0_0_0), - SymOp(Rot_mY_mX_Z, Tr_0_0_0), - SymOp(Rot_Y_X_Z, Tr_0_0_0), - SymOp(Rot_mY_X_mZ, Tr_0_0_0), - SymOp(Rot_Y_mX_mZ, Tr_0_0_0), - SymOp(Rot_mX_mZ_Y, Tr_0_0_0), - SymOp(Rot_X_mZ_mY, Tr_0_0_0), - SymOp(Rot_X_Z_Y, Tr_0_0_0), - SymOp(Rot_mX_Z_mY, Tr_0_0_0), - SymOp(Rot_mZ_mY_X, Tr_0_0_0), - SymOp(Rot_mZ_Y_mX, Tr_0_0_0), - SymOp(Rot_Z_mY_mX, Tr_0_0_0), - SymOp(Rot_Z_Y_X, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_mX_Y, Tr_12_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_12_12), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_12), - SymOp(Rot_mY_mZ_X, Tr_12_12_12), - SymOp(Rot_Y_X_mZ, Tr_12_12_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_12_12), - SymOp(Rot_mY_X_Z, Tr_12_12_12), - SymOp(Rot_X_Z_mY, Tr_12_12_12), - SymOp(Rot_mX_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_mZ_Y, Tr_12_12_12), - SymOp(Rot_Z_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_X, Tr_12_12_12), - SymOp(Rot_mZ_mY_mX, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_mZ_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_X_Y, Tr_12_12_12), - SymOp(Rot_Z_X_mY, Tr_12_12_12), - SymOp(Rot_Z_mX_Y, Tr_12_12_12), - SymOp(Rot_mY_mZ_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_X, Tr_12_12_12), - SymOp(Rot_mY_Z_X, Tr_12_12_12), - SymOp(Rot_Y_Z_mX, Tr_12_12_12), - SymOp(Rot_mY_mX_Z, Tr_12_12_12), - SymOp(Rot_Y_X_Z, Tr_12_12_12), - SymOp(Rot_mY_X_mZ, Tr_12_12_12), - SymOp(Rot_Y_mX_mZ, Tr_12_12_12), - SymOp(Rot_mX_mZ_Y, Tr_12_12_12), - SymOp(Rot_X_mZ_mY, Tr_12_12_12), - SymOp(Rot_X_Z_Y, Tr_12_12_12), - SymOp(Rot_mX_Z_mY, Tr_12_12_12), - SymOp(Rot_mZ_mY_X, Tr_12_12_12), - SymOp(Rot_mZ_Y_mX, Tr_12_12_12), - SymOp(Rot_Z_mY_mX, Tr_12_12_12), - SymOp(Rot_Z_Y_X, Tr_12_12_12), - ], -) - -sg230 = SpaceGroup( - number=230, - num_sym_equiv=96, - num_primitive_sym_equiv=48, - short_name="Ia-3d", - point_group_name="PGm3barm", - crystal_system="CUBIC", - pdb_name="I 41/a -3 2/d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_Z_mX_mY, Tr_12_12_0), - SymOp(Rot_mZ_mX_Y, Tr_12_0_12), - SymOp(Rot_mZ_X_mY, Tr_0_12_12), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_12), - SymOp(Rot_Y_mZ_mX, Tr_12_12_0), - SymOp(Rot_mY_mZ_X, Tr_12_0_12), - SymOp(Rot_Y_X_mZ, Tr_34_14_14), - SymOp(Rot_mY_mX_mZ, Tr_34_34_34), - SymOp(Rot_Y_mX_Z, Tr_14_14_34), - SymOp(Rot_mY_X_Z, Tr_14_34_14), - SymOp(Rot_X_Z_mY, Tr_34_14_14), - SymOp(Rot_mX_Z_Y, Tr_14_34_14), - SymOp(Rot_mX_mZ_mY, Tr_34_34_34), - SymOp(Rot_X_mZ_Y, Tr_14_14_34), - SymOp(Rot_Z_Y_mX, Tr_34_14_14), - SymOp(Rot_Z_mY_X, Tr_14_14_34), - SymOp(Rot_mZ_Y_X, Tr_14_34_14), - SymOp(Rot_mZ_mY_mX, Tr_34_34_34), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_mZ_mX_mY, Tr_0_0_0), - SymOp(Rot_mZ_X_Y, Tr_12_12_0), - SymOp(Rot_Z_X_mY, Tr_12_0_12), - SymOp(Rot_Z_mX_Y, Tr_0_12_12), - SymOp(Rot_mY_mZ_mX, Tr_0_0_0), - SymOp(Rot_Y_mZ_X, Tr_0_12_12), - SymOp(Rot_mY_Z_X, Tr_12_12_0), - SymOp(Rot_Y_Z_mX, Tr_12_0_12), - SymOp(Rot_mY_mX_Z, Tr_14_34_34), - SymOp(Rot_Y_X_Z, Tr_14_14_14), - SymOp(Rot_mY_X_mZ, Tr_34_34_14), - SymOp(Rot_Y_mX_mZ, Tr_34_14_34), - SymOp(Rot_mX_mZ_Y, Tr_14_34_34), - SymOp(Rot_X_mZ_mY, Tr_34_14_34), - SymOp(Rot_X_Z_Y, Tr_14_14_14), - SymOp(Rot_mX_Z_mY, Tr_34_34_14), - SymOp(Rot_mZ_mY_X, Tr_14_34_34), - SymOp(Rot_mZ_Y_mX, Tr_34_34_14), - SymOp(Rot_Z_mY_mX, Tr_34_14_34), - SymOp(Rot_Z_Y_X, Tr_14_14_14), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_Z_mX_mY, Tr_0_0_12), - SymOp(Rot_mZ_mX_Y, Tr_0_12_0), - SymOp(Rot_mZ_X_mY, Tr_12_0_0), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_0), - SymOp(Rot_Y_mZ_mX, Tr_0_0_12), - SymOp(Rot_mY_mZ_X, Tr_0_12_0), - SymOp(Rot_Y_X_mZ, Tr_14_34_34), - SymOp(Rot_mY_mX_mZ, Tr_14_14_14), - SymOp(Rot_Y_mX_Z, Tr_34_34_14), - SymOp(Rot_mY_X_Z, Tr_34_14_34), - SymOp(Rot_X_Z_mY, Tr_14_34_34), - SymOp(Rot_mX_Z_Y, Tr_34_14_34), - SymOp(Rot_mX_mZ_mY, Tr_14_14_14), - SymOp(Rot_X_mZ_Y, Tr_34_34_14), - SymOp(Rot_Z_Y_mX, Tr_14_34_34), - SymOp(Rot_Z_mY_X, Tr_34_34_14), - SymOp(Rot_mZ_Y_X, Tr_34_14_34), - SymOp(Rot_mZ_mY_mX, Tr_14_14_14), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_mZ_mX_mY, Tr_12_12_12), - SymOp(Rot_mZ_X_Y, Tr_0_0_12), - SymOp(Rot_Z_X_mY, Tr_0_12_0), - SymOp(Rot_Z_mX_Y, Tr_12_0_0), - SymOp(Rot_mY_mZ_mX, Tr_12_12_12), - SymOp(Rot_Y_mZ_X, Tr_12_0_0), - SymOp(Rot_mY_Z_X, Tr_0_0_12), - SymOp(Rot_Y_Z_mX, Tr_0_12_0), - SymOp(Rot_mY_mX_Z, Tr_34_14_14), - SymOp(Rot_Y_X_Z, Tr_34_34_34), - SymOp(Rot_mY_X_mZ, Tr_14_14_34), - SymOp(Rot_Y_mX_mZ, Tr_14_34_14), - SymOp(Rot_mX_mZ_Y, Tr_34_14_14), - SymOp(Rot_X_mZ_mY, Tr_14_34_14), - SymOp(Rot_X_Z_Y, Tr_34_34_34), - SymOp(Rot_mX_Z_mY, Tr_14_14_34), - SymOp(Rot_mZ_mY_X, Tr_34_14_14), - SymOp(Rot_mZ_Y_mX, Tr_14_14_34), - SymOp(Rot_Z_mY_mX, Tr_14_34_14), - SymOp(Rot_Z_Y_X, Tr_34_34_34), - ], -) - -sg1003 = SpaceGroup( - number=1003, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P2", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 2", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_mX_mY_Z, Tr_0_0_0)], -) - -sg1004 = SpaceGroup( - number=1004, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P1121", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 21", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_mX_mY_Z, Tr_0_0_12)], -) - -sg3004 = SpaceGroup( - number=3004, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="I21", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="I 1 21 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - ], -) - -sg1005 = SpaceGroup( - number=1005, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="B2", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="B 1 1 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - ], -) - -sg2005 = SpaceGroup( - number=2005, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="A2", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="A 2 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - ], -) - -sg3005 = SpaceGroup( - number=3005, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="C21", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="C 1 21 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - ], -) - -sg1006 = SpaceGroup( - number=1006, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P11m", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 m", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_X_Y_mZ, Tr_0_0_0)], -) - -sg1007 = SpaceGroup( - number=1007, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P11b", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 b", - symop_list=[SymOp(Rot_X_Y_Z, Tr_0_0_0), SymOp(Rot_X_Y_mZ, Tr_0_12_0)], -) - -sg1008 = SpaceGroup( - number=1008, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="B11m", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="B 1 1 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1009 = SpaceGroup( - number=1009, - num_sym_equiv=4, - num_primitive_sym_equiv=2, - short_name="B11b", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="B 1 1 b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1010 = SpaceGroup( - number=1010, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P112/m", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - ], -) - -sg1011 = SpaceGroup( - number=1011, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P1121/m", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 21/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg1012 = SpaceGroup( - number=1012, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="B112/m", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="B 1 1 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - ], -) - -sg1013 = SpaceGroup( - number=1013, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P112/b", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 2/b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg1014 = SpaceGroup( - number=1014, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P1121/b", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 21/b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1015 = SpaceGroup( - number=1015, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="B112/b", - point_group_name="PG2C", - crystal_system="MONOCLINIC", - pdb_name="B 1 1 2/b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1017 = SpaceGroup( - number=1017, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2122", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - ], -) - -sg2017 = SpaceGroup( - number=2017, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2212", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 21 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - ], -) - -sg1018 = SpaceGroup( - number=1018, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21212a", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 21 2 (a)", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - ], -) - -sg2018 = SpaceGroup( - number=2018, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21221", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 2 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - ], -) - -sg3018 = SpaceGroup( - number=3018, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P22121", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 21 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - ], -) - -sg1020 = SpaceGroup( - number=1020, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="C2221a", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2 2 21a)", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - ], -) - -sg1021 = SpaceGroup( - number=1021, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="C222a", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2 2 2a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - ], -) - -sg1022 = SpaceGroup( - number=1022, - num_sym_equiv=16, - num_primitive_sym_equiv=4, - short_name="F222a", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="F 2 2 2a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - ], -) - -sg1023 = SpaceGroup( - number=1023, - num_sym_equiv=8, - num_primitive_sym_equiv=4, - short_name="I222a", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="I 2 2 2a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - ], -) - -sg1059 = SpaceGroup( - number=1059, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmmn2", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21/m 21/m 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - ], -) - -sg1094 = SpaceGroup( - number=1094, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="P42212a", - point_group_name="PG422", - crystal_system="TETRAGONAL", - pdb_name="P 42 21 2a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mY_X_Z, Tr_0_12_12), - SymOp(Rot_Y_mX_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_Y_X_mZ, Tr_0_0_12), - SymOp(Rot_mY_mX_mZ, Tr_12_12_12), - ], -) - -sg1197 = SpaceGroup( - number=1197, - num_sym_equiv=24, - num_primitive_sym_equiv=12, - short_name="I23a", - point_group_name="PG23", - crystal_system="CUBIC", - pdb_name="I 2 3a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_Y_Z_X, Tr_0_0_0), - SymOp(Rot_mY_mZ_X, Tr_12_12_0), - SymOp(Rot_Y_mZ_mX, Tr_12_0_0), - SymOp(Rot_mY_Z_mX, Tr_0_12_0), - SymOp(Rot_Z_X_Y, Tr_0_0_0), - SymOp(Rot_mZ_mX_Y, Tr_12_12_0), - SymOp(Rot_Z_mX_mY, Tr_12_0_0), - SymOp(Rot_mZ_X_mY, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_Y_Z_X, Tr_12_12_12), - SymOp(Rot_mY_mZ_X, Tr_0_0_12), - SymOp(Rot_Y_mZ_mX, Tr_0_12_12), - SymOp(Rot_mY_Z_mX, Tr_12_0_12), - SymOp(Rot_Z_X_Y, Tr_12_12_12), - SymOp(Rot_mZ_mX_Y, Tr_0_0_12), - SymOp(Rot_Z_mX_mY, Tr_0_12_12), - SymOp(Rot_mZ_X_mY, Tr_12_0_12), - ], -) - - -# list of the space groups -mmLibSpaceGroupList = [ - sg1, - sg2, - sg3, - sg4, - sg5, - sg6, - sg7, - sg8, - sg9, - sg10, - sg11, - sg12, - sg13, - sg14, - sg15, - sg16, - sg17, - sg18, - sg19, - sg20, - sg21, - sg22, - sg23, - sg24, - sg25, - sg26, - sg27, - sg28, - sg29, - sg30, - sg31, - sg32, - sg33, - sg34, - sg35, - sg36, - sg37, - sg38, - sg39, - sg40, - sg41, - sg42, - sg43, - sg44, - sg45, - sg46, - sg47, - sg48, - sg49, - sg50, - sg51, - sg52, - sg53, - sg54, - sg55, - sg56, - sg57, - sg58, - sg59, - sg60, - sg61, - sg62, - sg63, - sg64, - sg65, - sg66, - sg67, - sg68, - sg69, - sg70, - sg71, - sg72, - sg73, - sg74, - sg75, - sg76, - sg77, - sg78, - sg79, - sg80, - sg81, - sg82, - sg83, - sg84, - sg85, - sg86, - sg87, - sg88, - sg89, - sg90, - sg91, - sg92, - sg93, - sg94, - sg95, - sg96, - sg97, - sg98, - sg99, - sg100, - sg101, - sg102, - sg103, - sg104, - sg105, - sg106, - sg107, - sg108, - sg109, - sg110, - sg111, - sg112, - sg113, - sg114, - sg115, - sg116, - sg117, - sg118, - sg119, - sg120, - sg121, - sg122, - sg123, - sg124, - sg125, - sg126, - sg127, - sg128, - sg129, - sg130, - sg131, - sg132, - sg133, - sg134, - sg135, - sg136, - sg137, - sg138, - sg139, - sg140, - sg141, - sg142, - sg143, - sg144, - sg145, - sg146, - sg1146, - sg147, - sg148, - sg1148, - sg149, - sg150, - sg151, - sg152, - sg153, - sg154, - sg155, - sg1155, - sg156, - sg157, - sg158, - sg159, - sg160, - sg1160, - sg161, - sg1161, - sg162, - sg163, - sg164, - sg165, - sg166, - sg1166, - sg167, - sg1167, - sg168, - sg169, - sg170, - sg171, - sg172, - sg173, - sg174, - sg175, - sg176, - sg177, - sg178, - sg179, - sg180, - sg181, - sg182, - sg183, - sg184, - sg185, - sg186, - sg187, - sg188, - sg189, - sg190, - sg191, - sg192, - sg193, - sg194, - sg195, - sg196, - sg197, - sg198, - sg199, - sg200, - sg201, - sg202, - sg203, - sg204, - sg205, - sg206, - sg207, - sg208, - sg209, - sg210, - sg211, - sg212, - sg213, - sg214, - sg215, - sg216, - sg217, - sg218, - sg219, - sg220, - sg221, - sg222, - sg223, - sg224, - sg225, - sg226, - sg227, - sg228, - sg229, - sg230, - sg1003, - sg1004, - sg3004, - sg1005, - sg2005, - sg3005, - sg1006, - sg1007, - sg1008, - sg1009, - sg1010, - sg1011, - sg1012, - sg1013, - sg1014, - sg1015, - sg1017, - sg2017, - sg1018, - sg2018, - sg3018, - sg1020, - sg1021, - sg1022, - sg1023, - sg1059, - sg1094, - sg1197, -] diff --git a/src/diffpy/structure/parsers/__init__.py b/src/diffpy/structure/parsers/__init__.py deleted file mode 100644 index 124b91a7..00000000 --- a/src/diffpy/structure/parsers/__init__.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Conversion plugins for various structure formats. - -The recognized structure formats are defined by subclassing `StructureParser`, -by convention these classes are named `P_.py`. The parser classes should -to override the `parseLines()` and `toLines()` methods of `StructureParser`. -Any structure parser needs to be registered in `parser_index` module. - -For normal usage it should be sufficient to use the routines provided -in this module. - -Content: - * StructureParser: base class for a concrete Parser - * parser_index: dictionary of known structure formats - * getParser: factory for Parser at given format - * inputFormats: list of available input formats - * outputFormats: list of available output formats -""" - -from diffpy.structure.parsers.parser_index_mod import parser_index -from diffpy.structure.parsers.structureparser import StructureParser -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -# silence pyflakes checker -assert StructureParser - -parsers_base = "diffpy.structure" -removal_version = "4.0.0" -getParser_deprecation_msg = build_deprecation_message( - parsers_base, - "getParser", - "get_parser", - removal_version, -) -inputFormats_deprecation_msg = build_deprecation_message( - parsers_base, - "inputFormats", - "input_formats", - removal_version, -) -outputFormats_deprecation_msg = build_deprecation_message( - parsers_base, - "outputFormats", - "output_formats", - removal_version, -) - - -@deprecated(getParser_deprecation_msg) -def getParser(format, **kw): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.get_parser instead. - """ - return get_parser(format, **kw) - - -def get_parser(format, **kw): - """Return Parser instance for a given structure format. - - Parameters - ---------- - format : str - String with the format name, see `parser_index_mod`. - **kw : dict - Keyword arguments passed to the Parser init function. - - Returns - ------- - Parser - Parser instance for the given format. - - Raises - ------ - StructureFormatError - When the format is not defined. - """ - if format not in parser_index: - emsg = "no parser for '%s' format" % format - raise StructureFormatError(emsg) - pmod = parser_index[format]["module"] - ns = {} - import_cmd = "from diffpy.structure.parsers import %s as pm" % pmod - exec(import_cmd, ns) - return ns["pm"].get_parser(**kw) - - -@deprecated(inputFormats_deprecation_msg) -def inputFormats(): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.input_formats instead. - """ - return input_formats() - - -def input_formats(): - """Return list of implemented input structure formats.""" - input_formats = [fmt for fmt, prop in parser_index.items() if prop["has_input"]] - input_formats.sort() - return input_formats - - -@deprecated(outputFormats_deprecation_msg) -def outputFormats(): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.output_formats instead. - """ - return output_formats() - - -def output_formats(): - """Return list of implemented output structure formats.""" - output_formats = [fmt for fmt, prop in parser_index.items() if prop["has_output"]] - output_formats.sort() - return output_formats diff --git a/src/diffpy/structure/parsers/p_auto.py b/src/diffpy/structure/parsers/p_auto.py deleted file mode 100644 index a0683d58..00000000 --- a/src/diffpy/structure/parsers/p_auto.py +++ /dev/null @@ -1,276 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Parser for automatic file format detection. - -This Parser does not provide the the `toLines()` method. -""" - -import os -from typing import Any - -from diffpy.structure.parsers import StructureParser, parser_index -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.P_auto" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) -parseFile_deprecation_msg = build_deprecation_message( - base, - "parseFile", - "parse_file", - removal_version, -) - - -class P_auto(StructureParser): - """Parser with automatic detection of structure format. - - This parser attempts to automatically detect the format of a given - structure file and parse it accordingly. When successful, it sets - its `format` attribute to the detected structure format. - - Parameters - ---------- - **kw : dict - Keyword arguments for the structure parser. - - Attributes - ---------- - format : str - Detected structure format. Initially set to "auto" and updated - after successful detection of the structure format. - pkw : dict - Keyword arguments passed to the parser. - """ - - def __init__(self, **kw): - StructureParser.__init__(self) - self.format = "auto" - self.pkw = kw - return - - # parseLines helpers - def _get_ordered_formats(self): - """Build a list of relevance ordered structure formats. - - This only works when `self.filename` has a known extension. - """ - from diffpy.structure.parsers import input_formats - - ofmts = [fmt for fmt in input_formats() if fmt != "auto"] - if not self.filename: - return ofmts - # filename is defined here - filebase = os.path.basename(self.filename) - from fnmatch import fnmatch - - # loop over copy of ofmts - for fmt in list(ofmts): - pattern = parser_index[fmt]["file_pattern"] - if pattern in ("*.*", "*"): - continue - anymatch = [1 for p in pattern.split("|") if fnmatch(filebase, p)] - if anymatch: - ofmts.remove(fmt) - ofmts.insert(0, fmt) - return ofmts - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_auto.parse_lines instead. - """ - return self.parse_lines(lines) - - def parse_lines(self, lines): - """Detect format and create `Structure` instance from a list of - lines. - - Set format attribute to the detected file format. - - Parameters - ---------- - lines : list - List of lines with structure data. - - Returns - ------- - Structure - `Structure` object. - - Raises - ------ - StructureFormatError - """ - return self._wrap_parse_method("parse_lines", lines) - - def parse(self, s): - """Detect format and create `Structure` instance from a string. - - Set format attribute to the detected file format. - - Parameters - ---------- - s : str - String with structure data. - - Returns - ------- - Structure - `Structure` object. - - Raises - ------ - StructureFormatError - """ - return self._wrap_parse_method("parse", s) - - @deprecated(parseFile_deprecation_msg) - def parseFile(self, filename): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_auto.parse_file instead. - """ - return self.parse_file(filename) - - def parse_file(self, filename): - """Detect format and create Structure instance from an existing - file. - - Set format attribute to the detected file format. - - Parameters - ---------- - filename : str - Path to structure file. - - Returns - ------- - Structure - `Structure` object. - - Raises - ------ - StructureFormatError - If the structure format is unknown or invalid. - IOError - If the file cannot be read. - """ - self.filename = filename - return self._wrap_parse_method("parse_file", filename) - - def _wrap_parse_method(self, method: object, *args: object, **kwargs: object) -> Any: - """A helper evaluator method that try the specified parse method - with each registered structure parser and return the first - successful result. - - Structure parsers that match structure file extension are - tried first. - - Parameters - ---------- - method : str - Name of the parse method to call. - *args : tuple - Positional arguments for the parse method. - **kwargs : dict - Keyword arguments for the parse method. - - Returns - ------- - Structure - `Structure` object. - - Raises - ------ - StructureFormatError - """ - from diffpy.structure.parsers import get_parser - - ofmts = self._get_ordered_formats() - stru = None - # try all parsers in sequence - parsers_emsgs = [] - for fmt in ofmts: - p = get_parser(fmt, **self.pkw) - try: - pmethod = getattr(p, method) - stru = pmethod(*args, **kwargs) - self.format = fmt - break - except StructureFormatError as err: - parsers_emsgs.append("%s: %s" % (fmt, err)) - except NotImplementedError: - pass - if stru is None: - emsg = "\n".join( - [ - "Unknown or invalid structure format.", - "Errors per each tested structure format:", - ] - + parsers_emsgs - ) - raise StructureFormatError(emsg) - self.__dict__.update(p.__dict__) - return stru - - -# End of class P_auto - -# Routines ------------------------------------------------------------------- - -parsers_base = "diffpy.structure" -removal_version = "4.0.0" -getParser_deprecation_msg = build_deprecation_message( - parsers_base, - "getParser", - "get_parser", - removal_version, -) - - -@deprecated(getParser_deprecation_msg) -def getParser(**kw): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.P_auto.get_parser instead. - """ - return get_parser(**kw) - - -def get_parser(**kw): - """Return a new instance of the automatic parser. - - Parameters - ---------- - **kw : dict - Keyword arguments for the structure parser - - Returns - ------- - P_auto - Instance of `P_auto`. - """ - return P_auto(**kw) diff --git a/src/diffpy/structure/parsers/p_cif.py b/src/diffpy/structure/parsers/p_cif.py deleted file mode 100644 index 1dc39d7c..00000000 --- a/src/diffpy/structure/parsers/p_cif.py +++ /dev/null @@ -1,975 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Parser for basic CIF file format. - -Attributes ----------- -rx_float : re.Pattern - Constant regular expression for `leading_float()`. -symvec : dict - Helper dictionary for `getSymOp()`. - -Note ----- -References: https://www.iucr.org/resources/cif -""" - -import io -import re -import sys -from contextlib import contextmanager - -import numpy -from CifFile.yapps3_compiled_rt import YappsSyntaxError - -from diffpy.structure import Atom, Lattice, Structure -from diffpy.structure.parsers import StructureParser -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -# ---------------------------------------------------------------------------- - - -base = "diffpy.structure.P_cif" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) -parseFile_deprecation_msg = build_deprecation_message( - base, - "parseFile", - "parse_file", - removal_version, -) -toLines_deprecation_msg = build_deprecation_message( - base, - "toLines", - "to_lines", - removal_version, -) - - -class P_cif(StructureParser): - """Simple parser for CIF structure format. - - Reads Structure from the first block containing _atom_site_label key. - Following blocks, if any, are ignored. - - Parameters - ---------- - eps : float, Optional - Fractional coordinates cutoff for duplicate positions. - When ``None`` use the default for `ExpandAsymmetricUnit`: ``1.0e-5``. - - Attributes - ---------- - format : str - Structure format name. - ciffile : CifFile - Instance of `CifFile` from `PyCifRW`. - stru : Structure - `Structure` instance used for CIF input or output. - spacegroup : SpaceGroup - Instance of `SpaceGroup` used for symmetry expansion. - eps : float - Resolution in fractional coordinates for non-equal positions. - Used for expansion of asymmetric unit. - eau : ExpandAsymmetricUnit - Instance of `ExpandAsymmetricUnit` from `SymmetryUtilities`. - asymmetric_unit : list - List of `Atom` instances for the original asymmetric unit in the CIF file. - labelindex : dict - Dictionary mapping unique atom label to index of `Atom` in `self.asymmetric_unit`. - anisotropy : dict - Dictionary mapping unique atom label to displacement anisotropy resolved at that site. - cif_sgname : str or None - Space group name obtained by looking up the value of - `_space_group_name_Hall`, - `_symmetry_space_group_name_Hall`, - `_space_group_name_H-M_alt`, - `_symmetry_space_group_name_H-M` - items. ``None`` when neither is defined. - """ - - # static data and methods ------------------------------------------------ - - # dictionary set of class methods for translating CIF values - # to Atom attributes - - # static data and methods ------------------------------------------------ - - # dictionary set of class methods for translating CIF values - # to Atom attributes - - _atom_setters = dict.fromkeys( - ( - "_tr_ignore", - "_tr_atom_site_label", - "_tr_atom_site_type_symbol", - "_tr_atom_site_fract_x", - "_tr_atom_site_fract_y", - "_tr_atom_site_fract_z", - "_tr_atom_site_cartn_x", - "_tr_atom_site_cartn_y", - "_tr_atom_site_cartn_z", - "_tr_atom_site_u_iso_or_equiv", - "_tr_atom_site_b_iso_or_equiv", - "_tr_atom_site_adp_type", - "_tr_atom_site_thermal_displace_type", - "_tr_atom_site_occupancy", - "_tr_atom_site_aniso_u_11", - "_tr_atom_site_aniso_u_22", - "_tr_atom_site_aniso_u_33", - "_tr_atom_site_aniso_u_12", - "_tr_atom_site_aniso_u_13", - "_tr_atom_site_aniso_u_23", - "_tr_atom_site_aniso_b_11", - "_tr_atom_site_aniso_b_22", - "_tr_atom_site_aniso_b_33", - "_tr_atom_site_aniso_b_12", - "_tr_atom_site_aniso_b_13", - "_tr_atom_site_aniso_b_23", - ) - ) - # make _atom_setters case insensitive - for k in list(_atom_setters.keys()): - _atom_setters[k] = _atom_setters[k.lower()] = k - del k - - BtoU = 1.0 / (8 * numpy.pi**2) - """float: Conversion factor from B values to U values.""" - - def _tr_ignore(a, value): - return - - _tr_ignore = staticmethod(_tr_ignore) - - def _tr_atom_site_label(a, value): - a.label = str(value) - # set element when not specified by _atom_site_type_symbol - if not a.element: - P_cif._tr_atom_site_type_symbol(a, value) - - _tr_atom_site_label = staticmethod(_tr_atom_site_label) - - # 3 regexp groups for nucleon number, atom symbol, and oxidation state - _psymb = re.compile(r"(\d+-)?([a-zA-Z]+)(\d[+-])?") - - def _tr_atom_site_type_symbol(a, value): - rx = P_cif._psymb.match(value) - smbl = rx and rx.group(0) or value - smbl = str(smbl) - a.element = smbl[:1].upper() + smbl[1:].lower() - - _tr_atom_site_type_symbol = staticmethod(_tr_atom_site_type_symbol) - - def _tr_atom_site_fract_x(a, value): - a.xyz[0] = leading_float(value) - - _tr_atom_site_fract_x = staticmethod(_tr_atom_site_fract_x) - - def _tr_atom_site_fract_y(a, value): - a.xyz[1] = leading_float(value) - - _tr_atom_site_fract_y = staticmethod(_tr_atom_site_fract_y) - - def _tr_atom_site_fract_z(a, value): - a.xyz[2] = leading_float(value) - - _tr_atom_site_fract_z = staticmethod(_tr_atom_site_fract_z) - - def _tr_atom_site_cartn_x(a, value): - a.xyz_cartn[0] = leading_float(value) - - _tr_atom_site_cartn_x = staticmethod(_tr_atom_site_cartn_x) - - def _tr_atom_site_cartn_y(a, value): - a.xyz_cartn[1] = leading_float(value) - - _tr_atom_site_cartn_y = staticmethod(_tr_atom_site_cartn_y) - - def _tr_atom_site_cartn_z(a, value): - a.xyz_cartn[2] = leading_float(value) - - _tr_atom_site_cartn_z = staticmethod(_tr_atom_site_cartn_z) - - def _tr_atom_site_u_iso_or_equiv(a, value): - a.Uisoequiv = leading_float(value) - - _tr_atom_site_u_iso_or_equiv = staticmethod(_tr_atom_site_u_iso_or_equiv) - - def _tr_atom_site_b_iso_or_equiv(a, value): - a.Uisoequiv = P_cif.BtoU * leading_float(value) - - _tr_atom_site_b_iso_or_equiv = staticmethod(_tr_atom_site_b_iso_or_equiv) - - def _tr_atom_site_adp_type(a, value): - a.anisotropy = value not in ("Uiso", "Biso") - - _tr_atom_site_adp_type = staticmethod(_tr_atom_site_adp_type) - _tr_atom_site_thermal_displace_type = _tr_atom_site_adp_type - - def _tr_atom_site_occupancy(a, value): - a.occupancy = leading_float(value, 1.0) - - _tr_atom_site_occupancy = staticmethod(_tr_atom_site_occupancy) - - def _tr_atom_site_aniso_u_11(a, value): - a.U11 = leading_float(value) - - _tr_atom_site_aniso_u_11 = staticmethod(_tr_atom_site_aniso_u_11) - - def _tr_atom_site_aniso_u_22(a, value): - a.U22 = leading_float(value) - - _tr_atom_site_aniso_u_22 = staticmethod(_tr_atom_site_aniso_u_22) - - def _tr_atom_site_aniso_u_33(a, value): - a.U33 = leading_float(value) - - _tr_atom_site_aniso_u_33 = staticmethod(_tr_atom_site_aniso_u_33) - - def _tr_atom_site_aniso_u_12(a, value): - a.U12 = leading_float(value) - - _tr_atom_site_aniso_u_12 = staticmethod(_tr_atom_site_aniso_u_12) - - def _tr_atom_site_aniso_u_13(a, value): - a.U13 = leading_float(value) - - _tr_atom_site_aniso_u_13 = staticmethod(_tr_atom_site_aniso_u_13) - - def _tr_atom_site_aniso_u_23(a, value): - a.U23 = leading_float(value) - - _tr_atom_site_aniso_u_23 = staticmethod(_tr_atom_site_aniso_u_23) - - def _tr_atom_site_aniso_b_11(a, value): - a.U11 = P_cif.BtoU * leading_float(value) - - _tr_atom_site_aniso_b_11 = staticmethod(_tr_atom_site_aniso_b_11) - - def _tr_atom_site_aniso_b_22(a, value): - a.U22 = P_cif.BtoU * leading_float(value) - - _tr_atom_site_aniso_b_22 = staticmethod(_tr_atom_site_aniso_b_22) - - def _tr_atom_site_aniso_b_33(a, value): - a.U33 = P_cif.BtoU * leading_float(value) - - _tr_atom_site_aniso_b_33 = staticmethod(_tr_atom_site_aniso_b_33) - - def _tr_atom_site_aniso_b_12(a, value): - a.U12 = P_cif.BtoU * leading_float(value) - - _tr_atom_site_aniso_b_12 = staticmethod(_tr_atom_site_aniso_b_12) - - def _tr_atom_site_aniso_b_13(a, value): - a.U13 = P_cif.BtoU * leading_float(value) - - _tr_atom_site_aniso_b_13 = staticmethod(_tr_atom_site_aniso_b_13) - - def _tr_atom_site_aniso_b_23(a, value): - a.U23 = P_cif.BtoU * leading_float(value) - - _tr_atom_site_aniso_b_23 = staticmethod(_tr_atom_site_aniso_b_23) - - def _get_atom_setters(cifloop): - """Static method for finding translators of CifLoop items to - data in `Atom` instance. - - Parameters - ---------- - cifloop : CifLoop - Instance of `CifLoop`. - - Returns - ------- - list - List of setter functions in the order of `cifloop.keys()`. - """ - rv = [] - for p in cifloop.keys(): - lcname = "_tr" + p.lower() - fncname = P_cif._atom_setters.get(lcname, "_tr_ignore") - f = getattr(P_cif, fncname) - rv.append(f) - return rv - - _get_atom_setters = staticmethod(_get_atom_setters) - - # normal methods --------------------------------------------------------- - - def __init__(self, eps=None): - StructureParser.__init__(self) - self.format = "cif" - self.ciffile = None - self.stru = None - self.spacegroup = None - self.eps = eps - self.eau = None - self.asymmetric_unit = None - self.labelindex = {} - self.anisotropy = {} - self.cif_sgname = None - pass - - def parse(self, s): - """Create `Structure` instance from a string in CIF format. - - Parameters - ---------- - s : str - A string in CIF format. - - Returns - ------- - Structure - `Structure` instance. - - Raises - ------ - StructureFormatError - When the data do not constitute a valid CIF format. - """ - self.ciffile = None - self.filename = "" - fp = io.StringIO(s) - rv = self._parse_cif_data_source(fp) - return rv - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_cif.parse_lines instead. - """ - return self.parse_lines(lines) - - @deprecated(parseLines_deprecation_msg) - def parse_lines(self, lines): - """Parse list of lines in CIF format. - - Parameters - ---------- - lines : list - List of strings stripped of line terminator. - - Returns - ------- - Structure - `Structure` instance. - - Raises - ------ - StructureFormatError - When the data do not constitute a valid CIF format. - """ - s = "\n".join(lines) + "\n" - return self.parse(s) - - @deprecated(parseFile_deprecation_msg) - def parseFile(self, filename): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_cif.parse_file instead. - """ - return self.parse_file(filename) - - def parse_file(self, filename): - """Create Structure from an existing CIF file. - - Parameters - ---------- - filename : str - Path to structure file. - - Returns - ------- - Structure - `Structure` instance. - - Raises - ------ - StructureFormatError - When the data do not constitute a valid CIF format. - IOError - When the file cannot be opened. - """ - self.ciffile = None - self.filename = filename - rv = self._parse_cif_data_source(filename) - # all good here - return rv - - def _parse_cif_data_source(self, datasource): - """Open and process CIF data from the specified `datasource`. - - Parameters - ---------- - datasource : str or a file-like object - This is used as an argument to the `CifFile` class. The `CifFile` - instance is stored in `ciffile` attribute of this Parser. - - Returns - ------- - Structure - The `Structure` object loaded from the specified data source. - - Raises - ------ - StructureFormatError - When the data do not constitute a valid CIF format. - """ - from CifFile import CifFile, StarError - - self.stru = None - try: - with _suppress_cif_parser_output(): - # Use `grammar` option to digest values with curly-brackets. - # Ref: https://bitbucket.org/jamesrhester/pycifrw/issues/19 - self.ciffile = CifFile(datasource, grammar="auto") - for blockname in self.ciffile.keys(): - self._parse_cif_block(blockname) - # stop after reading the first structure - if self.stru is not None: - break - except (YappsSyntaxError, StarError, ValueError, IndexError) as err: - exc_type, exc_value, exc_traceback = sys.exc_info() - emsg = str(err).strip() - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - return self.stru - - def _parse_cif_block(self, blockname): - """Translate CIF file block, skip blocks without - `_atom_site_label`. Updates data members `stru`, `eau`. - - Parameters - ---------- - blockname : str - Name of top level block in `self.ciffile`. - """ - block = self.ciffile[blockname] - if "_atom_site_label" not in block: - return - # here block contains structure, initialize output data - self.stru = Structure() - self.labelindex.clear() - self.anisotropy.clear() - # execute specialized block parsers - self._parse_lattice(block) - self._parse_atom_site_label(block) - self._parse_atom_site_aniso_label(block) - self._parse_space_group_symop_operation_xyz(block) - return - - def _parse_lattice(self, block): - """Obtain `lattice` parameters from a `CifBlock`. - - This method updates `self.stru.lattic`e. - - Parameters - ---------- - block : CifBlock - Instance of CifBlock. - """ - if "_cell_length_a" not in block: - return - # obtain lattice parameters - try: - latpars = ( - leading_float(block["_cell_length_a"]), - leading_float(block["_cell_length_b"]), - leading_float(block["_cell_length_c"]), - leading_float(block["_cell_angle_alpha"]), - leading_float(block["_cell_angle_beta"]), - leading_float(block["_cell_angle_gamma"]), - ) - except KeyError as err: - exc_type, exc_value, exc_traceback = sys.exc_info() - emsg = str(err) - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - self.stru.lattice = Lattice(*latpars) - return - - def _parse_atom_site_label(self, block): - """Obtain atoms in asymmetric unit from a `CifBlock`. - - This method inserts `Atom` instances to `self.stru` and - updates `labelindex` dictionary. - - Parameters - ---------- - block : CifBlock - Instance of `CifBlock`. - """ - # process _atom_site_label - atom_site_loop = block.GetLoop("_atom_site_label") - does_adp_type = ( - "_atom_site_adp_type" in atom_site_loop or "_atom_site_thermal_displace_type" in atom_site_loop - ) - # get a list of setters for atom_site values - prop_setters = P_cif._get_atom_setters(atom_site_loop) - # index of the _atom_site_label item for the labelindex dictionary - ilb = atom_site_loop.keys().index("_atom_site_label") - # loop through the values and pass them to the setters - sitedatalist = zip(*atom_site_loop.values()) - for values in sitedatalist: - curlabel = values[ilb] - # skip entries that have invalid label - if curlabel == "?": - continue - self.labelindex[curlabel] = len(self.stru) - self.stru.add_new_atom() - a = self.stru.get_last_atom() - for fset, val in zip(prop_setters, values): - fset(a, val) - if does_adp_type: - self.anisotropy[curlabel] = a.anisotropy - return - - def _parse_atom_site_aniso_label(self, block): - """Obtain value of anisotropic thermal displacements from a - `CifBlock`. - - This method updates `U` members of `Atom` instances in `self.stru`. - The `labelindex` dictionary has to be defined beforehand. - - Parameters - ---------- - block : CifBlock - Instance of `CifBlock`. - """ - if "_atom_site_aniso_label" not in block: - return - # something to do here: - adp_loop = block.GetLoop("_atom_site_aniso_label") - # index of the _atom_site_label column - ilb = adp_loop.keys().index("_atom_site_aniso_label") - # get a list of setters for this loop - prop_setters = P_cif._get_atom_setters(adp_loop) - sitedatalist = zip(*adp_loop.values()) - for values in sitedatalist: - lb = values[ilb] - if lb == "?": - break - idx = self.labelindex[lb] - a = self.stru[idx] - if lb not in self.anisotropy: - a.anisotropy = True - self.anisotropy[lb] = True - for fset, val in zip(prop_setters, values): - fset(a, val) - return - - def _parse_space_group_symop_operation_xyz(self, block): - """Process symmetry operations from a CifBlock. - - The method updates `spacegroup` and `eau` data according to symmetry - operations defined in `_space_group_symop_operation_xyz` or - `_symmetry_equiv_pos_as_xyz` items in `CifBlock`. - - Parameters - ---------- - block : CifBlock - Instance of `CifBlock`. - """ - from diffpy.structure.spacegroups import ( - SpaceGroup, - find_space_group, - get_space_group, - is_space_group_identifier, - ) - - self.asymmetric_unit = list(self.stru) - sym_synonyms = ( - "_space_group_symop_operation_xyz", - "_symmetry_equiv_pos_as_xyz", - ) - sym_loop_name = [n for n in sym_synonyms if n in block] - # recover explicit list of symmetry operations - symop_list = [] - if sym_loop_name: - # sym_loop exists here and we know its cif name - sym_loop_name = sym_loop_name[0] - sym_loop = block.GetLoop(sym_loop_name) - for eqxyz in sym_loop[sym_loop_name]: - opcif = get_symop(eqxyz) - symop_list.append(opcif) - # determine space group number - sg_nameHall = block.get("_space_group_name_Hall", "") or block.get("_symmetry_space_group_name_Hall", "") - sg_nameHM = ( - block.get("_space_group_name_H-M_alt", "") - or block.get("_space_group_name_H-M_ref", "") - or block.get("_symmetry_space_group_name_H-M", "") - ) - self.cif_sgname = sg_nameHall or sg_nameHM or None - sgid = block.get("_space_group_IT_number", "") or block.get("_symmetry_Int_Tables_number", "") or sg_nameHM - self.spacegroup = None - # try to reuse existing space group from symmetry operations - if symop_list: - try: - self.spacegroup = find_space_group(symop_list) - except ValueError: - pass - # otherwise lookup the space group from its identifier - if self.spacegroup is None and sgid and is_space_group_identifier(sgid): - self.spacegroup = get_space_group(sgid) - # define new spacegroup when symmetry operations were listed, but - # there is no match to an existing definition - if symop_list and self.spacegroup is None: - new_short_name = "CIF " + (sg_nameHall or "data") - new_crystal_system = ( - block.get("_space_group_crystal_system") or block.get("_symmetry_cell_setting") or "TRICLINIC" - ).upper() - self.spacegroup = SpaceGroup( - short_name=new_short_name, - crystal_system=new_crystal_system, - symop_list=symop_list, - ) - if self.spacegroup is None: - emsg = "CIF file has unknown space group identifier {!r}." - raise StructureFormatError(emsg.format(sgid)) - self._expand_asymmetric_unit(block) - return - - def _expand_asymmetric_unit(self, block): - """Perform symmetry expansion of `self.stru` using - `self.spacegroup`. - - This method updates data in `stru` and `eau`. - - Parameters - ---------- - block : CifBlock - The top-level block containing crystal structure data. - """ - from diffpy.structure.symmetryutilities import ExpandAsymmetricUnit - - corepos = [a.xyz for a in self.stru] - coreUijs = [a.U for a in self.stru] - self.eau = ExpandAsymmetricUnit(self.spacegroup, corepos, coreUijs, eps=self.eps) - # setup anisotropy according to symmetry requirements - # unless it was already explicitly set - for ca, uisotropy in zip(self.stru, self.eau.Uisotropy): - if ca.label not in self.anisotropy: - ca.anisotropy = not uisotropy - self.anisotropy[ca.label] = ca.anisotropy - # build a nested list of new atoms: - newatoms = [] - for i, ca in enumerate(self.stru): - eca = [] # expanded core atom - for j in range(self.eau.multiplicity[i]): - a = Atom(ca) - a.xyz = self.eau.expandedpos[i][j] - if j > 0: - a.label += "_" + str(j + 1) - if a.anisotropy: - a.U = self.eau.expandedUijs[i][j] - eca.append(a) - newatoms.append(eca) - # insert new atoms where they belong - self.stru[:] = sum(newatoms, []) - return - - # conversion to CIF ------------------------------------------------------ - - @deprecated(toLines_deprecation_msg) - def toLines(self, stru): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_cif.to_lines instead. - """ - return self.to_lines(stru) - - def to_lines(self, stru): - """Convert `Structure` to a list of lines in basic CIF format. - - Parameters - ---------- - stru : Structure - The structure to be converted. - - Returns - ------- - list - List of lines in basic CIF format. - """ - import time - - lines = [] - # may be replaced with filtered Structure.title - # for now, we can add the title as a comment - if stru.title.strip() != "": - title_lines = stru.title.split("\n") - lines.extend(["# " + line.strip() for line in title_lines]) - lines.append("") - lines.append("data_3D") - iso_date = "%04i-%02i-%02i" % time.gmtime()[:3] - lines.extend( - [ - "%-31s %s" % ("_audit_creation_date", iso_date), - "%-31s %s" % ("_audit_creation_method", "P_cif.py"), - "", - "%-31s %s" % ("_symmetry_space_group_name_H-M", "'P1'"), - "%-31s %s" % ("_symmetry_Int_Tables_number", "1"), - "%-31s %s" % ("_symmetry_cell_setting", "triclinic"), - "", - ] - ) - # there should be no need to specify equivalent positions for P1 - # _symmetry_equiv_posi_as_xyz x,y,z - lines.extend( - [ - "%-31s %.6g" % ("_cell_length_a", stru.lattice.a), - "%-31s %.6g" % ("_cell_length_b", stru.lattice.b), - "%-31s %.6g" % ("_cell_length_c", stru.lattice.c), - "%-31s %.6g" % ("_cell_angle_alpha", stru.lattice.alpha), - "%-31s %.6g" % ("_cell_angle_beta", stru.lattice.beta), - "%-31s %.6g" % ("_cell_angle_gamma", stru.lattice.gamma), - "", - ] - ) - # build a list of site labels and adp (displacement factor) types - element_count = {} - a_site_label = [] - a_adp_type = [] - for a in stru: - cnt = element_count[a.element] = element_count.get(a.element, 0) + 1 - a_site_label.append("%s%i" % (a.element, cnt)) - if numpy.all(a.U == a.U[0, 0] * numpy.identity(3)): - a_adp_type.append("Uiso") - else: - a_adp_type.append("Uani") - # list all atoms - lines.extend( - [ - "loop_", - " _atom_site_label", - " _atom_site_type_symbol", - " _atom_site_fract_x", - " _atom_site_fract_y", - " _atom_site_fract_z", - " _atom_site_U_iso_or_equiv", - " _atom_site_adp_type", - " _atom_site_occupancy", - ] - ) - for i in range(len(stru)): - a = stru[i] - line = " %-5s %-3s %11.6f %11.6f %11.6f %11.6f %-5s %.4f" % ( - a_site_label[i], - a.element, - a.xyz[0], - a.xyz[1], - a.xyz[2], - a.Uisoequiv, - a_adp_type[i], - a.occupancy, - ) - lines.append(line) - # find anisotropic atoms - idx_aniso = [i for i in range(len(stru)) if a_adp_type[i] != "Uiso"] - if idx_aniso != []: - lines.extend( - [ - "loop_", - " _atom_site_aniso_label", - " _atom_site_aniso_U_11", - " _atom_site_aniso_U_22", - " _atom_site_aniso_U_33", - " _atom_site_aniso_U_12", - " _atom_site_aniso_U_13", - " _atom_site_aniso_U_23", - ] - ) - for i in idx_aniso: - a = stru[i] - line = " %-5s %9.6f %9.6f %9.6f %9.6f %9.6f %9.6f" % ( - a_site_label[i], - a.U[0, 0], - a.U[1, 1], - a.U[2, 2], - a.U[0, 1], - a.U[0, 2], - a.U[1, 2], - ) - lines.append(line) - return lines - - -# End of class P_cif - -# Routines ------------------------------------------------------------------- - -parsers_base = "diffpy.structure" -getParser_deprecation_msg = build_deprecation_message( - parsers_base, - "getParser", - "get_parser", - removal_version, -) -getSymOp_deprecation_msg = build_deprecation_message( - parsers_base, - "getSymOp", - "get_symop", - removal_version, -) -# constant regular expression for leading_float() -rx_float = re.compile(r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?") - - -def leading_float(s, d=0.0): - """Extract the first float from a string and ignore trailing - characters. - - Useful for extracting values from "value(std)" syntax. - - Parameters - ---------- - s : str - The string to be scanned for floating point value. - d : float, Optional - The default value when `s` is "." or "?", which in CIF - format stands for inapplicable and unknown, respectively. - - Returns - ------- - float - The extracted floating point value. - - Raises - ------ - ValueError - When string does not start with a float. - """ - sbare = s.strip() - mx = rx_float.match(sbare) - if mx: - rv = float(mx.group()) - elif sbare == "." or sbare == "?": - # CIF files may contain "." or "?" for unknown values - rv = d - else: - rv = float(sbare) - return rv - - -# helper dictionary for getSymOp() -symvec = { - "x": numpy.array([1, 0, 0], dtype=float), - "y": numpy.array([0, 1, 0], dtype=float), - "z": numpy.array([0, 0, 1], dtype=float), - "-x": numpy.array([-1, 0, 0], dtype=float), - "-y": numpy.array([0, -1, 0], dtype=float), - "-z": numpy.array([0, 0, -1], dtype=float), -} -symvec["+x"] = symvec["x"] -symvec["+y"] = symvec["y"] -symvec["+z"] = symvec["z"] - - -@deprecated(getSymOp_deprecation_msg) -def getSymOp(s): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.get_symop instead. - """ - return get_symop(s) - - -def get_symop(s): - """Create `SpaceGroups.SymOp` instance from a string. - - Parameters - ---------- - s : str - Formula for equivalent coordinates, for example ``'x,1/2-y,1/2+z'``. - - Returns - ------- - SymOp - Instance of `SymOp`. - """ - from diffpy.structure.spacegroups import SymOp - - snoblanks = s.replace(" ", "") - eqlist = snoblanks.split(",") - R = numpy.zeros((3, 3), dtype=float) - t = numpy.zeros(3, dtype=float) - for i in (0, 1, 2): - eqparts = re.split("(?i)([+-]?[xyz])", eqlist[i]) - for Rpart in eqparts[1::2]: - R[i, :] += symvec[Rpart.lower()] - for tpart in eqparts[::2]: - t[i] += eval("1.0*%s+0" % tpart) - t -= numpy.floor(t) - rv = SymOp(R, t) - return rv - - -@deprecated(getParser_deprecation_msg) -def getParser(eps=None): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.get_parser instead. - """ - return get_parser(eps) - - -def get_parser(eps=None): - """Return new `parser` object for CIF format. - - Parameters - ---------- - eps : float, Optional - fractional coordinates cutoff for duplicate positions. - When ``None`` use the default for `ExpandAsymmetricUnit`: ``1.0e-5``. - - Returns - ------- - P_cif - Instance of `P_cif`. - """ - return P_cif(eps=eps) - - -# Local Helpers -------------------------------------------------------------- - - -@contextmanager -def _suppress_cif_parser_output(): - """Context manager which suppresses diagnostic messages from CIF - parser.""" - from CifFile import yapps3_compiled_rt - - print_error = yapps3_compiled_rt.print_error - # replace the print_error function with no-operation - yapps3_compiled_rt.print_error = lambda *a, **kw: None - try: - yield print_error - finally: - yapps3_compiled_rt.print_error = print_error - pass diff --git a/src/diffpy/structure/parsers/p_discus.py b/src/diffpy/structure/parsers/p_discus.py deleted file mode 100644 index 3e77b55f..00000000 --- a/src/diffpy/structure/parsers/p_discus.py +++ /dev/null @@ -1,443 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Parser for DISCUS structure format.""" - -import sys -from functools import reduce - -from diffpy.structure import Lattice, PDFFitStructure -from diffpy.structure.parsers import StructureParser -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.P_discus" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) -toLines_deprecation_msg = build_deprecation_message( - base, - "toLines", - "to_lines", - removal_version, -) - - -class P_discus(StructureParser): - """Parser for DISCUS structure format. The parser chokes on molecule - and generator records. - - Attributes - ---------- - format : str - File format name, default "discus". - nl : int - Line number of the current line being parsed. - lines : list of str - List of lines from the input file. - line : str - Current line being parsed. - stru : PDFFitStructure - Structure being parsed. - ignored_lines : list of str - List of lines that were ignored during parsing. - cell_read : bool - ``True`` if cell record processed. - ncell_read : bool - ``True`` if ncell record processed. - """ - - def __init__(self): - StructureParser.__init__(self) - self.format = "discus" - # helper variables - self.nl = None - self.lines = None - self.line = None - self.stru = None - self.ignored_lines = [] - self.cell_read = False - self.ncell_read = False - return - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """Parse list of lines in DISCUS format. - - Parameters - ---------- - lines : list of str - List of lines from the input file. - - Returns - ------- - PDFFitStructure - Parsed `PDFFitStructure` instance. - - Raises - ------ - StructureFormatError - If the file is not in DISCUS format. - """ - self.lines = lines - ilines = self._lines_iterator() - self.stru = PDFFitStructure() - record_parsers = { - "cell": self._parse_cell, - "format": self._parse_format, - "generator": self._parse_not_implemented, - "molecule": self._parse_not_implemented, - "ncell": self._parse_ncell, - "spcgr": self._parse_spcgr, - "symmetry": self._parse_not_implemented, - "title": self._parse_title, - "shape": self._parse_shape, - } - try: - # parse header - for self.line in ilines: - words = self.line.split() - if not words or words[0][0] == "#": - continue - if words[0] == "atoms": - break - rp = record_parsers.get(words[0], self._parse_unknown_record) - rp(words) - # check if cell has been defined - if not self.cell_read: - emsg = "%d: unit cell not defined" % self.nl - raise StructureFormatError(emsg) - # parse atoms - for self.line in ilines: - words = self.line.replace(",", " ").split() - if not words or words[0][0] == "#": - continue - self._parse_atom(words) - # self consistency check - exp_natoms = reduce(lambda x, y: x * y, self.stru.pdffit["ncell"]) - # only check if ncell record exists - if self.ncell_read and exp_natoms != len(self.stru): - emsg = "Expected %d atoms, read %d." % ( - exp_natoms, - len(self.stru), - ) - raise StructureFormatError(emsg) - # take care of superlattice - if self.stru.pdffit["ncell"][:3] != [1, 1, 1]: - latpars = list(self.stru.lattice.abcABG()) - superlatpars = [latpars[i] * self.stru.pdffit["ncell"][i] for i in range(3)] + latpars[3:] - superlattice = Lattice(*superlatpars) - self.stru.place_in_lattice(superlattice) - self.stru.pdffit["ncell"] = [1, 1, 1, exp_natoms] - except (ValueError, IndexError): - exc_type, exc_value, exc_traceback = sys.exc_info() - emsg = "%d: file is not in DISCUS format" % self.nl - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - return self.stru - - def parse_lines(self, lines): - """Parse list of lines in DISCUS format. - - Parameters - ---------- - lines : list of str - List of lines from the input file. - - Returns - ------- - PDFFitStructure - Parsed `PDFFitStructure` instance. - - Raises - ------ - StructureFormatError - If the file is not in DISCUS format. - """ - self.lines = lines - ilines = self._lines_iterator() - self.stru = PDFFitStructure() - record_parsers = { - "cell": self._parse_cell, - "format": self._parse_format, - "generator": self._parse_not_implemented, - "molecule": self._parse_not_implemented, - "ncell": self._parse_ncell, - "spcgr": self._parse_spcgr, - "symmetry": self._parse_not_implemented, - "title": self._parse_title, - "shape": self._parse_shape, - } - try: - # parse header - for self.line in ilines: - words = self.line.split() - if not words or words[0][0] == "#": - continue - if words[0] == "atoms": - break - rp = record_parsers.get(words[0], self._parse_unknown_record) - rp(words) - # check if cell has been defined - if not self.cell_read: - emsg = "%d: unit cell not defined" % self.nl - raise StructureFormatError(emsg) - # parse atoms - for self.line in ilines: - words = self.line.replace(",", " ").split() - if not words or words[0][0] == "#": - continue - self._parse_atom(words) - # self consistency check - exp_natoms = reduce(lambda x, y: x * y, self.stru.pdffit["ncell"]) - # only check if ncell record exists - if self.ncell_read and exp_natoms != len(self.stru): - emsg = "Expected %d atoms, read %d." % ( - exp_natoms, - len(self.stru), - ) - raise StructureFormatError(emsg) - # take care of superlattice - if self.stru.pdffit["ncell"][:3] != [1, 1, 1]: - latpars = list(self.stru.lattice.abcABG()) - superlatpars = [latpars[i] * self.stru.pdffit["ncell"][i] for i in range(3)] + latpars[3:] - superlattice = Lattice(*superlatpars) - self.stru.place_in_lattice(superlattice) - self.stru.pdffit["ncell"] = [1, 1, 1, exp_natoms] - except (ValueError, IndexError): - exc_type, exc_value, exc_traceback = sys.exc_info() - emsg = "%d: file is not in DISCUS format" % self.nl - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - return self.stru - - @deprecated(toLines_deprecation_msg) - def toLines(self, stru): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_discus.to_lines instead. - """ - return self.to_lines(stru) - - def to_lines(self, stru): - """Convert `Structure` stru to a list of lines in DISCUS format. - - Parameters - ---------- - stru : Structure - Structure to be converted. - - Returns - ------- - list of str - List of lines in DISCUS format. - """ - self.stru = stru - # if necessary, convert self.stru to PDFFitStructure - if not isinstance(stru, PDFFitStructure): - self.stru = PDFFitStructure(stru) - # build the stru_pdffit dictionary initialized from the defaults - # in PDFFitStructure - stru_pdffit = PDFFitStructure().pdffit - if stru.pdffit: - stru_pdffit.update(stru.pdffit) - # here we can start - self.lines = lines = [] - lines.append(("title " + self.stru.title).strip()) - lines.append("spcgr " + stru_pdffit["spcgr"]) - if stru_pdffit.get("spdiameter", 0.0) > 0.0: - line = "shape sphere, %g" % stru_pdffit["spdiameter"] - lines.append(line) - if stru_pdffit.get("stepcut", 0.0) > 0.0: - line = "shape stepcut, %g" % stru_pdffit["stepcut"] - lines.append(line) - lines.append("cell %9.6f, %9.6f, %9.6f, %9.6f, %9.6f, %9.6f" % self.stru.lattice.abcABG()) - lines.append("ncell %9i, %9i, %9i, %9i" % (1, 1, 1, len(self.stru))) - lines.append("atoms") - for a in self.stru: - lines.append( - "%-4s %17.8f %17.8f %17.8f %12.4f" - % ( - a.element.upper(), - a.xyz[0], - a.xyz[1], - a.xyz[2], - a.Bisoequiv, - ) - ) - return lines - - def _lines_iterator(self): - """Iterator over `self.lines`, which increments `self.nl`""" - # ignore trailing empty lines - stop = len(self.lines) - while stop > 0 and self.lines[stop - 1].strip() == "": - stop -= 1 - self.nl = 0 - # read header of PDFFit file - for self.line in self.lines[:stop]: - self.nl += 1 - yield self.line - pass - - def _parse_cell(self, words): - """Process the cell record from DISCUS structure file.""" - # split again on spaces or commas - words = self.line.replace(",", " ").split() - latpars = [float(w) for w in words[1:7]] - try: - self.stru.lattice.set_latt_parms(*latpars) - except ZeroDivisionError: - emsg = "%d: Invalid lattice parameters - zero cell volume" % self.nl - raise StructureFormatError(emsg) - self.cell_read = True - return - - def _parse_format(self, words): - """Process the format record from DISCUS structure file.""" - if words[1] == "pdffit": - emsg = "%d: file is not in DISCUS format" % self.nl - raise StructureFormatError(emsg) - return - - def _parse_ncell(self, words): - """Process the ncell record from DISCUS structure file.""" - # split again on spaces or commas - words = self.line.replace(",", " ").split() - self.stru.pdffit["ncell"] = [int(w) for w in words[1:5]] - self.ncell_read = True - return - - def _parse_spcgr(self, words): - """Process the spcgr record from DISCUS structure file.""" - self.stru.pdffit["spcgr"] = "".join(words[1:]) - return - - def _parse_title(self, words): - """Process the title record from DISCUS structure file.""" - self.stru.title = self.line.lstrip()[5:].strip() - return - - def _parse_shape(self, words): - """Process the shape record from DISCUS structure file. - - Parameters - ---------- - words : list of str - List of words in the line. - - Raises - ------ - StructureFormatError - Invalid type of particle shape correction. - """ - # strip away any commas - linefixed = " ".join(words).replace(",", " ") - wordsfixed = linefixed.split() - shapetype = wordsfixed[1] - if shapetype == "sphere": - self.stru.pdffit["spdiameter"] = float(words[2]) - elif shapetype == "stepcut": - self.stru.pdffit["stepcut"] = float(words[2]) - else: - emsg = "Invalid type of particle shape correction %r" % shapetype - raise StructureFormatError(emsg) - return - - def _parse_atom(self, words): - """Process atom records in DISCUS structure file.""" - element = words[0][0:1].upper() + words[0][1:].lower() - xyz = [float(w) for w in words[1:4]] - Biso = float(words[4]) - self.stru.add_new_atom(element, xyz) - a = self.stru.get_last_atom() - a.Bisoequiv = Biso - return - - def _parse_unknown_record(self, words): - """Process unknown record in DISCUS structure file. - - Silently ignores the line and adds it to `self.ignored_lines`. - - Parameters - ---------- - words : list of str - List of words in the line. - - Raises - ------ - StructureFormatError - Unknown record. - """ - self.ignored_lines.append(self.line) - return - - def _parse_not_implemented(self, words): - """Process the unimplemented records from DISCUS structure file. - - Parameters - ---------- - words : list of str - List of words in the line. - - Raises - ------ - NotImplementedError - If the record is not implemented. - """ - emsg = "%d: reading of DISCUS record %r is not implemented." % ( - self.nl, - words[0], - ) - raise NotImplementedError(emsg) - - -# End of class P_pdffit - -# Routines ------------------------------------------------------------------- - -parsers_base = "diffpy.structure" -removal_version = "4.0.0" -getParser_deprecation_msg = build_deprecation_message( - parsers_base, - "getParser", - "get_parser", - removal_version, -) - - -@deprecated(getParser_deprecation_msg) -def getParser(): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.P_discus.get_parser instead. - """ - return get_parser() - - -def get_parser(): - """Return new `parser` object for DISCUS format. - - Returns - ------- - P_discus - Instance of `P_discus`. - """ - return P_discus() diff --git a/src/diffpy/structure/parsers/p_pdb.py b/src/diffpy/structure/parsers/p_pdb.py deleted file mode 100644 index 98bc4b74..00000000 --- a/src/diffpy/structure/parsers/p_pdb.py +++ /dev/null @@ -1,520 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Basic parser for PDB structure format. - -Note ----- -References: - https://www.wwpdb.org/documentation/file-format-content/format23/v2.3.html - https://www.wwpdb.org/documentation/file-format-content/format30/index.html -""" - -import sys - -import numpy -from numpy import pi - -from diffpy.structure import Structure -from diffpy.structure.parsers import StructureParser -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.P_pdb" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) -toLines_deprecation_msg = build_deprecation_message( - base, - "toLines", - "to_lines", - removal_version, -) -titleLines_deprecation_msg = build_deprecation_message( - base, - "titleLines", - "title_lines", - removal_version, -) -cryst1Lines_deprecation_msg = build_deprecation_message( - base, - "cryst1Lines", - "cryst1_lines", - removal_version, -) -atomLines_deprecation_msg = build_deprecation_message( - base, - "atomLines", - "atom_lines", - removal_version, -) - - -class P_pdb(StructureParser): - """Simple parser for PDB format. - - The parser understands following PDB records: `TITLE, CRYST1, SCALE1, - SCALE2, SCALE3, ATOM, SIGATM, ANISOU, SIGUIJ, TER, HETATM, END`. - - Attributes - ---------- - format : str - Format name, default "pdb". - """ - - # Static data members - orderOfRecords = [ - "HEADER", - "OBSLTE", - "TITLE", - "CAVEAT", - "COMPND", - "SOURCE", - "KEYWDS", - "EXPDTA", - "AUTHOR", - "REVDAT", - "SPRSDE", - "JRNL", - "REMARK", - "REMARK", - "REMARK", - "REMARK", - "DBREF", - "SEQADV", - "SEQRES", - "MODRES", - "HET", - "HETNAM", - "HETSYN", - "FORMUL", - "HELIX", - "SHEET", - "TURN", - "SSBOND", - "LINK", - "HYDBND", - "SLTBRG", - "CISPEP", - "SITE", - "CRYST1", - "ORIGX1", - "ORIGX2", - "ORIGX3", - "SCALE1", - "SCALE2", - "SCALE3", - "MTRIX1", - "MTRIX2", - "MTRIX3", - "TVECT", - "MODEL", - "ATOM", - "SIGATM", - "ANISOU", - "SIGUIJ", - "TER", - "HETATM", - "ENDMDL", - "CONECT", - "MASTER", - "END", - ] - """list: Ordered list of PDB record labels.""" - - validRecords = dict.fromkeys(orderOfRecords) - """dict: Dictionary of PDB record labels.""" - - def __init__(self): - StructureParser.__init__(self) - self.format = "pdb" - return - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_pdb.parse_lines instead. - """ - return self.parse_lines(lines) - - def parse_lines(self, lines): - """Parse list of lines in PDB format. - - Parameters - ---------- - lines : list of str - List of lines in PDB format. - - Returns - ------- - Structure - Parsed structure instance. - - Raises - ------ - StructureFormatError - Invalid PDB record. - """ - try: - stru = Structure() - scale = numpy.identity(3, dtype=float) - scaleU = numpy.zeros(3, dtype=float) - p_nl = 0 - for line in lines: - p_nl += 1 - # skip blank lines - if not line.strip(): - continue - # make sure line has 80 characters - if len(line) < 80: - line = "%-80s" % line - words = line.split() - record = words[0] - if record == "TITLE": - continuation = line[8:10] - if continuation.strip(): - stru.title += line[10:].rstrip() - else: - stru.title = line[10:].rstrip() - elif record == "CRYST1": - a = float(line[7:15]) - b = float(line[15:24]) - c = float(line[24:33]) - alpha = float(line[33:40]) - beta = float(line[40:47]) - gamma = float(line[47:54]) - stru.lattice.set_latt_parms(a, b, c, alpha, beta, gamma) - scale = numpy.transpose(stru.lattice.recbase) - elif record == "SCALE1": - sc = numpy.zeros((3, 3), dtype=float) - sc[0, :] = [float(x) for x in line[10:40].split()] - scaleU[0] = float(line[45:55]) - elif record == "SCALE2": - sc[1, :] = [float(x) for x in line[10:40].split()] - scaleU[1] = float(line[45:55]) - elif record == "SCALE3": - sc[2, :] = [float(x) for x in line[10:40].split()] - scaleU[2] = float(line[45:55]) - base = numpy.transpose(numpy.linalg.inv(sc)) - abcABGcryst = numpy.array(stru.lattice.abcABG()) - stru.lattice.set_new_latt_base_vec(base) - abcABGscale = numpy.array(stru.lattice.abcABG()) - reldiff = numpy.fabs(1.0 - abcABGscale / abcABGcryst) - if not numpy.all(reldiff < 1.0e-4): - emsg = "%d: " % p_nl + "SCALE and CRYST1 are not consistent." - raise StructureFormatError(emsg) - if numpy.any(scaleU != 0.0): - emsg = "Origin offset not yet implemented." - raise NotImplementedError(emsg) - elif record in ("ATOM", "HETATM"): - name = line[12:16].strip() - rc = [float(x) for x in line[30:54].split()] - try: - occupancy = float(line[54:60]) - except ValueError: - occupancy = 1.0 - try: - B = float(line[60:66]) - uiso = B / (8 * pi**2) - except ValueError: - uiso = 0.0 - element = line[76:78].strip() - if element == "": - # get element from the first 2 characters of name - element = line[12:14].strip() - element = element[0].upper() + element[1:].lower() - stru.add_new_atom(element, occupancy=occupancy, label=name) - last_atom = stru.get_last_atom() - last_atom.xyz_cartn = rc - last_atom.Uisoequiv = uiso - elif record == "SIGATM": - sigrc = [float(x) for x in line[30:54].split()] - sigxyz = numpy.dot(scale, sigrc) - try: - sigo = float(line[54:60]) - except ValueError: - sigo = 0.0 - try: - sigB = float(line[60:66]) - sigU = numpy.identity(3) * sigB / (8 * pi**2) - except ValueError: - sigU = numpy.zeros((3, 3), dtype=float) - last_atom.sigxyz = sigxyz - last_atom.sigo = sigo - last_atom.sigU = sigU - elif record == "ANISOU": - last_atom.anisotropy = True - Uij = [float(x) * 1.0e-4 for x in line[28:70].split()] - Ua = last_atom.U - for i in range(3): - Ua[i, i] = Uij[i] - Ua[0, 1] = Ua[1, 0] = Uij[3] - Ua[0, 2] = Ua[2, 0] = Uij[4] - Ua[1, 2] = Ua[2, 1] = Uij[5] - elif record == "SIGUIJ": - sigUij = [float(x) * 1.0e-4 for x in line[28:70].split()] - for i in range(3): - last_atom.sigU[i, i] = sigUij[i] - last_atom.sigU[0, 1] = last_atom.sigU[1, 0] = sigUij[3] - last_atom.sigU[0, 2] = last_atom.sigU[2, 0] = sigUij[4] - last_atom.sigU[1, 2] = last_atom.sigU[2, 1] = sigUij[5] - elif record in P_pdb.validRecords: - pass - else: - emsg = "%d: invalid record name '%r'" % (p_nl, record) - raise StructureFormatError(emsg) - except (ValueError, IndexError): - emsg = "%d: invalid PDB record" % p_nl - exc_type, exc_value, exc_traceback = sys.exc_info() - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - return stru - - @deprecated(titleLines_deprecation_msg) - def titleLines(self, stru): - """Build lines corresponding to `TITLE` record.""" - return self.title_lines(stru) - - def title_lines(self, stru): - """Build lines corresponding to `TITLE` record.""" - lines = [] - title = stru.title - while title != "": - stop = len(title) - # maximum length of title record is 60 - if stop > 60: - stop = title.rfind(" ", 10, 60) - if stop < 0: - stop = 60 - if len(lines) == 0: - continuation = " " - else: - continuation = "%2i" % (len(lines) + 1) - lines.append("%-80s" % ("TITLE " + continuation + title[0:stop])) - title = title[stop:] - return lines - - @deprecated(cryst1Lines_deprecation_msg) - def cryst1Lines(self, stru): - """Build lines corresponding to `CRYST1` record.""" - return self.cryst1_lines(stru) - - def cryst1_lines(self, stru): - """Build lines corresponding to `CRYST1` record.""" - lines = [] - latpar = ( - stru.lattice.a, - stru.lattice.b, - stru.lattice.c, - stru.lattice.alpha, - stru.lattice.beta, - stru.lattice.gamma, - ) - if latpar != (1.0, 1.0, 1.0, 90.0, 90.0, 90.0): - line = "CRYST1%9.3f%9.3f%9.3f%7.2f%7.2f%7.2f" % latpar - lines.append("%-80s" % line) - return lines - - @deprecated(atomLines_deprecation_msg) - def atomLines(self, stru, idx): - """Build `ATOM` records and possibly `SIGATM`, `ANISOU` or - `SIGUIJ` records for `structure` stru `atom` number aidx.""" - return self.atom_lines(stru, idx) - - def atom_lines(self, stru, idx): - """Build `ATOM` records and possibly `SIGATM`, `ANISOU` or - `SIGUIJ` records for `structure` stru `atom` number aidx.""" - lines = [] - a = stru[idx] - ad = a.__dict__ - rc = a.xyz_cartn - B = a.Bisoequiv - atomline = ( - "ATOM " # 1-6 - + "%(serial)5i " # 7-11, 12 - + "%(name)-4s" # 13-16 - + "%(altLoc)c" # 17 - + "%(resName)-3s " # 18-20, 21 - + "%(chainID)c" # 22 - + "%(resSeq)4i" # 23-26 - + "%(iCode)c " # 27, 28-30 - + "%(x)8.3f%(y)8.3f%(z)8.3f" # 31-54 - + "%(occupancy)6.2f" # 55-60 - + "%(tempFactor)6.2f " # 61-66, 67-72 - + "%(segID)-4s" # 73-76 - + "%(element)2s" # 77-78 - + "%(charge)-2s" # 79-80 - ) % { - "serial": idx + 1, - "name": a.label or a.element, - "altLoc": " ", - "resName": "", - "chainID": " ", - "resSeq": 1, - "iCode": " ", - "x": rc[0], - "y": rc[1], - "z": rc[2], - "occupancy": a.occupancy, - "tempFactor": B, - "segID": "", - "element": a.element, - "charge": "", - } - lines.append(atomline) - isotropic = numpy.all(a.U == a.U[0, 0] * numpy.identity(3)) - if not isotropic: - mid = " %7i%7i%7i%7i%7i%7i " % tuple( - numpy.around( - 1e4 - * numpy.array( - [ - a.U[0, 0], - a.U[1, 1], - a.U[2, 2], - a.U[0, 1], - a.U[0, 2], - a.U[1, 2], - ] - ) - ) - ) - line = "ANISOU" + atomline[6:27] + mid + atomline[72:80] - lines.append(line) - # default values of standard deviations - d_sigxyz = numpy.zeros(3, dtype=float) - d_sigo = 0.0 - d_sigU = numpy.zeros((3, 3), dtype=float) - sigxyz = ad.get("sigxyz", d_sigxyz) - sigo = [ad.get("sigo", d_sigo)] - sigU = ad.get("sigU", d_sigU) - sigB = [8 * pi**2 * numpy.average([sigU[i, i] for i in range(3)])] - sigmas = numpy.concatenate((sigxyz, sigo, sigB)) - # no need to print sigmas if they all round to zero - hassigmas = numpy.any(numpy.fabs(sigmas) >= numpy.array(3 * [5e-4] + 2 * [5e-3])) or numpy.any( - numpy.fabs(sigU) > 5.0e-5 - ) - if hassigmas: - mid = " %8.3f%8.3f%8.3f%6.2f%6.2f " % tuple(sigmas) - line = "SIGATM" + atomline[6:27] + mid + atomline[72:80] - lines.append(line) - # do we need SIGUIJ record? - if not numpy.all(sigU == sigU[0, 0] * numpy.identity(3)): - mid = " %7i%7i%7i%7i%7i%7i " % tuple( - numpy.around( - 1e4 - * numpy.array( - [ - sigU[0, 0], - sigU[1, 1], - sigU[2, 2], - sigU[0, 1], - sigU[0, 2], - sigU[1, 2], - ] - ) - ) - ) - line = "SIGUIJ" + atomline[6:27] + mid + atomline[72:80] - lines.append(line) - return lines - - @deprecated(toLines_deprecation_msg) - def toLines(self, stru): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_pdb.to_lines instead. - """ - return self.to_lines(stru) - - def to_lines(self, stru): - """Convert `Structure` stru to a list of lines in PDB format. - - Parameters - ---------- - stru : Structure - Structure to be converted. - - Returns - ------- - list of str - List of lines in PDB format. - """ - lines = [] - lines.extend(self.title_lines(stru)) - lines.extend(self.cryst1_lines(stru)) - for idx in range(len(stru)): - lines.extend(self.atom_lines(stru, idx)) - line = ( - "TER " # 1-6 - + "%(serial)5i " # 7-11, 12-17 - + "%(resName)-3s " # 18-20, 21 - + "%(chainID)c" # 22 - + "%(resSeq)4i" # 23-26 - + "%(iCode)c" # 27 - + "%(blank)53s" # 28-80 - ) % { - "serial": len(stru) + 1, - "resName": "", - "chainID": " ", - "resSeq": 1, - "iCode": " ", - "blank": " ", - } - lines.append(line) - lines.append("%-80s" % "END") - return lines - - -# End of class P_pdb - -# Routines ------------------------------------------------------------------- - -parsers_base = "diffpy.structure" -getParser_deprecation_msg = build_deprecation_message( - parsers_base, - "getParser", - "get_parser", - removal_version, -) - - -@deprecated(getParser_deprecation_msg) -def getParser(): - """Return new `parser` object for PDB format. - - Returns - ------- - P_pdb - Instance of `P_pdb`. - """ - return get_parser() - - -def get_parser(): - """Return new `parser` object for PDB format. - - Returns - ------- - P_pdb - Instance of `P_pdb`. - """ - return P_pdb() diff --git a/src/diffpy/structure/parsers/p_pdffit.py b/src/diffpy/structure/parsers/p_pdffit.py deleted file mode 100644 index 2347f3ff..00000000 --- a/src/diffpy/structure/parsers/p_pdffit.py +++ /dev/null @@ -1,336 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Parser for PDFfit structure format.""" - -import sys -from functools import reduce - -import numpy - -from diffpy.structure import Lattice, PDFFitStructure -from diffpy.structure.parsers import StructureParser -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.P_pdffit" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) - - -class P_pdffit(StructureParser): - """Parser for PDFfit structure format. - - Attributes - ---------- - format : str - Format name, default "pdffit". - ignored_lines : list - List of lines ignored during parsing. - stru : PDFFitStructure - Structure instance used for cif input or output. - """ - - def __init__(self): - StructureParser.__init__(self) - self.format = "pdffit" - self.ignored_lines = [] - self.stru = None - return - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_pdffit.parse_lines instead. - """ - return self.parse_lines(lines) - - def parse_lines(self, lines): - """Parse list of lines in PDFfit format. - - Parameters - ---------- - lines : list of str - List of lines in PDB format. - - Returns - ------- - Structure - Parsed structure instance. - - Raises - ------ - StructureFormatError - File not in PDFfit format. - """ - p_nl = 0 - try: - self.stru = PDFFitStructure() - stru = self.stru - cell_line_read = False - stop = len(lines) - while stop > 0 and lines[stop - 1].strip() == "": - stop -= 1 - ilines = iter(lines[:stop]) - # read header of PDFFit file - for line in ilines: - p_nl += 1 - words = line.split() - if len(words) == 0 or words[0][0] == "#": - continue - elif words[0] == "title": - stru.title = line.lstrip()[5:].strip() - elif words[0] == "scale": - stru.pdffit["scale"] = float(words[1]) - elif words[0] == "sharp": - l1 = line.replace(",", " ") - sharp_pars = [float(w) for w in l1.split()[1:]] - if len(sharp_pars) < 4: - stru.pdffit["delta2"] = sharp_pars[0] - stru.pdffit["sratio"] = sharp_pars[1] - stru.pdffit["rcut"] = sharp_pars[2] - else: - stru.pdffit["delta2"] = sharp_pars[0] - stru.pdffit["delta1"] = sharp_pars[1] - stru.pdffit["sratio"] = sharp_pars[2] - stru.pdffit["rcut"] = sharp_pars[3] - elif words[0] == "spcgr": - key = "spcgr" - start = line.find(key) + len(key) - value = line[start:].strip() - stru.pdffit["spcgr"] = value - elif words[0] == "shape": - self._parse_shape(line) - elif words[0] == "cell": - cell_line_read = True - l1 = line.replace(",", " ") - latpars = [float(w) for w in l1.split()[1:7]] - stru.lattice = Lattice(*latpars) - elif words[0] == "dcell": - l1 = line.replace(",", " ") - stru.pdffit["dcell"] = [float(w) for w in l1.split()[1:7]] - elif words[0] == "ncell": - l1 = line.replace(",", " ") - stru.pdffit["ncell"] = [int(w) for w in l1.split()[1:5]] - elif words[0] == "format": - if words[1] != "pdffit": - emsg = "%d: file is not in PDFfit format" % p_nl - raise StructureFormatError(emsg) - elif words[0] == "atoms" and cell_line_read: - break - else: - self.ignored_lines.append(line) - # Header reading finished, check if required lines were present. - if not cell_line_read: - emsg = "%d: file is not in PDFfit format" % p_nl - raise StructureFormatError(emsg) - # Load data from atom entries. - p_natoms = reduce(lambda x, y: x * y, stru.pdffit["ncell"]) - # we are now inside data block - for line in ilines: - p_nl += 1 - wl1 = line.split() - element = wl1[0][0].upper() + wl1[0][1:].lower() - xyz = [float(w) for w in wl1[1:4]] - occ = float(wl1[4]) - stru.add_new_atom(element, xyz=xyz, occupancy=occ) - a = stru.get_last_atom() - p_nl += 1 - wl2 = next(ilines).split() - a.sigxyz = [float(w) for w in wl2[0:3]] - a.sigo = float(wl2[3]) - p_nl += 1 - wl3 = next(ilines).split() - p_nl += 1 - wl4 = next(ilines).split() - p_nl += 1 - wl5 = next(ilines).split() - p_nl += 1 - wl6 = next(ilines).split() - U = numpy.zeros((3, 3), dtype=float) - sigU = numpy.zeros((3, 3), dtype=float) - U[0, 0] = float(wl3[0]) - U[1, 1] = float(wl3[1]) - U[2, 2] = float(wl3[2]) - sigU[0, 0] = float(wl4[0]) - sigU[1, 1] = float(wl4[1]) - sigU[2, 2] = float(wl4[2]) - U[0, 1] = U[1, 0] = float(wl5[0]) - U[0, 2] = U[2, 0] = float(wl5[1]) - U[1, 2] = U[2, 1] = float(wl5[2]) - sigU[0, 1] = sigU[1, 0] = float(wl6[0]) - sigU[0, 2] = sigU[2, 0] = float(wl6[1]) - sigU[1, 2] = sigU[2, 1] = float(wl6[2]) - a.anisotropy = stru.lattice.isanisotropic(U) - a.U = U - a.sigU = sigU - if len(stru) != p_natoms: - emsg = "expected %d atoms, read %d" % (p_natoms, len(stru)) - raise StructureFormatError(emsg) - if stru.pdffit["ncell"][:3] != [1, 1, 1]: - superlatpars = [latpars[i] * stru.pdffit["ncell"][i] for i in range(3)] + latpars[3:] - superlattice = Lattice(*superlatpars) - stru.place_in_lattice(superlattice) - stru.pdffit["ncell"] = [1, 1, 1, p_natoms] - except (ValueError, IndexError): - emsg = "%d: file is not in PDFfit format" % p_nl - exc_type, exc_value, exc_traceback = sys.exc_info() - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - return stru - - def toLines(self, stru): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_pdffit.toLines instead. - """ - return self.to_lines(stru) - - def to_lines(self, stru): - """Convert `Structure` stru to a list of lines in PDFfit format. - - Parameters - ---------- - stru : Structure - Structure to be converted. - - Returns - ------- - list of str - List of lines in PDFfit format. - """ - # build the stru_pdffit dictionary initialized from the defaults - # in PDFFitStructure - stru_pdffit = PDFFitStructure().pdffit - if stru.pdffit: - stru_pdffit.update(stru.pdffit) - lines = [] - # default values of standard deviations - d_sigxyz = numpy.zeros(3, dtype=float) - d_sigo = 0.0 - d_sigU = numpy.zeros((3, 3), dtype=float) - # here we can start - line = "title " + stru.title - lines.append(line.strip()) - lines.append("format pdffit") - lines.append("scale %9.6f" % stru_pdffit["scale"]) - lines.append( - "sharp %9.6f, %9.6f, %9.6f, %9.6f" - % ( - stru_pdffit["delta2"], - stru_pdffit["delta1"], - stru_pdffit["sratio"], - stru_pdffit["rcut"], - ) - ) - lines.append("spcgr " + stru_pdffit["spcgr"]) - if stru_pdffit.get("spdiameter", 0.0) > 0.0: - line = "shape sphere, %g" % stru_pdffit["spdiameter"] - lines.append(line) - if stru_pdffit.get("stepcut", 0.0) > 0.0: - line = "shape stepcut, %g" % stru_pdffit["stepcut"] - lines.append(line) - lat = stru.lattice - lines.append( - "cell %9.6f, %9.6f, %9.6f, %9.6f, %9.6f, %9.6f" - % (lat.a, lat.b, lat.c, lat.alpha, lat.beta, lat.gamma) - ) - lines.append("dcell %9.6f, %9.6f, %9.6f, %9.6f, %9.6f, %9.6f" % tuple(stru_pdffit["dcell"])) - lines.append("ncell %9i, %9i, %9i, %9i" % (1, 1, 1, len(stru))) - lines.append("atoms") - for a in stru: - ad = a.__dict__ - lines.append( - "%-4s %17.8f %17.8f %17.8f %12.4f" - % ( - a.element.upper(), - a.xyz[0], - a.xyz[1], - a.xyz[2], - a.occupancy, - ) - ) - sigmas = numpy.concatenate((ad.get("sigxyz", d_sigxyz), [ad.get("sigo", d_sigo)])) - lines.append(" %18.8f %17.8f %17.8f %12.4f" % tuple(sigmas)) - sigU = ad.get("sigU", d_sigU) - Uii = (a.U[0][0], a.U[1][1], a.U[2][2]) - Uij = (a.U[0][1], a.U[0][2], a.U[1][2]) - sigUii = (sigU[0][0], sigU[1][1], sigU[2][2]) - sigUij = (sigU[0][1], sigU[0][2], sigU[1][2]) - lines.append(" %18.8f %17.8f %17.8f" % Uii) - lines.append(" %18.8f %17.8f %17.8f" % sigUii) - lines.append(" %18.8f %17.8f %17.8f" % Uij) - lines.append(" %18.8f %17.8f %17.8f" % sigUij) - return lines - - # Protected methods ------------------------------------------------------ - - def _parse_shape(self, line): - """Process shape line from PDFfit file and update self.stru. - - Parameters - ---------- - line : str - Line containing data for particle shape correction. - - Raises - ------ - StructureFormatError - Invalid type of particle shape correction. - """ - line_nocommas = line.replace(",", " ") - words = line_nocommas.split() - assert words[0] == "shape" - shapetype = words[1] - if shapetype == "sphere": - self.stru.pdffit["spdiameter"] = float(words[2]) - elif shapetype == "stepcut": - self.stru.pdffit["stepcut"] = float(words[2]) - else: - emsg = "Invalid type of particle shape correction %r" % shapetype - raise StructureFormatError(emsg) - return - - -# End of class P_pdffit - -# Routines ------------------------------------------------------------------- - - -def getParser(): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.P_pdffit.get_parser instead. - """ - return get_parser() - - -def get_parser(): - """Return new `parser` object for PDFfit format. - - Returns - ------- - P_pdffit - Instance of `P_pdffit`. - """ - return P_pdffit() diff --git a/src/diffpy/structure/parsers/p_rawxyz.py b/src/diffpy/structure/parsers/p_rawxyz.py deleted file mode 100644 index 2a8332b8..00000000 --- a/src/diffpy/structure/parsers/p_rawxyz.py +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Parser for raw XYZ file format. - -Raw XYZ is a 3 or 4 column text file with cartesian coordinates of atoms -and an optional first column for atom types. -""" - -import sys - -from diffpy.structure import Structure -from diffpy.structure.parsers import StructureParser -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.structure.utils import isfloat -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.P_rawxyz" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) -toLines_deprecation_msg = build_deprecation_message( - base, - "toLines", - "to_lines", - removal_version, -) - - -class P_rawxyz(StructureParser): - """Parser --> StructureParser subclass for RAWXYZ format. - - Attributes - ---------- - format : str - Format name, default "rawxyz". - """ - - def __init__(self): - StructureParser.__init__(self) - self.format = "rawxyz" - return - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_rawxyz.parse_lines instead. - """ - return self.parse_lines(lines) - - def parse_lines(self, lines): - """Parse list of lines in RAWXYZ format. - - Parameters - ---------- - lines : list of str - List of lines in RAWXYZ format. - - Returns - ------- - Structure - Parsed structure instance. - - Raises - ------ - StructureFormatError - Invalid RAWXYZ format. - """ - linefields = [line.split() for line in lines] - # prepare output structure - stru = Structure() - # find first valid record - start = 0 - for field in linefields: - if len(field) == 0 or field[0] == "#": - start += 1 - else: - break - # find the last valid record - stop = len(lines) - while stop > start and len(linefields[stop - 1]) == 0: - stop -= 1 - # get out for empty structure - if start >= stop: - return stru - # here we have at least one valid record line - # figure out xyz layout from the first line for plain and raw formats - floatfields = [isfloat(f) for f in linefields[start]] - nfields = len(linefields[start]) - if nfields not in (3, 4): - emsg = "%d: invalid RAWXYZ format, expected 3 or 4 columns" % (start + 1) - raise StructureFormatError(emsg) - if floatfields[:3] == [True, True, True]: - el_idx, x_idx = (None, 0) - elif floatfields[:4] == [False, True, True, True]: - el_idx, x_idx = (0, 1) - else: - emsg = "%d: invalid RAWXYZ format" % (start + 1) - raise StructureFormatError(emsg) - # now try to read all record lines - try: - p_nl = start - for fields in linefields[start:]: - p_nl += 1 - if fields == []: - continue - elif len(fields) != nfields: - emsg = ("%d: all lines must have " + "the same number of columns") % p_nl - raise StructureFormatError(emsg) - element = el_idx is not None and fields[el_idx] or "" - xyz = [float(f) for f in fields[x_idx : x_idx + 3]] - if len(xyz) == 2: - xyz.append(0.0) - stru.add_new_atom(element, xyz=xyz) - except ValueError: - emsg = "%d: invalid number" % p_nl - exc_type, exc_value, exc_traceback = sys.exc_info() - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - return stru - - @deprecated(toLines_deprecation_msg) - def toLines(self, stru): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_rawxyz.to_lines instead. - """ - return self.to_lines(stru) - - def to_lines(self, stru): - """Convert Structure stru to a list of lines in RAWXYZ format. - - Parameters - ---------- - stru : Structure - Structure to be converted. - - Returns - ------- - list of str - List of lines in RAWXYZ format. - """ - lines = [] - for a in stru: - rc = a.xyz_cartn - s = "%s %g %g %g" % (a.element, rc[0], rc[1], rc[2]) - lines.append(s.lstrip()) - return lines - - -# End of class P_rawxyz - -# Routines ------------------------------------------------------------------- - -parsers_base = "diffpy.structure" -getParser_deprecation_msg = build_deprecation_message( - parsers_base, - "getParser", - "get_parser", - removal_version, -) - - -@deprecated(getParser_deprecation_msg) -def getParser(): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.P_rawxyz.get_parser instead. - """ - return get_parser() - - -def get_parser(): - """Return new `parser` object for RAWXYZ format. - - Returns - ------- - P_rawxyz - Instance of `P_rawxyz`. - """ - return P_rawxyz() diff --git a/src/diffpy/structure/parsers/p_vesta.py b/src/diffpy/structure/parsers/p_vesta.py deleted file mode 100644 index 1be850c0..00000000 --- a/src/diffpy/structure/parsers/p_vesta.py +++ /dev/null @@ -1,370 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2026 University of California, Santa Barbara. -# All rights reserved. -# -# File coded by: Simon J. L. Billinge, Rundong Hua -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Parser for VESTA format used by VESTA (Visualization for Electronic -and Structural Analysis). - -This module replaces the AtomEye XCFG parser (P_xcfg). The XCFG parser and -all its original attributes are preserved for backward compatibility. -VESTA is the actively maintained successor viewer. - -Attributes ----------- -AtomicMass : dict - Dictionary of atomic masses for elements. -""" - -import re -import sys - -import numpy - -from diffpy.structure import Structure -from diffpy.structure.parsers import StructureParser -from diffpy.structure.parsers.p_xcfg import AtomicMass -from diffpy.structure.structureerrors import StructureFormatError - - -# Constants ------------------------------------------------------------------ -class P_vesta(StructureParser): - """Parser for VESTA native structure format (.vesta). - - VESTA (Visualization for Electronic and Structural Analysis) is the - actively maintained successor to AtomEye. This parser writes the - native VESTA format understood by VESTA 3.x and later. - - Attributes - ---------- - format : str - Format name, default "vesta". - - Notes - ----- - The ``cluster_boundary`` attribute is retained from the original - AtomEye/XCFG parser for API compatibility; it is not used by VESTA - because VESTA handles periodicity natively. - """ - - cluster_boundary = 2 - """int: Width of boundary around corners of non-periodic cluster. - Retained from the original AtomEye/XCFG parser for API compatibility. - VESTA handles periodicity natively so this value has no effect on output. - """ - - def __init__(self): - StructureParser.__init__(self) - self.format = "vesta" - return - - def parse_lines(self, lines): - """Parse list of lines in VESTA format. - - Reads the ``STRUC``, ``ATOMT``, and ``COORD`` sections of a - ``.vesta`` file to reconstruct a :class:`~diffpy.structure.Structure`. - - Parameters - ---------- - lines : list of str - Lines of a VESTA format file. - - Returns - ------- - Structure - Parsed structure instance. - - Raises - ------ - StructureFormatError - When the file does not conform to the VESTA format. - """ - stru = Structure() - p_nl = 0 - - # Strip trailing blank lines for a clean iteration boundary. - stop = len(lines) - for line in reversed(lines): - if line.strip(): - break - stop -= 1 - ilines = iter(lines[:stop]) - - try: - # Lattice parameters parsed from STRUC block: - # a b c alpha beta gamma - latt_abc = None - latt_abg = None - atom_types = {} - - # Raw fractional coordinates collected from COORD block: - # list of (atom_type_index, x, y, z, occupancy) - raw_coords = [] - - section = None # tracks current block keyword - - for line in ilines: - p_nl += 1 - stripped = line.strip() - if not stripped or stripped.startswith("#"): - continue - - # Detect section transitions. - upper = stripped.split()[0].upper() - if upper in ( - "CRYSTAL", - "TITLE", - "GROUP", - "STRUC", - "ATOMT", - "COORD", - "BOUND", - "SBOND", - "VECTR", - "VECTS", - "STYLE", - "SCENE", - "EOF", - ): - section = upper - continue - - # ---- STRUC section: lattice parameters ----------------- - if section == "STRUC": - words = stripped.split() - # First data line: a b c alpha beta gamma space_group - if latt_abc is None and len(words) >= 6: - try: - latt_abc = [float(w) for w in words[:3]] - latt_abg = [float(w) for w in words[3:6]] - except ValueError: - pass - continue - - # ---- ATOMT section: atom-type definitions --------------- - if section == "ATOMT": - # Format: index Symbol radius r g b style # mass= - words = stripped.split() - if len(words) >= 2: - try: - idx = int(words[0]) - symbol = words[1] - atom_types[idx] = {"symbol": symbol, "mass": None} - # Recover mass from the trailing comment if present. - mass_match = re.search(r"#\s*mass\s*=\s*([0-9.eE+\-]+)", stripped) - if mass_match: - atom_types[idx]["mass"] = float(mass_match.group(1)) - else: - # Fall back to the built-in lookup table. - atom_types[idx]["mass"] = AtomicMass.get(symbol, 0.0) - except ValueError: - pass - continue - - # ---- COORD section: atomic coordinates ----------------- - if section == "COORD": - # Format: seq type_index x y z occupancy ... - words = stripped.split() - if len(words) >= 6: - try: - type_idx = int(words[1]) - x, y, z = float(words[2]), float(words[3]), float(words[4]) - occ = float(words[5]) - raw_coords.append((type_idx, x, y, z, occ)) - except ValueError: - pass - continue - if latt_abc is None: - emsg = "VESTA file is missing STRUC lattice parameters" - raise StructureFormatError(emsg) - - stru.lattice.setLatPar( - a=latt_abc[0], - b=latt_abc[1], - c=latt_abc[2], - alpha=latt_abg[0], - beta=latt_abg[1], - gamma=latt_abg[2], - ) - for type_idx, x, y, z, occ in raw_coords: - type_info = atom_types.get(type_idx, {"symbol": "X", "mass": 0.0}) - element = type_info["symbol"] - mass = type_info["mass"] - stru.add_new_atom(element, xyz=[x, y, z]) - stru[-1].occupancy = occ - if mass is None: - mass = AtomicMass.get(element, 0.0) - stru[-1].mass = mass - - except (ValueError, IndexError): - emsg = "%d: file is not in VESTA format" % p_nl - exc_type, exc_value, exc_traceback = sys.exc_info() - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - - return stru - - def to_lines(self, stru): - """Convert Structure *stru* to a list of lines in VESTA format. - - Produces a ``.vesta`` file readable by VESTA 3.x and later, - containing ``STRUC``, ``ATOMT``, and ``COORD`` sections derived - from the structure's lattice and atomic data. - - Parameters - ---------- - stru : Structure - Structure to be converted. - - Returns - ------- - list of str - Lines of a VESTA format file. - - Raises - ------ - StructureFormatError - Cannot convert empty structure to VESTA format. - """ - if len(stru) == 0: - emsg = "cannot convert empty structure to VESTA format" - raise StructureFormatError(emsg) - - lines = [] - lines.append("#VESTA_FORMAT_VERSION 3.5.0") - lines.append("") - lines.append("CRYSTAL") - lines.append("") - lines.append("TITLE") - title = getattr(stru, "title", "") or "Structure" - lines.append(title) - lines.append("") - latt = stru.lattice - a, b, c, alpha, beta, gamma = latt.cell_parms() - lines.append("STRUC") - # Line 1: a b c alpha beta gamma space_group_number - lines.append(" %.8g %.8g %.8g %.8g %.8g %.8g 1" % (a, b, c, alpha, beta, gamma)) - # Line 2: origin shift (0 0 0) followed by space-group symbol placeholder - lines.append(" 0.000000 0.000000 0.000000") - lines.append("") - element_order = [] - seen = set() - for a_obj in stru: - el = a_obj.element - if el not in seen: - seen.add(el) - element_order.append(el) - type_index = {el: i + 1 for i, el in enumerate(element_order)} - lines.append("ATOMT") - for el in element_order: - idx = type_index[el] - mass = AtomicMass.get(el, 0.0) - lines.append(" %d %s %.4f 1.0000 1.0000 1.0000 204 # mass=%.7g" % (idx, el, 0.5, mass)) - lines.append("") - lines.append("COORD") - for seq, a_obj in enumerate(stru, start=1): - el = a_obj.element - tidx = type_index[el] - x, y, z = a_obj.xyz - occ = getattr(a_obj, "occupancy", 1.0) - # Isotropic displacement parameter (Uiso), defaulting to 0. - uiso = _get_uiso(a_obj) - lines.append(" %d %d %.8g %.8g %.8g %.4f %.4f" % (seq, tidx, x, y, z, occ, uiso)) - lines.append(" 0 0 0 0 0") - lines.append("") - lines.append("BOUND") - lines.append(" 0.0 1.0 0.0 1.0 0.0 1.0") - lines.append(" 0 0 0 0 0") - lines.append("") - lines.append("EOF") - return lines - - -# End of class P_vesta - - -# Routines ------------------------------------------------------------------- - - -def get_parser(): - """Return new parser object for VESTA format. - - Returns - ------- - P_vesta - Instance of :class:`P_vesta`. - """ - return P_vesta() - - -# Local Helpers -------------------------------------------------------------- - - -def _get_uiso(a): - """Return isotropic displacement parameter for atom *a*. - - Tries ``Uisoequiv`` first, then falls back to the mean of the - diagonal of the anisotropic U tensor, then to zero. - - Parameters - ---------- - a : Atom - Atom instance. - - Returns - ------- - float - Isotropic U value in Ų. - """ - if hasattr(a, "Uisoequiv"): - return float(a.Uisoequiv) - try: - return float(numpy.trace(a.U) / 3.0) - except Exception: - return 0.0 - - -def _assign_auxiliaries(a, fields, auxiliaries, no_velocity): - """Assign auxiliary properties for an - :class:`~diffpy.structure.Atom` object. - - Retained from the original AtomEye/XCFG parser for backward - compatibility with code that calls this helper directly. - - Parameters - ---------- - a : Atom - The Atom instance for which auxiliary properties need to be set. - fields : list - Floating-point values for the current row of the processed file. - auxiliaries : dict - Dictionary of zero-based indices and names of auxiliary properties. - no_velocity : bool - When ``False``, set atom velocity ``a.v`` to ``fields[3:6]``. - Use ``fields[3:6]`` for auxiliary values otherwise. - """ - if not no_velocity: - a.v = numpy.asarray(fields[3:6], dtype=float) - auxfirst = 3 if no_velocity else 6 - for i, prop in auxiliaries.items(): - value = fields[auxfirst + i] - if prop == "Uiso": - a.Uisoequiv = value - elif prop == "Biso": - a.Bisoequiv = value - elif prop[0] in "BU" and all(d in "123" for d in prop[1:]): - nm = prop if prop[1] <= prop[2] else prop[0] + prop[2] + prop[1] - a.anisotropy = True - setattr(a, nm, value) - else: - setattr(a, prop, value) - return diff --git a/src/diffpy/structure/parsers/p_xcfg.py b/src/diffpy/structure/parsers/p_xcfg.py deleted file mode 100644 index e94605c6..00000000 --- a/src/diffpy/structure/parsers/p_xcfg.py +++ /dev/null @@ -1,515 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Parser for extended CFG format used by atomeye. - -Attributes ----------- -AtomicMass : dict - Dictionary of atomic masses for elements. -""" - -import re -import sys - -import numpy - -from diffpy.structure import Structure -from diffpy.structure.parsers import StructureParser -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.structure.utils import isfloat -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -# Constants ------------------------------------------------------------------ - -# Atomic Mass of elements -# This can be later when PeriodicTable package becomes available. - -AtomicMass = { - "H": 1.007947, # 1 H hydrogen 1.007947 - "He": 4.0026022, # 2 He helium 4.0026022 - "Li": 6.9412, # 3 Li lithium 6.9412 - "Be": 9.0121823, # 4 Be beryllium 9.0121823 - "B": 10.8117, # 5 B boron 10.8117 - "C": 12.01078, # 6 C carbon 12.01078 - "N": 14.00672, # 7 N nitrogen 14.00672 - "O": 15.99943, # 8 O oxygen 15.99943 - "F": 18.99840325, # 9 F fluorine 18.99840325 - "Ne": 20.17976, # 10 Ne neon 20.17976 - "Na": 22.9897702, # 11 Na sodium 22.9897702 - "Mg": 24.30506, # 12 Mg magnesium 24.30506 - "Al": 26.9815382, # 13 Al aluminium 26.9815382 - "Si": 28.08553, # 14 Si silicon 28.08553 - "P": 30.9737612, # 15 P phosphorus 30.9737612 - "S": 32.0655, # 16 S sulfur 32.0655 - "Cl": 35.4532, # 17 Cl chlorine 35.4532 - "Ar": 39.9481, # 18 Ar argon 39.9481 - "K": 39.09831, # 19 K potassium 39.09831 - "Ca": 40.0784, # 20 Ca calcium 40.0784 - "Sc": 44.9559108, # 21 Sc scandium 44.9559108 - "Ti": 47.8671, # 22 Ti titanium 47.8671 - "V": 50.94151, # 23 V vanadium 50.94151 - "Cr": 51.99616, # 24 Cr chromium 51.99616 - "Mn": 54.9380499, # 25 Mn manganese 54.9380499 - "Fe": 55.8452, # 26 Fe iron 55.8452 - "Co": 58.9332009, # 27 Co cobalt 58.9332009 - "Ni": 58.69342, # 28 Ni nickel 58.69342 - "Cu": 63.5463, # 29 Cu copper 63.5463 - "Zn": 65.4094, # 30 Zn zinc 65.4094 - "Ga": 69.7231, # 31 Ga gallium 69.7231 - "Ge": 72.641, # 32 Ge germanium 72.641 - "As": 74.921602, # 33 As arsenic 74.921602 - "Se": 78.963, # 34 Se selenium 78.963 - "Br": 79.9041, # 35 Br bromine 79.9041 - "Kr": 83.7982, # 36 Kr krypton 83.7982 - "Rb": 85.46783, # 37 Rb rubidium 85.46783 - "Sr": 87.621, # 38 Sr strontium 87.621 - "Y": 88.905852, # 39 Y yttrium 88.905852 - "Zr": 91.2242, # 40 Zr zirconium 91.2242 - "Nb": 92.906382, # 41 Nb niobium 92.906382 - "Mo": 95.942, # 42 Mo molybdenum 95.942 - "Tc": 98.0, # 43 Tc technetium 98 - "Ru": 101.072, # 44 Ru ruthenium 101.072 - "Rh": 102.905502, # 45 Rh rhodium 102.905502 - "Pd": 106.421, # 46 Pd palladium 106.421 - "Ag": 107.86822, # 47 Ag silver 107.86822 - "Cd": 112.4118, # 48 Cd cadmium 112.4118 - "In": 114.8183, # 49 In indium 114.8183 - "Sn": 118.7107, # 50 Sn tin 118.7107 - "Sb": 121.7601, # 51 Sb antimony 121.7601 - "Te": 127.603, # 52 Te tellurium 127.603 - "I": 126.904473, # 53 I iodine 126.904473 - "Xe": 131.2936, # 54 Xe xenon 131.2936 - "Cs": 132.905452, # 55 Cs caesium 132.905452 - "Ba": 137.3277, # 56 Ba barium 137.3277 - "La": 138.90552, # 57 La lanthanum 138.90552 - "Ce": 140.1161, # 58 Ce cerium 140.1161 - "Pr": 140.907652, # 59 Pr praseodymium 140.907652 - "Nd": 144.243, # 60 Nd neodymium 144.243 - "Pm": 145.0, # 61 Pm promethium 145 - "Sm": 150.363, # 62 Sm samarium 150.363 - "Eu": 151.9641, # 63 Eu europium 151.9641 - "Gd": 157.253, # 64 Gd gadolinium 157.253 - "Tb": 158.925342, # 65 Tb terbium 158.925342 - "Dy": 162.5001, # 66 Dy dysprosium 162.5001 - "Ho": 164.930322, # 67 Ho holmium 164.930322 - "Er": 167.2593, # 68 Er erbium 167.2593 - "Tm": 168.934212, # 69 Tm thulium 168.934212 - "Yb": 173.043, # 70 Yb ytterbium 173.043 - "Lu": 174.9671, # 71 Lu lutetium 174.9671 - "Hf": 178.492, # 72 Hf hafnium 178.492 - "Ta": 180.94791, # 73 Ta tantalum 180.94791 - "W": 183.841, # 74 W tungsten 183.841 - "Re": 186.2071, # 75 Re rhenium 186.2071 - "Os": 190.233, # 76 Os osmium 190.233 - "Ir": 192.2173, # 77 Ir iridium 192.2173 - "Pt": 195.0782, # 78 Pt platinum 195.0782 - "Au": 196.966552, # 79 Au gold 196.966552 - "Hg": 200.592, # 80 Hg mercury 200.592 - "Tl": 204.38332, # 81 Tl thallium 204.38332 - "Pb": 207.21, # 82 Pb lead 207.21 - "Bi": 208.980382, # 83 Bi bismuth 208.980382 - "Po": 209.0, # 84 Po polonium 209 - "At": 210.0, # 85 At astatine 210 - "Rn": 222.0, # 86 Rn radon 222 - "Fr": 223.0, # 87 Fr francium 223 - "Ra": 226.0, # 88 Ra radium 226 - "Ac": 227.0, # 89 Ac actinium 227 - "Th": 232.03811, # 90 Th thorium 232.03811 - "Pa": 231.035882, # 91 Pa protactinium 231.035882 - "U": 238.028913, # 92 U uranium 238.028913 - "Np": 237.0, # 93 Np neptunium 237 - "Pu": 244.0, # 94 Pu plutonium 244 - "Am": 243.0, # 95 Am americium 243 - "Cm": 247.0, # 96 Cm curium 247 - "Bk": 247.0, # 97 Bk berkelium 247 - "Cf": 251.0, # 98 Cf californium 251 - "Es": 252.0, # 99 Es einsteinium 252 - "Fm": 257.0, # 100 Fm fermium 257 - "Md": 258.0, # 101 Md mendelevium 258 - "No": 259.0, # 102 No nobelium 259 - "Lr": 262.0, # 103 Lr lawrencium 262 - "Rf": 261.0, # 104 Rf rutherfordium 261 - "Db": 262.0, # 105 Db dubnium 262 - "Sg": 266.0, # 106 Sg seaborgium 266 - "Bh": 264.0, # 107 Bh bohrium 264 - "Hs": 277.0, # 108 Hs hassium 277 - "Mt": 268.0, # 109 Mt meitnerium 268 - "Ds": 281.0, # 110 Ds darmstadtium 281 - "Rg": 272.0, # 111 Rg roentgenium 272 -} - -# ---------------------------------------------------------------------------- - -base = "diffpy.structure.P_xcfg" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) -toLines_deprecation_msg = build_deprecation_message( - base, - "toLines", - "to_lines", - removal_version, -) - - -class P_xcfg(StructureParser): - """Parser for AtomEye extended CFG format. - - Attributes - ---------- - format : str - Format name, default "xcfg". - """ - - cluster_boundary = 2 - """int: Width of boundary around corners of non-periodic - cluster to avoid PBC effects in atomeye. - """ - - def __init__(self): - StructureParser.__init__(self) - self.format = "xcfg" - return - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_xcfg.parse_lines instead. - """ - return self.parse_lines(lines) - - def parse_lines(self, lines): - """Parse list of lines in XCFG format. - - Parameters - ---------- - lines : list of str - List of lines in XCFG format. - - Returns - ------- - Structure - Parsed structure instance. - - Raises - ------ - StructureFormatError - Invalid XCFG format. - """ - xcfg_Number_of_particles = None - xcfg_A = None - xcfg_H0 = numpy.zeros((3, 3), dtype=float) - xcfg_H0_set = numpy.zeros((3, 3), dtype=bool) - xcfg_NO_VELOCITY = False - xcfg_entry_count = None - p_nl = 0 - p_auxiliary_re = re.compile(r"^auxiliary\[(\d+)\] =") - p_auxiliary = {} - stru = Structure() - # ignore trailing blank lines - stop = len(lines) - for line in reversed(lines): - if line.strip(): - break - stop -= 1 - # iterator over the valid data lines - ilines = iter(lines[:stop]) - try: - # read XCFG header - for line in ilines: - p_nl += 1 - stripped_line = line.strip() - # blank lines and lines starting with # are ignored - if stripped_line == "" or line[0] == "#": - continue - elif xcfg_Number_of_particles is None: - if line.find("Number of particles =") != 0: - emsg = ("%d: first line must " + "contain 'Number of particles ='") % p_nl - raise StructureFormatError(emsg) - xcfg_Number_of_particles = int(line[21:].split(None, 1)[0]) - p_natoms = xcfg_Number_of_particles - elif line.find("A =") == 0: - xcfg_A = float(line[3:].split(None, 1)[0]) - elif line.find("H0(") == 0: - i, j = (int(line[3]) - 1, int(line[5]) - 1) - xcfg_H0[i, j] = float(line[10:].split(None, 1)[0]) - xcfg_H0_set[i, j] = True - elif line.find(".NO_VELOCITY.") == 0: - xcfg_NO_VELOCITY = True - elif line.find("entry_count =") == 0: - xcfg_entry_count = int(line[13:].split(None, 1)[0]) - elif p_auxiliary_re.match(line): - m = p_auxiliary_re.match(line) - idx = int(m.group(1)) - p_auxiliary[idx] = line[m.end() :].split(None, 1)[0] - else: - break - # check header for consistency - if not numpy.all(xcfg_H0_set): - emsg = "H0 tensor is not properly defined" - raise StructureFormatError(emsg) - p_auxnum = len(p_auxiliary) and max(p_auxiliary.keys()) + 1 - for i in range(p_auxnum): - if i not in p_auxiliary: - p_auxiliary[i] = "aux%d" % i - sorted_aux_keys = sorted(p_auxiliary.keys()) - if p_auxnum != 0: - stru.xcfg = {"auxiliaries": [p_auxiliary[k] for k in sorted_aux_keys]} - ecnt = len(p_auxiliary) + (3 if xcfg_NO_VELOCITY else 6) - if ecnt != xcfg_entry_count: - emsg = ("%d: auxiliary fields are " "not consistent with entry_count") % p_nl - raise StructureFormatError(emsg) - # define proper lattice - stru.lattice.set_new_latt_base_vec(xcfg_H0) - # here we are inside the data block - p_element = None - for line in ilines: - p_nl += 1 - words = line.split() - # ignore atom mass - if len(words) == 1 and isfloat(words[0]): - continue - # parse element allowing empty symbol - elif len(words) <= 1: - w = line.strip() - p_element = w[:1].upper() + w[1:].lower() - elif len(words) == xcfg_entry_count and p_element is not None: - fields = [float(w) for w in words] - xyz = [xcfg_A * xi for xi in fields[:3]] - stru.add_new_atom(p_element, xyz=xyz) - a = stru[-1] - _assign_auxiliaries( - a, - fields, - auxiliaries=p_auxiliary, - no_velocity=xcfg_NO_VELOCITY, - ) - else: - emsg = "%d: invalid record" % p_nl - raise StructureFormatError(emsg) - if len(stru) != p_natoms: - emsg = "expected %d atoms, read %d" % (p_natoms, len(stru)) - raise StructureFormatError(emsg) - except (ValueError, IndexError): - emsg = "%d: file is not in XCFG format" % p_nl - exc_type, exc_value, exc_traceback = sys.exc_info() - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - return stru - - @deprecated(toLines_deprecation_msg) - def toLines(self, stru): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_xcfg.to_lines instead. - """ - return self.to_lines(stru) - - def to_lines(self, stru): - """Convert Structure stru to a list of lines in XCFG atomeye - format. - - Parameters - ---------- - stru : Structure - Structure to be converted. - - Returns - ------- - list of str - List of lines in XCFG format. - - Raises - ------ - StructureFormatError - Cannot convert empty structure to XCFG format. - """ - if len(stru) == 0: - emsg = "cannot convert empty structure to XCFG format" - raise StructureFormatError(emsg) - lines = [] - lines.append("Number of particles = %i" % len(stru)) - # figure out length unit A - allxyz = numpy.array([a.xyz for a in stru]) - lo_xyz = allxyz.min(axis=0) - hi_xyz = allxyz.max(axis=0) - max_range_xyz = (hi_xyz - lo_xyz).max() - if numpy.allclose(stru.lattice.cell_parms(), (1, 1, 1, 90, 90, 90)): - max_range_xyz += self.cluster_boundary - # range of CFG coordinates must be less than 1 - p_A = numpy.ceil(max_range_xyz + 1.0e-13) - # atomeye draws rubbish when boxsize is less than 3.5 - hi_ucvect = max([numpy.sqrt(numpy.dot(v, v)) for v in stru.lattice.base]) - if hi_ucvect * p_A < 3.5: - p_A = numpy.ceil(3.5 / hi_ucvect) - lines.append("A = %.8g Angstrom" % p_A) - # how much do we need to shift the coordinates? - p_dxyz = numpy.zeros(3, dtype=float) - for i in range(3): - if lo_xyz[i] / p_A < 0.0 or hi_xyz[i] / p_A >= 1.0 or (lo_xyz[i] == hi_xyz[i] and lo_xyz[i] == 0.0): - p_dxyz[i] = 0.5 - (hi_xyz[i] + lo_xyz[i]) / 2.0 / p_A - # H0 tensor - for i in range(3): - for j in range(3): - lines.append("H0(%i,%i) = %.8g A" % (i + 1, j + 1, stru.lattice.base[i, j])) - # get out for empty structure - if len(stru) == 0: - return lines - a_first = stru[0] - p_NO_VELOCITY = "v" not in a_first.__dict__ - if p_NO_VELOCITY: - lines.append(".NO_VELOCITY.") - # build a p_auxiliaries list of (aux_name,atom_expression) tuples - # if stru came from xcfg file, it would store original auxiliaries in - # xcfg dictionary - try: - p_auxiliaries = [(aux, "a." + aux) for aux in stru.xcfg["auxiliaries"]] - except AttributeError: - p_auxiliaries = [] - # add occupancy if any atom has nonunit occupancy - for a in stru: - if a.occupancy != 1.0: - p_auxiliaries.append(("occupancy", "a.occupancy")) - break - # add temperature factor with as many terms as needed - # check whether all temperature factors are zero or isotropic - p_allUzero = True - p_allUiso = True - for a in stru: - if p_allUzero and numpy.any(a.U != 0.0): - p_allUzero = False - if not numpy.all(a.U == a.U[0, 0] * numpy.identity(3)): - p_allUiso = False - # here p_allUzero must be false - break - if p_allUzero: - pass - elif p_allUiso: - p_auxiliaries.append(("Uiso", "uflat[0]")) - else: - p_auxiliaries.extend([("U11", "uflat[0]"), ("U22", "uflat[4]"), ("U33", "uflat[8]")]) - # check if there are off-diagonal elements - allU = numpy.array([a.U for a in stru]) - if numpy.any(allU[:, 0, 1] != 0.0): - p_auxiliaries.append(("U12", "uflat[1]")) - if numpy.any(allU[:, 0, 2] != 0.0): - p_auxiliaries.append(("U13", "uflat[2]")) - if numpy.any(allU[:, 1, 2] != 0.0): - p_auxiliaries.append(("U23", "uflat[5]")) - # count entries - p_entry_count = (3 if p_NO_VELOCITY else 6) + len(p_auxiliaries) - lines.append("entry_count = %d" % p_entry_count) - # add auxiliaries - for i in range(len(p_auxiliaries)): - lines.append("auxiliary[%d] = %s [au]" % (i, p_auxiliaries[i][0])) - # now define entry format efmt for representing atom properties - fmwords = ["{pos[0]:.8g}", "{pos[1]:.8g}", "{pos[2]:.8g}"] - if not p_NO_VELOCITY: - fmwords += ["{v[0]:.8g}", "{v[1]:.8g}", "{v[2]:.8g}"] - fmwords += (("{" + e + ":.8g}") for p, e in p_auxiliaries) - efmt = " ".join(fmwords) - # we are ready to output atoms: - lines.append("") - p_element = None - for a in stru: - if a.element != p_element: - p_element = a.element - lines.append("%.4f" % AtomicMass.get(p_element, 0.0)) - lines.append(p_element) - pos = a.xyz / p_A + p_dxyz - v = None if p_NO_VELOCITY else a.v - uflat = numpy.ravel(a.U) - entry = efmt.format(pos=pos, v=v, uflat=uflat, a=a) - lines.append(entry) - return lines - - -# End of class P_xcfg - -# Routines ------------------------------------------------------------------- - -parsers_base = "diffpy.structure" -getParser_deprecation_msg = build_deprecation_message( - parsers_base, - "getParser", - "get_parser", - removal_version, -) - - -@deprecated(getParser_deprecation_msg) -def getParser(): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.P_xcfg.get_parser instead. - """ - return get_parser() - - -def get_parser(): - """Return new `parser` object for XCFG format. - - Returns - ------- - P_xcfg - Instance of `P_xcfg`. - """ - return P_xcfg() - - -# Local Helpers -------------------------------------------------------------- - - -def _assign_auxiliaries(a, fields, auxiliaries, no_velocity): - """Assign auxiliary properties for `Atom` object when reading CFG - format. - - Parameters - ---------- - a : Atom - The `Atom` instance for which the auxiliary properties need to be set. - fields : list - Floating point values for the current row of the processed CFG file. - auxiliaries : dict - Dictionary of zero-based indices and names of auxiliary properties - defined in the CFG format. - no_velocity : bool - When `False` set atom velocity `a.v` to `fields[3:6]`. - Use `fields[3:6]` for auxiliary values otherwise. - """ - if not no_velocity: - a.v = numpy.asarray(fields[3:6], dtype=float) - auxfirst = 3 if no_velocity else 6 - for i, prop in auxiliaries.items(): - value = fields[auxfirst + i] - if prop == "Uiso": - a.Uisoequiv = value - elif prop == "Biso": - a.Bisoequiv = value - elif prop[0] in "BU" and all(d in "123" for d in prop[1:]): - nm = prop if prop[1] <= prop[2] else prop[0] + prop[2] + prop[1] - a.anisotropy = True - setattr(a, nm, value) - else: - setattr(a, prop, value) - return diff --git a/src/diffpy/structure/parsers/p_xyz.py b/src/diffpy/structure/parsers/p_xyz.py deleted file mode 100644 index 60c8dd8a..00000000 --- a/src/diffpy/structure/parsers/p_xyz.py +++ /dev/null @@ -1,212 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Parser for XYZ file format, where. - -* First line gives number of atoms. -* Second line has optional title. -* Remaining lines contain element, `x, y, z`. -""" - -import sys - -from diffpy.structure import Structure -from diffpy.structure.parsers import StructureParser -from diffpy.structure.structureerrors import StructureFormatError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.P_xyz" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) -toLines_deprecation_msg = build_deprecation_message( - base, - "toLines", - "to_lines", - removal_version, -) - - -class P_xyz(StructureParser): - """Parser for standard XYZ structure format. - - Attributes - ---------- - format : str - Format name, default "xyz". - """ - - def __init__(self): - StructureParser.__init__(self) - self.format = "xyz" - return - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_xyz.parse_lines instead. - """ - return self.parse_lines(lines) - - def parse_lines(self, lines): - """Parse list of lines in XYZ format. - - Parameters - ---------- - lines : list of str - List of lines in XYZ format. - - Returns - ------- - Structure - Parsed structure instance. - - Raises - ------ - StructureFormatError - Invalid XYZ format. - """ - linefields = [line.split() for line in lines] - # prepare output structure - stru = Structure() - # find first valid record - start = 0 - for field in linefields: - if len(field) == 0 or field[0] == "#": - start += 1 - else: - break - # first valid line gives number of atoms - try: - lfs = linefields[start] - w1 = linefields[start][0] - if len(lfs) == 1 and str(int(w1)) == w1: - p_natoms = int(w1) - stru.title = lines[start + 1].strip() - start += 2 - else: - emsg = "%d: invalid XYZ format, missing number of atoms" % (start + 1) - raise StructureFormatError(emsg) - except (IndexError, ValueError): - exc_type, exc_value, exc_traceback = sys.exc_info() - emsg = "%d: invalid XYZ format, missing number of atoms" % (start + 1) - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - # find the last valid record - stop = len(lines) - while stop > start and len(linefields[stop - 1]) == 0: - stop -= 1 - # get out for empty structure - if p_natoms == 0 or start >= stop: - return stru - # here we have at least one valid record line - nfields = len(linefields[start]) - if nfields != 4: - emsg = "%d: invalid XYZ format, expected 4 columns" % (start + 1) - raise StructureFormatError(emsg) - # now try to read all record lines - try: - p_nl = start - for fields in linefields[start:]: - p_nl += 1 - if fields == []: - continue - elif len(fields) != nfields: - emsg = ("%d: all lines must have " + "the same number of columns") % p_nl - raise StructureFormatError(emsg) - element = fields[0] - element = element[0].upper() + element[1:].lower() - xyz = [float(f) for f in fields[1:4]] - stru.add_new_atom(element, xyz=xyz) - except ValueError: - exc_type, exc_value, exc_traceback = sys.exc_info() - emsg = "%d: invalid number format" % p_nl - e = StructureFormatError(emsg) - raise e.with_traceback(exc_traceback) - # finally check if all the atoms have been read - if p_natoms is not None and len(stru) != p_natoms: - emsg = "expected %d atoms, read %d" % (p_natoms, len(stru)) - raise StructureFormatError(emsg) - return stru - - @deprecated(toLines_deprecation_msg) - def toLines(self, stru): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.P_xyz.to_lines instead. - """ - return self.to_lines(stru) - - def to_lines(self, stru): - """Convert Structure stru to a list of lines in XYZ format. - - Parameters - ---------- - stru : Structure - Structure to be converted. - - Returns - ------- - list of str - List of lines in XYZ format. - """ - lines = [] - lines.append(str(len(stru))) - lines.append(stru.title) - for a in stru: - rc = a.xyz_cartn - s = "%-3s %g %g %g" % (a.element, rc[0], rc[1], rc[2]) - lines.append(s) - return lines - - -# End of class P_xyz - -# Routines ------------------------------------------------------------------- - -parsers_base = "diffpy.structure" -getParser_deprecation_msg = build_deprecation_message( - parsers_base, - "getParser", - "get_parser", - removal_version, -) - - -@deprecated(getParser_deprecation_msg) -def getParser(): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.P_xyz.get_parser instead. - """ - return get_parser() - - -def get_parser(): - """Return new `parser` object for XYZ format. - - Returns - ------- - P_xcfg - Instance of `P_xyz`. - """ - return P_xyz() diff --git a/src/diffpy/structure/parsers/parser_index_mod.py b/src/diffpy/structure/parsers/parser_index_mod.py deleted file mode 100644 index 5f8c3ec7..00000000 --- a/src/diffpy/structure/parsers/parser_index_mod.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Index of recognized structure formats, their IO capabilities and -associated modules where they are defined. - -Attributes ----------- -parser_index : dict - Dictionary of recognized structure formats. The keys are format names - and the values are dictionaries with the following keys: - - module : str - Name of the module that defines the parser class. - file_extension : str - File extension for the format, including the leading dot. - file_pattern : str - File pattern for the format, using '|' as separator for multiple - patterns. - has_input : bool - ``True`` if the parser can read the format. - has_output : bool - ``True`` if the parser can write the format. - -Note ----- -Plugins for new structure formats need to be added to the parser_index -dictionary in this module. -""" - -parser_index = { - # automatic format detection - tries all parsers one by one - "auto": { - "module": "p_auto", - "file_extension": "", - "file_pattern": "*.*", - "has_input": True, - "has_output": False, - }, - # CIF format - "cif": { - "module": "p_cif", - "file_extension": ".cif", - "file_pattern": "*.cif", - "has_input": True, - "has_output": True, - }, - # PDB format - "pdb": { - "module": "p_pdb", - "file_extension": ".pdb", - "file_pattern": "*.pdb", - "has_input": True, - "has_output": True, - }, - # Discus structure format - "discus": { - "module": "p_discus", - "file_extension": ".stru", - "file_pattern": "*.stru|*.rstr", - "has_input": True, - "has_output": True, - }, - # PDFfit structure format - "pdffit": { - "module": "p_pdffit", - "file_extension": ".stru", - "file_pattern": "*.stru|*.rstr", - "has_input": True, - "has_output": True, - }, - # standard xyz file - "xyz": { - "module": "p_xyz", - "file_extension": ".xyz", - "file_pattern": "*.xyz", - "has_input": True, - "has_output": True, - }, - # raw xyz file (element labels optional) - "rawxyz": { - "module": "p_rawxyz", - "file_extension": ".xyz", - "file_pattern": "*.xyz", - "has_input": True, - "has_output": True, - }, - # AtomEye extended configuration format - "xcfg": { - "module": "p_xcfg", - "file_extension": "", - "file_pattern": "*.xcfg|*.eye|*.cfg", - "has_input": True, - "has_output": True, - }, -} diff --git a/src/diffpy/structure/parsers/structureparser.py b/src/diffpy/structure/parsers/structureparser.py deleted file mode 100644 index 270fbb32..00000000 --- a/src/diffpy/structure/parsers/structureparser.py +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Definition of StructureParser, a base class for specific parsers.""" - -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.StructureParser" -removal_version = "4.0.0" -parseLines_deprecation_msg = build_deprecation_message( - base, - "parseLines", - "parse_lines", - removal_version, -) -parseFile_deprecation_msg = build_deprecation_message( - base, - "parseFile", - "parse_file", - removal_version, -) -toLines_deprecation_msg = build_deprecation_message( - base, - "toLines", - "to_lines", - removal_version, -) - - -class StructureParser(object): - """Base class for all structure parsers. - - Attributes - ---------- - format : str - Format name of particular parser. - filename : str - Path to structure file that is read or written. - """ - - def __init__(self): - self.format = None - self.filename = None - return - - @deprecated(parseLines_deprecation_msg) - def parseLines(self, lines): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.StructureParser.parse_lines instead. - """ - return self.parse_lines(lines) - - def parse_lines(self, lines): - """Create Structure instance from a list of lines. - - Return Structure object or raise StructureFormatError exception. - - Note - ---- - This method has to be overloaded in derived class. - """ - raise NotImplementedError("parse lines not defined for '%s' format" % self.format) - return - - @deprecated(toLines_deprecation_msg) - def toLines(self, stru): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.StructureParser.to_lines instead. - """ - return self.to_lines(stru) - - def to_lines(self, stru): - """Convert Structure stru to a list of lines. - - Return list of strings. - - Note - ---- - This method has to be overloaded in derived class. - """ - raise NotImplementedError("to_lines not defined for '%s' format" % self.format) - - def parse(self, s): - """Create `Structure` instance from a string.""" - lines = s.rstrip("\r\n").split("\n") - stru = self.parseLines(lines) - return stru - - def tostring(self, stru): - """Convert `Structure` instance to a string.""" - lines = self.to_lines(stru) - s = "\n".join(lines) + "\n" - return s - - @deprecated(parseFile_deprecation_msg) - def parseFile(self, filename): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.StructureParser.parse_file instead. - """ - return self.parse_file(filename) - - def parse_file(self, filename): - """Create Structure instance from an existing file.""" - self.filename = filename - with open(filename) as fp: - s = fp.read() - stru = self.parse(s) - return stru - - -# End of class StructureParser diff --git a/src/diffpy/structure/pdffitstructure.py b/src/diffpy/structure/pdffitstructure.py deleted file mode 100644 index 2ee1f7ac..00000000 --- a/src/diffpy/structure/pdffitstructure.py +++ /dev/null @@ -1,127 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Definition of PDFFitStructure class derived from Structure.""" - - -from diffpy.structure.structure import Structure -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure.PDFFitStructure" -removal_version = "4.0.0" -readStr_deprecation_msg = build_deprecation_message( - base, - "readStr", - "read_structure", - removal_version, -) - -# ---------------------------------------------------------------------------- - - -class PDFFitStructure(Structure): - """PDFFitStructure --> Structure with extra pdffit member. - - Parameters - ---------- - *args, **kwargs : - See `Structure` class constructor. - - Attributes - ---------- - pdffit : dict - Dictionary for storing following extra parameters from - PDFFit structure files: - `'scale', 'delta1', 'delta2', 'sratio', - 'rcut', 'spcgr', 'dcell', 'ncell'` - """ - - def __init__(self, *args, **kwargs): - self.pdffit = { - "scale": 1.0, - "delta1": 0.0, - "delta2": 0.0, - "sratio": 1.0, - "rcut": 0.0, - "spcgr": "P1", - "spdiameter": 0.0, - "stepcut": 0.0, - "dcell": 6 * [0.0], - "ncell": [1, 1, 1, 0], - } - Structure.__init__(self, *args, **kwargs) - return - - def read(self, filename, format="auto"): - """Same as `Structure.read`, but update `spcgr` value in - `self.pdffit` when parser can get spacegroup. - - See `Structure.read()` for more info. - - Parameters - ---------- - filename : str - File to be loaded. - format : str, Optional - All structure formats are defined in parsers submodule, - when ``format == 'auto'`` all parsers are tried one by one. - - Return - ------ - StructureParser - Instance of StructureParser used to load the data. - """ - p = Structure.read(self, filename, format) - sg = getattr(p, "spacegroup", None) - if sg: - self.pdffit["spcgr"] = sg.short_name - return p - - @deprecated(readStr_deprecation_msg) - def readStr(self, s, format="auto"): - """'diffpy.structure.PDFFitStructure.readStr' is deprecated and - will be removed in version 4.0.0. - - Please use 'diffpy.structure.PDFFitStructure.read_structure' - instead. - """ - return self.read_structure(s, format) - - def read_structure(self, s, format="auto"): - """Same as `Structure.readStr`, but update `spcgr` value in - `self.pdffit` when parser can get spacegroup. - - See `Structure.readStr()` for more info. - - Parameters - ---------- - s : str - String with structure definition. - format : str, Optional - All structure formats are defined in parsers submodule. When ``format == 'auto'``, - all parsers are tried one by one. - - Return - ------ - StructureParser - Instance of `StructureParser` used to load the data. - """ - p = Structure.read_structure(self, s, format) - sg = getattr(p, "spacegroup", None) - if sg: - self.pdffit["spcgr"] = sg.short_name - return p - - -# End of class PDFFitStructure diff --git a/src/diffpy/structure/sgtbxspacegroups.py b/src/diffpy/structure/sgtbxspacegroups.py deleted file mode 100644 index 30aacfcf..00000000 --- a/src/diffpy/structure/sgtbxspacegroups.py +++ /dev/null @@ -1,5198 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2009 Trustees of the Columbia University -# in the City of New York. All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Extra space group representations generated using `sgtbx` module from -`cctbx`. Import of this module extends the `SpaceGroupList` in the -`SpaceGroups` module. - -Attributes ----------- -sgtbxSpaceGroupList : list - List of space group instances defined in this module. -""" - - -from diffpy.structure.spacegroupmod import ( - Rot_mX_mY_mZ, - Rot_mX_mY_Z, - Rot_mX_Y_mZ, - Rot_mX_Y_Z, - Rot_X_mY_mZ, - Rot_X_mY_Z, - Rot_X_Y_mZ, - Rot_X_Y_Z, - SpaceGroup, - SymOp, - Tr_0_0_0, - Tr_0_0_12, - Tr_0_12_0, - Tr_0_12_12, - Tr_12_0_0, - Tr_12_0_12, - Tr_12_12_0, - Tr_12_12_12, - Tr_14_14_14, - Tr_14_34_34, - Tr_34_14_34, - Tr_34_34_14, -) - -############################################################################## -# generated using sgtbx_extra_groups.py -############################################################################## - -sg2003 = SpaceGroup( - number=2003, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P211", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="P 2 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - ], -) - -sg2004 = SpaceGroup( - number=2004, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P2111", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="P 21 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - ], -) - -sg4005 = SpaceGroup( - number=4005, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="A121", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="A 1 2 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - ], -) - -sg5005 = SpaceGroup( - number=5005, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I121", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="I 1 2 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - ], -) - -sg6005 = SpaceGroup( - number=6005, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="A112", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="A 1 1 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - ], -) - -sg7005 = SpaceGroup( - number=7005, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I112", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="I 1 1 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - ], -) - -sg8005 = SpaceGroup( - number=8005, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="B211", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="B 2 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - ], -) - -sg9005 = SpaceGroup( - number=9005, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="C211", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="C 2 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - ], -) - -sg10005 = SpaceGroup( - number=10005, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I211", - point_group_name="PG2", - crystal_system="MONOCLINIC", - pdb_name="I 2 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - ], -) - -sg2006 = SpaceGroup( - number=2006, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="Pm11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - ], -) - -sg2007 = SpaceGroup( - number=2007, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P1n1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P 1 n 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - ], -) - -sg3007 = SpaceGroup( - number=3007, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P1a1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P 1 a 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - ], -) - -sg4007 = SpaceGroup( - number=4007, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P11a", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg5007 = SpaceGroup( - number=5007, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="P11n", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg6007 = SpaceGroup( - number=6007, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="Pb11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P b 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - ], -) - -sg7007 = SpaceGroup( - number=7007, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="Pn11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P n 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg8007 = SpaceGroup( - number=8007, - num_sym_equiv=2, - num_primitive_sym_equiv=2, - short_name="Pc11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="P c 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - ], -) - -sg2008 = SpaceGroup( - number=2008, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="A1m1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="A 1 m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg3008 = SpaceGroup( - number=3008, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I1m1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I 1 m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg4008 = SpaceGroup( - number=4008, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="A11m", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="A 1 1 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg5008 = SpaceGroup( - number=5008, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I11m", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I 1 1 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg6008 = SpaceGroup( - number=6008, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Bm11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="B m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg7008 = SpaceGroup( - number=7008, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Cm11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="C m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg8008 = SpaceGroup( - number=8008, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Im11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg2009 = SpaceGroup( - number=2009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="A1n1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="A 1 n 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - ], -) - -sg3009 = SpaceGroup( - number=3009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I1a1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I 1 a 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg4009 = SpaceGroup( - number=4009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="A1a1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="A 1 a 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg5009 = SpaceGroup( - number=5009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="C1n1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="C 1 n 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg6009 = SpaceGroup( - number=6009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I1c1", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I 1 c 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - ], -) - -sg7009 = SpaceGroup( - number=7009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="A11a", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="A 1 1 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg8009 = SpaceGroup( - number=8009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="B11n", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="B 1 1 n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg9009 = SpaceGroup( - number=9009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I11b", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I 1 1 b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg10009 = SpaceGroup( - number=10009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="A11n", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="A 1 1 n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg11009 = SpaceGroup( - number=11009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="I11a", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I 1 1 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg12009 = SpaceGroup( - number=12009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Bb11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="B b 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg13009 = SpaceGroup( - number=13009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Cn11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="C n 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg14009 = SpaceGroup( - number=14009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Ic11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I c 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg15009 = SpaceGroup( - number=15009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Cc11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="C c 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg16009 = SpaceGroup( - number=16009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Bn11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="B n 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg17009 = SpaceGroup( - number=17009, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Ib11", - point_group_name="PGm", - crystal_system="MONOCLINIC", - pdb_name="I b 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg2010 = SpaceGroup( - number=2010, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2/m11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 2/m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - ], -) - -sg2011 = SpaceGroup( - number=2011, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21/m11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 21/m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - ], -) - -sg2012 = SpaceGroup( - number=2012, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A12/m1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="A 1 2/m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg3012 = SpaceGroup( - number=3012, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I12/m1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 1 2/m 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg4012 = SpaceGroup( - number=4012, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A112/m", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="A 1 1 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg5012 = SpaceGroup( - number=5012, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I112/m", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 1 1 2/m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg6012 = SpaceGroup( - number=6012, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B2/m11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="B 2/m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg7012 = SpaceGroup( - number=7012, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="C2/m11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="C 2/m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg8012 = SpaceGroup( - number=8012, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I2/m11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 2/m 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg2013 = SpaceGroup( - number=2013, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P12/n1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 2/n 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - ], -) - -sg3013 = SpaceGroup( - number=3013, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P12/a1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 2/a 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - ], -) - -sg4013 = SpaceGroup( - number=4013, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P112/a", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 2/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg5013 = SpaceGroup( - number=5013, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P112/n", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg6013 = SpaceGroup( - number=6013, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2/b11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 2/b 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - ], -) - -sg7013 = SpaceGroup( - number=7013, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2/n11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 2/n 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg8013 = SpaceGroup( - number=8013, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2/c11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 2/c 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - ], -) - -sg2014 = SpaceGroup( - number=2014, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P121/n1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 21/n 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg3014 = SpaceGroup( - number=3014, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P121/a1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 21/a 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - ], -) - -sg4014 = SpaceGroup( - number=4014, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P1121/a", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 21/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg5014 = SpaceGroup( - number=5014, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P1121/n", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 1 1 21/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg6014 = SpaceGroup( - number=6014, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21/b11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 21/b 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg7014 = SpaceGroup( - number=7014, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21/n11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 21/n 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg8014 = SpaceGroup( - number=8014, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21/c11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="P 21/c 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg2015 = SpaceGroup( - number=2015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A12/n1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="A 1 2/n 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - ], -) - -sg3015 = SpaceGroup( - number=3015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I12/a1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 1 2/a 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg4015 = SpaceGroup( - number=4015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A12/a1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="A 1 2/a 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg5015 = SpaceGroup( - number=5015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="C12/n1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="C 1 2/n 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg6015 = SpaceGroup( - number=6015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I12/c1", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 1 2/c 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - ], -) - -sg7015 = SpaceGroup( - number=7015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A112/a", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="A 1 1 2/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg8015 = SpaceGroup( - number=8015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B112/n", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="B 1 1 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg9015 = SpaceGroup( - number=9015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I112/b", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 1 1 2/b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg10015 = SpaceGroup( - number=10015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A112/n", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="A 1 1 2/n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg11015 = SpaceGroup( - number=11015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I112/a", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 1 1 2/a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg12015 = SpaceGroup( - number=12015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B2/b11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="B 2/b 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg13015 = SpaceGroup( - number=13015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="C2/n11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="C 2/n 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg14015 = SpaceGroup( - number=14015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I2/c11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 2/c 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - ], -) - -sg15015 = SpaceGroup( - number=15015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="C2/c11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="C 2/c 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - ], -) - -sg16015 = SpaceGroup( - number=16015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B2/n11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="B 2/n 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - ], -) - -sg17015 = SpaceGroup( - number=17015, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I2/b11", - point_group_name="PG2/m", - crystal_system="MONOCLINIC", - pdb_name="I 2/b 1 1", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - ], -) - -sg2020 = SpaceGroup( - number=2020, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A2122", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="A 21 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - ], -) - -sg3020 = SpaceGroup( - number=3020, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B2212", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="B 2 21 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - ], -) - -sg2021 = SpaceGroup( - number=2021, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A222", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="A 2 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - ], -) - -sg3021 = SpaceGroup( - number=3021, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B222", - point_group_name="PG222", - crystal_system="ORTHORHOMBIC", - pdb_name="B 2 2 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - ], -) - -sg1025 = SpaceGroup( - number=1025, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2mm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg2025 = SpaceGroup( - number=2025, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pm2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P m 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg1026 = SpaceGroup( - number=1026, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pcm21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P c m 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - ], -) - -sg2026 = SpaceGroup( - number=2026, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21ma", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 m a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg3026 = SpaceGroup( - number=3026, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21am", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg4026 = SpaceGroup( - number=4026, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pb21m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P b 21 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg5026 = SpaceGroup( - number=5026, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pm21b", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P m 21 b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg1027 = SpaceGroup( - number=1027, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2aa", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg2027 = SpaceGroup( - number=2027, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pb2b", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P b 2 b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg1028 = SpaceGroup( - number=1028, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pbm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P b m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - ], -) - -sg2028 = SpaceGroup( - number=2028, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2mb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg3028 = SpaceGroup( - number=3028, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2cm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg4028 = SpaceGroup( - number=4028, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pc2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P c 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg5028 = SpaceGroup( - number=5028, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pm2a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P m 2 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg1029 = SpaceGroup( - number=1029, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pbc21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P b c 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg2029 = SpaceGroup( - number=2029, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21ab", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 a b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg3029 = SpaceGroup( - number=3029, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21ca", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 c a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg4029 = SpaceGroup( - number=4029, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pc21b", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P c 21 b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg5029 = SpaceGroup( - number=5029, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pb21a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P b 21 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg1030 = SpaceGroup( - number=1030, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pcn2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P c n 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - ], -) - -sg2030 = SpaceGroup( - number=2030, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2na", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 n a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg3030 = SpaceGroup( - number=3030, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2an", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 a n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg4030 = SpaceGroup( - number=4030, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pb2n", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P b 2 n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg5030 = SpaceGroup( - number=5030, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pn2b", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P n 2 b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1031 = SpaceGroup( - number=1031, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pnm21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P n m 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - ], -) - -sg2031 = SpaceGroup( - number=2031, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21mn", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 m n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg3031 = SpaceGroup( - number=3031, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21nm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 n m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg4031 = SpaceGroup( - number=4031, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pn21m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P n 21 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg5031 = SpaceGroup( - number=5031, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pm21n", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P m 21 n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg1032 = SpaceGroup( - number=1032, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2cb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2032 = SpaceGroup( - number=2032, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pc2a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P c 2 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1033 = SpaceGroup( - number=1033, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pbn21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P b n 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg2033 = SpaceGroup( - number=2033, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21nb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 n b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg3033 = SpaceGroup( - number=3033, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P21cn", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 21 c n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg4033 = SpaceGroup( - number=4033, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pc21n", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P c 21 n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg5033 = SpaceGroup( - number=5033, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pn21a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P n 21 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1034 = SpaceGroup( - number=1034, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="P2nn", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P 2 n n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg2034 = SpaceGroup( - number=2034, - num_sym_equiv=4, - num_primitive_sym_equiv=4, - short_name="Pn2n", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="P n 2 n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1035 = SpaceGroup( - number=1035, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A2mm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A 2 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2035 = SpaceGroup( - number=2035, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Bm2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B m 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1036 = SpaceGroup( - number=1036, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Ccm21", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C c m 21", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - ], -) - -sg2036 = SpaceGroup( - number=2036, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A21ma", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A 21 m a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg3036 = SpaceGroup( - number=3036, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A21am", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A 21 a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg4036 = SpaceGroup( - number=4036, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Bb21m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B b 21 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg5036 = SpaceGroup( - number=5036, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Bm21b", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B m 21 b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1037 = SpaceGroup( - number=1037, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="A2aa", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A 2 a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg2037 = SpaceGroup( - number=2037, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Bb2b", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B b 2 b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1038 = SpaceGroup( - number=1038, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Bmm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B m m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - ], -) - -sg2038 = SpaceGroup( - number=2038, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B2mm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B 2 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg3038 = SpaceGroup( - number=3038, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="C2mm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg4038 = SpaceGroup( - number=4038, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Cm2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C m 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg5038 = SpaceGroup( - number=5038, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Am2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A m 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1039 = SpaceGroup( - number=1039, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Bma2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B m a 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - ], -) - -sg2039 = SpaceGroup( - number=2039, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B2cm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B 2 c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg3039 = SpaceGroup( - number=3039, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="C2mb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2 m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg4039 = SpaceGroup( - number=4039, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Cm2a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C m 2 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg5039 = SpaceGroup( - number=5039, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Ac2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A c 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg1040 = SpaceGroup( - number=1040, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Bbm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B b m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - ], -) - -sg2040 = SpaceGroup( - number=2040, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B2mb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B 2 m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg3040 = SpaceGroup( - number=3040, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="C2cm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2 c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg4040 = SpaceGroup( - number=4040, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Cc2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C c 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg5040 = SpaceGroup( - number=5040, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Am2a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A m 2 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1041 = SpaceGroup( - number=1041, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Bba2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B b a 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - ], -) - -sg2041 = SpaceGroup( - number=2041, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="B2cb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="B 2 c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg3041 = SpaceGroup( - number=3041, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="C2cb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C 2 c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg4041 = SpaceGroup( - number=4041, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Cc2a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="C c 2 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg5041 = SpaceGroup( - number=5041, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Ac2a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="A c 2 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1042 = SpaceGroup( - number=1042, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="F2mm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="F 2 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg2042 = SpaceGroup( - number=2042, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Fm2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="F m 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg1043 = SpaceGroup( - number=1043, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="F2dd", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="F 2 d d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_14_14_14), - SymOp(Rot_X_Y_mZ, Tr_14_14_14), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_14_34_34), - SymOp(Rot_X_Y_mZ, Tr_14_34_34), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_34_14_34), - SymOp(Rot_X_Y_mZ, Tr_34_14_34), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_34_34_14), - SymOp(Rot_X_Y_mZ, Tr_34_34_14), - ], -) - -sg2043 = SpaceGroup( - number=2043, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Fd2d", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="F d 2 d", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_14_14_14), - SymOp(Rot_X_Y_mZ, Tr_14_14_14), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_14_34_34), - SymOp(Rot_X_Y_mZ, Tr_14_34_34), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_34_14_34), - SymOp(Rot_X_Y_mZ, Tr_34_14_34), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_34_34_14), - SymOp(Rot_X_Y_mZ, Tr_34_34_14), - ], -) - -sg1044 = SpaceGroup( - number=1044, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I2mm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I 2 m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg2044 = SpaceGroup( - number=2044, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Im2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I m 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1045 = SpaceGroup( - number=1045, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I2cb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I 2 c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2045 = SpaceGroup( - number=2045, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Ic2a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I c 2 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1046 = SpaceGroup( - number=1046, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Ibm2", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I b m 2", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - ], -) - -sg2046 = SpaceGroup( - number=2046, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I2mb", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I 2 m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg3046 = SpaceGroup( - number=3046, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="I2cm", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I 2 c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg4046 = SpaceGroup( - number=4046, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Ic2m", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I c 2 m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg5046 = SpaceGroup( - number=5046, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Im2a", - point_group_name="PGmm2", - crystal_system="ORTHORHOMBIC", - pdb_name="I m 2 a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1049 = SpaceGroup( - number=1049, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmaa", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg2049 = SpaceGroup( - number=2049, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbmb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg1050 = SpaceGroup( - number=1050, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pncb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2050 = SpaceGroup( - number=2050, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pncb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg3050 = SpaceGroup( - number=3050, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcna", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c n a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg4050 = SpaceGroup( - number=4050, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcna", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c n a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg1051 = SpaceGroup( - number=1051, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmmb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg2051 = SpaceGroup( - number=2051, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg3051 = SpaceGroup( - number=3051, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg4051 = SpaceGroup( - number=4051, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmcm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg5051 = SpaceGroup( - number=5051, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg1052 = SpaceGroup( - number=1052, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnnb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n n b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg2052 = SpaceGroup( - number=2052, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbnn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b n n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg3052 = SpaceGroup( - number=3052, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcnn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c n n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg4052 = SpaceGroup( - number=4052, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pncn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n c n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg5052 = SpaceGroup( - number=5052, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnan", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n a n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1053 = SpaceGroup( - number=1053, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnmb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2053 = SpaceGroup( - number=2053, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbmn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b m n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg3053 = SpaceGroup( - number=3053, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcnm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c n m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg4053 = SpaceGroup( - number=4053, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pncm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg5053 = SpaceGroup( - number=5053, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pman", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m a n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg1054 = SpaceGroup( - number=1054, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pccb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg2054 = SpaceGroup( - number=2054, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbaa", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg3054 = SpaceGroup( - number=3054, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcaa", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg4054 = SpaceGroup( - number=4054, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbcb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg5054 = SpaceGroup( - number=5054, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbab", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b a b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg1055 = SpaceGroup( - number=1055, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmcb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2055 = SpaceGroup( - number=2055, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c m a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1056 = SpaceGroup( - number=1056, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnaa", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg2056 = SpaceGroup( - number=2056, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbnb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b n b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1057 = SpaceGroup( - number=1057, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg2057 = SpaceGroup( - number=2057, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmca", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m c a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg3057 = SpaceGroup( - number=3057, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmab", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m a b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg4057 = SpaceGroup( - number=4057, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b m a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg5057 = SpaceGroup( - number=5057, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcmb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1058 = SpaceGroup( - number=1058, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmnn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m n n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg2058 = SpaceGroup( - number=2058, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnmn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n m n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg2059 = SpaceGroup( - number=2059, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg3059 = SpaceGroup( - number=3059, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg4059 = SpaceGroup( - number=4059, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmnm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m n m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - ], -) - -sg5059 = SpaceGroup( - number=5059, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmnm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m n m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg1060 = SpaceGroup( - number=1060, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcan", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c a n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg2060 = SpaceGroup( - number=2060, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnca", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n c a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - ], -) - -sg3060 = SpaceGroup( - number=3060, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnab", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n a b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg4060 = SpaceGroup( - number=4060, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbna", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b n a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg5060 = SpaceGroup( - number=5060, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcnb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c n b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg1061 = SpaceGroup( - number=1061, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcab", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c a b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1062 = SpaceGroup( - number=1062, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmnb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m n b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2062 = SpaceGroup( - number=2062, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pbnm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P b n m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg3062 = SpaceGroup( - number=3062, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pcmn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P c m n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg4062 = SpaceGroup( - number=4062, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pmcn", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P m c n", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg5062 = SpaceGroup( - number=5062, - num_sym_equiv=8, - num_primitive_sym_equiv=8, - short_name="Pnam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="P n a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg1063 = SpaceGroup( - number=1063, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Ccmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C c m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg2063 = SpaceGroup( - number=2063, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Amma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A m m a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg3063 = SpaceGroup( - number=3063, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Amam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A m a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg4063 = SpaceGroup( - number=4063, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bbmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B b m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg5063 = SpaceGroup( - number=5063, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bmmb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B m m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1064 = SpaceGroup( - number=1064, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Ccmb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C c m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2064 = SpaceGroup( - number=2064, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Abma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A b m a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg3064 = SpaceGroup( - number=3064, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Acam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A c a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg4064 = SpaceGroup( - number=4064, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bbcm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B b c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg5064 = SpaceGroup( - number=5064, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bmab", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B m a b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1065 = SpaceGroup( - number=1065, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Ammm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A m m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2065 = SpaceGroup( - number=2065, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bmmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B m m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1066 = SpaceGroup( - number=1066, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Amaa", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A m a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg2066 = SpaceGroup( - number=2066, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bbmb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B b m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1067 = SpaceGroup( - number=1067, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Cmmb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C m m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg2067 = SpaceGroup( - number=2067, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Abmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A b m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg3067 = SpaceGroup( - number=3067, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Acmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A c m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg4067 = SpaceGroup( - number=4067, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bmcm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B m c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg5067 = SpaceGroup( - number=5067, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bmam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B m a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - ], -) - -sg1068 = SpaceGroup( - number=1068, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Cccb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="C c c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - ], -) - -sg2068 = SpaceGroup( - number=2068, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Abaa", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A b a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg3068 = SpaceGroup( - number=3068, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Abaa", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A b a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg4068 = SpaceGroup( - number=4068, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Acaa", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="A c a a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg5068 = SpaceGroup( - number=5068, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bbcb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B b c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg6068 = SpaceGroup( - number=6068, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bbcb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B b c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg7068 = SpaceGroup( - number=7068, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Bbab", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="B b a b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg1072 = SpaceGroup( - number=1072, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Imcb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I m c b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2072 = SpaceGroup( - number=2072, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Icma", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I c m a", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_12), - ], -) - -sg1073 = SpaceGroup( - number=1073, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Icab", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I c a b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg1074 = SpaceGroup( - number=1074, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Immb", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I m m b", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_12_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_12_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_0_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_0_12_12), - ], -) - -sg2074 = SpaceGroup( - number=2074, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Ibmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I b m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_12), - SymOp(Rot_mX_Y_mZ, Tr_0_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_12), - SymOp(Rot_X_mY_Z, Tr_0_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_0), - SymOp(Rot_mX_Y_mZ, Tr_12_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_0), - SymOp(Rot_X_mY_Z, Tr_12_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -sg3074 = SpaceGroup( - number=3074, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Icmm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I c m m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_12_0), - SymOp(Rot_mX_Y_mZ, Tr_0_12_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_12_0), - SymOp(Rot_X_mY_Z, Tr_0_12_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_0_12), - SymOp(Rot_mX_Y_mZ, Tr_12_0_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_0_12), - SymOp(Rot_X_mY_Z, Tr_12_0_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg4074 = SpaceGroup( - number=4074, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Imcm", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I m c m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_12_0_0), - SymOp(Rot_mX_Y_mZ, Tr_12_0_0), - SymOp(Rot_mX_mY_Z, Tr_0_0_0), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_12_0_0), - SymOp(Rot_X_mY_Z, Tr_12_0_0), - SymOp(Rot_X_Y_mZ, Tr_0_0_0), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_0_12_12), - SymOp(Rot_mX_Y_mZ, Tr_0_12_12), - SymOp(Rot_mX_mY_Z, Tr_12_12_12), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_0_12_12), - SymOp(Rot_X_mY_Z, Tr_0_12_12), - SymOp(Rot_X_Y_mZ, Tr_12_12_12), - ], -) - -sg5074 = SpaceGroup( - number=5074, - num_sym_equiv=16, - num_primitive_sym_equiv=16, - short_name="Imam", - point_group_name="PGmmm", - crystal_system="ORTHORHOMBIC", - pdb_name="I m a m", - symop_list=[ - SymOp(Rot_X_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_mZ, Tr_0_0_12), - SymOp(Rot_mX_mY_Z, Tr_0_0_12), - SymOp(Rot_mX_mY_mZ, Tr_0_0_0), - SymOp(Rot_mX_Y_Z, Tr_0_0_0), - SymOp(Rot_X_mY_Z, Tr_0_0_12), - SymOp(Rot_X_Y_mZ, Tr_0_0_12), - SymOp(Rot_X_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_mZ, Tr_12_12_0), - SymOp(Rot_mX_mY_Z, Tr_12_12_0), - SymOp(Rot_mX_mY_mZ, Tr_12_12_12), - SymOp(Rot_mX_Y_Z, Tr_12_12_12), - SymOp(Rot_X_mY_Z, Tr_12_12_0), - SymOp(Rot_X_Y_mZ, Tr_12_12_0), - ], -) - -############################################################################## -# end of generated code -############################################################################## - -# list of all groups in this module -sgtbxSpaceGroupList = [ - sg2003, - sg2004, - sg4005, - sg5005, - sg6005, - sg7005, - sg8005, - sg9005, - sg10005, - sg2006, - sg2007, - sg3007, - sg4007, - sg5007, - sg6007, - sg7007, - sg8007, - sg2008, - sg3008, - sg4008, - sg5008, - sg6008, - sg7008, - sg8008, - sg2009, - sg3009, - sg4009, - sg5009, - sg6009, - sg7009, - sg8009, - sg9009, - sg10009, - sg11009, - sg12009, - sg13009, - sg14009, - sg15009, - sg16009, - sg17009, - sg2010, - sg2011, - sg2012, - sg3012, - sg4012, - sg5012, - sg6012, - sg7012, - sg8012, - sg2013, - sg3013, - sg4013, - sg5013, - sg6013, - sg7013, - sg8013, - sg2014, - sg3014, - sg4014, - sg5014, - sg6014, - sg7014, - sg8014, - sg2015, - sg3015, - sg4015, - sg5015, - sg6015, - sg7015, - sg8015, - sg9015, - sg10015, - sg11015, - sg12015, - sg13015, - sg14015, - sg15015, - sg16015, - sg17015, - sg2020, - sg3020, - sg2021, - sg3021, - sg1025, - sg2025, - sg1026, - sg2026, - sg3026, - sg4026, - sg5026, - sg1027, - sg2027, - sg1028, - sg2028, - sg3028, - sg4028, - sg5028, - sg1029, - sg2029, - sg3029, - sg4029, - sg5029, - sg1030, - sg2030, - sg3030, - sg4030, - sg5030, - sg1031, - sg2031, - sg3031, - sg4031, - sg5031, - sg1032, - sg2032, - sg1033, - sg2033, - sg3033, - sg4033, - sg5033, - sg1034, - sg2034, - sg1035, - sg2035, - sg1036, - sg2036, - sg3036, - sg4036, - sg5036, - sg1037, - sg2037, - sg1038, - sg2038, - sg3038, - sg4038, - sg5038, - sg1039, - sg2039, - sg3039, - sg4039, - sg5039, - sg1040, - sg2040, - sg3040, - sg4040, - sg5040, - sg1041, - sg2041, - sg3041, - sg4041, - sg5041, - sg1042, - sg2042, - sg1043, - sg2043, - sg1044, - sg2044, - sg1045, - sg2045, - sg1046, - sg2046, - sg3046, - sg4046, - sg5046, - sg1049, - sg2049, - sg1050, - sg2050, - sg3050, - sg4050, - sg1051, - sg2051, - sg3051, - sg4051, - sg5051, - sg1052, - sg2052, - sg3052, - sg4052, - sg5052, - sg1053, - sg2053, - sg3053, - sg4053, - sg5053, - sg1054, - sg2054, - sg3054, - sg4054, - sg5054, - sg1055, - sg2055, - sg1056, - sg2056, - sg1057, - sg2057, - sg3057, - sg4057, - sg5057, - sg1058, - sg2058, - sg2059, - sg3059, - sg4059, - sg5059, - sg1060, - sg2060, - sg3060, - sg4060, - sg5060, - sg1061, - sg1062, - sg2062, - sg3062, - sg4062, - sg5062, - sg1063, - sg2063, - sg3063, - sg4063, - sg5063, - sg1064, - sg2064, - sg3064, - sg4064, - sg5064, - sg1065, - sg2065, - sg1066, - sg2066, - sg1067, - sg2067, - sg3067, - sg4067, - sg5067, - sg1068, - sg2068, - sg3068, - sg4068, - sg5068, - sg6068, - sg7068, - sg1072, - sg2072, - sg1073, - sg1074, - sg2074, - sg3074, - sg4074, - sg5074, -] diff --git a/src/diffpy/structure/spacegroupmod.py b/src/diffpy/structure/spacegroupmod.py deleted file mode 100644 index 2403d32f..00000000 --- a/src/diffpy/structure/spacegroupmod.py +++ /dev/null @@ -1,345 +0,0 @@ -#!/usr/bin/env python -# Copyright 2002 by PyMMLib Development Group, http://pymmlib.sourceforge.net/ -# This code is part of the PyMMLib distribution and governed by -# its license. Please see the LICENSE_pymmlib file that should have been -# included as part of this package. -"""Symmetry operations as functions on vectors or arrays.""" - -import numpy - -# 64 unique rotation matrices -Rot_Z_mY_X = numpy.array([[0.0, 0.0, 1.0], [0.0, -1.0, 0.0], [1.0, 0.0, 0.0]], float) -Rot_Y_mX_mZ = numpy.array([[0.0, 1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_XmY_X_mZ = numpy.array([[1.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_mX_Y_mZ = numpy.array([[-1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_X_mZ_Y = numpy.array([[1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, 1.0, 0.0]], float) -Rot_Y_mXY_Z = numpy.array([[0.0, 1.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_Y_mX_Z = numpy.array([[0.0, 1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_XmY_X_Z = numpy.array([[1.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_mX_mXY_mZ = numpy.array([[-1.0, 0.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_Y_Z_X = numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, 1.0], [1.0, 0.0, 0.0]], float) -Rot_mY_mZ_X = numpy.array([[0.0, -1.0, 0.0], [0.0, 0.0, -1.0], [1.0, 0.0, 0.0]], float) -Rot_X_Z_mY = numpy.array([[1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, -1.0, 0.0]], float) -Rot_XmY_mY_Z = numpy.array([[1.0, -1.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_Y_X_mZ = numpy.array([[0.0, 1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_Y_mZ_X = numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, -1.0], [1.0, 0.0, 0.0]], float) -Rot_mXY_Y_Z = numpy.array([[-1.0, 1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_mX_mY_mZ = numpy.array([[-1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_X_Y_mZ = numpy.array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_mXY_mX_Z = numpy.array([[-1.0, 1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_mZ_mY_mX = numpy.array([[0.0, 0.0, -1.0], [0.0, -1.0, 0.0], [-1.0, 0.0, 0.0]], float) -Rot_X_mZ_mY = numpy.array([[1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, -1.0, 0.0]], float) -Rot_X_Y_Z = numpy.array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_mY_mX_mZ = numpy.array([[0.0, -1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_mY_X_Z = numpy.array([[0.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_Z_X_Y = numpy.array([[0.0, 0.0, 1.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], float) -Rot_X_XmY_Z = numpy.array([[1.0, 0.0, 0.0], [1.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_mY_X_mZ = numpy.array([[0.0, -1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_mY_Z_mX = numpy.array([[0.0, -1.0, 0.0], [0.0, 0.0, 1.0], [-1.0, 0.0, 0.0]], float) -Rot_mY_Z_X = numpy.array([[0.0, -1.0, 0.0], [0.0, 0.0, 1.0], [1.0, 0.0, 0.0]], float) -Rot_mX_mZ_mY = numpy.array([[-1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, -1.0, 0.0]], float) -Rot_mX_Z_Y = numpy.array([[-1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 1.0, 0.0]], float) -Rot_mZ_mX_mY = numpy.array([[0.0, 0.0, -1.0], [-1.0, 0.0, 0.0], [0.0, -1.0, 0.0]], float) -Rot_X_XmY_mZ = numpy.array([[1.0, 0.0, 0.0], [1.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_mY_XmY_mZ = numpy.array([[0.0, -1.0, 0.0], [1.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_Z_X_mY = numpy.array([[0.0, 0.0, 1.0], [1.0, 0.0, 0.0], [0.0, -1.0, 0.0]], float) -Rot_mZ_mY_X = numpy.array([[0.0, 0.0, -1.0], [0.0, -1.0, 0.0], [1.0, 0.0, 0.0]], float) -Rot_X_Z_Y = numpy.array([[1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, 1.0, 0.0]], float) -Rot_Z_mX_mY = numpy.array([[0.0, 0.0, 1.0], [-1.0, 0.0, 0.0], [0.0, -1.0, 0.0]], float) -Rot_mX_Z_mY = numpy.array([[-1.0, 0.0, 0.0], [0.0, 0.0, 1.0], [0.0, -1.0, 0.0]], float) -Rot_X_mY_Z = numpy.array([[1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_mY_mX_Z = numpy.array([[0.0, -1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_Z_mY_mX = numpy.array([[0.0, 0.0, 1.0], [0.0, -1.0, 0.0], [-1.0, 0.0, 0.0]], float) -Rot_mX_mY_Z = numpy.array([[-1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_Z_Y_X = numpy.array([[0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [1.0, 0.0, 0.0]], float) -Rot_mZ_Y_mX = numpy.array([[0.0, 0.0, -1.0], [0.0, 1.0, 0.0], [-1.0, 0.0, 0.0]], float) -Rot_Y_Z_mX = numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, 1.0], [-1.0, 0.0, 0.0]], float) -Rot_mY_XmY_Z = numpy.array([[0.0, -1.0, 0.0], [1.0, -1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_mXY_Y_mZ = numpy.array([[-1.0, 1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_mZ_mX_Y = numpy.array([[0.0, 0.0, -1.0], [-1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], float) -Rot_mX_mZ_Y = numpy.array([[-1.0, 0.0, 0.0], [0.0, 0.0, -1.0], [0.0, 1.0, 0.0]], float) -Rot_mX_Y_Z = numpy.array([[-1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_X_mY_mZ = numpy.array([[1.0, 0.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_mZ_X_Y = numpy.array([[0.0, 0.0, -1.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], float) -Rot_Y_mZ_mX = numpy.array([[0.0, 1.0, 0.0], [0.0, 0.0, -1.0], [-1.0, 0.0, 0.0]], float) -Rot_mY_mZ_mX = numpy.array([[0.0, -1.0, 0.0], [0.0, 0.0, -1.0], [-1.0, 0.0, 0.0]], float) -Rot_mZ_Y_X = numpy.array([[0.0, 0.0, -1.0], [0.0, 1.0, 0.0], [1.0, 0.0, 0.0]], float) -Rot_Z_Y_mX = numpy.array([[0.0, 0.0, 1.0], [0.0, 1.0, 0.0], [-1.0, 0.0, 0.0]], float) -Rot_mXY_mX_mZ = numpy.array([[-1.0, 1.0, 0.0], [-1.0, 0.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_XmY_mY_mZ = numpy.array([[1.0, -1.0, 0.0], [0.0, -1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_Z_mX_Y = numpy.array([[0.0, 0.0, 1.0], [-1.0, 0.0, 0.0], [0.0, 1.0, 0.0]], float) -Rot_mX_mXY_Z = numpy.array([[-1.0, 0.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float) -Rot_Y_mXY_mZ = numpy.array([[0.0, 1.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, -1.0]], float) -Rot_mZ_X_mY = numpy.array([[0.0, 0.0, -1.0], [1.0, 0.0, 0.0], [0.0, -1.0, 0.0]], float) -Rot_Y_X_Z = numpy.array([[0.0, 1.0, 0.0], [1.0, 0.0, 0.0], [0.0, 0.0, 1.0]], float) - -# 32 unique translation vectors -Tr_0_0_34 = numpy.array([0.0, 0.0, 3.0 / 4.0], float) -Tr_12_0_34 = numpy.array([1.0 / 2.0, 0.0, 3.0 / 4.0], float) -Tr_0_0_56 = numpy.array([0.0, 0.0, 5.0 / 6.0], float) -Tr_12_0_12 = numpy.array([1.0 / 2.0, 0.0, 1.0 / 2.0], float) -Tr_0_12_12 = numpy.array([0.0, 1.0 / 2.0, 1.0 / 2.0], float) -Tr_12_0_14 = numpy.array([1.0 / 2.0, 0.0, 1.0 / 4.0], float) -Tr_0_12_14 = numpy.array([0.0, 1.0 / 2.0, 1.0 / 4.0], float) -Tr_14_14_14 = numpy.array([1.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0], float) -Tr_0_12_34 = numpy.array([0.0, 1.0 / 2.0, 3.0 / 4.0], float) -Tr_34_14_14 = numpy.array([3.0 / 4.0, 1.0 / 4.0, 1.0 / 4.0], float) -Tr_0_0_0 = numpy.array([0.0, 0.0, 0.0], float) -Tr_23_13_56 = numpy.array([2.0 / 3.0, 1.0 / 3.0, 5.0 / 6.0], float) -Tr_14_14_34 = numpy.array([1.0 / 4.0, 1.0 / 4.0, 3.0 / 4.0], float) -Tr_12_12_0 = numpy.array([1.0 / 2.0, 1.0 / 2.0, 0.0], float) -Tr_23_13_13 = numpy.array([2.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0], float) -Tr_13_23_23 = numpy.array([1.0 / 3.0, 2.0 / 3.0, 2.0 / 3.0], float) -Tr_12_12_12 = numpy.array([1.0 / 2.0, 1.0 / 2.0, 1.0 / 2.0], float) -Tr_12_12_14 = numpy.array([1.0 / 2.0, 1.0 / 2.0, 1.0 / 4.0], float) -Tr_14_34_14 = numpy.array([1.0 / 4.0, 3.0 / 4.0, 1.0 / 4.0], float) -Tr_12_12_34 = numpy.array([1.0 / 2.0, 1.0 / 2.0, 3.0 / 4.0], float) -Tr_0_0_23 = numpy.array([0.0, 0.0, 2.0 / 3.0], float) -Tr_0_12_0 = numpy.array([0.0, 1.0 / 2.0, 0.0], float) -Tr_14_34_34 = numpy.array([1.0 / 4.0, 3.0 / 4.0, 3.0 / 4.0], float) -Tr_34_34_14 = numpy.array([3.0 / 4.0, 3.0 / 4.0, 1.0 / 4.0], float) -Tr_12_0_0 = numpy.array([1.0 / 2.0, 0.0, 0.0], float) -Tr_34_34_34 = numpy.array([3.0 / 4.0, 3.0 / 4.0, 3.0 / 4.0], float) -Tr_0_0_13 = numpy.array([0.0, 0.0, 1.0 / 3.0], float) -Tr_0_0_12 = numpy.array([0.0, 0.0, 1.0 / 2.0], float) -Tr_13_23_16 = numpy.array([1.0 / 3.0, 2.0 / 3.0, 1.0 / 6.0], float) -Tr_0_0_14 = numpy.array([0.0, 0.0, 1.0 / 4.0], float) -Tr_0_0_16 = numpy.array([0.0, 0.0, 1.0 / 6.0], float) -Tr_34_14_34 = numpy.array([3.0 / 4.0, 1.0 / 4.0, 3.0 / 4.0], float) - - -class SymOp(object): - """The transformation of coordinates to a symmetry-related position. - - The SymOp operation involves rotation and translation in cell coordinates. - - Parameters - ---------- - R : numpy.ndarray - The 3x3 matrix of rotation for this symmetry operation. - t : numpy.ndarray - The vector of translation in this symmetry operation. - - Attributes - ---------- - R : numpy.ndarray - The 3x3 matrix of rotation pertaining to unit cell coordinates. - This may be identity, simple rotation, improper rotation, mirror - or inversion. The determinant of *R* is either +1 or -1. - t : numpy.ndarray - The translation of cell coordinates applied after rotation *R*. - """ - - def __init__(self, R, t): - self.R = R - self.t = t - return - - def __str__(self): - """Printable representation of this SymOp object.""" - x = "[%6.3f %6.3f %6.3f %6.3f]\n" % ( - self.R[0, 0], - self.R[0, 1], - self.R[0, 2], - self.t[0], - ) - x += "[%6.3f %6.3f %6.3f %6.3f]\n" % ( - self.R[1, 0], - self.R[1, 1], - self.R[1, 2], - self.t[1], - ) - x += "[%6.3f %6.3f %6.3f %6.3f]\n" % ( - self.R[2, 0], - self.R[2, 1], - self.R[2, 2], - self.t[2], - ) - return x - - def __call__(self, vec): - """Return symmetry-related position for the specified - coordinates. - - Parameters - ---------- - vec : numpy.ndarray - The initial position in fractional cell coordinates. - - Returns - ------- - numpy.ndarray - The transformed position after this symmetry operation. - """ - return numpy.dot(self.R, vec) + self.t - - def __eq__(self, symop): - """Implement the ``self == symop`` test of equality. - - Return ``True`` when *self* and *symop* difference is within - tiny round-off errors. - """ - return numpy.allclose(self.R, symop.R) and numpy.allclose(self.t, symop.t) - - def is_identity(self): - """Check if this SymOp is an identity operation. - - Returns - ------- - bool - ``True`` if this is an identity operation within a small round-off. - Return ``False`` otherwise. - """ - rv = numpy.allclose(self.R, numpy.identity(3, float)) and numpy.allclose(self.t, numpy.zeros(3, float)) - return rv - - -# End of class SymOp - - -class SpaceGroup(object): - """Definition and basic operations for a specific space group. - - Provide standard names and all symmetry operations contained in - one space group. - - Parameters - ---------- - number : int - The space group number. - num_sym_equiv : int - The number of symmetry equivalent sites for a general position. - num_primitive_sym_equiv : int - The number of symmetry equivalent sites in a primitive unit cell. - short_name : str - The short Hermann-Mauguin symbol of the space group. - point_group_name : str - The point group of this space group. - crystal_system : str - The crystal system of this space group. - pdb_name : str - The full Hermann-Mauguin symbol of the space group. - symop_list : list of SymOp - The symmetry operations contained in this space group. - - Attributes - ---------- - number : int - A unique space group number. This may be incremented by - several thousands to facilitate unique values for multiple - settings of the same space group. Use ``number % 1000`` - to get the standard space group number from International - Tables. - num_sym_equiv : int - The number of symmetry equivalent sites for a general position. - num_primitive_sym_equiv : int - The number of symmetry equivalent sites in a primitive unit cell. - short_name : str - The short Hermann-Mauguin symbol of the space group. - point_group_name : str - The point group to which this space group belongs to. - crystal_system : str - The crystal system of this space group. The possible values are - ``"TRICLINIC", "MONOCLINIC", "ORTHORHOMBIC", "TETRAGONAL", - "TRIGONAL" "HEXAGONAL", "CUBIC"``. - pdb_name : str - The full Hermann-Mauguin symbol of the space group. - symop_list : list of SymOp - A list of `SymOp` objects for all symmetry operations - in this space group. - """ - - def __init__( - self, - number=None, - num_sym_equiv=None, - num_primitive_sym_equiv=None, - short_name=None, - point_group_name=None, - crystal_system=None, - pdb_name=None, - symop_list=None, - ): - - self.number = number - self.num_sym_equiv = num_sym_equiv - self.num_primitive_sym_equiv = num_primitive_sym_equiv - self.short_name = short_name - self.point_group_name = point_group_name - self.crystal_system = crystal_system - self.pdb_name = pdb_name - self.symop_list = symop_list - - def __repr__(self): - """Return a string representation of the space group.""" - return ("SpaceGroup #%i (%s, %s). Symmetry matrices: %i, " "point sym. matr.: %i") % ( - self.number, - self.short_name, - self.crystal_system[0] + self.crystal_system[1:].lower(), - self.num_sym_equiv, - self.num_primitive_sym_equiv, - ) - - def iter_symops(self): - """Iterate over all symmetry operations in the space group. - - Yields - ------ - SymOp - Generate all symmetry operations for this space group. - """ - return iter(self.symop_list) - - def check_group_name(self, name): - """Check if given name matches this space group. - - Parameters - ---------- - name : str or int - The space group identifier, a string name or number. - - Returns - ------- - bool - ``True`` if the specified name matches one of the recognized - names of this space group or if it equals its `number`. - Return ``False`` otherwise. - """ - - if name == self.short_name: - return True - if name == self.pdb_name: - return True - if name == self.point_group_name: - return True - if name == self.number: - return True - return False - - def iter_equivalent_positions(self, vec): - """Generate symmetry equivalent positions for the specified - position. - - The initial position must be in fractional coordinates and so - are the symmetry equivalent positions yielded by iteration. - This generates `num_sym_equiv` positions regardless of initial - coordinates being a special symmetry position or not. - - Parameters - ---------- - vec : numpy.ndarray - The initial position in fractional coordinates. - - Yields - ------ - numpy.ndarray - The symmetry equivalent positions in fractional coordinates. - The positions may be duplicate or outside of the ``0 <= x < 1`` - unit cell bounds. - """ - for symop in self.symop_list: - yield symop(vec) - pass - - -# End of class SpaceGroup diff --git a/src/diffpy/structure/spacegroups.py b/src/diffpy/structure/spacegroups.py deleted file mode 100644 index 8b6fb8c5..00000000 --- a/src/diffpy/structure/spacegroups.py +++ /dev/null @@ -1,1511 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2011 Trustees of the Columbia University -# in the City of New York. All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Space group classes and definitions from mmLib and sgtbx. - -Attributes ----------- -SpaceGroupList : list - List of all spacegroup definitions. -""" - -import copy -from itertools import zip_longest - -from diffpy.structure.mmlibspacegroups import ( - mmLibSpaceGroupList, - sg1, - sg2, - sg3, - sg4, - sg5, - sg6, - sg7, - sg8, - sg9, - sg10, - sg11, - sg12, - sg13, - sg14, - sg15, - sg16, - sg17, - sg18, - sg19, - sg20, - sg21, - sg22, - sg23, - sg24, - sg25, - sg26, - sg27, - sg28, - sg29, - sg30, - sg31, - sg32, - sg33, - sg34, - sg35, - sg36, - sg37, - sg38, - sg39, - sg40, - sg41, - sg42, - sg43, - sg44, - sg45, - sg46, - sg47, - sg48, - sg49, - sg50, - sg51, - sg52, - sg53, - sg54, - sg55, - sg56, - sg57, - sg58, - sg59, - sg60, - sg61, - sg62, - sg63, - sg64, - sg65, - sg66, - sg67, - sg68, - sg69, - sg70, - sg71, - sg72, - sg73, - sg74, - sg75, - sg76, - sg77, - sg78, - sg79, - sg80, - sg81, - sg82, - sg83, - sg84, - sg85, - sg86, - sg87, - sg88, - sg89, - sg90, - sg91, - sg92, - sg93, - sg94, - sg95, - sg96, - sg97, - sg98, - sg99, - sg100, - sg101, - sg102, - sg103, - sg104, - sg105, - sg106, - sg107, - sg108, - sg109, - sg110, - sg111, - sg112, - sg113, - sg114, - sg115, - sg116, - sg117, - sg118, - sg119, - sg120, - sg121, - sg122, - sg123, - sg124, - sg125, - sg126, - sg127, - sg128, - sg129, - sg130, - sg131, - sg132, - sg133, - sg134, - sg135, - sg136, - sg137, - sg138, - sg139, - sg140, - sg141, - sg142, - sg143, - sg144, - sg145, - sg146, - sg147, - sg148, - sg149, - sg150, - sg151, - sg152, - sg153, - sg154, - sg155, - sg156, - sg157, - sg158, - sg159, - sg160, - sg161, - sg162, - sg163, - sg164, - sg165, - sg166, - sg167, - sg168, - sg169, - sg170, - sg171, - sg172, - sg173, - sg174, - sg175, - sg176, - sg177, - sg178, - sg179, - sg180, - sg181, - sg182, - sg183, - sg184, - sg185, - sg186, - sg187, - sg188, - sg189, - sg190, - sg191, - sg192, - sg193, - sg194, - sg195, - sg196, - sg197, - sg198, - sg199, - sg200, - sg201, - sg202, - sg203, - sg204, - sg205, - sg206, - sg207, - sg208, - sg209, - sg210, - sg211, - sg212, - sg213, - sg214, - sg215, - sg216, - sg217, - sg218, - sg219, - sg220, - sg221, - sg222, - sg223, - sg224, - sg225, - sg226, - sg227, - sg228, - sg229, - sg230, - sg1003, - sg1004, - sg1005, - sg1006, - sg1007, - sg1008, - sg1009, - sg1010, - sg1011, - sg1012, - sg1013, - sg1014, - sg1015, - sg1017, - sg1018, - sg1020, - sg1021, - sg1022, - sg1023, - sg1059, - sg1094, - sg1146, - sg1148, - sg1155, - sg1160, - sg1161, - sg1166, - sg1167, - sg1197, - sg2005, - sg2017, - sg2018, - sg3004, - sg3005, - sg3018, -) -from diffpy.structure.sgtbxspacegroups import ( - sg1025, - sg1026, - sg1027, - sg1028, - sg1029, - sg1030, - sg1031, - sg1032, - sg1033, - sg1034, - sg1035, - sg1036, - sg1037, - sg1038, - sg1039, - sg1040, - sg1041, - sg1042, - sg1043, - sg1044, - sg1045, - sg1046, - sg1049, - sg1050, - sg1051, - sg1052, - sg1053, - sg1054, - sg1055, - sg1056, - sg1057, - sg1058, - sg1060, - sg1061, - sg1062, - sg1063, - sg1064, - sg1065, - sg1066, - sg1067, - sg1068, - sg1072, - sg1073, - sg1074, - sg2003, - sg2004, - sg2006, - sg2007, - sg2008, - sg2009, - sg2010, - sg2011, - sg2012, - sg2013, - sg2014, - sg2015, - sg2020, - sg2021, - sg2025, - sg2026, - sg2027, - sg2028, - sg2029, - sg2030, - sg2031, - sg2032, - sg2033, - sg2034, - sg2035, - sg2036, - sg2037, - sg2038, - sg2039, - sg2040, - sg2041, - sg2042, - sg2043, - sg2044, - sg2045, - sg2046, - sg2049, - sg2050, - sg2051, - sg2052, - sg2053, - sg2054, - sg2055, - sg2056, - sg2057, - sg2058, - sg2059, - sg2060, - sg2062, - sg2063, - sg2064, - sg2065, - sg2066, - sg2067, - sg2068, - sg2072, - sg2074, - sg3007, - sg3008, - sg3009, - sg3012, - sg3013, - sg3014, - sg3015, - sg3020, - sg3021, - sg3026, - sg3028, - sg3029, - sg3030, - sg3031, - sg3033, - sg3036, - sg3038, - sg3039, - sg3040, - sg3041, - sg3046, - sg3050, - sg3051, - sg3052, - sg3053, - sg3054, - sg3057, - sg3059, - sg3060, - sg3062, - sg3063, - sg3064, - sg3067, - sg3068, - sg3074, - sg4005, - sg4007, - sg4008, - sg4009, - sg4012, - sg4013, - sg4014, - sg4015, - sg4026, - sg4028, - sg4029, - sg4030, - sg4031, - sg4033, - sg4036, - sg4038, - sg4039, - sg4040, - sg4041, - sg4046, - sg4050, - sg4051, - sg4052, - sg4053, - sg4054, - sg4057, - sg4059, - sg4060, - sg4062, - sg4063, - sg4064, - sg4067, - sg4068, - sg4074, - sg5005, - sg5007, - sg5008, - sg5009, - sg5012, - sg5013, - sg5014, - sg5015, - sg5026, - sg5028, - sg5029, - sg5030, - sg5031, - sg5033, - sg5036, - sg5038, - sg5039, - sg5040, - sg5041, - sg5046, - sg5051, - sg5052, - sg5053, - sg5054, - sg5057, - sg5059, - sg5060, - sg5062, - sg5063, - sg5064, - sg5067, - sg5068, - sg5074, - sg6005, - sg6007, - sg6008, - sg6009, - sg6012, - sg6013, - sg6014, - sg6015, - sg6068, - sg7005, - sg7007, - sg7008, - sg7009, - sg7012, - sg7013, - sg7014, - sg7015, - sg7068, - sg8005, - sg8007, - sg8008, - sg8009, - sg8012, - sg8013, - sg8014, - sg8015, - sg9005, - sg9009, - sg9015, - sg10005, - sg10009, - sg10015, - sg11009, - sg11015, - sg12009, - sg12015, - sg13009, - sg13015, - sg14009, - sg14015, - sg15009, - sg15015, - sg16009, - sg16015, - sg17009, - sg17015, - sgtbxSpaceGroupList, -) -from diffpy.structure.spacegroupmod import ( - Rot_mX_mXY_mZ, - Rot_mX_mXY_Z, - Rot_mX_mY_mZ, - Rot_mX_mY_Z, - Rot_mX_mZ_mY, - Rot_mX_mZ_Y, - Rot_mX_Y_mZ, - Rot_mX_Y_Z, - Rot_mX_Z_mY, - Rot_mX_Z_Y, - Rot_mXY_mX_mZ, - Rot_mXY_mX_Z, - Rot_mXY_Y_mZ, - Rot_mXY_Y_Z, - Rot_mY_mX_mZ, - Rot_mY_mX_Z, - Rot_mY_mZ_mX, - Rot_mY_mZ_X, - Rot_mY_X_mZ, - Rot_mY_X_Z, - Rot_mY_XmY_mZ, - Rot_mY_XmY_Z, - Rot_mY_Z_mX, - Rot_mY_Z_X, - Rot_mZ_mX_mY, - Rot_mZ_mX_Y, - Rot_mZ_mY_mX, - Rot_mZ_mY_X, - Rot_mZ_X_mY, - Rot_mZ_X_Y, - Rot_mZ_Y_mX, - Rot_mZ_Y_X, - Rot_X_mY_mZ, - Rot_X_mY_Z, - Rot_X_mZ_mY, - Rot_X_mZ_Y, - Rot_X_XmY_mZ, - Rot_X_XmY_Z, - Rot_X_Y_mZ, - Rot_X_Y_Z, - Rot_X_Z_mY, - Rot_X_Z_Y, - Rot_XmY_mY_mZ, - Rot_XmY_mY_Z, - Rot_XmY_X_mZ, - Rot_XmY_X_Z, - Rot_Y_mX_mZ, - Rot_Y_mX_Z, - Rot_Y_mXY_mZ, - Rot_Y_mXY_Z, - Rot_Y_mZ_mX, - Rot_Y_mZ_X, - Rot_Y_X_mZ, - Rot_Y_X_Z, - Rot_Y_Z_mX, - Rot_Y_Z_X, - Rot_Z_mX_mY, - Rot_Z_mX_Y, - Rot_Z_mY_mX, - Rot_Z_mY_X, - Rot_Z_X_mY, - Rot_Z_X_Y, - Rot_Z_Y_mX, - Rot_Z_Y_X, - SpaceGroup, - SymOp, - Tr_0_0_0, - Tr_0_0_12, - Tr_0_0_13, - Tr_0_0_14, - Tr_0_0_16, - Tr_0_0_23, - Tr_0_0_34, - Tr_0_0_56, - Tr_0_12_0, - Tr_0_12_12, - Tr_0_12_14, - Tr_0_12_34, - Tr_12_0_0, - Tr_12_0_12, - Tr_12_0_14, - Tr_12_0_34, - Tr_12_12_0, - Tr_12_12_12, - Tr_12_12_14, - Tr_12_12_34, - Tr_13_23_16, - Tr_13_23_23, - Tr_14_14_14, - Tr_14_14_34, - Tr_14_34_14, - Tr_14_34_34, - Tr_23_13_13, - Tr_23_13_56, - Tr_34_14_14, - Tr_34_14_34, - Tr_34_34_14, - Tr_34_34_34, -) -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -# Import SpaceGroup objects -------------------------------------------------- -base = "diffpy.structure" -removal_version = "4.0.0" -GetSpaceGroup_deprecation_msg = build_deprecation_message( - base, - "GetSpaceGroup", - "get_space_group", - removal_version, -) -FindSpaceGroup_deprecation_msg = build_deprecation_message( - base, - "FindSpaceGroup", - "find_space_group", - removal_version, -) -IsSpaceGroupIdentifier_deprecation_msg = build_deprecation_message( - base, - "IsSpaceGroupIdentifier", - "is_space_group_identifier", - removal_version, -) -_hashSymOpList_deprecation_msg = build_deprecation_message( - base, - "_hashSymOpList", - "_hash_symop_list", - removal_version, -) - -SpaceGroupList = mmLibSpaceGroupList + sgtbxSpaceGroupList - - -@deprecated(GetSpaceGroup_deprecation_msg) -def GetSpaceGroup(sgid): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.get_space_group instead. - """ - return get_space_group(sgid) - - -def get_space_group(sgid): - """Returns the SpaceGroup instance for the given identifier. - - Parameters - ---------- - sgid : str, int - space group symbol, either `short_name` or `pdb_name`, - whatever it means in mmlib. Can be also an integer. - - Returns - ------- - SpaceGroup - The SpaceGroup object for the given identifier. - - Raises - ------ - ValueError - When the identifier is not found. - """ - if not _sg_lookup_table: - _build_sg_lookup_table() - if sgid in _sg_lookup_table: - return _sg_lookup_table[sgid] - # Try different versions of sgid, first make sure it is a string - emsg = "Unknown space group identifier %r" % sgid - if not isinstance(sgid, str): - raise ValueError(emsg) - sgbare = sgid.strip() - # short_name case adjusted - sgkey = sgbare.replace(" ", "") - sgkey = sgkey[:1].upper() + sgkey[1:].lower() - if sgkey in _sg_lookup_table: - return _sg_lookup_table[sgkey] - # pdb_name case adjusted - sgkey = sgbare[:1].upper() + sgbare[1:].lower() - if sgkey in _sg_lookup_table: - return _sg_lookup_table[sgkey] - # nothing worked, sgid is unknown identifier - raise ValueError(emsg) - - -@deprecated(IsSpaceGroupIdentifier_deprecation_msg) -def IsSpaceGroupIdentifier(sgid): - """Check if identifier can be used as an argument to - `GetSpaceGroup`. - - Returns - ------- - bool - """ - return is_space_group_identifier(sgid) - - -def is_space_group_identifier(sgid): - """Check if identifier can be used as an argument to - `GetSpaceGroup`. - - Returns - ------- - bool - """ - try: - GetSpaceGroup(sgid) - rv = True - except ValueError: - rv = False - return rv - - -@deprecated(FindSpaceGroup_deprecation_msg) -def FindSpaceGroup(symops, shuffle=False): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.find_space_group instead. - """ - return find_space_group(symops, shuffle=shuffle) - - -def find_space_group(symops, shuffle=False): - """Lookup SpaceGroup from a given list of symmetry operations. - - Parameters - ---------- - symops : list - The list of `SymOp` objects for which to find SpaceGroup. - shuffle : bool, Optional - Flag for allowing different order of symops in the returned - SpaceGroup. The default is ``False``. - - Returns - ------- - SpaceGroup - The SpaceGroup object with equivalent list of symmetry - operations. Return predefined SpaceGroup instance when - symmetry operations have the same order or when the - `shuffle` flag is set. - - Raises - ------ - ValueError - When `symops` do not match any known SpaceGroup. - """ - - tb = _get_sg_hash_lookup_table() - hh = _hash_symop_list(symops) - if hh not in tb: - raise ValueError("Cannot find SpaceGroup for the specified symops.") - rv = tb[hh] - if not shuffle: - zz = zip_longest(rv.iter_symops(), symops, fillvalue="") - sameorder = all(str(o0) == str(o1) for o0, o1 in zz) - if not sameorder: - rv = copy.copy(rv) - rv.symop_list = symops - return rv - - -@deprecated(_hashSymOpList_deprecation_msg) -def _hashSymOpList(symops): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure._hash_symop_list instead. - """ - return _hash_symop_list(symops) - - -def _hash_symop_list(symops): - """Return hash value for a sequence of `SymOp` objects. - - The symops are sorted so the results is independent of symops order. - - Parameters - ---------- - symops : sequence - The sequence of `SymOp` objects to be hashed - - Returns - ------- - int - The hash value. - """ - ssop = sorted(str(o) for o in symops) - rv = hash(tuple(ssop)) - return rv - - -def _build_sg_lookup_table(): - """Rebuild space group lookup table from the `SpaceGroupList` data. - - This routine updates the global `_sg_lookup_table` dictionary. - """ - _sg_lookup_table.clear() - for sg in SpaceGroupList: - _sg_lookup_table.setdefault(sg.number, sg) - _sg_lookup_table.setdefault(str(sg.number), sg) - _sg_lookup_table.setdefault(sg.short_name, sg) - _sg_lookup_table.setdefault(sg.pdb_name, sg) - # extra aliases obtained from matching code in - # cctbx::sgtbx::symbols::find_main_symbol_dict_entry - alias_hmname = [ - ("Pm3", "P m -3"), - ("Pn3", "P n -3"), - ("Fm3", "F m -3"), - ("Fd3", "F d -3"), - ("Im3", "I m -3"), - ("Pa3", "P a -3"), - ("Ia3", "I a -3"), - ("Pm3m", "P m -3 m"), - ("Pn3n", "P n -3 n"), - ("Pm3n", "P m -3 n"), - ("Pn3m", "P n -3 m"), - ("Fm3m", "F m -3 m"), - ("Fm3c", "F m -3 c"), - ("Fd3m", "F d -3 m"), - ("Fd3c", "F d -3 c"), - ("Im3m", "I m -3 m"), - ("Ia3d", "I a -3 d"), - ] - for a, hm in alias_hmname: - hmbare = hm.replace(" ", "") - _sg_lookup_table.setdefault(a, _sg_lookup_table[hmbare]) - # make sure None does not sneak into the dictionary - assert None not in _sg_lookup_table - return - - -_sg_lookup_table = {} - - -def _get_sg_hash_lookup_table(): - """Return lookup table of symop hashes to standard `SpaceGroup` - objects.""" - if _sg_hash_lookup_table: - return _sg_hash_lookup_table - for sg in SpaceGroupList: - h = _hash_symop_list(sg.symop_list) - _sg_hash_lookup_table[h] = sg - assert len(_sg_hash_lookup_table) == len(SpaceGroupList) - return _get_sg_hash_lookup_table() - - -_sg_hash_lookup_table = {} - -# silence pyflakes checker -assert all( - o is not None - for o in ( - SpaceGroup, - SymOp, - Rot_X_Y_Z, - Rot_mX_mY_mZ, - Rot_mX_Y_mZ, - Rot_X_mY_Z, - Rot_mX_mY_Z, - Rot_X_mY_mZ, - Rot_mX_Y_Z, - Rot_X_Y_mZ, - Rot_mY_X_Z, - Rot_Y_mX_Z, - Rot_Y_mX_mZ, - Rot_mY_X_mZ, - Rot_Y_X_mZ, - Rot_mY_mX_mZ, - Rot_mY_mX_Z, - Rot_Y_X_Z, - Rot_mY_XmY_Z, - Rot_mXY_mX_Z, - Rot_Z_X_Y, - Rot_Y_Z_X, - Rot_Y_mXY_mZ, - Rot_XmY_X_mZ, - Rot_mZ_mX_mY, - Rot_mY_mZ_mX, - Rot_mXY_Y_mZ, - Rot_X_XmY_mZ, - Rot_XmY_mY_mZ, - Rot_mX_mXY_mZ, - Rot_mX_mZ_mY, - Rot_mZ_mY_mX, - Rot_mXY_Y_Z, - Rot_X_XmY_Z, - Rot_XmY_mY_Z, - Rot_mX_mXY_Z, - Rot_X_Z_Y, - Rot_Z_Y_X, - Rot_Y_mXY_Z, - Rot_XmY_X_Z, - Rot_mY_XmY_mZ, - Rot_mXY_mX_mZ, - Rot_Z_mX_mY, - Rot_mZ_mX_Y, - Rot_mZ_X_mY, - Rot_mY_Z_mX, - Rot_Y_mZ_mX, - Rot_mY_mZ_X, - Rot_mZ_X_Y, - Rot_Z_X_mY, - Rot_Z_mX_Y, - Rot_Y_mZ_X, - Rot_mY_Z_X, - Rot_Y_Z_mX, - Rot_X_Z_mY, - Rot_mX_Z_Y, - Rot_X_mZ_Y, - Rot_Z_Y_mX, - Rot_Z_mY_X, - Rot_mZ_Y_X, - Rot_mX_Z_mY, - Rot_mX_mZ_Y, - Rot_X_mZ_mY, - Rot_Z_mY_mX, - Rot_mZ_Y_mX, - Rot_mZ_mY_X, - Tr_0_0_0, - Tr_0_12_0, - Tr_12_12_0, - Tr_0_0_12, - Tr_12_12_12, - Tr_0_12_12, - Tr_12_0_12, - Tr_12_0_0, - Tr_14_14_14, - Tr_14_34_34, - Tr_34_14_34, - Tr_34_34_14, - Tr_0_0_14, - Tr_0_0_34, - Tr_0_12_14, - Tr_12_0_34, - Tr_12_12_14, - Tr_12_12_34, - Tr_0_12_34, - Tr_12_0_14, - Tr_0_0_13, - Tr_0_0_23, - Tr_23_13_13, - Tr_13_23_23, - Tr_23_13_56, - Tr_13_23_16, - Tr_0_0_56, - Tr_0_0_16, - Tr_34_14_14, - Tr_34_34_34, - Tr_14_14_34, - Tr_14_34_14, - sg1, - sg2, - sg3, - sg4, - sg5, - sg6, - sg7, - sg8, - sg9, - sg10, - sg11, - sg12, - sg13, - sg14, - sg15, - sg16, - sg17, - sg18, - sg19, - sg20, - sg21, - sg22, - sg23, - sg24, - sg25, - sg26, - sg27, - sg28, - sg29, - sg30, - sg31, - sg32, - sg33, - sg34, - sg35, - sg36, - sg37, - sg38, - sg39, - sg40, - sg41, - sg42, - sg43, - sg44, - sg45, - sg46, - sg47, - sg48, - sg49, - sg50, - sg51, - sg52, - sg53, - sg54, - sg55, - sg56, - sg57, - sg58, - sg59, - sg60, - sg61, - sg62, - sg63, - sg64, - sg65, - sg66, - sg67, - sg68, - sg69, - sg70, - sg71, - sg72, - sg73, - sg74, - sg75, - sg76, - sg77, - sg78, - sg79, - sg80, - sg81, - sg82, - sg83, - sg84, - sg85, - sg86, - sg87, - sg88, - sg89, - sg90, - sg91, - sg92, - sg93, - sg94, - sg95, - sg96, - sg97, - sg98, - sg99, - sg100, - sg101, - sg102, - sg103, - sg104, - sg105, - sg106, - sg107, - sg108, - sg109, - sg110, - sg111, - sg112, - sg113, - sg114, - sg115, - sg116, - sg117, - sg118, - sg119, - sg120, - sg121, - sg122, - sg123, - sg124, - sg125, - sg126, - sg127, - sg128, - sg129, - sg130, - sg131, - sg132, - sg133, - sg134, - sg135, - sg136, - sg137, - sg138, - sg139, - sg140, - sg141, - sg142, - sg143, - sg144, - sg145, - sg146, - sg1146, - sg147, - sg148, - sg1148, - sg149, - sg150, - sg151, - sg152, - sg153, - sg154, - sg155, - sg1155, - sg156, - sg157, - sg158, - sg159, - sg160, - sg1160, - sg161, - sg1161, - sg162, - sg163, - sg164, - sg165, - sg166, - sg1166, - sg167, - sg1167, - sg168, - sg169, - sg170, - sg171, - sg172, - sg173, - sg174, - sg175, - sg176, - sg177, - sg178, - sg179, - sg180, - sg181, - sg182, - sg183, - sg184, - sg185, - sg186, - sg187, - sg188, - sg189, - sg190, - sg191, - sg192, - sg193, - sg194, - sg195, - sg196, - sg197, - sg198, - sg199, - sg200, - sg201, - sg202, - sg203, - sg204, - sg205, - sg206, - sg207, - sg208, - sg209, - sg210, - sg211, - sg212, - sg213, - sg214, - sg215, - sg216, - sg217, - sg218, - sg219, - sg220, - sg221, - sg222, - sg223, - sg224, - sg225, - sg226, - sg227, - sg228, - sg229, - sg230, - sg1003, - sg1004, - sg3004, - sg1005, - sg2005, - sg3005, - sg1006, - sg1007, - sg1008, - sg1009, - sg1010, - sg1011, - sg1012, - sg1013, - sg1014, - sg1015, - sg1017, - sg2017, - sg1018, - sg2018, - sg3018, - sg1020, - sg1021, - sg1022, - sg1023, - sg1059, - sg1094, - sg1197, - sg2003, - sg2004, - sg4005, - sg5005, - sg6005, - sg7005, - sg8005, - sg9005, - sg10005, - sg2006, - sg2007, - sg3007, - sg4007, - sg5007, - sg6007, - sg7007, - sg8007, - sg2008, - sg3008, - sg4008, - sg5008, - sg6008, - sg7008, - sg8008, - sg2009, - sg3009, - sg4009, - sg5009, - sg6009, - sg7009, - sg8009, - sg9009, - sg10009, - sg11009, - sg12009, - sg13009, - sg14009, - sg15009, - sg16009, - sg17009, - sg2010, - sg2011, - sg2012, - sg3012, - sg4012, - sg5012, - sg6012, - sg7012, - sg8012, - sg2013, - sg3013, - sg4013, - sg5013, - sg6013, - sg7013, - sg8013, - sg2014, - sg3014, - sg4014, - sg5014, - sg6014, - sg7014, - sg8014, - sg2015, - sg3015, - sg4015, - sg5015, - sg6015, - sg7015, - sg8015, - sg9015, - sg10015, - sg11015, - sg12015, - sg13015, - sg14015, - sg15015, - sg16015, - sg17015, - sg2020, - sg3020, - sg2021, - sg3021, - sg1025, - sg2025, - sg1026, - sg2026, - sg3026, - sg4026, - sg5026, - sg1027, - sg2027, - sg1028, - sg2028, - sg3028, - sg4028, - sg5028, - sg1029, - sg2029, - sg3029, - sg4029, - sg5029, - sg1030, - sg2030, - sg3030, - sg4030, - sg5030, - sg1031, - sg2031, - sg3031, - sg4031, - sg5031, - sg1032, - sg2032, - sg1033, - sg2033, - sg3033, - sg4033, - sg5033, - sg1034, - sg2034, - sg1035, - sg2035, - sg1036, - sg2036, - sg3036, - sg4036, - sg5036, - sg1037, - sg2037, - sg1038, - sg2038, - sg3038, - sg4038, - sg5038, - sg1039, - sg2039, - sg3039, - sg4039, - sg5039, - sg1040, - sg2040, - sg3040, - sg4040, - sg5040, - sg1041, - sg2041, - sg3041, - sg4041, - sg5041, - sg1042, - sg2042, - sg1043, - sg2043, - sg1044, - sg2044, - sg1045, - sg2045, - sg1046, - sg2046, - sg3046, - sg4046, - sg5046, - sg1049, - sg2049, - sg1050, - sg2050, - sg3050, - sg4050, - sg1051, - sg2051, - sg3051, - sg4051, - sg5051, - sg1052, - sg2052, - sg3052, - sg4052, - sg5052, - sg1053, - sg2053, - sg3053, - sg4053, - sg5053, - sg1054, - sg2054, - sg3054, - sg4054, - sg5054, - sg1055, - sg2055, - sg1056, - sg2056, - sg1057, - sg2057, - sg3057, - sg4057, - sg5057, - sg1058, - sg2058, - sg2059, - sg3059, - sg4059, - sg5059, - sg1060, - sg2060, - sg3060, - sg4060, - sg5060, - sg1061, - sg1062, - sg2062, - sg3062, - sg4062, - sg5062, - sg1063, - sg2063, - sg3063, - sg4063, - sg5063, - sg1064, - sg2064, - sg3064, - sg4064, - sg5064, - sg1065, - sg2065, - sg1066, - sg2066, - sg1067, - sg2067, - sg3067, - sg4067, - sg5067, - sg1068, - sg2068, - sg3068, - sg4068, - sg5068, - sg6068, - sg7068, - sg1072, - sg2072, - sg1073, - sg1074, - sg2074, - sg3074, - sg4074, - sg5074, - ) -) diff --git a/src/diffpy/structure/structure.py b/src/diffpy/structure/structure.py deleted file mode 100644 index a33f4643..00000000 --- a/src/diffpy/structure/structure.py +++ /dev/null @@ -1,1118 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""This module defines class `Structure`.""" - -import copy as copymod -import warnings - -import numpy - -from diffpy.structure.atom import Atom -from diffpy.structure.lattice import Lattice -from diffpy.structure.utils import _link_atom_attribute, atom_bare_symbol, isiterable -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -# ---------------------------------------------------------------------------- - -base = "diffpy.structure.Structure" -removal_version = "4.0.0" -assignUniqueLabels_deprecation_msg = build_deprecation_message( - base, - "assignUniqueLabels", - "assign_unique_labels", - removal_version, -) -addNewAtom_deprecation_msg = build_deprecation_message( - base, - "addNewAtom", - "add_new_atom", - removal_version, -) -getLastAtom_deprecation_msg = build_deprecation_message( - base, - "getLastAtom", - "get_last_atom", - removal_version, -) -placeInLattice_deprecation_msg = build_deprecation_message( - base, - "placeInLattice", - "place_in_lattice", - removal_version, -) -readStr_deprecation_msg = build_deprecation_message( - base, - "readStr", - "read_structure", - removal_version, -) -writeStr_deprecation_msg = build_deprecation_message( - base, - "writeStr", - "write_structure", - removal_version, -) - - -class Structure(list): - """Define group of atoms in a specified lattice. Structure --> group - of atoms. - - `Structure` class is inherited from Python `list`. It contains - a list of `Atom` instances. `Structure` overloads `setitem` and `setslice` - methods so that the `lattice` attribute of atoms get set to `lattice`. - - Parameters - ---------- - atoms : list of Atom or Structure, Optional - List of `Atom` instances to be included in this `Structure`. - When `atoms` argument is an existing `Structure` instance, - the new structure is its copy. - lattice : Lattice, Optional - Instance of `Lattice` defining coordinate systems, property. - title : str, Optional - String description of the structure. - filename : str, Optional - Name of a file to load the structure from. - format : str, Optional - `Structure` format of the loaded `filename`. By default - all structure formats are tried one by one. Ignored when - `filename` has not been specified. - - Note - ---- - Cannot use `filename` and `atoms` arguments together. Overrides `atoms` argument - when `filename` is specified. - - Attributes - ---------- - title : str - String description of the structure. - lattice : Lattice - Instance of `Lattice` defining coordinate systems. - pdffit : None or dict - Dictionary of PDFFit-related metadata. - - Examples - -------- - ``Structure(stru)`` create a copy of `Structure` instance stru. - - >>> stru = Structure() - >>> copystru = Structure(stru) - - `Structure` is inherited from a list it can use list expansions. - - >>> oxygen_atoms = [a for a in stru if a.element == "O" ] - >>> oxygen_stru = Structure(oxygen_atoms, lattice=stru.lattice) - """ - - # default values for instance attributes - title = "" - """str: default values for `title`.""" - - _lattice = None - pdffit = None - """None: default values for `pdffit`.""" - - def __init__(self, atoms=None, lattice=None, title=None, filename=None, format=None): - # if filename is specified load it and return - if filename is not None: - if any((atoms, lattice, title)): - emsg = "Cannot use filename and atoms arguments together." - raise ValueError(emsg) - readkwargs = (format is not None) and {"format": format} or {} - self.read(filename, **readkwargs) - return - # copy initialization, must be first to allow lattice, title override - if isinstance(atoms, Structure): - Structure.__copy__(atoms, self) - # assign arguments: - if title is not None: - self.title = title - if lattice is not None: - self.lattice = lattice - elif self.lattice is None: - self.lattice = Lattice() - # insert atoms unless already done by __copy__ - if not len(self) and atoms is not None: - self.extend(atoms) - return - - def copy(self): - """Return a copy of this `Structure` object.""" - return copymod.copy(self) - - def __copy__(self, target=None): - """Create a deep copy of this instance. - - Parameters - ---------- - target : - Optional target instance for copying, useful for - copying a derived class. Defaults to new instance - of the same type as self. - - Returns - ------- - A duplicate instance of this object. - """ - if target is None: - target = Structure() - elif target is self: - return target - # copy attributes as appropriate: - target.title = self.title - target.lattice = Lattice(self.lattice) - target.pdffit = copymod.deepcopy(self.pdffit) - # copy all atoms to the target - target[:] = self - return target - - def __str__(self): - """Simple string representation.""" - s_lattice = "lattice=%s" % self.lattice - s_atoms = "\n".join([str(a) for a in self]) - return s_lattice + "\n" + s_atoms - - @deprecated(addNewAtom_deprecation_msg) - def addNewAtom(self, *args, **kwargs): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Structure.add_new_atom instead. - """ - self.add_new_atom(*args, **kwargs) - return - - def add_new_atom(self, *args, **kwargs): - """Add new `Atom` instance to the end of this `Structure`. - - Parameters - ---------- - *args, **kwargs : - See `Atom` class constructor. - - Raises - ------ - UserWarning - If an atom with the same element/type and coordinates already exists. - """ - kwargs["lattice"] = self.lattice - atom = Atom(*args, **kwargs) - for existing in self: - if existing.element == atom.element and numpy.allclose(existing.xyz, atom.xyz): - warnings.warn( - f"Duplicate atom {atom.element} already exists at {atom.xyz!r}", - category=UserWarning, - stacklevel=2, - ) - break - self.append(atom, copy=False) - return - - @deprecated(getLastAtom_deprecation_msg) - def getLastAtom(self): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Structure.get_last_atom instead. - """ - return self.get_last_atom() - - def get_last_atom(self): - """Return Reference to the last `Atom` in this structure.""" - last_atom = self[-1] - return last_atom - - def get_chemical_symbols(self): - """Return list of chemical symbols for all `Atoms` in this - structure. - - Returns - ------- - list of str - The list of chemical symbols for all `Atoms` in this structure. - """ - symbols_with_charge = [a.element for a in self] - symbols = [atom_bare_symbol(sym) for sym in symbols_with_charge] - return symbols - - def get_fractional_coordinates(self): - """Return array of fractional coordinates of all `Atoms` in this - structure. - - Returns - ------- - numpy.ndarray - The array of fractional coordinates of all `Atoms` in this structure - in the same order as `Structure.get_chemical_symbols()`. - """ - coords = numpy.array([a.xyz for a in self]) - return coords - - def get_cartesian_coordinates(self): - """Return array of Cartesian coordinates of all `Atoms` in this - structure. - - Returns - ------- - numpy.ndarray - The array of Cartesian coordinates of all `Atoms` in this structure - in the same order as `Structure.get_chemical_symbols()`. - """ - cartn_coords = numpy.array([a.xyz_cartn for a in self]) - return cartn_coords - - def get_anisotropic_displacement_parameters(self, return_array=False): - """Return the anisotropic displacement parameters for all atoms. - - Parameters - ---------- - return_array : bool, optional - If True, return anisotropic displacement parameters as a numpy array instead of a dictionary. - - Returns - ------- - dict - The dictionary of anisotropic displacement parameters for all atoms in this structure. - Keys are of the form 'Element_i_Ujk', e.g. 'C_0_11', 'C_0_12'. - """ - if return_array: - aniso_adps = numpy.array([a.U for a in self]) - return aniso_adps - else: - adp_dict = {} - for i, atom in enumerate(self): - element = atom_bare_symbol(atom.element) - adp_dict[f"{element}_{i}_11"] = self.U11[i] - adp_dict[f"{element}_{i}_22"] = self.U22[i] - adp_dict[f"{element}_{i}_33"] = self.U33[i] - adp_dict[f"{element}_{i}_12"] = self.U12[i] - adp_dict[f"{element}_{i}_13"] = self.U13[i] - adp_dict[f"{element}_{i}_23"] = self.U23[i] - return adp_dict - - def get_isotropic_displacement_parameters(self, return_array=False): - """Return a the isotropic displacement parameters for all atoms. - - Parameters - ---------- - return_array : bool, optional - If True, return isotropic displacement parameters as a numpy array instead of a dictionary. - Default is False. - - Returns - ------- - dict - The dictionary of isotropic displacement parameters for all atoms in this structure. - Keys are of the form 'Element_i_Uiso', e.g. 'C_0_Uiso'. - """ - if return_array: - iso_adps = numpy.array([a.Uisoequiv for a in self]) - return iso_adps - else: - iso_dict = {} - for i, atom in enumerate(self): - element = atom_bare_symbol(atom.element) - iso_dict[f"{element}_{i+1}_Uiso"] = self.Uisoequiv[i] - return iso_dict - - def get_occupancies(self): - """Return array of occupancies of all `Atoms` in this structure. - - Returns - ------- - numpy.ndarray - The array of occupancies of all `Atoms` in this structure. - """ - occupancies = numpy.array([a.occupancy for a in self]) - return occupancies - - def get_lattice_vectors(self): - """Return array of lattice vectors for this structure. - - Returns - ------- - numpy.ndarray - The array of lattice vectors for this structure. - """ - lattice_vectors = self.lattice.base - return lattice_vectors - - def get_lattice_vector_angles(self): - """Return array of lattice vector angles for this structure. - - Returns - ------- - numpy.ndarray - The array of lattice vector angles for this structure. - """ - a, b, c = self.lattice.base - alpha = self.lattice.angle(b, c) - beta = self.lattice.angle(a, c) - gamma = self.lattice.angle(a, b) - return numpy.array([alpha, beta, gamma]) - - def assign_unique_labels(self): - """Set a unique label string for each `Atom` in this structure. - - The label strings are formatted as "%(baresymbol)s%(index)i", - where baresymbol is the element right-stripped of "[0-9][+-]". - """ - elnum = {} - # support duplicate atom instances - islabeled = set() - for a in self: - if a in islabeled: - continue - baresmbl = atom_bare_symbol(a.element) - elnum[baresmbl] = elnum.get(baresmbl, 0) + 1 - a.label = baresmbl + str(elnum[baresmbl]) - islabeled.add(a) - return - - @deprecated(assignUniqueLabels_deprecation_msg) - def assignUniqueLabels(self): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Structure.assign_unique_labels - instead. - """ - return self.assign_unique_labels() - - def distance(self, aid0, aid1): - """Calculate distance between 2 `Atoms`, no periodic boundary - conditions. - - Parameters - ---------- - aid0 : int or str - Zero based index of the first `Atom` or a string label. - aid1 : int or str - Zero based index or string label of the second atom. - - Returns - ------- - float - Distance between the two `Atoms` in Angstroms. - - Raises - ------ - IndexError - If any of the `Atom` indices or labels are invalid. - """ - # lookup by labels - a0, a1 = self[aid0, aid1] - return self.lattice.dist(a0.xyz, a1.xyz) - - def angle(self, aid0, aid1, aid2): - """The bond angle at the second of three `Atoms` in degrees. - - Parameters - ---------- - aid0 : int or str - Zero based index of the first `Atom` or a string label. - aid1 : int or str - Index or string label for the second atom, where the angle is formed. - aid2 : int or str - Index or string label for the third atom. - - Returns - ------- - float - The bond angle in degrees. - - Raises - ------ - IndexError - If any of the arguments are invalid. - """ - a0, a1, a2 = self[aid0, aid1, aid2] - u10 = a0.xyz - a1.xyz - u12 = a2.xyz - a1.xyz - return self.lattice.angle(u10, u12) - - @deprecated(placeInLattice_deprecation_msg) - def placeInLattice(self, new_lattice): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Structure.place_in_lattice instead. - """ - return self.place_in_lattice(new_lattice) - - def place_in_lattice(self, new_lattice): - """Place structure into `new_lattice` coordinate system. - - Sets `lattice` to `new_lattice` and recalculate fractional coordinates - of all `Atoms` so their absolute positions remain the same. - - Parameters - ---------- - new_lattice : Lattice - New `lattice` to place the structure into. - - Returns - ------- - Structure - Reference to this `Structure` object. The `lattice` attribute - is updated to `new_lattice`. - """ - Tx = numpy.dot(self.lattice.base, new_lattice.recbase) - Tu = numpy.dot(self.lattice.normbase, new_lattice.recnormbase) - for a in self: - a.xyz = numpy.dot(a.xyz, Tx) - if a.anisotropy: - a.U = numpy.dot(numpy.transpose(Tu), numpy.dot(a.U, Tu)) - self.lattice = new_lattice - return self - - def read(self, filename, format="auto"): - """Load structure from a file, any original data become lost. - - Parameters - ---------- - filename : str - File to be loaded. - format : str, Optional - All structure formats are defined in parsers submodule, - when ``format == 'auto'`` all parsers are tried one by one. - - Returns - ------- - Parser - Return instance of data Parser used to process input string. This - can be inspected for information related to particular format. - """ - import diffpy.structure - import diffpy.structure.parsers - - get_parser = diffpy.structure.parsers.get_parser - p = get_parser(format) - new_structure = p.parse_file(filename) - # reinitialize data after successful parsing - # avoid calling __init__ from a derived class - Structure.__init__(self) - if new_structure is not None: - self.__dict__.update(new_structure.__dict__) - self[:] = new_structure - if not self.title: - import os.path - - tailname = os.path.basename(filename) - tailbase = os.path.splitext(tailname)[0] - self.title = tailbase - return p - - @deprecated(readStr_deprecation_msg) - def readStr(self, s, format="auto"): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Structure.read_structure instead. - """ - return self.read_structure(s, format) - - def read_structure(self, s, format="auto"): - """Read structure from a string. - - Parameters - ---------- - s : str - String with structure definition. - format : str, Optional - All structure formats are defined in parsers submodule. When ``format == 'auto'``, - all parsers are tried one by one. - - Returns - ------- - Parser - Return instance of data Parser used to process input string. This - can be inspected for information related to particular format. - """ - from diffpy.structure.parsers import get_parser - - p = get_parser(format) - new_structure = p.parse(s) - # reinitialize data after successful parsing - # avoid calling __init__ from a derived class - Structure.__init__(self) - if new_structure is not None: - self.__dict__.update(new_structure.__dict__) - self[:] = new_structure - return p - - def write(self, filename, format): - """Save structure to file in the specified format. - - Parameters - ---------- - filename : str - File to save the structure to. - format : str - `Structure` format to use for saving. - - Note - ---- - Available structure formats can be obtained by: - - ``from parsers import formats`` - """ - from diffpy.structure.parsers import get_parser - - p = get_parser(format) - p.filename = filename - s = p.tostring(self) - with open(filename, "w", encoding="utf-8", newline="") as fp: - fp.write(s) - return - - @deprecated(writeStr_deprecation_msg) - def writeStr(self, format): - """This function has been deprecated and will be removed in - version 4.0.0. - - Please use diffpy.structure.Structure.write_structure instead. - """ - return self.write_structure(format) - - def write_structure(self, format): - """Return string representation of the structure in specified - format. - - Note - ---- - Available structure formats can be obtained by: - - ``from parsers import formats`` - """ - from diffpy.structure.parsers import get_parser - - p = get_parser(format) - s = p.tostring(self) - return s - - def tolist(self): - """Return `Atoms` in this `Structure` as a standard Python - list.""" - rv = [a for a in self] - return rv - - # Overloaded list Methods and Operators ---------------------------------- - - def append(self, a, copy=True): - """Append `Atom` to a structure and update its `lattice` - attribute. - - Parameters - ---------- - a : Atom - Instance of `Atom` to be appended. - copy : bool, Optional - Flag for appending a copy of `a`. When ``False``, append `a` and update `a.lattice`. - """ - adup = copy and Atom(a) or a - adup.lattice = self.lattice - super(Structure, self).append(adup) - return - - def insert(self, idx, a, copy=True): - """Insert `Atom` a before position idx in this `Structure`. - - Parameters - ---------- - idx : int - Position in `Atom` list. - a : Atom - Instance of `Atom` to be inserted. - copy : bool, Optional - Flag for inserting a copy of `a`. When ``False``, append `a` and update `a.lattice`. - """ - adup = copy and copymod.copy(a) or a - adup.lattice = self.lattice - super(Structure, self).insert(idx, adup) - return - - def extend(self, atoms, copy=None): - """Extend `Structure` with an iterable of `atoms`. - - Update the `lattice` attribute of all added `atoms`. - - Parameters - ---------- - atoms : Iterable - The `Atom` objects to be appended to this `Structure`. - copy : bool, Optional - Flag for adding copies of `Atom` objects. - Make copies when ``True``, append `atoms` unchanged when ``False``. - The default behavior is to make copies when `atoms` are of - `Structure` type or if new atoms introduce repeated objects. - """ - adups = (copymod.copy(a) for a in atoms) - if copy is None: - if isinstance(atoms, Structure): - newatoms = adups - else: - memo = set(id(a) for a in self) - - def nextatom(a): - return a if id(a) not in memo else copymod.copy(a) - - def mark(a): - return (memo.add(id(a)), a)[-1] - - newatoms = (mark(nextatom(a)) for a in atoms) - elif copy: - newatoms = adups - else: - newatoms = atoms - - def setlat(a): - return (setattr(a, "lattice", self.lattice), a)[-1] - - super(Structure, self).extend(setlat(a) for a in newatoms) - return - - def __getitem__(self, idx): - """Get one or more `Atoms` in this structure. - - Parameters - ---------- - idx : int or str or Iterable - `Atom` identifier. When integer use standard list lookup. - For iterables use numpy lookup, this supports integer or - boolean flag arrays. For string or string-containing iterables - lookup the `Atoms` by string label. - - Returns - ------- - Atom or Structure - An `Atom` instance for integer or string index or a substructure - in all other cases. - - Raises - ------ - IndexError - If the index is invalid or the `Atom` label is not unique. - - Examples - -------- - First `Atom` in the `Structure`: - - >>> stru[0] - - Substructure of all ``'Na'`` `Atoms`: - - >>> stru[stru.element == 'Na'] - - `Atom` with a unique label ``'Na3'``: - >>> stru['Na3'] - - Substructure of three `Atoms`, lookup by label is more efficient - when done for several `Atoms` at once. - - >>> stru['Na3', 2, 'Cl2'] - """ - if isinstance(idx, slice): - rv = self.__empty_shared_structure() - lst = super(Structure, self).__getitem__(idx) - rv.extend(lst, copy=False) - return rv - try: - rv = super(Structure, self).__getitem__(idx) - return rv - except TypeError: - pass - # check if there is any string label that should be resolved - scalarstringlabel = isinstance(idx, str) - hasstringlabel = scalarstringlabel or (isiterable(idx) and any(isinstance(ii, str) for ii in idx)) - # if not, use numpy indexing to resolve idx - if not hasstringlabel: - idx1 = idx - if type(idx) is tuple: - idx1 = numpy.r_[idx] - indices = numpy.arange(len(self))[idx1] - rhs = [list.__getitem__(self, i) for i in indices] - rv = self.__empty_shared_structure() - rv.extend(rhs, copy=False) - return rv - # here we need to resolve at least one string label - # build a map of labels to indices and mark duplicate labels - duplicate = object() - labeltoindex = {} - for i, a in enumerate(self): - labeltoindex[a.label] = duplicate if a.label in labeltoindex else i - - def _resolveindex(aid): - aid1 = aid - if type(aid) is str: - aid1 = labeltoindex.get(aid, None) - if aid1 is None: - raise IndexError("Invalid atom label %r." % aid) - if aid1 is duplicate: - raise IndexError("Atom label %r is not unique." % aid) - return aid1 - - # generate new index object that has no strings - if scalarstringlabel: - idx2 = _resolveindex(idx) - # for iterables preserve the tuple object type - else: - idx2 = [_resolveindex(i) for i in idx] - if type(idx) is tuple: - idx2 = tuple(idx2) - # call this function again and hope there is no recursion loop - rv = self[idx2] - return rv - - def __setitem__(self, idx, value, copy=True): - """Assign `self[idx]` `Atom` to value. - - Parameters - ---------- - idx : int or slice - Index of `Atom` in this `Structure` or a slice. - value : Atom or Iterable - Instance of `Atom` or an iterable. - copy : bool, Optional - Flag for making a copy of the value. When ``False``, update - the `lattice` attribute of `Atom` objects present in value. - Default is ``True``. - """ - # handle slice assignment - if isinstance(idx, slice): - - def _fixlat(a): - a.lattice = self.lattice - return a - - v1 = value - if copy: - keep = set(super(Structure, self).__getitem__(idx)) - v1 = (a if a in keep else Atom(a) for a in value) - vfinal = filter(_fixlat, v1) - # handle scalar assignment - else: - vfinal = Atom(value) if copy else value - vfinal.lattice = self.lattice - super(Structure, self).__setitem__(idx, vfinal) - return - - def __add__(self, other): - """Return new `Structure` object with appended `Atoms` from - other. - - Parameters - ---------- - other : sequence of Atom - Sequence of `Atom` instances. - - Returns - ------- - Structure - New `Structure` with a copy of `Atom` instances. - """ - rv = copymod.copy(self) - rv += other - return rv - - def __iadd__(self, other): - """Extend this `Structure` with `Atoms` from other. - - Parameters - ---------- - other : sequence of Atom - Sequence of `Atom` instances. - - Returns - ------- - Structure - Reference to this `Structure` object. - """ - self.extend(other, copy=True) - return self - - def __sub__(self, other): - """Return new `Structure` that has `Atoms` from the other - removed. - - Parameters - ---------- - other : sequence of Atom - Sequence of `Atom` instances. - - Returns - ------- - Structure - New `Structure` with a copy of `Atom` instances. - """ - otherset = set(other) - keepindices = [i for i, a in enumerate(self) if a not in otherset] - rv = copymod.copy(self[keepindices]) - return rv - - def __isub__(self, other): - """Remove other `Atoms` if present in this structure. - - Parameters - ---------- - other : sequence of Atom - Sequence of `Atom` instances. - - Returns - ------- - Structure - Reference to this `Structure` object. - """ - otherset = set(other) - self[:] = [a for a in self if a not in otherset] - return self - - def __mul__(self, n): - """Return new `Structure` with n-times concatenated `Atoms` from - self. `Atoms` and `lattice` in the new structure are all copies. - - Parameters - ---------- - n : int - Integer multiple. - - Returns - ------- - Structure - New `Structure` with n-times concatenated `Atoms`. - """ - rv = copymod.copy(self[:0]) - rv += n * self.tolist() - return rv - - # right-side multiplication is the same as left-side - __rmul__ = __mul__ - - def __imul__(self, n): - """Concatenate this `Structure` to n-times more `Atoms`. For - positive multiple the current `Atom` objects remain at the - beginning of this `Structure`. - - Parameters - ---------- - n : int - Integer multiple. - - Returns - ------- - Structure - Reference to this `Structure` object. - """ - if n <= 0: - self[:] = [] - else: - self.extend((n - 1) * self.tolist(), copy=True) - return self - - # Properties ------------------------------------------------------------- - - # lattice - - def _get_lattice(self): - return self._lattice - - def _set_lattice(self, value): - for a in self: - a.lattice = value - self._lattice = value - return - - lattice = property( - _get_lattice, - _set_lattice, - doc="Coordinate system for this `Structure`.", - ) - - # composition - - def _get_composition(self): - rv = {} - for a in self: - rv[a.element] = rv.get(a.element, 0.0) + a.occupancy - return rv - - composition = property( - _get_composition, - doc="Dictionary of chemical symbols and their total occupancies.", - ) - - # linked atom attributes - - element = _link_atom_attribute( - "element", - """Character array of `Atom` types. Assignment updates - the element attribute of the respective `Atoms`. - Set the maximum length of the element string to 5 characters.""", - toarray=lambda items: numpy.char.array(items, itemsize=5), - ) - - xyz = _link_atom_attribute( - "xyz", - """Array of fractional coordinates of all `Atoms`. - Assignment updates `xyz` attribute of all `Atoms`.""", - ) - - x = _link_atom_attribute( - "x", - """Array of all fractional coordinates `x`. - Assignment updates `xyz` attribute of all `Atoms`.""", - ) - - y = _link_atom_attribute( - "y", - """Array of all fractional coordinates `y`. - Assignment updates `xyz` attribute of all `Atoms`.""", - ) - - z = _link_atom_attribute( - "z", - """Array of all fractional coordinates `z`. - Assignment updates `xyz` attribute of all `Atoms`.""", - ) - - label = _link_atom_attribute( - "label", - """Character array of `Atom` names. Assignment updates - the label attribute of all `Atoms`. - Set the maximum length of the label string to 5 characters.""", - toarray=lambda items: numpy.char.array(items, itemsize=5), - ) - - occupancy = _link_atom_attribute( - "occupancy", - """Array of `Atom` occupancies. Assignment updates the - occupancy attribute of all `Atoms`.""", - ) - - xyz_cartn = _link_atom_attribute( - "xyz_cartn", - """Array of absolute Cartesian coordinates of all `Atoms`. - Assignment updates the `xyz` attribute of all `Atoms`.""", - ) - - anisotropy = _link_atom_attribute( - "anisotropy", - """Boolean array for anisotropic thermal displacement flags. - Assignment updates the anisotropy attribute of all `Atoms`.""", - ) - - U = _link_atom_attribute( - "U", - """Array of anisotropic thermal displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - Uisoequiv = _link_atom_attribute( - "Uisoequiv", - """Array of isotropic thermal displacement or equivalent values. - Assignment updates the U attribute of all `Atoms`.""", - ) - - U11 = _link_atom_attribute( - "U11", - """Array of `U11` elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - U22 = _link_atom_attribute( - "U22", - """Array of `U22` elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - U33 = _link_atom_attribute( - "U33", - """Array of `U33` elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - U12 = _link_atom_attribute( - "U12", - """Array of `U12` elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - U13 = _link_atom_attribute( - "U13", - """Array of `U13` elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - U23 = _link_atom_attribute( - "U23", - """Array of `U23` elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - Bisoequiv = _link_atom_attribute( - "Bisoequiv", - """Array of Debye-Waller isotropic thermal displacement or equivalent - values. Assignment updates the U attribute of all `Atoms`.""", - ) - - B11 = _link_atom_attribute( - "B11", - """Array of `B11` elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - B22 = _link_atom_attribute( - "B22", - """Array of `B22` elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - B33 = _link_atom_attribute( - "B33", - """Array of `B33` elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - B12 = _link_atom_attribute( - "B12", - """Array of `B12` elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - B13 = _link_atom_attribute( - "B13", - """Array of `B13` elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - B23 = _link_atom_attribute( - "B23", - """Array of `B23` elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all `Atoms`.""", - ) - - # Private Methods -------------------------------------------------------- - - def __empty_shared_structure(self): - """Return empty `Structure` with standard attributes same as in - self.""" - rv = Structure() - rv.__dict__.update([(k, getattr(self, k)) for k in rv.__dict__]) - return rv - - -# End of class Structure diff --git a/src/diffpy/structure/structure_app.py b/src/diffpy/structure/structure_app.py deleted file mode 100644 index 56623a58..00000000 --- a/src/diffpy/structure/structure_app.py +++ /dev/null @@ -1,33 +0,0 @@ -import argparse - -from diffpy.structure.version import __version__ # noqa - - -def main(): - parser = argparse.ArgumentParser( - prog="diffpy.structure", - description=( - "Crystal structure container and parsers for structure formats.\n\n" - "For more information, visit: " - "https://github.com/diffpy/diffpy.structure/" - ), - formatter_class=argparse.RawDescriptionHelpFormatter, - ) - - parser.add_argument( - "--version", - action="store_true", - help="Show the program's version number and exit", - ) - - args = parser.parse_args() - - if args.version: - print(f"diffpy.structure {__version__}") - else: - # Default behavior when no arguments are given - parser.print_help() - - -if __name__ == "__main__": - main() diff --git a/src/diffpy/structure/structureerrors.py b/src/diffpy/structure/structureerrors.py deleted file mode 100644 index f9a2aaec..00000000 --- a/src/diffpy/structure/structureerrors.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Exceptions used in Structure package.""" - - -class StructureFormatError(Exception): - """Exception for failed IO from Structure file.""" - - pass - - -class LatticeError(Exception): - """Exception for impossible lattice parameters.""" - - pass - - -class SymmetryError(Exception): - """Exception raised for invalid symmetry operations.""" - - pass diff --git a/src/diffpy/structure/symmetryutilities.py b/src/diffpy/structure/symmetryutilities.py deleted file mode 100644 index 5e744fbd..00000000 --- a/src/diffpy/structure/symmetryutilities.py +++ /dev/null @@ -1,1464 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Symmetry utility functions such as expansion of asymmetric unit, and -generation of positional constraints. - -Attributes ----------- -epsilon : float - Default tolerance for equality of 2 positions, also - used for identification of special positions. - -stdUsymbols : list - Standard symbols denoting elements of anisotropic thermal - displacement tensor. -""" - -import re -import sys - -import numpy - -from diffpy.structure.structureerrors import SymmetryError -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure" -removal_version = "4.0.0" -isSpaceGroupLatPar_deprecation_msg = build_deprecation_message( - base, - "isSpaceGroupLatPar", - "is_space_group_latt_parms", - removal_version, -) -isconstantFormula_deprecation_msg = build_deprecation_message( - base, - "isconstantFormula", - "is_constant_formula", - removal_version, -) -positionDifference_deprecation_msg = build_deprecation_message( - base, - "positionDifference", - "position_difference", - removal_version, -) -nearestSiteIndex_deprecation_msg = build_deprecation_message( - base, - "nearestSiteIndex", - "nearest_site_index", - removal_version, -) -equalPositions_deprecation_msg = build_deprecation_message( - base, - "equalPositions", - "equal_positions", - removal_version, -) -expandPosition_deprecation_msg = build_deprecation_message( - base, - "expandPosition", - "expand_position", - removal_version, -) -nullSpace_deprecation_msg = build_deprecation_message( - base, - "nullSpace", - "null_space", - removal_version, -) - -# Constants ------------------------------------------------------------------ - -epsilon = 1.0e-5 - -stdUsymbols = ["U11", "U22", "U33", "U12", "U13", "U23"] - -# ---------------------------------------------------------------------------- - - -@deprecated(isSpaceGroupLatPar_deprecation_msg) -def isSpaceGroupLatPar(spacegroup, a, b, c, alpha, beta, gamma): - """'diffpy.structure.isSpaceGroupLatPar' is deprecated and will be - removed in version 4.0.0. - - Please use 'diffpy.structure.is_space_group_latt_parms' instead. - """ - return is_space_group_latt_parms(spacegroup, a, b, c, alpha, beta, gamma) - - -def is_space_group_latt_parms(spacegroup, a, b, c, alpha, beta, gamma): - """Check if space group allows passed lattice parameters. - - Parameters - ---------- - spacegroup : SpaceGroup - Instance of `SpaceGroup`. - a, b, c, alpha, beta, gamma : float - `Lattice` parameters. - - Return - ------ - bool - ``True`` when lattice parameters are allowed by space group. - - Note - ---- - Crystal system rules: - - Benjamin, W. A., Introduction to crystallography, New York (1969), p.60. - """ - - # crystal system rules - # ref: Benjamin, W. A., Introduction to crystallography, - # New York (1969), p.60 - def check_triclinic(): - return True - - def check_monoclinic(): - rv = (alpha == gamma == 90) or (alpha == beta == 90) - return rv - - def check_orthorhombic(): - return alpha == beta == gamma == 90 - - def check_tetragonal(): - return a == b and alpha == beta == gamma == 90 - - def check_trigonal(): - rv = (a == b == c and alpha == beta == gamma) or (a == b and alpha == beta == 90 and gamma == 120) - return rv - - def check_hexagonal(): - return a == b and alpha == beta == 90 and gamma == 120 - - def check_cubic(): - return a == b == c and alpha == beta == gamma == 90 - - crystal_system_rules = { - "TRICLINIC": check_triclinic, - "MONOCLINIC": check_monoclinic, - "ORTHORHOMBIC": check_orthorhombic, - "TETRAGONAL": check_tetragonal, - "TRIGONAL": check_trigonal, - "HEXAGONAL": check_hexagonal, - "CUBIC": check_cubic, - } - rule = crystal_system_rules[spacegroup.crystal_system] - return rule() - - -# Constant regular expression used in isconstantFormula(). -# isconstantFormula runs faster when regular expression is not -# compiled per every single call. - -_rx_constant_formula = re.compile(r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)??(/[-+]?\d+)?$") - - -@deprecated(isconstantFormula_deprecation_msg) -def isconstantFormula(s): - """'diffpy.structure.isconstantFormula' is deprecated and will be - removed in version 4.0.0. - - Please use 'diffpy.structure.is_constant_formula' instead. - """ - return is_constant_formula(s) - - -def is_constant_formula(s): - """Check if formula string is constant. - - Parameters - ---------- - s : str - Formula string. - - Return - ------ - bool - ``True`` when argument is a floating point number or a fraction of float with integer. - """ - res = _rx_constant_formula.match(s.replace(" ", "")) - return bool(res) - - -# Helper class intended for this module only: - - -class _Position2Tuple(object): - """Create callable object that converts fractional coordinates to a - tuple of integers with given precision. For presision close to zero - it will return a tuples of double. - - Note - ---- - Helper class intended for local use only. - - Parameters - ---------- - eps : float - Cutoff for equivalent coordinates. - - Attributes - ---------- - eps : float - Cutoff for equivalent coordinates. When two coordinates map to the - same tuple, they are closer than `eps`. - """ - - def __init__(self, eps=None): - if eps is None: - eps = epsilon - # ensure self.eps has exact machine representation - self.eps = eps + 1.0 - self.eps = self.eps - 1.0 - # no conversions for very small eps - if self.eps == 0.0 or 1.0 / self.eps > sys.maxsize: - self.eps = 0.0 - return - - def __call__(self, xyz): - """Convert array of fractional coordinates to a tuple. - - Parameters - ---------- - xyz : Iterable - Fractional coordinates. - - Return - ------ - tuple - Tuple of 3 float when `eps` is zero, otherwise tuple of 3 int. - """ - # no conversion case - if self.eps == 0.0: - tpl = tuple(xyz % 1.0) - return tpl - # here we convert to integer - tpl = tuple([int((xi - numpy.floor(xi)) / self.eps) for xi in xyz]) - return tpl - - -# End of class _Position2Tuple - - -@deprecated(positionDifference_deprecation_msg) -def positionDifference(xyz0, xyz1): - """'diffpy.structure.positionDifference' is deprecated and will be - removed in version 4.0.0. - - Please use 'diffpy.structure.position_difference' instead. - """ - return position_difference(xyz0, xyz1) - - -def position_difference(xyz0, xyz1): - """Smallest difference between two coordinates in periodic lattice. - - Parameters - ---------- - xyz0, xyz1 : array_like - Fractional coordinates. - - Return - ------ - dxyz : numpy.ndarray - Smallest difference between two coordinates in periodic lattice - with ``0 <= dxyz <= 0.5``. - """ - dxyz = numpy.asarray(xyz0) - xyz1 - # map differences to [0,0.5] - dxyz = dxyz - numpy.floor(dxyz) - mask = dxyz > 0.5 - dxyz[mask] = 1.0 - dxyz[mask] - return dxyz - - -@deprecated(nearestSiteIndex_deprecation_msg) -def nearestSiteIndex(sites, xyz): - """'diffpy.structure.nearestSiteIndex' is deprecated and will be - removed in version 4.0.0. - - Please use 'diffpy.structure.nearest_site_index' instead. - """ - # we use box distance to be consistent with _Position2Tuple conversion - return nearest_site_index(sites, xyz) - - -def nearest_site_index(sites, xyz): - """Index of the nearest site to a specified position. - - Parameters - ---------- - sites : array_like - List of coordinates. - xyz : array_like - Single position. - - Return - ------ - int - Index of the nearest site. - """ - # we use box distance to be consistent with _Position2Tuple conversion - dbox = position_difference(sites, xyz).max(axis=1) - nearindex = numpy.argmin(dbox) - return nearindex - - -@deprecated(equalPositions_deprecation_msg) -def equalPositions(xyz0, xyz1, eps): - """'diffpy.structure.equalPositions' is deprecated and will be - removed in version 4.0.0. - - Please use 'diffpy.structure.equal_positions' instead. - """ - return equal_positions(xyz0, xyz1, eps) - - -def equal_positions(xyz0, xyz1, eps): - """Equality of two coordinates with optional tolerance. - - Parameters - ---------- - xyz0, xyz1 : array_like - Fractional coordinates. - eps : float - Tolerance for equality of coordinates. - - Return - ------ - bool - ``True`` when two coordinates are closer than `eps`. - """ - # we use box distance to be consistent with _Position2Tuple conversion - dxyz = position_difference(xyz0, xyz1) - return numpy.all(dxyz <= eps) - - -@deprecated(expandPosition_deprecation_msg) -def expandPosition(spacegroup, xyz, sgoffset=[0, 0, 0], eps=None): - """'diffpy.structure.expandPosition' is deprecated and will be - removed in version 4.0.0. - - Please use 'diffpy.structure.expand_position' instead. - """ - return expand_position(spacegroup, xyz, sgoffset, eps) - - -def expand_position(spacegroup, xyz, sgoffset=[0, 0, 0], eps=None): - """Obtain unique equivalent positions and corresponding operations. - - Parameters - ---------- - spacegroup : SpaceGroup - Instance of SpaceGroup. - xyz : list - Position to be expanded. - sgoffset : list, Optional - Offset of space group origin ``[0, 0, 0]``. Default is ``[0, 0, 0]``. - eps : float, Optional - Cutoff for equal positions, default is ``1.0e-5``. - - Return - ------ - tuple - A tuple with ``(list of unique equivalent positions, nested - list of `SpaceGroups.SymOp` instances, site multiplicity)``. - """ - sgoffset = numpy.asarray(sgoffset, dtype=float) - if eps is None: - eps = epsilon - pos2tuple = _Position2Tuple(eps) - positions = [] - site_symops = {} # position tuples with [related symops] - for symop in spacegroup.iter_symops(): - # operate on coordinates in non-shifted spacegroup - pos = symop(xyz + sgoffset) - sgoffset - mask = numpy.logical_or(pos < 0.0, pos >= 1.0) - pos[mask] -= numpy.floor(pos[mask]) - tpl = pos2tuple(pos) - if tpl not in site_symops: - pos_is_new = True - site_symops[tpl] = [] - # double check if there is any position nearby - if positions: - nearpos = positions[nearest_site_index(positions, pos)] - # is it an equivalent position? - if equal_positions(nearpos, pos, eps): - # tpl should map to the same list as nearpos - site_symops[tpl] = site_symops[pos2tuple(nearpos)] - pos_is_new = False - if pos_is_new: - positions.append(pos) - # here tpl is inside site_symops - site_symops[tpl].append(symop) - # pos_symops is nested list of symops associated with each position - pos_symops = [site_symops[pos2tuple(p)] for p in positions] - multiplicity = len(positions) - return positions, pos_symops, multiplicity - - -@deprecated(nullSpace_deprecation_msg) -def nullSpace(A): - """'diffpy.structure.nullSpace' is deprecated and will be removed in - version 4.0.0. - - Please use 'diffpy.structure.null_space' instead. - """ - return null_space(A) - - -def null_space(A): - """Null space of matrix A.""" - from numpy import linalg - - u, s, v = linalg.svd(A) - # s may have smaller dimension than v - vnrows = numpy.shape(v)[0] - mask = numpy.ones(vnrows, dtype=bool) - mask[s > epsilon] = False - null_space = numpy.compress(mask, v, axis=0) - return null_space - - -def _find_invariants(symops): - """Find a list of symmetry operations which contains identity. - - Parameters - ---------- - symops : list of SymOp - Nested list of `SymOp` instances. - - Return - ------ - list - List-item in symops which contains identity. - - Raise - ----- - ValueError - When identity is not found. - """ - invrnts = None - R0 = numpy.identity(3, dtype=float) - t0 = numpy.zeros(3, dtype=float) - for ops in symops: - for op in ops: - if numpy.all(op.R == R0) and numpy.all(op.t == t0): - invrnts = ops - break - if invrnts: - break - if invrnts is None: - emsg = "Could not find identity operation." - raise ValueError(emsg) - return invrnts - - -# ---------------------------------------------------------------------------- - -generator_site = "diffpy.symmetryutilities.GeneratorSite" -signedRatStr_deprecation_msg = build_deprecation_message( - generator_site, - "signedRatStr", - "convert_fp_num_to_signed_rational", - removal_version, -) -positionFormula_deprecation_msg = build_deprecation_message( - generator_site, - "positionFormula", - "position_formula", - removal_version, -) -UFormula_deprecation_msg = build_deprecation_message( - generator_site, - "UFormula", - "u_formula", - removal_version, -) -eqIndex_deprecation_msg = build_deprecation_message( - generator_site, - "eqIndex", - "eq_index", - removal_version, -) - - -class GeneratorSite(object): - """Storage of data related to a generator positions. - - Parameters - ---------- - spacegroup : SpaceGroup - Instance of `SpaceGroup`. - xyz : array_like - Generating site. When `xyz` is close to special - position `self.xyz` will be adjusted. - Uij : array_like, Optional - Thermal factors at generator site. Yields `self.Uij` - after adjusting to spacegroup symmetry. Default is zeros. - sgoffset : list, Optional - Offset of space group origin ``[0, 0, 0]``. Default is ``[0, 0, 0]``. - eps : float, Optional - Cutoff for equal positions. Default is ``1.0e-5``. - - Attributes - ---------- - xyz : numpy.ndarray - Fractional coordinates of generator site. - Uij : numpy.ndarray - Anisotropic thermal displacement at generator site. - sgoffset : numpy.ndarray - Offset of space group origin ``[0, 0, 0]``. - eps : float - Cutoff for equal positions. - eqxyz : list - List of equivalent positions. - eqUij : list - List of displacement matrices at equivalent positions. - symops : list - Nested list of operations per each `eqxyz`. - multiplicity : int - Generator site multiplicity. - Uisotropy : bool - Bool flag for isotropic thermal factors. - invariants : list - List of invariant operations for generator site. - null_space : numpy.ndarray - Null space of all possible differences of invariant - rotational matrices, this is a base of symmetry - allowed shifts. - Uspace : numpy.ndarray - 3D array of independent components of U matrices. - pparameters : list - List of ``(xyz symbol, value)`` pairs. - Uparameters : list - List of ``(U symbol, value)`` pairs. - """ - - Ucomponents = numpy.array( - [ - [[1, 0, 0], [0, 0, 0], [0, 0, 0]], - [[0, 0, 0], [0, 1, 0], [0, 0, 0]], - [[0, 0, 0], [0, 0, 0], [0, 0, 1]], - [[0, 1, 0], [1, 0, 0], [0, 0, 0]], - [[0, 0, 1], [0, 0, 0], [1, 0, 0]], - [[0, 0, 0], [0, 0, 1], [0, 1, 0]], - ], - dtype=float, - ) - """numpy.ndarray: 6x3x3 array of independent components of U - matrices.""" - - idx2Usymbol = { - 0: "U11", - 1: "U12", - 2: "U13", - 3: "U12", - 4: "U22", - 5: "U23", - 6: "U13", - 7: "U23", - 8: "U33", - } - """dict: Mapping of index to standard U symbol.""" - - def __init__( - self, - spacegroup, - xyz, - Uij=numpy.zeros((3, 3)), - sgoffset=[0, 0, 0], - eps=None, - ): - if eps is None: - eps = epsilon - # just declare the members - self.xyz = numpy.array(xyz, dtype=float) - self.Uij = numpy.array(Uij, dtype=float) - self.sgoffset = numpy.array(sgoffset, dtype=float) - self.eps = eps - self.eqxyz = [] - self.eqUij = [] - self.symops = None - self.multiplicity = None - self.Uisotropy = False - self.invariants = [] - self.null_space = None - self.Uspace = None - self.pparameters = [] - self.Uparameters = [] - # fill in the values - sites, ops, mult = expandPosition(spacegroup, xyz, sgoffset, eps) - invariants = _find_invariants(ops) - # shift self.xyz exactly to the special position - if mult > 1: - xyzdups = numpy.array([op(xyz + self.sgoffset) - self.sgoffset for op in invariants]) - dxyz = xyzdups - xyz - dxyz = numpy.mean(dxyz - dxyz.round(), axis=0) - # recalculate if needed - if numpy.any(dxyz != 0.0): - self.xyz = xyz + dxyz - self.xyz[numpy.fabs(self.xyz) < self.eps] = 0.0 - sites, ops, mult = expandPosition(spacegroup, self.xyz, self.sgoffset, eps) - invariants = _find_invariants(ops) - # self.xyz, sites, ops are all adjusted here - self.eqxyz = sites - self.symops = ops - self.multiplicity = mult - self.invariants = invariants - self._find_null_space() - self._find_pos_parameters() - self._find_u_space() - self._find_u_parameters() - self._find_eq_uij() - return - - def convert_fp_num_to_signed_rational(self, x): - """Convert floating point number to signed rational - representation. - - Possible fractional are multiples of 1/3, 1/6, 1/7, 1/9, if these - are not close, return `%+g` format. - - Parameters - ---------- - x : float - Floating point number. - - Return - ------ - str - Signed rational representation of `x`. - """ - s = "{:.8g}".format(x) - if len(s) < 6: - return "%+g" % x - den = numpy.array([3.0, 6.0, 7.0, 9.0]) - nom = x * den - idx = numpy.where(numpy.fabs(nom - nom.round()) < self.eps)[0] - if idx.size == 0: - return "%+g" % x - # here we have fraction - return "%+.0f/%.0f" % (nom[idx[0]], den[idx[0]]) - - @deprecated(signedRatStr_deprecation_msg) - def signedRatStr(self, x): - """'diffpy.structure.GeneratorSite.signedRatStr' is deprecated - and will be removed in version 4.0.0. - - Please use 'diffpy.structure.GeneratorSite.convert_fp_num_to_signed_rational' instead. - """ - return self.convert_fp_num_to_signed_rational(x) - - def _find_null_space(self): - """Calculate `self.null_space` from `self.invariants`. - - Try to represent `self.null_space` using small integers. - """ - R0 = self.invariants[0].R - Rdiff = [(symop.R - R0) for symop in self.invariants] - Rdiff = numpy.concatenate(Rdiff, axis=0) - self.null_space = null_space(Rdiff) - if self.null_space.size == 0: - return - # reverse sort rows of null_space rows by absolute value - key = tuple(numpy.fabs(numpy.transpose(self.null_space))[::-1]) - order = numpy.lexsort(key) - self.null_space = self.null_space[order[::-1]] - # rationalize by the smallest element larger than cutoff - cutoff = 1.0 / 32 - for row in self.null_space: - abrow = numpy.abs(row) - sgrow = numpy.sign(row) - # equalize items with round-off-equal absolute value - ii = abrow.argsort() - delta = 1e-8 * abrow[ii[-1]] - for k in ii[1:]: - if abrow[k] - abrow[k - 1] < delta: - abrow[k] = abrow[k - 1] - # find the smallest nonzero absolute element - jnz = numpy.flatnonzero(abrow > cutoff) - idx = jnz[abrow[jnz].argmin()] - row[:] = (sgrow * abrow) / sgrow[idx] / abrow[idx] - return - - def _find_pos_parameters(self): - """Find pparameters and their values for expressing - `self.xyz`.""" - usedsymbol = {} - # parameter values depend on offset of self.xyz - txyz = self.xyz - # define txyz such that most of its elements are zero - for nvec in self.null_space: - idx = numpy.where(numpy.fabs(nvec) >= epsilon)[0][0] - varvalue = txyz[idx] / nvec[idx] - txyz = txyz - varvalue * nvec - # determine standard parameter name - vname = [s for s in "xyz"[idx:] if s not in usedsymbol][0] - self.pparameters.append((vname, varvalue)) - usedsymbol[vname] = True - return - - def _find_u_space(self): - """Find independent U components with respect to invariant - rotations.""" - n = len(self.invariants) - R6zall = numpy.tile(-numpy.identity(6, dtype=float), (n, 1)) - R6zall_iter = numpy.split(R6zall, n, axis=0) - i6kl = ( - (0, (0, 0)), - (1, (1, 1)), - (2, (2, 2)), - (3, (0, 1)), - (4, (0, 2)), - (5, (1, 2)), - ) - for op, R6z in zip(self.invariants, R6zall_iter): - R = op.R - for j, Ucj in enumerate(self.Ucomponents): - Ucj2 = numpy.dot(R, numpy.dot(Ucj, R.T)) - for i, kl in i6kl: - R6z[i, j] += Ucj2[kl] - Usp6 = null_space(R6zall) - # normalize Usp6 by its maximum component - mxcols = numpy.argmax(numpy.fabs(Usp6), axis=1) - mxrows = numpy.arange(len(mxcols)) - Usp6 /= Usp6[mxrows, mxcols].reshape(-1, 1) - Usp6 = numpy.around(Usp6, 2) - # normalize again after rounding to get correct signs - mxcols = numpy.argmax(numpy.fabs(Usp6), axis=1) - Usp6 /= Usp6[mxrows, mxcols].reshape(-1, 1) - self.Uspace = numpy.tensordot(Usp6, self.Ucomponents, axes=(1, 0)) - self.Uisotropy = len(self.Uspace) == 1 - return - - def _find_u_parameters(self): - """Find Uparameters and their values for expressing - `self.Uij`.""" - # permute indices as 00 11 22 01 02 12 10 20 21 - diagorder = numpy.array((0, 4, 8, 1, 2, 5, 3, 6, 7)) - Uijflat = self.Uij.flatten() - for Usp in self.Uspace: - Uspflat = Usp.flatten() - Uspnorm2 = numpy.dot(Uspflat, Uspflat) - permidx = next(i for i, x in enumerate(Uspflat[diagorder]) if x == 1) - idx = diagorder[permidx] - vname = self.idx2Usymbol[idx] - varvalue = numpy.dot(Uijflat, Uspflat) / Uspnorm2 - self.Uparameters.append((vname, varvalue)) - return - - def _find_eq_uij(self): - """Adjust `self.Uij` and `self.eqUij` to be consistent with - spacegroup.""" - self.Uij = numpy.zeros((3, 3), dtype=float) - for i in range(len(self.Uparameters)): - Usp = self.Uspace[i] - varvalue = self.Uparameters[i][1] - self.Uij += varvalue * Usp - # now determine eqUij - for ops in self.symops: - # take first rotation matrix - R = ops[0].R - Rt = R.transpose() - self.eqUij.append(numpy.dot(R, numpy.dot(self.Uij, Rt))) - return - - @deprecated(positionFormula_deprecation_msg) - def positionFormula(self, pos, xyzsymbols=("x", "y", "z")): - """'diffpy.structure.GeneratorSite.positionFormula' is - deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.GeneratorSite.position_formula' - instead. - """ - return self.position_formula(pos, xyzsymbols) - - def position_formula(self, pos, xyzsymbols=("x", "y", "z")): - """Formula of equivalent position with respect to generator - site. - - Parameters - ---------- - pos : array_like - Fractional coordinates of possibly equivalent site. - xyzsymbols : tuple, Optional - Symbols for parametrized coordinates. - - Return - ------ - dict - Position formulas in a dictionary with keys equal ``("x", "y", "z")`` - or an empty dictionary when pos is not equivalent to generator. - Formulas are formatted as ``[[-][%g*]{x|y|z}] [{+|-}%g]``, for example - ``-x``, ``z +0.5``, ``0.25``. - """ - # find pos in eqxyz - idx = nearest_site_index(self.eqxyz, pos) - eqpos = self.eqxyz[idx] - if not equal_positions(eqpos, pos, self.eps): - return {} - # any rotation matrix should do fine - R = self.symops[idx][0].R - nsrotated = numpy.dot(self.null_space, numpy.transpose(R)) - # build formulas using eqpos - # find offset - teqpos = numpy.array(eqpos) - for nvec, (vname, varvalue) in zip(nsrotated, self.pparameters): - teqpos -= nvec * varvalue - # map varnames to xyzsymbols - name2sym = dict(zip(("x", "y", "z"), xyzsymbols)) - xyzformula = 3 * [""] - for nvec, (vname, ignore) in zip(nsrotated, self.pparameters): - for i in range(3): - if abs(nvec[i]) < epsilon: - continue - xyzformula[i] += "%s*%s " % ( - self.convert_fp_num_to_signed_rational(nvec[i]), - name2sym[vname], - ) - # add constant offset teqpos to all formulas - for i in range(3): - if xyzformula[i] and abs(teqpos[i]) < epsilon: - continue - xyzformula[i] += self.convert_fp_num_to_signed_rational(teqpos[i]) - # reduce unnecessary +1* and -1* - xyzformula = [re.sub("^[+]1[*]|(?<=[+-])1[*]", "", f).strip() for f in xyzformula] - return dict(zip(("x", "y", "z"), xyzformula)) - - @deprecated(UFormula_deprecation_msg) - def UFormula(self, pos, Usymbols=stdUsymbols): - """'diffpy.structure.GeneratorSite.UFormula' is deprecated and - will be removed in version 4.0.0. - - Please use 'diffpy.structure.GeneratorSite.u_formula' instead. - """ - return self.u_formula(pos, Usymbols) - - def u_formula(self, pos, Usymbols=stdUsymbols): - """List of atom displacement formulas with custom parameter - symbols. - - Parameters - ---------- - pos : array_like - Fractional coordinates of possibly equivalent site. - Usymbols : list, Optional - 6 symbols for possible U matrix parameters, default is - ``["U11", "U22", "U33", "U12", "U13", "U23"]``. - - Return - ------ - Uformula : dict - U element formulas in a dictionary where keys are from - ``('U11','U22','U33','U12','U13','U23')`` or empty dictionary when - pos is not equivalent to generator. - """ - # find pos in eqxyz - idx = nearest_site_index(self.eqxyz, pos) - eqpos = self.eqxyz[idx] - if not equal_positions(eqpos, pos, self.eps): - return {} - # any rotation matrix should do fine - R = self.symops[idx][0].R - Rt = R.transpose() - Usrotated = [numpy.dot(R, numpy.dot(Us, Rt)) for Us in self.Uspace] - Uformula = dict.fromkeys(stdUsymbols, "") - name2sym = dict(zip(stdUsymbols, Usymbols)) - for Usr, (vname, ignore) in zip(Usrotated, self.Uparameters): - # avoid adding off-diagonal elements twice - assert numpy.all(Usr == Usr.T) - Usr -= numpy.tril(Usr, -1) - Usrflat = Usr.flatten() - for i in numpy.where(Usrflat)[0]: - f = "%+g*%s" % (Usrflat[i], name2sym[vname]) - smbl = self.idx2Usymbol[i] - Uformula[smbl] += f - for smbl, f in Uformula.items(): - if not f: - f = "0" - f = re.sub(r"^[+]?1[*]|^[+](?=\d)|(?<=[+-])1[*]", "", f).strip() - Uformula[smbl] = f - return Uformula - - @deprecated(eqIndex_deprecation_msg) - def eqIndex(self, pos): - """'diffpy.structure.GeneratorSite.eqIndex' is deprecated and - will be removed in version 4.0.0. - - Please use 'diffpy.structure.GeneratorSite.eq_index' instead. - """ - return self.eq_index(pos) - - def eq_index(self, pos): - """Index of the nearest generator equivalent site. - - Parameters - ---------- - pos : array_like - Fractional coordinates. - - Return - ------ - int - Index of the nearest generator equivalent site. - """ - return nearest_site_index(self.eqxyz, pos) - - -# End of class GeneratorSite - -# ---------------------------------------------------------------------------- - - -class ExpandAsymmetricUnit(object): - """Expand asymmetric unit and anisotropic thermal displacement. - - Parameters - ---------- - spacegroup : SpaceGroup - Instance of `SpaceGroup`. - corepos : array_like - List of positions in asymmetric unit, - it may contain duplicates. - coreUijs : numpy.ndarray, Optional - Thermal factors for `corepos`. - sgoffset : list, Optional - Offset of space group origin ``[0, 0, 0]``. Default is ``[0, 0, 0]``. - eps : float, Optional - Cutoff for duplicate positions. Default is ``1.0e-5``. - - Attributes - ---------- - spacegroup : SpaceGroup - Instance of `SpaceGroup`. - corepos : array_like - List of positions in asymmetric unit, - it may contain duplicates. - coreUijs : numpy.ndarray - Thermal factors for `corepos`. Defaults to zeros. - sgoffset : numpy.ndarray - Offset of space group origin ``[0, 0, 0]``. Default to zeros. - eps : float - Cutoff for equivalent positions. Default is ``1.0e-5``. - multiplicity : list - Multiplicity of each site in `corepos`. - Uisotropy : list - Bool flags for isotropic sites in `corepos`. - expandedpos : list - List of equivalent positions per each site in `corepos`. - expandedUijs : list - List of thermal factors per each site in `corepos`. - """ - - # By design Atom instances are not accepted as arguments to keep - # number of required imports low. - def __init__(self, spacegroup, corepos, coreUijs=None, sgoffset=[0, 0, 0], eps=None): - if eps is None: - eps = epsilon - # declare data members - self.spacegroup = spacegroup - self.corepos = corepos - self.coreUijs = None - self.sgoffset = numpy.array(sgoffset) - self.eps = eps - self.multiplicity = [] - self.Uisotropy = [] - self.expandedpos = [] - self.expandedUijs = [] - # obtain their values - corelen = len(self.corepos) - if coreUijs: - self.coreUijs = coreUijs - else: - self.coreUijs = numpy.zeros((corelen, 3, 3), dtype=float) - for cpos, cUij in zip(self.corepos, self.coreUijs): - gen = GeneratorSite(self.spacegroup, cpos, cUij, self.sgoffset, self.eps) - self.multiplicity.append(gen.multiplicity) - self.Uisotropy.append(gen.Uisotropy) - self.expandedpos.append(gen.eqxyz) - self.expandedUijs.append(gen.eqUij) - return - - -# End of class ExpandAsymmetricUnit - - -# Helper function for SymmetryConstraints class. It may be useful -# elsewhere therefore its name does not start with underscore. - -pruneFormulaDictionary_deprecation_msg = build_deprecation_message( - base, - "pruneFormulaDictionary", - "prune_formula_dictionary", - removal_version, -) - - -@deprecated(pruneFormulaDictionary_deprecation_msg) -def pruneFormulaDictionary(eqdict): - """'diffpy.structure.pruneFormulaDictionary' is deprecated and will - be removed in version 4.0.0. - - Please use 'diffpy.structure.prune_formula_dictionary' instead. - """ - pruned = {} - for smb, eq in eqdict.items(): - if not is_constant_formula(eq): - pruned[smb] = eq - return pruned - - -def prune_formula_dictionary(eqdict): - """Remove constant items from formula dictionary. - - Parameters - ---------- - eqdict : dict - Formula dictionary which maps standard variable symbols - ``("x", "U11")`` to string formulas ``("0", "-x3", "z7 +0.5")``. - - Return - ------ - dict - Pruned formula dictionary. - """ - pruned = {} - for smb, eq in eqdict.items(): - if not is_constant_formula(eq): - pruned[smb] = eq - return pruned - - -symmetry_constraints = "diffpy.symmetryutilities.SymmetryConstraints" -posparSymbols_deprecation_msg = build_deprecation_message( - symmetry_constraints, - "posparSymbols", - "pospar_symbols", - removal_version, -) -posparValues_deprecation_msg = build_deprecation_message( - symmetry_constraints, - "posparValues", - "pospar_values", - removal_version, -) -UparSymbols_deprecation_msg = build_deprecation_message( - symmetry_constraints, - "UparSymbols", - "upar_symbols", - removal_version, -) -UparValues_deprecation_msg = build_deprecation_message( - symmetry_constraints, - "UparValues", - "upar_values", - removal_version, -) -UFormulas_deprecation_msg = build_deprecation_message( - symmetry_constraints, - "UFormulas", - "u_formulas", - removal_version, -) -positionFormulas_deprecation_msg = build_deprecation_message( - symmetry_constraints, - "positionFormulas", - "position_formulas", - removal_version, -) -positionFormulasPruned_deprecation_msg = build_deprecation_message( - symmetry_constraints, - "positionFormulasPruned", - "position_formulas_pruned", - removal_version, -) -UFormulasPruned_deprecation_msg = build_deprecation_message( - symmetry_constraints, - "UFormulasPruned", - "u_formulas_pruned", - removal_version, -) - - -class SymmetryConstraints(object): - """Generate symmetry constraints for specified positions. - - Parameters - ---------- - spacegroup : SpaceGroup - Instance of `SpaceGroup`. - positions : array_like - List of all positions to be constrained. - Uijs : array_like, Optional - List of U matrices for all constrained positions. - sgoffset : list, Optional - Offset of space group origin ``[0, 0, 0]``. Default is ``[0, 0, 0]``. - eps : float, Optional - Cutoff for duplicate positions. Default is ``1.0e-5``. - - Attributes - ---------- - spacegroup : SpaceGroup - Instance of `SpaceGroup`. - positions : numpy.ndarray - All positions to be constrained. - Uijs : numpy.ndarray - Thermal factors for all positions. Defaults to zeros. - sgoffset : numpy.ndarray - Optional offset of space group origin ``[0, 0, 0]``. - eps : float - Cutoff for equivalent positions. Default is ``1.0e-5``. - corepos : list - List of of positions in the asymmetric unit. - coremap : dict - Dictionary mapping indices of asymmetric core positions - to indices of all symmetry related positions. - poseqns : list - List of coordinate formula dictionaries per each site. - Formula dictionary keys are from ``("x", "y", "z")`` and - the values are formatted as ``[[-]{x|y|z}%i] [{+|-}%g]``, - for example: ``x0``, ``-x3``, ``z7 +0.5``, ``0.25``. - pospars : list - List of ``(xyz symbol, value)`` pairs. - Ueqns : list - List of anisotropic atomic displacement formula - dictionaries per each position. Formula dictionary - keys are from ``('U11','U22','U33','U12','U13','U23')`` - and the values are formatted as ``{[%g*][Uij%i]|0}``, - for example: ``U110``, ``0.5*U2213``, ``0``. - Upars : list - List of ``(U symbol, value)`` pairs. - Uisotropy : list - List of bool flags for isotropic thermal displacements. - """ - - def __init__(self, spacegroup, positions, Uijs=None, sgoffset=[0, 0, 0], eps=None): - if eps is None: - eps = epsilon - # fill in data members - self.spacegroup = spacegroup - self.positions = None - self.Uijs = None - self.sgoffset = numpy.array(sgoffset) - self.eps = eps - self.corepos = [] - self.coremap = {} - self.poseqns = None - self.pospars = [] - self.Ueqns = None - self.Upars = [] - self.Uisotropy = None - # handle list of lists returned by ExpandAsymmetricUnit - if len(positions) and isinstance(positions[0], list): - # concatenate lists before converting to Nx3 array - flatpos = sum(positions, []) - flatpos = numpy.array(flatpos, dtype=float).flatten() - self.positions = flatpos.reshape((-1, 3)) - # otherwise convert to array - else: - flatpos = numpy.array(positions, dtype=float).flatten() - self.positions = flatpos.reshape((-1, 3)) - # here self.positions should be a 2D numpy array - numpos = len(self.positions) - # adjust Uijs if not specified - if Uijs is not None: - self.Uijs = numpy.array(Uijs, dtype=float) - else: - self.Uijs = numpy.zeros((numpos, 3, 3), dtype=float) - self.poseqns = numpos * [None] - self.Ueqns = numpos * [None] - self.Uisotropy = numpos * [False] - # all members should be initialized here - self._find_constraints() - return - - def _find_constraints(self): - """Find constraints for positions and anisotropic displacements - `Uij`.""" - numpos = len(self.positions) - # canonical xyzsymbols and Usymbols - xyzsymbols = [smbl + str(i) for i in range(numpos) for smbl in "xyz"] - Usymbols = [smbl + str(i) for i in range(numpos) for smbl in stdUsymbols] - independent = set(range(numpos)) - for genidx in range(numpos): - if genidx not in independent: - continue - # it is a generator - self.coremap[genidx] = [] - genpos = self.positions[genidx] - genUij = self.Uijs[genidx] - gen = GeneratorSite(self.spacegroup, genpos, genUij, self.sgoffset, self.eps) - # append new pparameters if there are any - gxyzsymbols = xyzsymbols[3 * genidx : 3 * (genidx + 1)] - for k, v in gen.pparameters: - smbl = gxyzsymbols["xyz".index(k)] - self.pospars.append((smbl, v)) - gUsymbols = Usymbols[6 * genidx : 6 * (genidx + 1)] - for k, v in gen.Uparameters: - smbl = gUsymbols[stdUsymbols.index(k)] - self.Upars.append((smbl, v)) - # search for equivalents inside indies - indies = sorted(independent) - for indidx in indies: - indpos = self.positions[indidx] - formula = gen.position_formula(indpos, gxyzsymbols) - # formula is empty when indidx is independent - if not formula: - continue - # indidx is dependent here - independent.remove(indidx) - self.coremap[genidx].append(indidx) - self.poseqns[indidx] = formula - self.Ueqns[indidx] = gen.u_formula(indpos, gUsymbols) - # make sure positions and Uijs are consistent with spacegroup - eqidx = gen.eq_index(indpos) - dxyz = gen.eqxyz[eqidx] - indpos - self.positions[indidx] += dxyz - dxyz.round() - self.Uijs[indidx] = gen.eqUij[eqidx] - self.Uisotropy[indidx] = gen.Uisotropy - # all done here - coreidx = sorted(self.coremap.keys()) - self.corepos = [self.positions[i] for i in coreidx] - return - - @deprecated(posparSymbols_deprecation_msg) - def posparSymbols(self): - """'diffpy.structure.SymmetryConstraints.posparSymbols' is - deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.SymmetryConstraints.pos_parm_symbols' instead. - """ - return self.pos_parm_symbols() - - def pos_parm_symbols(self): - """Return list of standard position parameter symbols.""" - return [n for n, v in self.pospars] - - @deprecated(posparValues_deprecation_msg) - def posparValues(self): - """'diffpy.structure.SymmetryConstraints.posparValues' is - deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.SymmetryConstraints.pos_parm_values' instead. - """ - return self.pos_parm_values() - - def pos_parm_values(self): - """Return list of position parameters values.""" - return [v for n, v in self.pospars] - - @deprecated(posparValues_deprecation_msg) - def positionFormulas(self, xyzsymbols=None): - """'diffpy.structure.SymmetryConstraints.positionFormulas' is - deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.SymmetryConstraints.position_formulas' instead. - """ - return self.position_formulas(xyzsymbols) - - def position_formulas(self, xyzsymbols=None): - """List of position formulas with custom parameter symbols. - - Parameters - ---------- - xyzsymbols : list, Optional - List of custom symbols used in formula strings. - - Return - ------ - list - List of coordinate formulas dictionaries. Formulas dictionary - keys are from ``("x", "y", "z")`` and the values are formatted as - ``[[-]{symbol}] [{+|-}%g]``, for example: ``x0``, ``-sym``, ``@7 +0.5``, ``0.25``. - """ - if not xyzsymbols: - return list(self.poseqns) - # check xyzsymbols - if len(xyzsymbols) < len(self.pospars): - emsg = "Not enough symbols for %i position parameters" % len(self.pospars) - raise SymmetryError(emsg) - # build translation dictionary - trsmbl = dict(zip(self.pos_parm_symbols(), xyzsymbols)) - - def translatesymbol(matchobj): - return trsmbl[matchobj.group(0)] - - pat = re.compile(r"\b[xyz]\d+") - rv = [] - for eqns in self.poseqns: - treqns = {} - for smbl, eq in eqns.items(): - treqns[smbl] = re.sub(pat, translatesymbol, eq) - rv.append(treqns) - return rv - - @deprecated(positionFormulasPruned_deprecation_msg) - def positionFormulasPruned(self, xyzsymbols=None): - """'diffpy.structure.SymmetryConstraints.positionFormulasPruned' - is deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.SymmetryConstraints.position_formulas_pruned' instead. - """ - return self.position_formulas_pruned(xyzsymbols) - - def position_formulas_pruned(self, xyzsymbols=None): - """List of position formula dictionaries with constant items - removed. - - See also - -------- - positionFormulas() - - Parameters - ---------- - xyzsymbols : list, Optional - List of custom symbols used in formula strings. - - Return - ------ - list - List of coordinate formula dictionaries. - """ - rv = [prune_formula_dictionary(eqns) for eqns in self.position_formulas(xyzsymbols)] - return rv - - @deprecated(UparSymbols_deprecation_msg) - def UparSymbols(self): - """'diffpy.structure.SymmetryConstraints.UparSymbols' is - deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.SymmetryConstraints.u_parm_symbols' instead. - """ - return self.u_parm_symbols() - - def u_parm_symbols(self): - """Return list of standard atom displacement parameter - symbols.""" - return [n for n, v in self.Upars] - - @deprecated(UparValues_deprecation_msg) - def UparValues(self): - """'diffpy.structure.SymmetryConstraints.UparValues' is - deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.SymmetryConstraints.u_parm_values' - instead. - """ - return [v for n, v in self.Upars] - - def u_parm_values(self): - """Return list of atom displacement parameters values.""" - return [v for n, v in self.Upars] - - @deprecated(UFormula_deprecation_msg) - def UFormulas(self, Usymbols=None): - """'diffpy.structure.SymmetryConstraints.UFormulas' is - deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.SymmetryConstraints.u_formulas' - instead. - """ - return self.u_formulas(Usymbols) - - def u_formulas(self, Usymbols=None): - """List of atom displacement formulas with custom parameter - symbols. - - Parameters - ---------- - Usymbols : list, Optional - List of custom symbols used in formula strings. - - Return - ------ - list - List of atom displacement formula dictionaries per each site. - Formula dictionary keys are from ``('U11','U22','U33','U12','U13','U23')`` - and the values are formatted as ``{[%g*][Usymbol]|0}``, for example: - ``U11``, ``0.5*@37``, ``0``. - """ - if not Usymbols: - return list(self.Ueqns) - # check Usymbols - if len(Usymbols) < len(self.Upars): - emsg = "Not enough symbols for %i U parameters" % len(self.Upars) - raise SymmetryError(emsg) - # build translation dictionary - trsmbl = dict(zip(self.u_parm_symbols(), Usymbols)) - - def translatesymbol(matchobj): - return trsmbl[matchobj.group(0)] - - pat = re.compile(r"\bU\d\d\d+") - rv = [] - for eqns in self.Ueqns: - treqns = {} - for smbl, eq in eqns.items(): - treqns[smbl] = re.sub(pat, translatesymbol, eq) - rv.append(treqns) - return rv - - @deprecated(UFormulasPruned_deprecation_msg) - def UFormulasPruned(self, Usymbols=None): - """'diffpy.structure.SymmetryConstraints.UFormulasPruned' is - deprecated and will be removed in version 4.0.0. - - Please use 'diffpy.structure.SymmetryConstraints.u_formulas_pruned' - instead. - """ - return self.u_formulas_pruned(Usymbols) - - def u_formulas_pruned(self, Usymbols=None): - """List of atom displacement formula dictionaries with constant - items removed. - - See Also - -------- - UFormulas() - - Parameters - ---------- - Usymbols : list, Optional - List of custom symbols used in formula strings. - - Return - ------ - list - List of atom displacement formulas in tuples of - ``(U11, U22, U33, U12, U13, U23)``. - """ - rv = [prune_formula_dictionary(eqns) for eqns in self.u_formulas(Usymbols)] - return rv - - -# End of class SymmetryConstraints - -# ---------------------------------------------------------------------------- - -# basic demonstration -if __name__ == "__main__": - from diffpy.structure.spacegroups import sg100 - - site = [0.125, 0.625, 0.13] - Uij = [[1, 2, 3], [2, 4, 5], [3, 5, 6]] - g = GeneratorSite(sg100, site, Uij=Uij) - fm100 = g.position_formula(site) - print("g = GeneratorSite(sg100, %r)" % site) - print("g.positionFormula(%r) = %s" % (site, fm100)) - print("g.pparameters =", g.pparameters) - print("g.Uparameters =", g.Uparameters) - print("g.UFormula(%r) =" % site, g.u_formula(site)) diff --git a/src/diffpy/structure/utils.py b/src/diffpy/structure/utils.py deleted file mode 100644 index 1e1a6deb..00000000 --- a/src/diffpy/structure/utils.py +++ /dev/null @@ -1,146 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Small shared functions.""" - -from collections.abc import Iterable as _Iterable - -import numpy - -from diffpy.utils._deprecator import build_deprecation_message, deprecated - -base = "diffpy.structure" -removal_version = "4.0.0" -atomBareSymbol_deprecation_msg = build_deprecation_message( - base, - "atomBareSymbol", - "atom_bare_symbol", - removal_version, -) - - -def isiterable(obj): - """``True`` if argument is iterable.""" - rv = isinstance(obj, _Iterable) - return rv - - -def isfloat(s): - """``True`` if argument can be converted to float.""" - try: - float(s) - return True - except ValueError: - pass - return False - - -@deprecated(atomBareSymbol_deprecation_msg) -def atomBareSymbol(smbl): - """This function has been deprecated and will be removed in version - 4.0.0. - - Please use diffpy.structure.atom_bare_symbol instead. - """ - - return atom_bare_symbol(smbl) - - -def atom_bare_symbol(smbl): - """Remove atom type string stripped of isotope and ion charge - symbols. - - This function removes any blank, isotope numbers (0-9), leading hyphens (-), and ion charge - symbols (1-9)(+-) from the given atom type string, returning only the bare element symbol. - - Parameters - ---------- - smbl : str - Atom type string that may include isotope numbers, ion charges, or hyphens. - - Returns - ------- - str - The bare element symbol. - - Examples - -------- - >>> atom_bare_symbol("Cl-") - 'Cl' - >>> atom_bare_symbol("Ca2+") - 'Ca' - >>> atom_bare_symbol("12-C") - 'C' - """ - rv = smbl.strip().lstrip("0123456789-").rstrip("123456789+-") - return rv - - -# Helpers for the Structure class -------------------------------------------- - - -def _link_atom_attribute(attrname, doc, toarray=numpy.array): - """Create property wrapper that maps the specified atom attribute. - - The returned property object provides convenient access to atom - attributes from the owner `Structure` class. - - Parameters - ---------- - attrname : str - The string name of the `Atom` class attribute to be mapped. - doc : str - The docstring for the property wrapper. - toarray : callable, Optional - Factory function that converts list of attributes to `numpy.ndarray`. - Use `numpy.char.array` for string attributes. - - Return a property object. - """ - from itertools import repeat - from operator import setitem - - _all = slice(None) - - def fget(self): - va = toarray([getattr(a, attrname) for a in self]) - return va - - def fset(self, value): - n = len(self) - if n == 0: - return - v0 = getattr(self[0], attrname) - # replace scalar values, but change array attributes in place - if numpy.isscalar(v0): - - def setvalue(a, v): - return setattr(a, attrname, v) - - else: - - def setvalue(a, v): - return setitem(getattr(a, attrname), _all, v) - - # avoid broadcasting if the new value is a scalar - if numpy.isscalar(value): - genvalues = repeat(value) - else: - genvalues = numpy.broadcast_to(value, (n,) + numpy.shape(v0)) - for a, v in zip(self, genvalues): - setvalue(a, v) - return - - rv = property(fget, fset, doc=doc) - return rv diff --git a/src/diffpy/structure/version.py b/src/diffpy/structure/version.py deleted file mode 100644 index 05a8d8ea..00000000 --- a/src/diffpy/structure/version.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# (c) 2026 The Trustees of Columbia University in the City of New York. -# All rights reserved. -# -# File coded by: Chris Farrow, Pavol Juhas, Simon Billinge, Billinge Group members. -# -# See GitHub contributions for a more detailed list of contributors. -# https://github.com/diffpy/diffpy.structure/graphs/contributors # noqa: E501 -# -# See LICENSE.rst for license information. -# -############################################################################## -"""Definition of __version__.""" - -# We do not use the other three variables, but can be added back if needed. -# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] - -# obtain version information -from importlib.metadata import PackageNotFoundError, version - -try: - __version__ = version("diffpy.structure") -except PackageNotFoundError: - __version__ = "unknown" diff --git a/tests/conftest.py b/tests/conftest.py deleted file mode 100644 index 5471acc1..00000000 --- a/tests/conftest.py +++ /dev/null @@ -1,29 +0,0 @@ -import json -from pathlib import Path - -import pytest - - -@pytest.fixture -def user_filesystem(tmp_path): - base_dir = Path(tmp_path) - home_dir = base_dir / "home_dir" - home_dir.mkdir(parents=True, exist_ok=True) - cwd_dir = base_dir / "cwd_dir" - cwd_dir.mkdir(parents=True, exist_ok=True) - - home_config_data = {"username": "home_username", "email": "home@email.com"} - with open(home_dir / "diffpyconfig.json", "w") as f: - json.dump(home_config_data, f) - - yield tmp_path - - -@pytest.fixture -def datafile(): - """Fixture to dynamically load any test file.""" - - def _load(filename): - return "tests/testdata/" + filename - - return _load diff --git a/tests/test_atom.py b/tests/test_atom.py deleted file mode 100644 index 2d2b4f5e..00000000 --- a/tests/test_atom.py +++ /dev/null @@ -1,305 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure Complex Modeling Initiative -# (c) 2016 Brookhaven Science Associates, -# Brookhaven National Laboratory. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## -"""Unit tests for the Atom class.""" - - -import unittest - -import numpy -import pytest - -from diffpy.structure.atom import Atom -from diffpy.structure.lattice import Lattice - -# ---------------------------------------------------------------------------- - - -class TestAtom(unittest.TestCase): - - def test___init__(self): - """Check Atom.__init__()""" - a = Atom() - self.assertEqual("", a.element) - self.assertTrue((a.xyz == 0).all()) - self.assertEqual("", a.label) - self.assertEqual(1.0, a.occupancy) - self.assertFalse(a.anisotropy) - self.assertTrue((a.U == 0).all()) - self.assertTrue(a.lattice is None) - # check initialization with arguments - a1 = Atom("C", xyz=(1, 2, 3), Uisoequiv=0.005) - self.assertEqual("C", a1.element) - self.assertTrue(numpy.array_equal([1, 2, 3], a1.xyz)) - self.assertFalse(a1.anisotropy) - self.assertEqual(0.005, a1.Uisoequiv) - # initialize with anisotropic displacement parameters - uani = numpy.identity(3, dtype=float) * numpy.array([1, 2, 3]) * 0.01 - a2 = Atom("C", U=uani) - self.assertTrue(numpy.array_equal(uani, a2.U)) - self.assertTrue(a2.anisotropy) - a3 = Atom("C", Uisoequiv=0.02, anisotropy=True) - self.assertTrue(a3.anisotropy) - self.assertEqual(a3.U[2, 2], 0.02) - self.assertRaises(ValueError, Atom, "C", Uisoequiv=0.02, U=uani) - return - - # def test_msdLat(self): - # """check Atom.msdLat() - # """ - # return - # - # def test_msdCart(self): - # """check Atom.msdCart() - # """ - # return - # - # def test___repr__(self): - # """check Atom.__repr__() - # """ - # return - # - # def test___copy__(self): - # """check Atom.__copy__() - # """ - # return - - def test_msdLat(self): - """Check Atom.msdLat.""" - hexagonal = Lattice(1, 1, 1, 90, 90, 120) - atom_1 = Atom("C", [0, 0, 0], lattice=hexagonal, Uisoequiv=0.0123) - assert atom_1.msdLat([1, 2, 3]) == pytest.approx(0.0123, rel=0, abs=1e-15) - assert atom_1.msdLat([9, 0, -4]) == pytest.approx(0.0123, rel=0, abs=1e-15) - U = numpy.array( - [ - [0.010, 0.002, 0.001], - [0.002, 0.020, 0.003], - [0.001, 0.003, 0.030], - ], - dtype=float, - ) - atom_2 = Atom("C", [0, 0, 0], lattice=hexagonal, U=U) - - vc = numpy.array([1.2, -0.3, 0.7], dtype=float) - vl = hexagonal.fractional(vc) - - assert atom_2.msdLat(vl) == pytest.approx(atom_2.msd_cart(vc), rel=1e-13, abs=1e-13) - - def test_msdCart(self): - """Check Atom.msdCart.""" - hexagonal = Lattice(1, 1, 1, 90, 90, 120) - atom_1 = Atom("C", [0, 0, 0], lattice=hexagonal, Uisoequiv=0.0456) - assert atom_1.msdCart([1, 0, 0]) == pytest.approx(0.0456, rel=0, abs=1e-15) - assert atom_1.msdCart([0, 5, -2]) == pytest.approx(0.0456, rel=0, abs=1e-15) - assert atom_1.msdCart([0, 5, -2]) == pytest.approx(0.0456, rel=0, abs=1e-15) - - U = numpy.array( - [ - [0.011, 0.001, 0.000], - [0.001, 0.019, 0.002], - [0.000, 0.002, 0.027], - ], - dtype=float, - ) - atom_2 = Atom("C", [0, 0, 0], lattice=hexagonal, U=U) - - vc = numpy.array([0.4, 1.1, -0.6], dtype=float) - assert atom_2.msdCart(vc) == pytest.approx(atom_2.msdCart(3.7 * vc), rel=1e-13, abs=1e-13) - - def test_xyz_cartn(self): - """Check Atom.xyz_cartn property.""" - hexagonal = Lattice(1, 1, 1, 90, 90, 120) - a0 = Atom("C", [0, 0, 0], lattice=hexagonal) - a1 = Atom("C", [1, 1, 1], lattice=hexagonal) - self.assertTrue(all(a0.xyz_cartn == 0)) - rc1 = numpy.array([0.75**0.5, 0.5, 1]) - self.assertTrue(numpy.allclose(rc1, a1.xyz_cartn)) - a1.xyz_cartn[2] = 0 - self.assertTrue(numpy.allclose([1, 1, 0], a1.xyz)) - a1.xyz_cartn[:2] = 0 - self.assertTrue(all(a1.xyz == 0)) - a3 = Atom("C", [1, 2, 3]) - self.assertTrue(numpy.array_equal(a3.xyz, a3.xyz_cartn)) - a3.xyz_cartn = 1.3 - self.assertTrue(all(1.3 == a3.xyz_cartn)) - self.assertTrue(all(1.3 == a3.xyz)) - return - - -# def test__get_anisotropy(self): -# """check Atom._get_anisotropy() -# """ -# return -# -# def test__set_anisotropy(self): -# """check Atom._set_anisotropy() -# """ -# return -# -# def test__get_U(self): -# """check Atom._get_U() -# """ -# return -# -# def test__set_U(self): -# """check Atom._set_U() -# """ -# return -# -# def test__get_Uij(self): -# """check Atom._get_Uij() -# """ -# return -# -# def test__set_Uij(self): -# """check Atom._set_Uij() -# """ -# return -# -# def test__get_Uisoequiv(self): -# """check Atom._get_Uisoequiv() -# """ -# return -# -# def test__set_Uisoequiv(self): -# """check Atom._set_Uisoequiv() -# """ -# return -# -# def test__get_Bisoequiv(self): -# """check Atom._get_Bisoequiv() -# """ -# return -# -# def test__set_Bisoequiv(self): -# """check Atom._set_Bisoequiv() -# """ -# return - -# End of class TestAtom - - -# ---------------------------------------------------------------------------- -@pytest.mark.parametrize( - "uiso, lattice_vector", - [ # C1: isotropic displacement, msd is direction-independent in lattice coordinates. - # Expected the msd_latt equals Uisoequiv for any direction. - (0.0123, [1, 2, 3]), - ], -) -def test_msd_latt_isotropic(uiso, lattice_vector): - """Check Atom.msd_latt().""" - hexagonal = Lattice(1, 1, 1, 90, 90, 120) - atom = Atom("C", [0, 0, 0], lattice=hexagonal, Uisoequiv=uiso) - actual = atom.msd_latt(lattice_vector) - expected = pytest.approx(uiso, rel=0, abs=1e-15) - assert actual == expected - - -@pytest.mark.parametrize( - "U, cartesian_vector", - [ # C2: anisotropic displacement with same physical direction expressed in lattice vs cartesian coords - # Expected msd_latt(fractional(cartesian_vector)) == msd_cart(cartesian_vector) - ( - numpy.array( - [ - [0.010, 0.002, 0.001], - [0.002, 0.020, 0.003], - [0.001, 0.003, 0.030], - ], - dtype=float, - ), - numpy.array([1.2, -0.3, 0.7], dtype=float), - ), - ( - numpy.array( - [ - [0.018, -0.001, 0.002], - [-0.001, 0.012, 0.004], - [0.002, 0.004, 0.025], - ], - dtype=float, - ), - numpy.array([-0.8, 0.9, 0.1], dtype=float), - ), - ], -) -def test_msd_latt_anisotropic(U, cartesian_vector): - """Check Atom.msd_latt() anisotropic coordinate-invariance.""" - hexagonal = Lattice(1, 1, 1, 90, 90, 120) - atom = Atom("C", [0, 0, 0], lattice=hexagonal, U=U) - lattice_vector = hexagonal.fractional(cartesian_vector) - actual = atom.msd_latt(lattice_vector) - expected = pytest.approx(atom.msd_cart(cartesian_vector), rel=1e-13, abs=1e-13) - assert actual == expected - - -@pytest.mark.parametrize( - "uiso, cartesian_vector", - [ # C1: isotropic displacement with msd is direction-independent in cartesian coordinates - # Expected msd_cart equals Uisoequiv for any direction - (0.0456, [0, 5, -2]), - ], -) -def test_msd_cart_isotropic(uiso, cartesian_vector): - """Check Atom.msd_cart().""" - hexagonal = Lattice(1, 1, 1, 90, 90, 120) - atom = Atom("C", [0, 0, 0], lattice=hexagonal, Uisoequiv=uiso) - - actual = atom.msd_cart(cartesian_vector) - expected = pytest.approx(uiso, rel=0, abs=1e-15) - assert actual == expected - - -@pytest.mark.parametrize( - "U, cartesian_vector, scale", - [ # C2: anisotropic displacement with msd_cart normalizes direction vector internally - # Expected msd_cart(cartesian_vector) == msd_cart(scale * cartesian_vector) - ( - numpy.array( - [ - [0.011, 0.001, 0.000], - [0.001, 0.019, 0.002], - [0.000, 0.002, 0.027], - ], - dtype=float, - ), - numpy.array([0.4, 1.1, -0.6], dtype=float), - 3.7, - ), - ( - numpy.array( - [ - [0.020, 0.003, -0.001], - [0.003, 0.014, 0.002], - [-0.001, 0.002, 0.009], - ], - dtype=float, - ), - numpy.array([2.0, -1.0, 0.5], dtype=float), - 0.25, - ), - ], -) -def test_msd_cart_anisotropic(U, cartesian_vector, scale): - """Check Atom.msd_cart() anisotropic normalization invariance.""" - hexagonal = Lattice(1, 1, 1, 90, 90, 120) - atom = Atom("C", [0, 0, 0], lattice=hexagonal, U=U) - actual = atom.msd_cart(cartesian_vector) - expected = pytest.approx(atom.msd_cart(scale * cartesian_vector), rel=1e-13, abs=1e-13) - assert actual == expected - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_expansion.py b/tests/test_expansion.py deleted file mode 100644 index 481f7670..00000000 --- a/tests/test_expansion.py +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure Complex Modeling Initiative -# (c) 2016 Brookhaven Science Associates, -# Brookhaven National Laboratory. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.rst for a list of people who contributed. -# See LICENSE.rst for license information. -# -############################################################################## -"""Tests for the expansion module utilities.""" -import pytest - -from diffpy.structure.atom import Atom -from diffpy.structure.expansion.makeellipsoid import make_ellipsoid, make_sphere, makeEllipsoid, makeSphere -from diffpy.structure.expansion.shapeutils import find_center, findCenter -from diffpy.structure.lattice import Lattice -from diffpy.structure.structure import Structure - - -def test_findCenter(): - # C1: We have single atom, expect to return the index of the single atom. - structure_1 = Structure([Atom("Ni", [0.8, 1.2, 0.9])], lattice=Lattice()) - expected = 0 - actual = findCenter(structure_1) - assert actual == expected - - # C2: We have multiple atoms. - # Expect to find the index of the atom which has the closest distance to [0.5, 0.5, 0.5]. - # In this case it corresponds to atom "C". - structure_2 = Structure( - [Atom("Ni", [0.8, 1.2, 0.9]), Atom("C", [0.1, 0.2, 0.3])], - lattice=Lattice(), - ) - actual = findCenter(structure_2) - expected = 1 - assert actual == expected - - -def test_makeEllipsoid_and_makeSphere(): - structure = Structure( - [ - Atom("Ni", [0.0, 0.0, 0.0]), - Atom("C", [0.5, 0.5, 0.5]), - Atom("O", [1.0, 0.0, 0.0]), - Atom("H", [1.1, 0.0, 0.0]), - ], - lattice=Lattice(1, 1, 1, 90, 90, 90), - ) - # C1: set primary, secondary, and polar radius the same in makeEllipsoid, expect to be the same as makeSphere - ellipsoid_1 = makeEllipsoid(structure, 1, 1, 1) - sphere = makeSphere(structure, 1) - assert [atom.element for atom in ellipsoid_1] == [atom.element for atom in sphere] - assert [tuple(atom.xyz) for atom in ellipsoid_1] == [tuple(atom.xyz) for atom in sphere] - # C2: set the radius to be 0.5, expect to exclude the atom that is too far from the center of ellipsoid. - ellipsoid_2 = makeEllipsoid(structure, 0.5) - actual = [(atom.element, tuple(atom.xyz)) for atom in ellipsoid_2] - expected = [("C", (0.5, 0.5, 0.5))] - assert actual == expected - - -@pytest.mark.parametrize( - "atom_params, expected", - [ - pytest.param([Atom("Ni", [0.8, 1.2, 0.9])], 0), - pytest.param([Atom("Ni", [0.8, 1.2, 0.9]), Atom("C", [0.1, 0.2, 0.3])], 1), - ], -) -def test_find_center(atom_params, expected): - structure = Structure(atom_params, lattice=Lattice()) - actual = find_center(structure) - assert actual == expected - - -@pytest.mark.parametrize( - ("ellipsoid_args", "sphere_radius"), - [ - ((1, 1, 1), 1), - ((0.8, 0.8, 0.8), 0.8), - ((0.5, 0.5, 0.5), 0.5), - ], -) -def test_make_ellipsoid_equiv_to_make_sphere(ellipsoid_args, sphere_radius): - structure = Structure( - [ - Atom("Ni", [0.0, 0.0, 0.0]), - Atom("C", [0.5, 0.5, 0.5]), - Atom("O", [1.0, 0.0, 0.0]), - Atom("H", [1.1, 0.0, 0.0]), - ], - lattice=Lattice(1, 1, 1, 90, 90, 90), - ) - - actual = [(atom.element, tuple(atom.xyz)) for atom in make_ellipsoid(structure, *ellipsoid_args)] - expected = [(atom.element, tuple(atom.xyz)) for atom in make_sphere(structure, sphere_radius)] - - assert actual == expected - - -@pytest.mark.parametrize( - ("ellipsoid_args", "expected"), - [ - ((0.5,), [("C", (0.5, 0.5, 0.5))]), - ((0.4,), [("C", (0.5, 0.5, 0.5))]), - ], -) -def test_make_ellipsoid(ellipsoid_args, expected): - structure = Structure( - [ - Atom("Ni", [0.0, 0.0, 0.0]), - Atom("C", [0.5, 0.5, 0.5]), - Atom("O", [1.0, 0.0, 0.0]), - Atom("H", [1.1, 0.0, 0.0]), - ], - lattice=Lattice(1, 1, 1, 90, 90, 90), - ) - actual = [(atom.element, tuple(atom.xyz)) for atom in make_ellipsoid(structure, *ellipsoid_args)] - assert actual == expected diff --git a/tests/test_lattice.py b/tests/test_lattice.py deleted file mode 100644 index c1cc80c8..00000000 --- a/tests/test_lattice.py +++ /dev/null @@ -1,327 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Unit tests for Lattice class.""" - -import unittest - -import numpy -import numpy.linalg as numalg - -from diffpy.structure import Lattice, LatticeError - -# ---------------------------------------------------------------------------- - - -class TestLattice(unittest.TestCase): - """Test methods of Lattice class.""" - - def setUp(self): - self.lattice = Lattice() - self.places = 12 - return - - def test___init__(self): - """Check Lattice.__init__ processing of arguments.""" - self.assertRaises(ValueError, Lattice, self.lattice, c=4) - self.assertRaises( - ValueError, - Lattice, - base=self.lattice.base, - baserot=self.lattice.baserot, - ) - self.assertRaises(ValueError, Lattice, 1, 2, 3) - self.assertRaises(ValueError, Lattice, 1, 2, 3, 80, 90) - L0 = self.lattice - L0.set_new_latt_base_vec(L0.cartesian([[1, 1, 0], [0, 1, 1], [1, 0, 1]])) - L1 = Lattice(L0) - self.assertTrue(numpy.array_equal(L0.base, L1.base)) - L2 = Lattice(base=L0.base) - self.assertTrue(numpy.array_equal(L0.base, L2.base)) - self.assertTrue(numpy.array_equal(L0.isotropicunit, L2.isotropicunit)) - L3 = Lattice(*L0.cell_parms(), baserot=L0.baserot) - self.assertTrue(numpy.allclose(L0.base, L3.base)) - self.assertTrue(numpy.allclose(L0.isotropicunit, L3.isotropicunit)) - return - - def test_setLatPar(self): - """Check calculation of standard unit cell vectors.""" - from math import cos, radians, sqrt - - from numpy import dot - - def norm(x): - return sqrt(sum([xi**2 for xi in x])) - - def cosd(x): - return cos(radians(x)) - - self.lattice.setLatPar(1.0, 2.0, 3.0, 80, 100, 120) - base = self.lattice.base - self.assertAlmostEqual(1.0, norm(base[0]), self.places) - self.assertAlmostEqual(2.0, norm(base[1]), self.places) - self.assertAlmostEqual(3.0, norm(base[2]), self.places) - self.assertAlmostEqual(cosd(80.0), dot(base[1], base[2]) / (2 * 3), self.places) - self.assertAlmostEqual(cosd(100.0), dot(base[0], base[2]) / (1 * 3), self.places) - self.assertAlmostEqual(cosd(120.0), dot(base[0], base[1]) / (1 * 2), self.places) - return - - def test_set_lat_par(self): - """Check calculation of standard unit cell vectors.""" - from math import cos, radians, sqrt - - from numpy import dot - - def norm(x): - return sqrt(sum([xi**2 for xi in x])) - - def cosd(x): - return cos(radians(x)) - - self.lattice.set_latt_parms(1.0, 2.0, 3.0, 80, 100, 120) - base = self.lattice.base - self.assertAlmostEqual(1.0, norm(base[0]), self.places) - self.assertAlmostEqual(2.0, norm(base[1]), self.places) - self.assertAlmostEqual(3.0, norm(base[2]), self.places) - self.assertAlmostEqual(cosd(80.0), dot(base[1], base[2]) / (2 * 3), self.places) - self.assertAlmostEqual(cosd(100.0), dot(base[0], base[2]) / (1 * 3), self.places) - self.assertAlmostEqual(cosd(120.0), dot(base[0], base[1]) / (1 * 2), self.places) - return - - def test_latpar_properties(self): - """Check assignment to a, b, c, alpha, beta, gamma.""" - lat = self.lattice - lat.a = 2 - lat.b = 4 - lat.c = 6 - lat.alpha = 80 - lat.beta = 100 - lat.gamma = 120 - lat1 = Lattice(2, 4, 6, 80, 100, 120) - self.assertAlmostEqual(-0.5, lat.cg, self.places) - self.assertTrue(numpy.array_equal(lat1.base, lat.base)) - return - - def test_readonly_properties(self): - """Check that read-only properties are indeed such.""" - lat = self.lattice - lat.b = 2 - lat.c = 6 - self.assertEqual(1.0, lat.unitvolume) - self.assertRaises(AttributeError, setattr, lat, "unitvolume", 3.33) - self.assertEqual(12, lat.volume) - self.assertRaises(AttributeError, setattr, lat, "volume", 3.33) - self.assertEqual(0.0, lat.ca) - self.assertRaises(AttributeError, setattr, lat, "ca", 3.33) - self.assertEqual(0.0, lat.cb) - self.assertRaises(AttributeError, setattr, lat, "cb", 3.33) - self.assertEqual(0.0, lat.cg) - self.assertRaises(AttributeError, setattr, lat, "cg", 3.33) - self.assertEqual(1.0, lat.sa) - self.assertRaises(AttributeError, setattr, lat, "sa", 3.33) - self.assertEqual(1.0, lat.sb) - self.assertRaises(AttributeError, setattr, lat, "sb", 3.33) - self.assertEqual(1.0, lat.sg) - self.assertRaises(AttributeError, setattr, lat, "sg", 3.33) - self.assertEqual(1.0, lat.ar) - self.assertRaises(AttributeError, setattr, lat, "ar", 3.33) - self.assertEqual(0.5, lat.br) - self.assertRaises(AttributeError, setattr, lat, "br", 3.33) - self.assertAlmostEqual(1.0 / 6, lat.cr, self.places) - self.assertRaises(AttributeError, setattr, lat, "cr", 3.33) - self.assertEqual(90.0, lat.alphar) - self.assertRaises(AttributeError, setattr, lat, "alphar", 3.33) - self.assertEqual(90.0, lat.betar) - self.assertRaises(AttributeError, setattr, lat, "betar", 3.33) - self.assertEqual(90.0, lat.gammar) - self.assertRaises(AttributeError, setattr, lat, "gammar", 3.33) - self.assertEqual(0.0, lat.car) - self.assertRaises(AttributeError, setattr, lat, "car", 3.33) - self.assertEqual(0.0, lat.cbr) - self.assertRaises(AttributeError, setattr, lat, "cbr", 3.33) - self.assertEqual(0.0, lat.cgr) - self.assertRaises(AttributeError, setattr, lat, "cgr", 3.33) - self.assertEqual(1.0, lat.sar) - self.assertRaises(AttributeError, setattr, lat, "sar", 3.33) - self.assertEqual(1.0, lat.sbr) - self.assertRaises(AttributeError, setattr, lat, "sbr", 3.33) - self.assertEqual(1.0, lat.sgr) - self.assertRaises(AttributeError, setattr, lat, "sgr", 3.33) - return - - def test_setLatBase(self): - """Check calculation of unit cell rotation.""" - base = numpy.array([[1.0, 1.0, 0.0], [0.0, 1.0, 1.0], [1.0, 0.0, 1.0]]) - self.lattice.setLatBase(base) - self.assertAlmostEqual(self.lattice.a, numpy.sqrt(2.0), self.places) - self.assertAlmostEqual(self.lattice.b, numpy.sqrt(2.0), self.places) - self.assertAlmostEqual(self.lattice.c, numpy.sqrt(2.0), self.places) - self.assertAlmostEqual(self.lattice.alpha, 60.0, self.places) - self.assertAlmostEqual(self.lattice.beta, 60.0, self.places) - self.assertAlmostEqual(self.lattice.gamma, 60.0, self.places) - detR0 = numalg.det(self.lattice.baserot) - self.assertAlmostEqual(detR0, 1.0, self.places) - # try if rotation matrix works - self.assertEqual(numpy.all(base == self.lattice.base), True) - self.lattice.set_latt_parms(alpha=44, beta=66, gamma=88) - self.assertNotEqual(numpy.all(base == self.lattice.base), True) - self.lattice.set_latt_parms(alpha=60, beta=60, gamma=60) - self.assertTrue(numpy.allclose(base[0], self.lattice.base[0])) - self.assertTrue(numpy.allclose(base[1], self.lattice.base[1])) - self.assertTrue(numpy.allclose(base[2], self.lattice.base[2])) - # try base checking - self.assertRaises( - LatticeError, - self.lattice.setLatBase, - [[1, 0, 0], [1, 0, 0], [0, 0, 1]], - ) - self.assertRaises( - LatticeError, - self.lattice.setLatBase, - [[1, 0, 0], [0, 0, 1], [0, 1, 0]], - ) - return - - def test_set_lat_base(self): - """Check calculation of unit cell rotation.""" - base = numpy.array([[1.0, 1.0, 0.0], [0.0, 1.0, 1.0], [1.0, 0.0, 1.0]]) - self.lattice.set_new_latt_base_vec(base) - self.assertAlmostEqual(self.lattice.a, numpy.sqrt(2.0), self.places) - self.assertAlmostEqual(self.lattice.b, numpy.sqrt(2.0), self.places) - self.assertAlmostEqual(self.lattice.c, numpy.sqrt(2.0), self.places) - self.assertAlmostEqual(self.lattice.alpha, 60.0, self.places) - self.assertAlmostEqual(self.lattice.beta, 60.0, self.places) - self.assertAlmostEqual(self.lattice.gamma, 60.0, self.places) - detR0 = numalg.det(self.lattice.baserot) - self.assertAlmostEqual(detR0, 1.0, self.places) - # try if rotation matrix works - self.assertEqual(numpy.all(base == self.lattice.base), True) - self.lattice.set_latt_parms(alpha=44, beta=66, gamma=88) - self.assertNotEqual(numpy.all(base == self.lattice.base), True) - self.lattice.set_latt_parms(alpha=60, beta=60, gamma=60) - self.assertTrue(numpy.allclose(base[0], self.lattice.base[0])) - self.assertTrue(numpy.allclose(base[1], self.lattice.base[1])) - self.assertTrue(numpy.allclose(base[2], self.lattice.base[2])) - # try base checking - self.assertRaises( - LatticeError, - self.lattice.set_new_latt_base_vec, - [[1, 0, 0], [1, 0, 0], [0, 0, 1]], - ) - self.assertRaises( - LatticeError, - self.lattice.set_new_latt_base_vec, - [[1, 0, 0], [0, 0, 1], [0, 1, 0]], - ) - return - - def test_reciprocal(self): - """Check calculation of reciprocal lattice.""" - r1 = self.lattice.reciprocal() - self.assertEqual((1, 1, 1, 90, 90, 90), r1.cell_parms()) - L2 = Lattice(2, 4, 8, 90, 90, 90) - r2 = L2.reciprocal() - self.assertEqual((0.5, 0.25, 0.125, 90, 90, 90), r2.cell_parms()) - rr2 = r2.reciprocal() - self.assertTrue(numpy.array_equal(L2.base, rr2.base)) - return - - def test_dot(self): - """Check dot product of lattice vectors.""" - L = self.lattice - L.set_latt_parms(gamma=120) - self.assertAlmostEqual(-0.5, L.dot([1, 0, 0], [0, 1, 0]), self.places) - va5 = numpy.tile([1.0, 0.0, 0.0], (5, 1)) - vb5 = numpy.tile([0.0, 1.0, 0.0], (5, 1)) - self.assertTrue(numpy.array_equal(5 * [-0.5], L.dot(va5, vb5))) - self.assertTrue(numpy.array_equal(5 * [-0.5], L.dot(va5[0], vb5))) - self.assertTrue(numpy.array_equal(5 * [-0.5], L.dot(va5, vb5[0]))) - return - - def test_norm(self): - """Check norm of a lattice vector.""" - self.assertEqual(1, self.lattice.norm([1, 0, 0])) - u = numpy.array([[3, 4, 0], [1, 1, 1]]) - self.assertTrue(numpy.allclose([5, 3**0.5], self.lattice.norm(u))) - self.lattice.set_latt_parms(gamma=120) - self.assertAlmostEqual(1, self.lattice.norm([1, 1, 0]), self.places) - return - - def test_rnorm(self): - """Check norm of a reciprocal vector.""" - L = self.lattice - L.set_latt_parms(1, 1.5, 2.3, 80, 95, 115) - r = L.reciprocal() - hkl = [0.5, 0.3, 0.2] - self.assertAlmostEqual(r.norm(hkl), L.rnorm(hkl), self.places) - hkl5 = numpy.tile(hkl, (5, 1)) - self.assertTrue(numpy.allclose(5 * [r.norm(hkl)], L.rnorm(hkl5))) - return - - def test_dist(self): - """Check dist function for distance between lattice points.""" - L = self.lattice - L.set_latt_parms(1, 1.5, 2.3, 80, 95, 115) - u = [0.1, 0.3, 0.7] - v = [0.3, 0.7, 0.7] - d0 = numalg.norm(L.cartesian(numpy.array(u) - v)) - self.assertAlmostEqual(d0, L.dist(u, v), self.places) - self.assertAlmostEqual(d0, L.dist(v, u), self.places) - u5 = numpy.tile(u, (5, 1)) - v5 = numpy.tile(v, (5, 1)) - self.assertTrue(numpy.allclose(5 * [d0], L.dist(u, v5))) - self.assertTrue(numpy.allclose(5 * [d0], L.dist(u5, v))) - self.assertTrue(numpy.allclose(5 * [d0], L.dist(v5, u5))) - return - - def test_angle(self): - """Check angle calculation between lattice vectors.""" - from math import acos, degrees - - L = self.lattice - L.set_latt_parms(1, 1.5, 2.3, 80, 95, 115) - u = [0.1, 0.3, 0.7] - v = [0.3, 0.7, 0.7] - uc = L.cartesian(u) - vc = L.cartesian(v) - a0 = degrees(acos(numpy.dot(uc, vc) / (numalg.norm(uc) * numalg.norm(vc)))) - self.assertAlmostEqual(a0, L.angle(u, v), self.places) - self.assertAlmostEqual(a0, L.angle(v, u), self.places) - u5 = numpy.tile(u, (5, 1)) - v5 = numpy.tile(v, (5, 1)) - self.assertTrue(numpy.allclose(5 * [a0], L.angle(u, v5))) - self.assertTrue(numpy.allclose(5 * [a0], L.angle(u5, v))) - self.assertTrue(numpy.allclose(5 * [a0], L.angle(v5, u5))) - return - - def test_repr(self): - """Check string representation of this lattice.""" - r = repr(self.lattice) - self.assertEqual(r, "Lattice()") - self.lattice.set_latt_parms(1, 2, 3, 10, 20, 30) - r = repr(self.lattice) - r0 = "Lattice(a=1, b=2, c=3, alpha=10, beta=20, gamma=30)" - self.assertEqual(r, r0) - base = [[1.0, 1.0, 0.0], [0.0, 2.0, 2.0], [3.0, 0.0, 3.0]] - self.lattice.set_new_latt_base_vec(base) - r = repr(self.lattice) - self.assertEqual(r, "Lattice(base=%r)" % self.lattice.base) - - -# End of class TestLattice - -# ---------------------------------------------------------------------------- - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_loadstructure.py b/tests/test_loadstructure.py deleted file mode 100644 index ae6979ba..00000000 --- a/tests/test_loadstructure.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python - -"""Unit tests for the loadStructure factory.""" - -import unittest - -import pytest - -from diffpy.structure import PDFFitStructure, Structure, load_structure, loadStructure -from diffpy.structure.structureerrors import StructureFormatError - - -############################################################################## -class TestLoadStructure(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def test_xcfg(self): - """Check loading of atomeye xcfg format.""" - f = self.datafile("BubbleRaftShort.xcfg") - stru = load_structure(f) - self.assertTrue(type(stru) is Structure) - self.assertRaises(StructureFormatError, load_structure, f, "xyz") - return - - def test_discus(self): - """Check loading of discus file format.""" - f = self.datafile("Ni-discus.stru") - stru = load_structure(f) - self.assertTrue(type(stru) is PDFFitStructure) - return - - def test_cif(self): - """Check loading of CIF file format.""" - f = self.datafile("PbTe.cif") - stru = load_structure(f) - self.assertTrue(isinstance(stru, Structure)) - self.assertFalse(isinstance(stru, PDFFitStructure)) - return - - def test_badfile(self): - """Check loading of CIF file format.""" - f = self.datafile("Ni-bad.stru") - self.assertRaises(StructureFormatError, loadStructure, f) - return - - def test_load_bad_file(self): - """Check loading of CIF file format.""" - f = self.datafile("Ni-bad.stru") - self.assertRaises(StructureFormatError, load_structure, f) - return - - def test_goodkwarg(self): - """Check loading of CIF file and passing of parser keyword - argument.""" - f = self.datafile("graphite.cif") - stru = load_structure(f, eps=1e-10) - self.assertEqual(8, len(stru)) - return - - def test_badkwarg(self): - """Check loading of xyz file format with invalid keyword - argument.""" - f = self.datafile("bucky.xyz") - self.assertRaises(TypeError, load_structure, f, eps=1e-10) - return - - -# End of class TestLoadStructure - - -# ---------------------------------------------------------------------------- -@pytest.mark.parametrize( - "filename, expected", - [ # C1: Load the cif file in Path object, expected to load the Structure instance. - ("PbTe.cif", (True, False)), - ], -) -def test_load_structure_cif_in_path(datafile, filename, expected): - from pathlib import Path - - f = datafile(filename) - f_path = Path(f) - stru = load_structure(f_path) - actual = ( - isinstance(stru, Structure), - isinstance(stru, PDFFitStructure), - ) - - assert actual == expected - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_p_cif.py b/tests/test_p_cif.py deleted file mode 100644 index 5784ecfd..00000000 --- a/tests/test_p_cif.py +++ /dev/null @@ -1,502 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2007 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Unit tests for diffpy.structure.parsers.p_cif module.""" - -import unittest - -import numpy -import pytest - -from diffpy.structure import Structure -from diffpy.structure.parsers import get_parser, getParser -from diffpy.structure.parsers.p_cif import P_cif, get_symop, getSymOp, leading_float -from diffpy.structure.structureerrors import StructureFormatError - -# ---------------------------------------------------------------------------- - - -class TestRoutines(unittest.TestCase): - - def setUp(self): - return - - def tearDown(self): - return - - def test_leading_float(self): - """Check leading_float()""" - self.assertEqual(0.37, leading_float("0.37(3)")) - self.assertEqual(0.37, leading_float("0.37ab\ncd")) - self.assertRaises(ValueError, leading_float, "q1") - return - - def test_getSymOp(self): - """Check getSymOp()""" - from diffpy.structure.spacegroups import Rot_X_mY_Z, SymOp, Tr_0_12_12 - - op = getSymOp("x,1/2-y,1/2+z") - op_std = SymOp(Rot_X_mY_Z, Tr_0_12_12) - self.assertEqual(str(op_std), str(op)) - from diffpy.structure.spacegroups import Rot_mX_mXY_Z, Tr_0_0_12 - - op1 = getSymOp("-x,-x+y,1/2+z") - op1_std = SymOp(Rot_mX_mXY_Z, Tr_0_0_12) - self.assertEqual(str(op1_std), str(op1)) - return - - def test_get_symop(self): - """Check get_symop()""" - from diffpy.structure.spacegroups import Rot_X_mY_Z, SymOp, Tr_0_12_12 - - op = get_symop("x,1/2-y,1/2+z") - op_std = SymOp(Rot_X_mY_Z, Tr_0_12_12) - self.assertEqual(str(op_std), str(op)) - from diffpy.structure.spacegroups import Rot_mX_mXY_Z, Tr_0_0_12 - - op1 = get_symop("-x,-x+y,1/2+z") - op1_std = SymOp(Rot_mX_mXY_Z, Tr_0_0_12) - self.assertEqual(str(op1_std), str(op1)) - return - - -# End of class TestRoutines - -# ---------------------------------------------------------------------------- - - -class TestP_cif(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - self.pbteciffile = datafile("PbTe.cif") - self.badciffile = datafile("LiCl-bad.cif") - self.graphiteciffile = datafile("graphite.cif") - self.cdsebulkpdffitfile = datafile("CdSe_bulk.stru") - self.teiciffile = datafile("TeI.cif") - self.refciffile = datafile("Ni_ref.cif") - self.places = 6 - - def setUp(self): - self.ptest = P_cif() - self.pfile = P_cif() - return - - def tearDown(self): - return - - def test_parse(self): - """Check P_cif.parse()""" - with open(self.pbteciffile) as fp1: - sgood = fp1.read() - with open(self.badciffile) as fp2: - sbad = fp2.read() - pfile, ptest = self.pfile, self.ptest - stru_check = pfile.parseFile(self.pbteciffile) - stru = ptest.parse(sgood) - self.assertEqual(str(stru_check), str(stru)) - self.assertEqual(str(stru_check.lattice), str(stru.lattice)) - self.assertEqual(pfile.spacegroup.short_name, ptest.spacegroup.short_name) - ptestb = P_cif() - self.assertRaises(StructureFormatError, ptestb.parse, sbad) - return - - def test_parseLines(self): - """Check P_cif.parseLines()""" - with open(self.pbteciffile) as fp1: - goodlines = fp1.readlines() - with open(self.badciffile) as fp2: - badlines = fp2.readlines() - pfile, ptest = self.pfile, self.ptest - stru_check = pfile.parseFile(self.pbteciffile) - stru = ptest.parseLines(goodlines) - self.assertEqual(str(stru_check), str(stru)) - self.assertEqual(str(stru_check.lattice), str(stru.lattice)) - self.assertEqual(pfile.spacegroup.short_name, ptest.spacegroup.short_name) - ptest2 = P_cif() - self.assertRaises(StructureFormatError, ptest2.parseLines, badlines) - return - - def test_parse_lines(self): - """Check P_cif.parseLines()""" - with open(self.pbteciffile) as fp1: - goodlines = fp1.readlines() - with open(self.badciffile) as fp2: - badlines = fp2.readlines() - pfile, ptest = self.pfile, self.ptest - stru_check = pfile.parseFile(self.pbteciffile) - stru = ptest.parse_lines(goodlines) - self.assertEqual(str(stru_check), str(stru)) - self.assertEqual(str(stru_check.lattice), str(stru.lattice)) - self.assertEqual(pfile.spacegroup.short_name, ptest.spacegroup.short_name) - ptest2 = P_cif() - self.assertRaises(StructureFormatError, ptest2.parse_lines, badlines) - return - - def test_parseFile(self): - """Check P_cif.parseFile()""" - # pbteciffile - stru = self.pfile.parseFile(self.pbteciffile) - self.assertEqual(8, len(stru)) - self.assertEqual(6.461, stru.lattice.a) - self.assertEqual(6.461, stru.lattice.b) - self.assertEqual(6.461, stru.lattice.c) - self.assertEqual(90.0, stru.lattice.alpha) - self.assertEqual(90.0, stru.lattice.beta) - self.assertEqual(90.0, stru.lattice.gamma) - self.assertEqual("Fm-3m", self.pfile.spacegroup.short_name) - a0 = stru[0] - self.assertEqual(0.5, a0.x) - self.assertEqual(0.5, a0.y) - self.assertEqual(0.5, a0.z) - self.assertEqual(False, a0.anisotropy) - self.assertEqual(1.0, a0.occupancy) - self.assertEqual(0.0225566, a0.Uisoequiv) - # badciffile - pfile2 = P_cif() - self.assertRaises(StructureFormatError, pfile2.parseFile, self.badciffile) - # graphite - pgraphite = P_cif() - graphite = pgraphite.parseFile(self.graphiteciffile) - self.assertEqual(4, len(graphite)) - c1 = graphite[0] - self.assertEqual(str, type(c1.element)) - self.assertEqual("C", c1.element) - self.assertEqual(str, type(c1.label)) - self.assertEqual("C1", c1.label) - # filename with unicode encoding - hasbs = "\\" in self.graphiteciffile - uciffile = self.graphiteciffile.replace("\\", "/") - if hasbs: # pragma: no cover - uciffile = uciffile.replace("/", "\\") - ugraphite = P_cif().parseFile(uciffile) - self.assertEqual(4, len(ugraphite)) - # File with full space group name - ptei = P_cif().parseFile(self.teiciffile) - self.assertEqual(16, len(ptei)) - return - - def test_parse_file(self): - """Check P_cif.parse_file()""" - # pbteciffile - stru = self.pfile.parse_file(self.pbteciffile) - self.assertEqual(8, len(stru)) - self.assertEqual(6.461, stru.lattice.a) - self.assertEqual(6.461, stru.lattice.b) - self.assertEqual(6.461, stru.lattice.c) - self.assertEqual(90.0, stru.lattice.alpha) - self.assertEqual(90.0, stru.lattice.beta) - self.assertEqual(90.0, stru.lattice.gamma) - self.assertEqual("Fm-3m", self.pfile.spacegroup.short_name) - a0 = stru[0] - self.assertEqual(0.5, a0.x) - self.assertEqual(0.5, a0.y) - self.assertEqual(0.5, a0.z) - self.assertEqual(False, a0.anisotropy) - self.assertEqual(1.0, a0.occupancy) - self.assertEqual(0.0225566, a0.Uisoequiv) - # badciffile - pfile2 = P_cif() - self.assertRaises(StructureFormatError, pfile2.parse_file, self.badciffile) - # graphite - pgraphite = P_cif() - graphite = pgraphite.parse_file(self.graphiteciffile) - self.assertEqual(4, len(graphite)) - c1 = graphite[0] - self.assertEqual(str, type(c1.element)) - self.assertEqual("C", c1.element) - self.assertEqual(str, type(c1.label)) - self.assertEqual("C1", c1.label) - # filename with unicode encoding - hasbs = "\\" in self.graphiteciffile - uciffile = self.graphiteciffile.replace("\\", "/") - if hasbs: # pragma: no cover - uciffile = uciffile.replace("/", "\\") - ugraphite = P_cif().parse_file(uciffile) - self.assertEqual(4, len(ugraphite)) - # File with full space group name - ptei = P_cif().parse_file(self.teiciffile) - self.assertEqual(16, len(ptei)) - return - - # def test__parseCifBlock(self): - # """check P_cif._parseCifBlock() - # """ - # return - # - # def test__parse_lattice(self): - # """check P_cif._parse_lattice() - # """ - # return - # - # def test__parse_atom_site_label(self): - # """check P_cif._parse_atom_site_label() - # """ - # return - # - # def test__parse_atom_site_aniso_label(self): - # """check P_cif._parse_atom_site_aniso_label() - # """ - # return - # - # def test__parse_space_group_symop_operation_xyz(self): - # """check P_cif._parse_space_group_symop_operation_xyz() - # """ - # return - # - # def test__expandAsymmetricUnit(self): - # """check P_cif._expandAsymmetricUnit() - # """ - # return - # - # def test_toLines(self): - # """check P_cif.toLines() - # """ - # return - # - # def test_tostring(self): - # """check P_cif.tostring() - # """ - # return - - def test_write_and_read(self): - """High-level check of P_cif.tostring()""" - # high-level check - stru_check = Structure() - stru_check.read(self.cdsebulkpdffitfile) - s_s = stru_check.writeStr("cif") - stru = Structure() - stru.readStr(s_s, "cif") - self.assertAlmostEqual(4.2352, stru.lattice.a, self.places) - self.assertAlmostEqual(4.2352, stru.lattice.b, self.places) - self.assertAlmostEqual(6.90603, stru.lattice.c, self.places) - self.assertEqual(4, len(stru)) - a0 = stru[0] - self.assertEqual("Cd", a0.element) - self.assertTrue(numpy.allclose([0.3334, 0.6667, 0.0], a0.xyz)) - self.assertTrue(a0.anisotropy) - self.assertAlmostEqual(0.01303, a0.U[0, 0]) - self.assertAlmostEqual(0.01303, a0.U[1, 1]) - self.assertAlmostEqual(0.01402, a0.U[2, 2]) - a3 = stru[3] - self.assertEqual("Se", a3.element) - self.assertTrue(numpy.allclose([0.6666, 0.333300, 0.87667], a3.xyz)) - self.assertAlmostEqual(0.015673, a3.U[0, 0]) - self.assertAlmostEqual(0.015673, a3.U[1, 1]) - self.assertAlmostEqual(0.046164, a3.U[2, 2]) - return - - def test_write_structure_and_read_structure(self): - """High-level check of P_cif.tostring()""" - # high-level check - stru_check = Structure() - stru_check.read(self.cdsebulkpdffitfile) - s_s = stru_check.write_structure("cif") - stru = Structure() - stru.read_structure(s_s, "cif") - self.assertAlmostEqual(4.2352, stru.lattice.a, self.places) - self.assertAlmostEqual(4.2352, stru.lattice.b, self.places) - self.assertAlmostEqual(6.90603, stru.lattice.c, self.places) - self.assertEqual(4, len(stru)) - a0 = stru[0] - self.assertEqual("Cd", a0.element) - self.assertTrue(numpy.allclose([0.3334, 0.6667, 0.0], a0.xyz)) - self.assertTrue(a0.anisotropy) - self.assertAlmostEqual(0.01303, a0.U[0, 0]) - self.assertAlmostEqual(0.01303, a0.U[1, 1]) - self.assertAlmostEqual(0.01402, a0.U[2, 2]) - a3 = stru[3] - self.assertEqual("Se", a3.element) - self.assertTrue(numpy.allclose([0.6666, 0.333300, 0.87667], a3.xyz)) - self.assertAlmostEqual(0.015673, a3.U[0, 0]) - self.assertAlmostEqual(0.015673, a3.U[1, 1]) - self.assertAlmostEqual(0.046164, a3.U[2, 2]) - return - - def test_eps(self): - """Test the P_cif.eps coordinates resolution.""" - pcif = P_cif() - pcif.eps = 1e-8 - grph = pcif.parse_file(self.graphiteciffile) - self.assertEqual(8, len(grph)) - self.assertTrue(all(a.label.startswith("C1") for a in grph[:2])) - self.assertTrue(all(a.label.startswith("C2") for a in grph[2:])) - pcif2 = P_cif() - pcif2.eps = 1e-3 - grph2 = pcif2.parse_file(self.graphiteciffile) - self.assertEqual(4, len(grph2)) - return - - def test_unknown_occupancy(self): - "test CIF file with unknown occupancy data" - stru = self.ptest.parse_file(self.datafile("TeI-unkocc.cif")) - self.assertTrue(numpy.array_equal(16 * [1], stru.occupancy)) - return - - def test_unknown_spacegroup_number(self): - "test CIF file with unknown space group symbol" - from diffpy.structure.spacegroups import _hash_symop_list, get_space_group - - with open(self.pbteciffile) as fp: - lines = fp.readlines() - self.assertTrue(lines[16].startswith("_symmetry_space_group")) - self.assertTrue(lines[17].startswith("_symmetry_space_group")) - lines[16:18] = [ - "_space_group_IT_number ?\n", - "_symmetry_space_group_name_H-M ?\n", - "_symmetry_space_group_name_Hall ?\n", - ] - ciftxt = "".join(lines) - stru = self.ptest.parse(ciftxt) - self.assertEqual(8, len(stru)) - h225 = _hash_symop_list(get_space_group(225).iter_symops()) - sgcif = self.ptest.spacegroup - self.assertEqual(h225, _hash_symop_list(sgcif.iter_symops())) - return - - def test_nosites_cif(self): - """Test reading of CIF file with no valid sites.""" - ptest = self.ptest - stru = ptest.parse_file(self.datafile("nosites.cif")) - self.assertEqual(0, len(stru)) - self.assertEqual(10.413, stru.lattice.a) - self.assertEqual(10.413, stru.lattice.b) - self.assertEqual(10.413, stru.lattice.c) - return - - def test_badspacegroup_cif(self): - """Test reading of CIF file with unrecognized space group.""" - ptest = self.ptest - filename = self.datafile("badspacegroup.cif") - self.assertRaises(StructureFormatError, ptest.parse_file, filename) - return - - def test_custom_spacegroup_cif(self): - """Test parsing of nonstandard symops-defined space group.""" - pfile = self.pfile - filename = self.datafile("customsg.cif") - pfile.parse_file(filename) - sg = pfile.spacegroup - self.assertEqual("CIF data", sg.short_name) - self.assertEqual(6, len(sg.symop_list)) - return - - def test_spacegroup_isotropy(self): - "verify site isotropy due to site symmetry." - # remove the _atom_site_thermal_displace_type field - with open(self.pbteciffile) as fp: - lines = [line.replace(" Uiso ", " ") for line in fp if "_atom_site_thermal_displace_type" not in line] - ciftxt = "".join(lines) - ptest = self.ptest - stru = ptest.parse(ciftxt) - self.assertFalse(any(stru.anisotropy)) - self.assertTrue(all(not a.anisotropy for a in ptest.asymmetric_unit)) - return - - def test_spacegroup_anisotropy(self): - "verify site anisotropy due to site symmetry." - stru = self.ptest.parse_file(self.graphiteciffile) - self.assertTrue(all(stru.anisotropy)) - return - - def test_spacegroup_ref(self): - "verify space group reference" - pfile = self.pfile - pfile.parse_file(self.refciffile) - sg = pfile.spacegroup - self.assertEqual("Fm-3m", sg.short_name) - - return - - def test_adp_type_ani(self): - "verify adp type override to anisotropic" - with open(self.pbteciffile) as fp: - ciftxt = fp.read() - ciftxt = ciftxt.replace(" Uiso ", " Uani ") - stru = self.ptest.parse(ciftxt) - self.assertTrue(all(stru.anisotropy)) - return - - def test_adp_type_iso(self): - "verify adp type override to isotropic" - with open(self.graphiteciffile) as fp: - lines = fp.readlines() - lines.insert(-2, "_atom_site_adp_type\n") - lines[-2] = lines[-2].rstrip() + " Uiso\n" - lines[-1] = lines[-1].rstrip() + " Uiso\n" - ciftxt = "".join(lines) - stru = self.ptest.parse(ciftxt) - self.assertFalse(any(a.anisotropy for a in stru)) - return - - def test_adp_aniso_label(self): - "verify ADP type setting from _atom_site_aniso_label loop" - with open(self.teiciffile) as fp: - lines = [line.replace(" Uani ", " ") for line in fp if "_atom_site_adp_type" not in line] - ciftxt = "".join(lines) - stru = self.ptest.parse(ciftxt) - self.assertTrue(all(stru.anisotropy)) - return - - def test_unknown_aniso(self): - "test CIF file with unknown values in the aniso block." - with open(self.teiciffile) as fp: - lines = fp.readlines() - lines[-4:] = [" ? ? ? ? ? ? ?\n"] - ciftxt = "".join(lines) - stru = self.ptest.parse(ciftxt) - self.assertEqual(16, len(stru)) - self.assertTrue(all(stru.anisotropy)) - return - - def test_curly_brace(self): - "verify loading of a CIF file with unquoted curly brace" - ptest = self.ptest - stru = ptest.parse_file(self.datafile("curlybrackets.cif")) - self.assertEqual(20, len(stru)) - return - - def test_getParser(self): - """Test passing of eps keyword argument by getParser - function.""" - pcif = getParser("cif", eps=1e-6) - grph = pcif.parse_file(self.graphiteciffile) - self.assertEqual(8, len(grph)) - self.assertTrue(all(a.label.startswith("C1") for a in grph[:2])) - self.assertTrue(all(a.label.startswith("C2") for a in grph[2:])) - pcif2 = getParser("cif") - grph2 = pcif2.parse_file(self.graphiteciffile) - self.assertEqual(4, len(grph2)) - return - - def test_get_parser(self): - """Test passing of eps keyword argument by get_parser - function.""" - pcif = get_parser("cif", eps=1e-6) - grph = pcif.parse_file(self.graphiteciffile) - self.assertEqual(8, len(grph)) - self.assertTrue(all(a.label.startswith("C1") for a in grph[:2])) - self.assertTrue(all(a.label.startswith("C2") for a in grph[2:])) - pcif2 = get_parser("cif") - grph2 = pcif2.parse_file(self.graphiteciffile) - self.assertEqual(4, len(grph2)) - return - - -# End of class TestP_cif - -# ---------------------------------------------------------------------------- - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_p_discus.py b/tests/test_p_discus.py deleted file mode 100644 index 852acdfa..00000000 --- a/tests/test_p_discus.py +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Unit tests for diffpy.structure.parsers.p_discus module.""" - -import re -import unittest - -import pytest - -from diffpy.structure import Structure -from diffpy.structure.parsers import StructureFormatError - -# ---------------------------------------------------------------------------- - - -class TestP_discus(unittest.TestCase): - """Test Parser for PDFFit file format.""" - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.stru = Structure() - self.format = "discus" - self.places = 8 - - def test_read_discus_Ni(self): - """Check reading of Ni structure in discus format.""" - stru = self.stru - stru.read(self.datafile("Ni-discus.stru"), self.format) - f_title = "structure Ni FCC" - self.assertEqual(f_title, stru.title) - self.assertEqual("Fm-3m", stru.pdffit["spcgr"]) - # cell record - abcABG = (3.52, 3.52, 3.52, 90.0, 90.0, 90.0) - self.assertEqual(abcABG, stru.lattice.cell_parms()) - # ncell - self.assertEqual([1, 1, 1, 4], stru.pdffit["ncell"]) - self.assertEqual(4, len(stru)) - # first atom - a0 = stru[0] - self.assertEqual((0.0, 0.0, 0.0), tuple(a0.xyz)) - self.assertTrue(not a0.anisotropy) - Biso0 = 0.1 - self.assertAlmostEqual(Biso0, a0.Bisoequiv, self.places) - return - - def test_except_other_formats(self): - """Check exceptions when reading files in other formats.""" - badfiles = [ - "LiCl-bad.cif", - "PbTe.cif", - "arginine.pdb", - "ZnSb_RT_Q28X_VM_20_fxiso.rstr", - "Ni-bad.stru", - "Ni.stru", - "BubbleRaftShort.xcfg", - "bucky-bad1.xyz", - "bucky-bad2.xyz", - "bucky-plain-bad.xyz", - "bucky-plain.xyz", - "bucky-raw.xyz", - "bucky.xyz", - "hexagon-raw-bad.xyz", - "hexagon-raw.xyz", - ] - for ft in badfiles: - ff = self.datafile(ft) - self.assertRaises(StructureFormatError, self.stru.read, ff, format=self.format) - return - - def test_ignored_lines(self): - """Check skipping of ignored lines in the header.""" - r1 = "ignored record 1\n" - r2 = "ignored record 2\n" - with open(self.datafile("Ni-discus.stru")) as fp: - ni_lines = fp.readlines() - ni_lines.insert(2, r1) - ni_lines.insert(4, r2) - s_s1 = "".join(ni_lines) - p = self.stru.read_structure(s_s1, self.format) - self.assertEqual([r1.rstrip(), r2.rstrip()], p.ignored_lines) - ni_lines.append(r1) - s_s2 = "".join(ni_lines) - self.assertRaises(StructureFormatError, self.stru.read_structure, s_s2, self.format) - return - - def test_spdiameter_parsing(self): - """Check parsing of spdiameter record from a file.""" - stru = self.stru - stru.read(self.datafile("Ni-discus.stru"), self.format) - self.assertEqual(0, stru.pdffit["spdiameter"]) - snoshape = stru.write_structure(format=self.format) - self.assertTrue(not re.search("(?m)^shape", snoshape)) - # produce a string with non-zero spdiameter - stru.pdffit["spdiameter"] = 13 - s13 = stru.write_structure(format=self.format) - self.assertTrue(re.search("(?m)^shape +sphere, ", s13)) - stru13 = Structure() - stru13.read_structure(s13) - self.assertEqual(13, stru13.pdffit["spdiameter"]) - with open(self.datafile("Ni.stru")) as fp: - ni_lines = fp.readlines() - ni_lines.insert(3, "shape invalid, 7\n") - sbad = "".join(ni_lines) - self.assertRaises(StructureFormatError, self.stru.read_structure, sbad, format=self.format) - return - - def test_stepcut_parsing(self): - """Check parsing of stepcut record from a file.""" - stru = self.stru - stru.read(self.datafile("Ni-discus.stru"), self.format) - self.assertEqual(0, stru.pdffit["stepcut"]) - snoshape = stru.write_structure(format=self.format) - self.assertTrue(not re.search("(?m)^shape", snoshape)) - # produce a string with non-zero stepcut - stru.pdffit["stepcut"] = 13 - s13 = stru.write_structure(format=self.format) - self.assertTrue(re.search("(?m)^shape +stepcut, ", s13)) - stru13 = Structure() - stru13.read_structure(s13) - self.assertEqual(13, stru13.pdffit["stepcut"]) - with open(self.datafile("Ni.stru")) as fp: - ni_lines = fp.readlines() - ni_lines.insert(3, "shape invalid, 7\n") - sbad = "".join(ni_lines) - self.assertRaises(StructureFormatError, self.stru.read_structure, sbad, format=self.format) - return - - -# End of class TestP_discus - -# ---------------------------------------------------------------------------- - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_p_pdffit.py b/tests/test_p_pdffit.py deleted file mode 100644 index 07bc6ca1..00000000 --- a/tests/test_p_pdffit.py +++ /dev/null @@ -1,254 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Unit tests for diffpy.structure.parsers.p_pdffit module.""" - -import re -import unittest - -import numpy -import pytest - -from diffpy.structure import Structure -from diffpy.structure.structureerrors import StructureFormatError - -# ---------------------------------------------------------------------------- - - -class TestP_pdffit(unittest.TestCase): - """Test Parser for PDFFit file format.""" - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.stru = Structure() - self.format = "pdffit" - self.places = 8 - - def test_read_pdffit_ZnSb(self): - """Check reading of ZnSb pdffit structure file.""" - stru = self.stru - stru.read(self.datafile("ZnSb_RT_Q28X_VM_20_fxiso.rstr"), self.format) - f_title = "Cell structure file of Zn4Sb3 #167 interstitial" - self.assertEqual(stru.title, f_title) - self.assertAlmostEqual(stru.pdffit["scale"], 0.826145) - self.assertAlmostEqual(stru.pdffit["delta2"], 4.687951) - self.assertAlmostEqual(stru.pdffit["delta1"], 0.01) - self.assertAlmostEqual(stru.pdffit["sratio"], 1.02) - self.assertAlmostEqual(stru.pdffit["rcut"], 0.03) - self.assertEqual(stru.pdffit["spcgr"], "R-3c") - s_lat = [ - stru.lattice.a, - stru.lattice.b, - stru.lattice.c, - stru.lattice.alpha, - stru.lattice.beta, - stru.lattice.gamma, - ] - f_lat = [12.309436, 12.309436, 12.392839, 90.0, 90.0, 120.0] - self.assertTrue(numpy.allclose(s_lat, f_lat)) - s_dcell = stru.pdffit["dcell"] - f_dcell = [0.000008, 0.000008, 0.000013, 0.0, 0.0, 0.0] - self.assertTrue(numpy.allclose(s_dcell, f_dcell)) - self.assertEqual(stru.pdffit["ncell"], [1, 1, 1, 66]) - s_els = [a.element for a in stru] - self.assertEqual(s_els, 36 * ["Zn"] + 30 * ["Sb"]) - a0 = stru[0] - s_xyz = a0.xyz - f_xyz = [0.09094387, 0.24639539, 0.40080261] - s_o = a0.occupancy - f_o = 0.9 - s_sigxyz = a0.sigxyz - f_sigxyz = [0.00000079, 0.00000076, 0.00000064] - s_sigo = a0.sigo - f_sigo = 0.0 - s_U = [a0.U[i][i] for i in range(3)] - f_U = 3 * [0.01] - self.assertTrue(numpy.allclose(s_xyz, f_xyz)) - self.assertTrue(numpy.allclose(s_sigxyz, f_sigxyz)) - self.assertTrue(numpy.allclose(s_U, f_U)) - self.assertAlmostEqual(s_o, f_o) - self.assertAlmostEqual(s_sigo, f_sigo) - - def test_read_pdffit_Ni(self): - """Check reading of Ni pdffit structure file.""" - stru = self.stru - stru.read(self.datafile("Ni.stru"), self.format) - f_title = "structure Ni FCC" - self.assertEqual(stru.title, f_title) - self.assertEqual(stru.pdffit["spcgr"], "Fm-3m") - s_lat = [ - stru.lattice.a, - stru.lattice.b, - stru.lattice.c, - stru.lattice.alpha, - stru.lattice.beta, - stru.lattice.gamma, - ] - f_lat = [3.52, 3.52, 3.52, 90.0, 90.0, 90.0] - for i in range(len(s_lat)): - self.assertAlmostEqual(s_lat[i], f_lat[i]) - self.assertEqual(stru.pdffit["ncell"], [1, 1, 1, 4]) - s_els = [a.element for a in stru] - self.assertEqual(s_els, 4 * ["Ni"]) - a0 = stru[0] - s_xyz = a0.xyz - f_xyz = [0.0, 0.0, 0.0] - s_o = a0.occupancy - f_o = 1.0 - s_U = [a0.U[i][i] for i in range(3)] - f_U = 3 * [0.00126651] - for i in range(3): - self.assertAlmostEqual(s_xyz[i], f_xyz[i]) - self.assertAlmostEqual(s_U[i], f_U[i]) - self.assertAlmostEqual(s_o, f_o) - - def test_read_pdffit_Ni_prim123(self): - """Check reading of Ni_prim supercell 1x2x3.""" - stru = self.stru - stru.read(self.datafile("Ni_prim123.stru"), self.format) - s_lat = [ - stru.lattice.a, - stru.lattice.b, - stru.lattice.c, - stru.lattice.alpha, - stru.lattice.beta, - stru.lattice.gamma, - ] - f_lat = [2.489016, 2 * 2.489016, 3 * 2.489016, 60.0, 60.0, 60.0] - for i in range(len(s_lat)): - self.assertAlmostEqual(s_lat[i], f_lat[i]) - s_els = [a.element for a in stru] - self.assertEqual(s_els, 6 * ["Ni"]) - a5 = stru[5] - s_xyz = a5.xyz - f_xyz = [0.0, 1.0 / 2.0, 2.0 / 3.0] - for i in range(3): - self.assertAlmostEqual(s_xyz[i], f_xyz[i]) - s_o = a5.occupancy - f_o = 1.0 - self.assertAlmostEqual(s_o, f_o) - s_U = [a5.U[ij[0], ij[1]] for ij in [(0, 0), (1, 1), (2, 2), (0, 1), (0, 2), (1, 2)]] - f_U = 3 * [0.00126651] + 3 * [-0.00042217] - for i in range(len(s_U)): - self.assertAlmostEqual(s_U[i], f_U[i]) - return - - def test_read_pdffit_bad(self): - """Check exceptions when reading invalid pdffit file.""" - stru = self.stru - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("Ni-bad.stru"), - self.format, - ) - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("bucky.xyz"), - self.format, - ) - return - - def test_writeStr_pdffit(self): - """Check writing of normal xyz file.""" - stru = self.stru - stru.read(self.datafile("Ni.stru"), self.format) - with open(self.datafile("Ni.stru")) as fp: - f_s = fp.read() - f_s = re.sub("[ \t]+", " ", f_s) - f_s = re.sub("[ \t]+\n", "\n", f_s) - s_s = stru.write_structure(self.format) - s_s = re.sub("[ \t]+", " ", s_s) - self.assertEqual(f_s, s_s) - return - - def test_huge_occupancy(self): - """Check structure with huge occupancy can be read.""" - self.stru.read(self.datafile("Ni.stru"), self.format) - self.stru[0].occupancy = 16e16 - s_s = self.stru.write_structure(self.format) - stru1 = Structure() - stru1.read_structure(s_s, self.format) - self.assertEqual(16e16, stru1[0].occupancy) - return - - def test_ignored_lines(self): - """Check skipping of ignored lines in the header.""" - r1 = "ignored record 1" - r2 = "ignored record 2" - with open(self.datafile("Ni.stru")) as fp: - ni_lines = fp.readlines() - ni_lines.insert(2, r1 + "\n") - ni_lines.insert(4, r2 + "\n") - s_s1 = "".join(ni_lines) - p = self.stru.read_structure(s_s1, self.format) - self.assertEqual([r1, r2], p.ignored_lines) - ni_lines.insert(-3, r1 + "\n") - s_s2 = "".join(ni_lines) - self.assertRaises(StructureFormatError, self.stru.read_structure, s_s2, self.format) - return - - def test_spdiameter_parsing(self): - """Check parsing of spdiameter record from a file.""" - stru = self.stru - stru.read(self.datafile("Ni.stru"), self.format) - self.assertEqual(0, stru.pdffit["spdiameter"]) - snoshape = stru.write_structure(format=self.format) - self.assertTrue(not re.search("(?m)^shape", snoshape)) - # produce a string with non-zero spdiameter - stru.pdffit["spdiameter"] = 13 - s13 = stru.write_structure(format=self.format) - self.assertTrue(re.search("(?m)^shape +sphere, ", s13)) - stru13 = Structure() - stru13.read_structure(s13) - self.assertEqual(13, stru13.pdffit["spdiameter"]) - with open(self.datafile("Ni.stru")) as fp: - ni_lines = fp.readlines() - ni_lines.insert(3, "shape invalid, 7\n") - sbad = "".join(ni_lines) - self.assertRaises(StructureFormatError, self.stru.read_structure, sbad, format=self.format) - return - - def test_stepcut_parsing(self): - """Check parsing of stepcut record from a file.""" - stru = self.stru - stru.read(self.datafile("Ni.stru"), self.format) - self.assertEqual(0, stru.pdffit["stepcut"]) - snoshape = stru.write_structure(format=self.format) - self.assertTrue(not re.search("(?m)^shape", snoshape)) - # produce a string with non-zero stepcut - stru.pdffit["stepcut"] = 13 - s13 = stru.write_structure(format=self.format) - self.assertTrue(re.search("(?m)^shape +stepcut, ", s13)) - stru13 = Structure() - stru13.read_structure(s13) - self.assertEqual(13, stru13.pdffit["stepcut"]) - with open(self.datafile("Ni.stru")) as fp: - ni_lines = fp.readlines() - ni_lines.insert(3, "shape invalid, 7\n") - sbad = "".join(ni_lines) - self.assertRaises(StructureFormatError, self.stru.read_structure, sbad, format=self.format) - return - - -# End of class TestP_pdffit - -# ---------------------------------------------------------------------------- - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_parsers.py b/tests/test_parsers.py deleted file mode 100644 index 548fbb78..00000000 --- a/tests/test_parsers.py +++ /dev/null @@ -1,373 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas, Chris Farrow -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Unit tests for structure.parsers module.""" - -import os -import re -import tempfile -import unittest - -import numpy -import pytest - -from diffpy.structure import Atom, Lattice, Structure -from diffpy.structure.structureerrors import StructureFormatError - -# ---------------------------------------------------------------------------- - - -class TestP_xyz(unittest.TestCase): - """Test Parser for xyz file format.""" - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.stru = Structure() - self.format = "xyz" - self.tmpnames = [] - return - - def tearDown(self): - for f in self.tmpnames: - os.remove(f) - return - - def mktmpfile(self): - with tempfile.NamedTemporaryFile(delete=False) as ftmp: - self.tmpnames.append(ftmp.name) - return self.tmpnames[-1] - - def test_read_xyz(self): - """Check reading of normal xyz file.""" - stru = self.stru - stru.read(self.datafile("bucky.xyz"), self.format) - s_els = [a.element for a in stru] - self.assertEqual(stru.title, "bucky-ball") - self.assertEqual(s_els, 60 * ["C"]) - return - - def test_read_xyz_bad(self): - """Check exceptions when reading invalid xyz file.""" - stru = self.stru - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("bucky-bad1.xyz"), - self.format, - ) - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("bucky-bad2.xyz"), - self.format, - ) - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("bucky-plain.xyz"), - self.format, - ) - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("hexagon-raw.xy"), - self.format, - ) - return - - def test_writeStr_xyz(self): - """Check string representation of normal xyz file.""" - stru = self.stru - stru.title = "test of writeStr" - stru.lattice = Lattice(1.0, 2.0, 3.0, 90.0, 90.0, 90.0) - stru[:] = [Atom("H", [1.0, 1.0, 1.0]), Atom("Cl", [3.0, 2.0, 1.0])] - s1 = stru.write_structure(self.format) - s1 = re.sub("[ \t]+", " ", s1) - s0 = "2\n%s\nH 1 2 3\nCl 3 4 3\n" % stru.title - self.assertEqual(s1, s0) - return - - def test_write_xyz(self): - """Check writing of normal xyz file.""" - stru = self.stru - stru.title = "test of writeStr" - stru.lattice = Lattice(1.0, 2.0, 3.0, 90.0, 90.0, 90.0) - stru[:] = [Atom("H", [1.0, 1.0, 1.0]), Atom("Cl", [3.0, 2.0, 1.0])] - filename = self.mktmpfile() - stru.write(filename, self.format) - with open(filename) as fp: - f_s = fp.read() - f_s = re.sub("[ \t]+", " ", f_s) - s_s = "2\n%s\nH 1 2 3\nCl 3 4 3\n" % stru.title - self.assertEqual(f_s, s_s) - return - - -# End of class TestP_xyz - -# ---------------------------------------------------------------------------- - - -class TestP_rawxyz(unittest.TestCase): - """Test Parser for rawxyz file format.""" - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.stru = Structure() - self.format = "rawxyz" - return - - def test_read_plainxyz(self): - """Check reading of a plain xyz file.""" - stru = self.stru - stru.read(self.datafile("bucky-plain.xyz"), self.format) - s_els = [a.element for a in stru] - self.assertEqual(stru.title, "bucky-plain") - self.assertEqual(s_els, 60 * ["C"]) - return - - def test_read_plainxyz_bad(self): - """Check exceptions when reading invalid plain xyz file.""" - stru = self.stru - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("bucky-plain-bad.xyz"), - self.format, - ) - return - - def test_read_rawxyz(self): - """Check reading of raw xyz file.""" - stru = self.stru - stru.read(self.datafile("bucky-raw.xyz"), self.format) - s_els = [a.element for a in stru] - self.assertEqual(stru.title, "bucky-raw") - self.assertEqual(s_els, 60 * [""]) - stru.read(self.datafile("hexagon-raw.xyz"), self.format) - zs = [a.xyz[-1] for a in stru] - self.assertEqual(zs, 6 * [0.0]) - return - - def test_read_rawxyz_bad(self): - """Check exceptions when reading unsupported xy file.""" - stru = self.stru - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("hexagon-raw-bad.xyz"), - self.format, - ) - self.assertRaises( - StructureFormatError, - stru.read, - self.datafile("hexagon-raw.xy"), - self.format, - ) - return - - def test_writeStr_rawxyz(self): - """Check writing of normal xyz file.""" - stru = self.stru - stru.title = "test of writeStr" - stru.lattice = Lattice(1.0, 2.0, 3.0, 90.0, 90.0, 90.0) - # plain version - stru[:] = [Atom("H", [1.0, 1.0, 1.0])] - s1 = stru.write_structure(self.format) - s1 = re.sub("[ \t]+", " ", s1) - s0 = "H 1 2 3\n" - # brutal raw version - stru[0].element = "" - s1 = stru.write_structure(self.format) - s0 = "1 2 3\n" - self.assertEqual(s1, s0) - return - - -# End of class TestP_rawxyz - -# ---------------------------------------------------------------------------- - - -class TestP_pdb(unittest.TestCase): - """Test Parser for PDB file format.""" - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.stru = Structure() - self.format = "pdb" - self.places = 3 - - def test_read_pdb_arginine(self): - """Check reading of arginine PDB file.""" - stru = self.stru - stru.read(self.datafile("arginine.pdb"), self.format) - f_els = [ - "N", - "C", - "C", - "O", - "C", - "C", - "C", - "N", - "C", - "N", - "N", - "H", - "H", - "H", - "H", - "H", - "H", - "H", - "H", - "H", - "H", - "H", - "H", - "H", - "H", - "O", - "H", - ] - s_els = [a.element for a in stru] - self.assertEqual(s_els, f_els) - s_lat = [ - stru.lattice.a, - stru.lattice.b, - stru.lattice.c, - stru.lattice.alpha, - stru.lattice.beta, - stru.lattice.gamma, - ] - f_lat = [1.0, 1.0, 1.0, 90.0, 90.0, 90.0] - self.assertEqual(s_lat, f_lat) - a0 = stru[0] - self.assertTrue(numpy.allclose(a0.xyz, [0.735, 2.219, 1.389])) - - def test_rwStr_pdb_CdSe(self): - """Check conversion to PDB file format.""" - stru = self.stru - stru.read(self.datafile("CdSe_bulk.stru"), "pdffit") - s = stru.write_structure(self.format) - # all lines should be 80 characters long - linelens = [len(line) for line in s.split("\n") if line != ""] - self.assertEqual(linelens, len(linelens) * [80]) - # now clean and re-read structure - stru = Structure() - stru.read_structure(s, self.format) - s_els = [a.element for a in stru] - f_els = ["Cd", "Cd", "Se", "Se"] - self.assertEqual(s_els, f_els) - s_lat = [ - stru.lattice.a, - stru.lattice.b, - stru.lattice.c, - stru.lattice.alpha, - stru.lattice.beta, - stru.lattice.gamma, - ] - f_lat = [4.235204, 4.235204, 6.906027, 90.0, 90.0, 120.0] - self.assertTrue(numpy.allclose(s_lat, f_lat, atol=5e-4)) - a0 = stru[0] - s_Uii = [a0.U[i, i] for i in range(3)] - f_Uii = [0.01303035, 0.01303035, 0.01401959] - self.assertTrue(numpy.allclose(s_Uii, f_Uii, atol=5e-4)) - s_sigUii = [a0.sigU[i, i] for i in range(3)] - f_sigUii = [0.00011127, 0.00011127, 0.00019575] - self.assertTrue(numpy.allclose(s_sigUii, f_sigUii, atol=5e-4)) - s_title = stru.title - f_title = "Cell structure file of CdSe #186" - self.assertEqual(s_title, f_title) - - -# End of class TestP_pdb - -# ---------------------------------------------------------------------------- - - -class TestP_xcfg(unittest.TestCase): - """Test Parser for XCFG file format.""" - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - def setUp(self): - self.stru = Structure() - self.format = "xcfg" - self.places = 6 - - def test_read_xcfg(self): - """Check reading of BubbleRaft XCFG file.""" - stru = self.stru - stru.read(self.datafile("BubbleRaftShort.xcfg"), self.format) - f_els = 500 * ["Ar"] - s_els = [a.element for a in stru] - self.assertEqual(s_els, f_els) - self.assertAlmostEqual(stru.distance(82, 357), 47.5627, 3) - s_lat = [ - stru.lattice.a, - stru.lattice.b, - stru.lattice.c, - stru.lattice.alpha, - stru.lattice.beta, - stru.lattice.gamma, - ] - f_lat = [127.5, 119.5, 3.0, 90.0, 90.0, 90.0] - self.assertTrue(numpy.allclose(s_lat, f_lat)) - return - - def test_rwStr_xcfg_CdSe(self): - """Check conversion to XCFG file format.""" - stru = self.stru - stru.read(self.datafile("CdSe_bulk.stru"), "pdffit") - s = stru.write_structure(self.format) - stru = Structure() - stru.read_structure(s, self.format) - s_els = [a.element for a in stru] - f_els = ["Cd", "Cd", "Se", "Se"] - self.assertEqual(s_els, f_els) - s_lat = [ - stru.lattice.a, - stru.lattice.b, - stru.lattice.c, - stru.lattice.alpha, - stru.lattice.beta, - stru.lattice.gamma, - ] - f_lat = [4.235204, 4.235204, 6.906027, 90.0, 90.0, 120.0] - self.assertTrue(numpy.allclose(s_lat, f_lat)) - a0 = stru[0] - s_Uii = [a0.U[i, i] for i in range(3)] - f_Uii = [0.01303035, 0.01303035, 0.01401959] - self.assertTrue(numpy.allclose(s_Uii, f_Uii)) - - -# End of class TestP_xcfg - -# ---------------------------------------------------------------------------- - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_spacegroups.py b/tests/test_spacegroups.py deleted file mode 100644 index de5fd69d..00000000 --- a/tests/test_spacegroups.py +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure Complex Modeling Initiative -# (c) 2019 Brookhaven Science Associates, -# Brookhaven National Laboratory. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## -"""Unit tests for diffpy.structure.spacegroups.""" - - -import unittest - -from diffpy.structure.spacegroups import ( - FindSpaceGroup, - GetSpaceGroup, - SpaceGroupList, - _hash_symop_list, - _hashSymOpList, - find_space_group, - get_space_group, -) - -# ---------------------------------------------------------------------------- - - -class TestRoutines(unittest.TestCase): - - def setUp(self): - return - - def test_old_alt_name(self): - "check GetSpaceGroup lookup from deprecated alt_name values" - # alt_name values which do not map to short_name or pdb_name - altnames_sgnos = ( - ("P M 3", 200), - ("P N 3", 201), - ("F M 3", 202), - ("F D 3", 203), - ("I M 3", 204), - ("P A 3", 205), - ("I A 3", 206), - ("P M 3 M", 221), - ("P N 3 N", 222), - ("P M 3 N", 223), - ("P N 3 M", 224), - ("F M 3 M", 225), - ("F M 3 C", 226), - ("F D 3 M", 227), - ("F D 3 C", 228), - ("I M 3 M", 229), - ("I A 3 D", 230), - ) - for name, sgno in altnames_sgnos: - self.assertIs(get_space_group(sgno), get_space_group(name)) - return - - def test_GetSpaceGroup(self): - "check GetSpaceGroup function" - from diffpy.structure.spacegroups import sg125 - - self.assertRaises(ValueError, GetSpaceGroup, 0) - self.assertRaises(ValueError, GetSpaceGroup, 300) - self.assertRaises(ValueError, GetSpaceGroup, "300") - self.assertIs(sg125, GetSpaceGroup(125)) - self.assertIs(sg125, GetSpaceGroup("125")) - self.assertIs(sg125, GetSpaceGroup("P4/nbm")) - self.assertIs(sg125, GetSpaceGroup("P 4/n 2/b 2/m")) - # old alt_name - self.assertIs(sg125, GetSpaceGroup("P 4/N B M")) - # upper case pdb_name - self.assertIs(sg125, GetSpaceGroup("P 4/N 2/B 2/M")) - return - - def test_get_space_group(self): - "check get_space_group function" - from diffpy.structure.spacegroups import sg125 - - self.assertRaises(ValueError, get_space_group, 0) - self.assertRaises(ValueError, get_space_group, 300) - self.assertRaises(ValueError, get_space_group, "300") - self.assertIs(sg125, get_space_group(125)) - self.assertIs(sg125, get_space_group("125")) - self.assertIs(sg125, get_space_group("P4/nbm")) - self.assertIs(sg125, get_space_group("P 4/n 2/b 2/m")) - # old alt_name - self.assertIs(sg125, get_space_group("P 4/N B M")) - # upper case pdb_name - self.assertIs(sg125, get_space_group("P 4/N 2/B 2/M")) - return - - def test_FindSpaceGroup(self): - "check FindSpaceGroup function" - sg123 = get_space_group(123) - ops123 = list(sg123.iter_symops()) - self.assertRaises(ValueError, FindSpaceGroup, []) - self.assertRaises(ValueError, FindSpaceGroup, 2 * ops123) - self.assertIs(sg123, FindSpaceGroup(ops123)) - sg123r = FindSpaceGroup(ops123[::-1]) - self.assertIsNot(sg123, sg123r) - self.assertIsNot(sg123.symop_list, sg123r.symop_list) - self.assertEqual(ops123[::-1], sg123r.symop_list) - self.assertEqual(_hash_symop_list(sg123.symop_list), _hash_symop_list(sg123r.symop_list)) - self.assertIs(sg123, FindSpaceGroup(ops123[::-1], shuffle=True)) - return - - def test_find_space_group(self): - "check find_space_group function" - sg123 = get_space_group(123) - ops123 = list(sg123.iter_symops()) - self.assertRaises(ValueError, find_space_group, []) - self.assertRaises(ValueError, find_space_group, 2 * ops123) - self.assertIs(sg123, find_space_group(ops123)) - sg123r = find_space_group(ops123[::-1]) - self.assertIsNot(sg123, sg123r) - self.assertIsNot(sg123.symop_list, sg123r.symop_list) - self.assertEqual(ops123[::-1], sg123r.symop_list) - self.assertEqual(_hash_symop_list(sg123.symop_list), _hash_symop_list(sg123r.symop_list)) - self.assertIs(sg123, find_space_group(ops123[::-1], shuffle=True)) - return - - def test__hashSymOpList(self): - "verify _hashSymOpList is unique for each spacegroup" - hset = set(_hashSymOpList(sg.symop_list) for sg in SpaceGroupList) - self.assertEqual(len(SpaceGroupList), len(hset)) - return - - def test__hash_symop_list(self): - "verify _hash_symop_list is unique for each spacegroup" - hset = set(_hash_symop_list(sg.symop_list) for sg in SpaceGroupList) - self.assertEqual(len(SpaceGroupList), len(hset)) - return - - def test_spacegroup_representation(self): - """Verify SpaceGroup.__repr__().""" - self.assertEqual( - repr(get_space_group(1)), - "SpaceGroup #1 (P1, Triclinic). Symmetry matrices: 1, point sym. matr.: 1", - ) - self.assertEqual( - repr(get_space_group(3)), - "SpaceGroup #3 (P2, Monoclinic). Symmetry matrices: 2, point sym. matr.: 2", - ) - self.assertEqual( - repr(get_space_group(16)), - ("SpaceGroup #16 (P222, Orthorhombic). Symmetry matrices: 4, point sym. " "matr.: 4"), - ) - self.assertEqual( - repr(get_space_group(75)), - "SpaceGroup #75 (P4, Tetragonal). Symmetry matrices: 4, point sym. matr.: 4", - ) - self.assertEqual( - repr(get_space_group(143)), - "SpaceGroup #143 (P3, Trigonal). Symmetry matrices: 3, point sym. matr.: 3", - ) - self.assertEqual( - repr(get_space_group(168)), - "SpaceGroup #168 (P6, Hexagonal). Symmetry matrices: 6, point sym. matr.: 6", - ) - self.assertEqual( - repr(get_space_group(229)), - ("SpaceGroup #229 (Im-3m, Cubic). Symmetry matrices: 96, point sym. " "matr.: 48"), - ) - return - - -# End of class TestRoutines - -# ---------------------------------------------------------------------------- - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_structure.py b/tests/test_structure.py deleted file mode 100644 index 39591bc1..00000000 --- a/tests/test_structure.py +++ /dev/null @@ -1,957 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Unit tests for Structure class.""" - - -import copy -import pickle -import unittest - -import numpy as np -import pytest - -from diffpy.structure import Atom, Lattice, Structure - -# ---------------------------------------------------------------------------- - - -class TestStructure(unittest.TestCase): - """Test methods of Structure class.""" - - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.cdsefile = datafile("CdSe_bulk.stru") - self.teifile = datafile("TeI.cif") - self.pbtefile = datafile("PbTe.cif") - - _loaded_structures = {} - - def setUp(self): - self.stru = Structure( - [Atom("C", [0, 0, 0]), Atom("C", [1, 1, 1])], - lattice=Lattice(1, 1, 1, 90, 90, 120), - ) - # useful variables - - if not self._loaded_structures: - self._loaded_structures.update( - [ - ("cdse", Structure(filename=self.cdsefile)), - ("tei", Structure(filename=self.teifile)), - ("pbte", Structure(filename=self.pbtefile)), - ] - ) - self.__dict__.update(self._loaded_structures) - self.places = 12 - return - - def test___init__(self): - """Check Structure.__init__()""" - atoms = [Atom("C", [0, 0, 0]), Atom("C", [0.5, 0.5, 0.5])] - self.assertRaises(ValueError, Structure, atoms, filename=self.teifile) - self.assertRaises(ValueError, Structure, lattice=Lattice(), filename=self.teifile) - self.assertRaises(ValueError, Structure, title="test", filename=self.teifile) - stru1 = Structure(title="my title") - self.assertEqual("my title", stru1.title) - stru2a = Structure(atoms) - stru2b = Structure(iter(atoms)) - stru2c = Structure(a for a in atoms) - s2a = str(stru2a) - self.assertEqual(s2a, str(stru2b)) - self.assertEqual(s2a, str(stru2c)) - return - - def test_copy(self): - """Check Structure.copy()""" - - class MyDerivedStructure(Structure): - def __copy__(self): - rv = MyDerivedStructure() - Structure.__copy__(self, target=rv) - return rv - - pass - - pbte = self.pbte - pbte2 = pbte.copy() - self.assertFalse(pbte2.lattice is pbte.lattice) - self.assertTrue(np.array_equal(pbte.xyz_cartn, pbte2.xyz_cartn)) - self.assertTrue(np.array_equal(pbte.U, pbte2.U)) - stru = MyDerivedStructure() - stru += pbte2[pbte2.element.startswith("Pb")] - pb3 = stru.copy() - self.assertTrue(isinstance(pb3, MyDerivedStructure)) - self.assertTrue(all(pb3.element == "Pb2+")) - self.assertEqual(4, len(pb3)) - return - - def test___copy__(self): - """Check Structure.__copy__()""" - cdse = Structure(filename=self.cdsefile) - cdse_str = cdse.write_structure("pdffit") - cdse2 = copy.copy(cdse) - self.assertEqual(cdse_str, cdse2.write_structure("pdffit")) - self.assertFalse(cdse.lattice is cdse2.lattice) - sameatoms = set(cdse).intersection(cdse2) - self.assertFalse(sameatoms) - return - - # def test___str__(self): - # """check Structure.__str__()""" - # return - - # def test_addNewAtom(self): - # """check Structure.addNewAtom()""" - # return - - # def test_getLastAtom(self): - # """check Structure.getLastAtom()""" - # return - def test_getLastAtom(self): - """Check Structure.getLastAtom()""" - s_lat = Lattice() - expected = Atom("C", [0, 0, 0]) - structure = Structure(atoms=[Atom("C", [0, 0, 0])], lattice=s_lat) - actual = structure.getLastAtom() - assert actual.element == expected.element - assert np.allclose(expected.xyz, actual.xyz) - - def test_get_last_atom(self): - """Check Structure.get_last_atom()""" - s_lat = Lattice() - expected = Atom("C", [0, 0, 0]) - structure = Structure(atoms=[Atom("C", [0, 0, 0])], lattice=s_lat) - actual = structure.get_last_atom() - assert actual.element == expected.element - assert np.allclose(expected.xyz, actual.xyz) - - def test_addNewAtom(self): - """Duplicate test for the deprecated addNewAtom method. - - Remove this test in version 4.0.0 - """ - s_lat = Lattice() - structure = Structure(lattice=s_lat) - - length = len(structure) - structure.addNewAtom(atype="C", xyz=[0.1, 0.2, 0.3]) - expected = len(structure) - actual = length + 1 - assert expected == actual - atom_object = structure[-1] - assert atom_object.element == "C" - assert np.allclose(atom_object.xyz, [0.1, 0.2, 0.3]) - - def test_assignUniqueLabels(self): - """Check Structure.assignUniqueLabels()""" - self.assertEqual("", "".join([a.label for a in self.stru])) - self.stru.assignUniqueLabels() - self.assertEqual("C1", self.stru[0].label) - self.assertEqual("C2", self.stru[1].label) - return - - def test_assign_unique_labels(self): - """Check Structure.assign_unique_labels()""" - self.assertEqual("", "".join([a.label for a in self.stru])) - self.stru.assign_unique_labels() - self.assertEqual("C1", self.stru[0].label) - self.assertEqual("C2", self.stru[1].label) - return - - def test_distance(self): - """Check Structure.distance()""" - from math import sqrt - - self.stru.assign_unique_labels() - self.assertRaises(IndexError, self.stru.distance, 333, "C1") - self.assertRaises(IndexError, self.stru.distance, "C", "C1") - self.assertAlmostEqual(sqrt(2.0), self.stru.distance(0, 1), self.places) - self.assertAlmostEqual(sqrt(2.0), self.stru.distance("C1", "C2"), self.places) - self.assertEqual(0, self.stru.distance(0, "C1")) - return - - def test_angle(self): - """Check Structure.angle()""" - cdse = Structure(filename=self.cdsefile) - cdse.assign_unique_labels() - self.assertEqual(109, round(cdse.angle(0, 2, 1))) - self.assertEqual(109, round(cdse.angle("Cd1", "Se1", "Cd2"))) - return - - def test_placeInLattice(self): - """Check Structure.placeInLattice() -- conversion of - coordinates.""" - stru = self.stru - new_lattice = Lattice(0.5, 0.5, 0.5, 90, 90, 60) - stru.placeInLattice(new_lattice) - a0 = stru[0] - self.assertTrue(np.allclose(a0.xyz, [0.0, 0.0, 0.0])) - a1 = stru[1] - self.assertTrue(np.allclose(a1.xyz, [2.0, 0.0, 2.0])) - - def test_place_in_lattice(self): - """Check Structure.placeInLattice() -- conversion of - coordinates.""" - stru = self.stru - new_lattice = Lattice(0.5, 0.5, 0.5, 90, 90, 60) - stru.place_in_lattice(new_lattice) - a0 = stru[0] - self.assertTrue(np.allclose(a0.xyz, [0.0, 0.0, 0.0])) - a1 = stru[1] - self.assertTrue(np.allclose(a1.xyz, [2.0, 0.0, 2.0])) - - # def test_read(self): - # """check Structure.read()""" - # return - - # def test_readStr(self): - # """check Structure.readStr()""" - # return - - # def test_write(self): - # """check Structure.write()""" - # return - - # def test_writeStr(self): - # """check Structure.writeStr()""" - # return - - def test_aslist(self): - """Check Structure.tolist()""" - lst = self.stru.tolist() - self.assertEqual(tuple(lst), tuple(self.stru)) - self.assertEqual(list, type(lst)) - return - - def test_append(self): - """Check Structure.append()""" - a = Atom("Si", (0.1, 0.2, 0.3)) - lat = self.stru.lattice - self.stru.append(a) - alast = self.stru[-1] - self.assertEqual(3, len(self.stru)) - self.assertEqual("Si", alast.element) - self.assertTrue(lat is alast.lattice) - self.assertTrue(np.array_equal(a.xyz, alast.xyz)) - self.assertFalse(a is alast) - self.assertFalse(lat is a.lattice) - return - - def test_insert(self): - """Check Structure.insert()""" - a = Atom("Si", (0.1, 0.2, 0.3)) - lat = self.stru.lattice - self.stru.insert(1, a) - a1 = self.stru[1] - self.assertEqual(3, len(self.stru)) - self.assertEqual("Si", a1.element) - self.assertTrue(lat is a1.lattice) - self.assertTrue(np.array_equal(a.xyz, a1.xyz)) - self.assertFalse(a is a1) - self.assertFalse(lat is a.lattice) - return - - def test_extend(self): - """Check Structure.extend()""" - stru = self.stru - cdse = Structure(filename=self.cdsefile) - lst = stru.tolist() - stru.extend(cdse) - self.assertEqual(6, len(stru)) - self.assertTrue(all(a.lattice is stru.lattice for a in stru)) - self.assertEqual(lst, stru.tolist()[:2]) - self.assertFalse(stru[-1] is cdse[-1]) - return - - def test___getitem__(self): - """Check Structure.__getitem__()""" - stru = self.stru - self.assertTrue(stru[0] is stru.tolist()[0]) - intidx = list(range(len(stru)))[::-1] - self.assertEqual(stru[intidx].tolist(), stru.tolist()[::-1]) - flagidx = np.arange(len(stru)) > 0 - self.assertEqual(stru[flagidx].tolist(), stru.tolist()[1:]) - cdse = Structure(self.cdse) - self.assertEqual([cdse[0], cdse[-2]], cdse[0, -2].tolist()) - cdse013 = cdse.tolist() - cdse013.pop(2) - self.assertEqual(cdse013, cdse[:2, 3].tolist()) - self.assertRaises(IndexError, cdse.__getitem__, "Cd1") - cdse.assign_unique_labels() - self.assertTrue(cdse[0] is cdse["Cd1"]) - cdse[0].label = "Hohenzollern" - self.assertRaises(IndexError, cdse.__getitem__, "Cd1") - self.assertTrue(cdse[0] is cdse["Hohenzollern"]) - self.assertEqual([cdse[0], cdse[3], cdse[1]], cdse["Hohenzollern", 3:0:-2].tolist()) - stru.label = ["A", "B"] - self.assertTrue(stru[0] is stru["A"]) - self.assertTrue(stru[1] is stru["B"]) - stru[1].label = "A" - self.assertRaises(IndexError, stru.__getitem__, "A") - return - - def test___getitem__slice(self): - """Check Structure.__getitem__() with a slice argument.""" - stru = self.stru - self.assertEqual([stru[0]], stru[:1].tolist()) - self.assertEqual([stru[1], stru[0]], stru[::-1].tolist()) - return - - def test___setitem__(self): - """Check Structure.__setitem__()""" - a = Atom("Si", (0.1, 0.2, 0.3)) - lat = self.stru.lattice - self.stru[1] = a - a1 = self.stru[1] - self.assertEqual(2, len(self.stru)) - self.assertEqual("Si", a1.element) - self.assertTrue(lat is a1.lattice) - self.assertTrue(np.array_equal(a.xyz, a1.xyz)) - self.assertFalse(a is a1) - self.assertFalse(lat is a.lattice) - return - - def test___setitem__slice(self): - """Check Structure.__setitem__() with a slice argument.""" - a = Atom("Si", (0.1, 0.2, 0.3)) - lat = self.stru.lattice - self.stru[:] = [a] - a0 = self.stru[0] - self.assertEqual(1, len(self.stru)) - self.assertEqual("Si", a0.element) - self.assertTrue(lat is a0.lattice) - self.assertTrue(np.array_equal(a.xyz, a0.xyz)) - self.assertFalse(a is a0) - self.assertFalse(lat is a.lattice) - return - - def test___add__(self): - """Check Structure.__add__()""" - stru = self.stru - cdse = Structure(filename=self.cdsefile) - total = stru + cdse - self.assertEqual(6, len(total)) - ta0 = total[0] - tam1 = total[-1] - self.assertEqual("C", ta0.element) - self.assertTrue(np.array_equal(stru[0].xyz, ta0.xyz)) - self.assertEqual("Se", tam1.element) - self.assertTrue(np.array_equal(cdse[-1].xyz, tam1.xyz)) - self.assertFalse(total.lattice in (stru.lattice, cdse.lattice)) - self.assertTrue(all([a.lattice is total.lattice for a in total])) - return - - def test___iadd__(self): - """Check Structure.__iadd__()""" - stru = self.stru - lat0 = stru.lattice - lst = stru.tolist() - cdse = Structure(filename=self.cdsefile) - stru += cdse - self.assertEqual(6, len(stru)) - self.assertEqual(lst, stru[:2].tolist()) - am1 = stru[-1] - self.assertEqual("Se", am1.element) - self.assertTrue(np.array_equal(cdse[-1].xyz, am1.xyz)) - self.assertTrue(lat0 is stru.lattice) - self.assertFalse(stru.lattice is cdse.lattice) - self.assertTrue(all([a.lattice is stru.lattice for a in stru])) - return - - def test___sub__(self): - """Check Structure.__sub__()""" - cdse = Structure(filename=self.cdsefile) - cadmiums = cdse - cdse[2:] - self.assertEqual(2, len(cadmiums)) - self.assertEqual("Cd", cadmiums[0].element) - self.assertEqual("Cd", cadmiums[1].element) - self.assertTrue(np.array_equal(cdse[0].xyz, cadmiums[0].xyz)) - self.assertTrue(np.array_equal(cdse[1].xyz, cadmiums[1].xyz)) - self.assertFalse(cdse[0] is cadmiums[0]) - self.assertFalse(cdse.lattice is cadmiums.lattice) - return - - def test___isub__(self): - """Check Structure.__isub__()""" - cdse = Structure(filename=self.cdsefile) - lat = cdse.lattice - lst = cdse.tolist() - cdse -= cdse[2:] - self.assertEqual(2, len(cdse)) - self.assertEqual(4, len(lst)) - self.assertEqual("Cd", cdse[0].element) - self.assertEqual("Cd", cdse[1].element) - self.assertEqual(lat, cdse.lattice) - self.assertEqual(lst[:2], cdse.tolist()) - return - - def test___mul__(self): - """Check Structure.__mul__()""" - cdse = Structure(filename=self.cdsefile) - self.assertEqual(12, len(set(3 * cdse))) - self.assertEqual(12, len(set(cdse * 3))) - cdsex3 = 3 * cdse - self.assertEqual(12, len(cdsex3)) - self.assertEqual(3 * "Cd Cd Se Se".split(), [a.element for a in cdsex3]) - self.assertTrue(np.array_equal(3 * [a.xyz for a in cdse], [a.xyz for a in cdsex3])) - self.assertFalse(set(cdse).intersection(cdsex3)) - self.assertFalse(cdse.lattice is cdsex3.lattice) - return - - def test___imul__(self): - """Check Structure.__imul__()""" - cdse = Structure(filename=self.cdsefile) - lat = cdse.lattice - els = cdse.element - xyz = cdse.xyz - lst = cdse.tolist() - cdse *= 2 - self.assertEqual(8, len(cdse)) - self.assertEqual(lst, cdse[:4].tolist()) - self.assertEqual(np.tile(els, 2).tolist(), cdse.element.tolist()) - self.assertTrue(np.array_equal(np.tile(xyz, (2, 1)), cdse.xyz)) - self.assertEqual(8, len(set(cdse))) - self.assertEqual(8 * [lat], [a.lattice for a in cdse]) - self.stru *= -3 - self.assertEqual(0, len(self.stru)) - return - - def test__get_lattice_dep(self): - """Check Structure._get_lattice()""" - lat = Lattice() - stru = Structure() - self.assertEqual((1, 1, 1, 90, 90, 90), stru.lattice.abcABG()) - stru2 = Structure(lattice=lat) - self.assertTrue(lat is stru2.lattice) - return - - def test__get_lattice(self): - """Check Structure._get_lattice()""" - lat = Lattice() - stru = Structure() - self.assertEqual((1, 1, 1, 90, 90, 90), stru.lattice.cell_parms()) - stru2 = Structure(lattice=lat) - self.assertTrue(lat is stru2.lattice) - return - - def test__set_lattice(self): - """Check Structure._set_lattice()""" - lat = Lattice() - self.stru.lattice = lat - self.assertEqual(2 * [lat], [a.lattice for a in self.stru]) - return - - def test_composition(self): - """Check Structure.composition property.""" - stru = self.stru - self.assertEqual({"C": 2}, stru.composition) - stru *= 2 - self.assertEqual({"C": 4}, stru.composition) - stru[:] = [] - self.assertEqual({}, stru.composition) - return - - def test_element(self): - """Check Structure.element.""" - stru = self.stru - cdse = self.cdse - self.assertEqual("Cd Cd Se Se".split(), cdse.element.tolist()) - self.assertEqual(cdse[:2], cdse[cdse.element == "Cd"]) - stru.element = stru.element.replace("C", "Si") - self.assertEqual("Si", stru[0].element) - return - - def test_xyz(self): - """Check Structure.xyz.""" - stru = self.stru - self.assertEqual((2, 3), stru.xyz.shape) - self.assertTrue(np.array_equal([1, 1, 1], stru.xyz[1])) - stru.xyz += 0.1 - self.assertTrue(np.array_equal([0.1, 0.1, 0.1], stru[0].xyz)) - self.assertTrue(np.array_equal([1.1, 1.1, 1.1], stru[1].xyz)) - stru.xyz = 0 - stru[1].xyz[:] = 1 - self.assertTrue(np.array_equal([0, 0, 0], stru[0].xyz)) - self.assertTrue(np.array_equal([1, 1, 1], stru[1].xyz)) - # verify noop when changing empty slice - xyz0 = np.copy(stru.xyz) - stru[1:1].xyz += 1 - self.assertTrue(np.array_equal(xyz0, stru.xyz)) - return - - def test_x(self): - """Check Structure.x.""" - cdse = self.cdse - self.assertEqual((4,), cdse.x.shape) - self.assertAlmostEqual(0.6666, cdse.x[3], 5) - stru = self.stru - stru.x = [3, 4] - self.assertEqual(3, stru[0].xyz[0]) - self.assertEqual(4, stru[1].xyz[0]) - return - - def test_y(self): - """Check Structure.y.""" - cdse = self.cdse - self.assertEqual((4,), cdse.y.shape) - self.assertAlmostEqual(0.3333, cdse.y[3], 5) - stru = self.stru - stru.y = [3, 4] - self.assertEqual(3, stru[0].xyz[1]) - self.assertEqual(4, stru[1].xyz[1]) - return - - def test_z(self): - """Check Structure.z.""" - cdse = self.cdse - self.assertEqual((4,), cdse.z.shape) - self.assertAlmostEqual(0.87667, cdse.z[3], 5) - stru = self.stru - stru.z = [3, 4] - self.assertEqual(3, stru[0].xyz[2]) - self.assertEqual(4, stru[1].xyz[2]) - return - - def test_label(self): - """Check Structure.label.""" - cdse = Structure(filename=self.cdsefile) - self.assertEqual(4 * [""], cdse.label.tolist()) - cdse.assign_unique_labels() - self.assertEqual("Cd1 Cd2 Se1 Se2".split(), cdse.label.tolist()) - cdse.label = cdse.label.lower() - self.assertEqual("cd1 cd2 se1 se2".split(), cdse.label.tolist()) - return - - def test_occupancy(self): - """Check Structure.occupancy.""" - cdse = self.cdse - self.assertTrue(np.array_equal(np.ones(4), cdse.occupancy)) - self.stru.occupancy *= 0.5 - self.assertEqual(1.0, sum([a.occupancy for a in self.stru])) - cdse.occupancy = 1 - self.assertTrue(all(isinstance(a.occupancy, int) for a in cdse)) - return - - def test_xyz_cartn(self): - """Check Structure.xyz_cartn.""" - pbte = copy.copy(self.pbte) - self.assertEqual((8, 3), pbte.xyz_cartn.shape) - self.assertTrue(np.allclose(6.461 / 2.0 * np.ones(3), pbte.xyz_cartn[0])) - pbte.xyz_cartn += np.array([0.1, 0.2, 0.3]) * 6.461 - self.assertTrue(np.allclose([0.6, 0.7, 0.8], pbte[0].xyz)) - self.assertTrue(np.allclose([0.6, 0.7, 0.3], pbte[7].xyz)) - return - - def test_anisotropy(self): - """Check Structure.anisotropy.""" - self.assertEqual((2,), self.stru.anisotropy.shape) - self.assertFalse(np.any(self.stru.anisotropy)) - tei = copy.copy(self.tei) - self.assertTrue(np.all(tei.anisotropy)) - tei.anisotropy = False - self.assertFalse(np.any(tei.anisotropy)) - self.assertAlmostEqual(0.019227, tei[0].U11, 6) - self.assertAlmostEqual(0.019227, tei[0].U22, 6) - self.assertAlmostEqual(0.019227, tei[0].U33, 6) - self.assertAlmostEqual(0.0, tei[0].U12, 6) - self.assertAlmostEqual(0.019227 * -np.cos(np.radians(128.09)), tei[0].U13, 6) - self.assertAlmostEqual(0.0, tei[0].U23, 6) - self.assertAlmostEqual(0.019227, tei[0].Uisoequiv, 6) - return - - def test_U(self): - """Check Structure.U.""" - stru = self.stru - self.assertEqual((2, 3, 3), stru.U.shape) - self.assertFalse(np.any(stru.anisotropy)) - stru.U = np.identity(3) - self.assertEqual(2, len(set([id(a.U) for a in stru]))) - isou = stru.lattice.isotropicunit - self.assertTrue(np.array_equal(2 * [isou], stru.U)) - self.assertFalse(np.any(stru.anisotropy)) - stru.anisotropy = True - stru.U = np.identity(3) - self.assertTrue(np.array_equal(2 * [np.identity(3)], stru.U)) - self.assertTrue(np.all(stru.anisotropy)) - stru.U = 0 - self.assertTrue(np.all(stru.anisotropy)) - self.assertFalse(np.any(stru.U != 0.0)) - stru[1].U[:] = 1 - self.assertTrue(np.all(stru[0].U == 0.0)) - self.assertTrue(np.all(stru[1].U == 1.0)) - return - - def test_Uisoequiv(self): - """Check Structure.Uisoequiv.""" - tei = copy.copy(self.tei) - self.assertEqual((16,), tei.Uisoequiv.shape) - self.assertAlmostEqual(0.019227, tei.Uisoequiv[0], 6) - self.assertAlmostEqual(0.019784, tei.Uisoequiv[4], 6) - self.assertAlmostEqual(0.024813, tei.Uisoequiv[8], 6) - self.assertAlmostEqual(0.026878, tei.Uisoequiv[12], 6) - u11old = tei[0].U11 - tei.Uisoequiv = 0.001 - self.assertAlmostEqual(u11old * 0.001 / 0.019227, tei[0].U[0, 0]) - return - - def test_Uij(self): - """Check Structure.Uij.""" - stru = self.stru - stru[1].anisotropy = True - stru[1].U = [[1.1, 0.12, 0.13], [0.12, 2.2, 0.23], [0.13, 0.23, 3.3]] - self.assertTrue(np.array_equal([0, 1.1], stru.U11)) - self.assertTrue(np.array_equal([0, 2.2], stru.U22)) - self.assertTrue(np.array_equal([0, 3.3], stru.U33)) - self.assertTrue(np.array_equal([0, 0.12], stru.U12)) - self.assertTrue(np.array_equal([0, 0.13], stru.U13)) - self.assertTrue(np.array_equal([0, 0.23], stru.U23)) - stru.U11 = stru.U22 = stru.U33 = stru.U12 = stru.U13 = stru.U23 = 0.0 - self.assertFalse(np.any(stru.U != 0.0)) - return - - def test_Bisoequiv(self): - """Check Structure.Bisoequiv.""" - utob = 8 * np.pi**2 - tei = copy.copy(self.tei) - self.assertEqual((16,), tei.Bisoequiv.shape) - self.assertAlmostEqual(utob * 0.019227, tei.Bisoequiv[0], 4) - self.assertAlmostEqual(utob * 0.019784, tei.Bisoequiv[4], 4) - self.assertAlmostEqual(utob * 0.024813, tei.Bisoequiv[8], 4) - self.assertAlmostEqual(utob * 0.026878, tei.Bisoequiv[12], 4) - b11old = tei[0].B11 - tei.Bisoequiv = 0.1 - self.assertAlmostEqual(b11old * 0.1 / (utob * 0.019227), tei[0].B11, 5) - return - - def test_Bij(self): - """Check Structure.Bij.""" - stru = self.stru - stru[1].anisotropy = True - stru[1].U = [[1.1, 0.12, 0.13], [0.12, 2.2, 0.23], [0.13, 0.23, 3.3]] - stru[1].U /= 8 * np.pi**2 - self.assertTrue(np.allclose([0, 1.1], stru.B11)) - self.assertTrue(np.allclose([0, 2.2], stru.B22)) - self.assertTrue(np.allclose([0, 3.3], stru.B33)) - self.assertTrue(np.allclose([0, 0.12], stru.B12)) - self.assertTrue(np.allclose([0, 0.13], stru.B13)) - self.assertTrue(np.allclose([0, 0.23], stru.B23)) - stru.B11 = stru.B22 = stru.B33 = stru.B12 = stru.B13 = stru.B23 = 0.0 - self.assertFalse(np.any(stru.U != 0.0)) - return - - def test_pickling(self): - """Make sure Atom in Structure can be consistently pickled.""" - stru = self.stru - a = stru[0] - self.assertTrue(a is stru[0]) - a1, stru1 = pickle.loads(pickle.dumps((a, stru))) - self.assertTrue(a1 is stru1[0]) - return - - -# End of class TestStructure - - -def test_get_chemical_symbols(datafile): - """Check Structure.get_chemical_symbols()""" - pbte_stru = Structure(filename=datafile("PbTe.cif")) - actual_chemical_symbols = pbte_stru.get_chemical_symbols() - expected_chemical_symbols = ["Pb"] * 4 + ["Te"] * 4 - assert actual_chemical_symbols == expected_chemical_symbols - - -def test_get_fractional_coordinates(datafile): - """Check Structure.get_fractional_coordinates()""" - pbte_stru = Structure(filename=datafile("PbTe.cif")) - actual_fractional_coords = pbte_stru.get_fractional_coordinates() - expected_fractional_coords = np.array( - [ - [0.5, 0.5, 0.5], - [0.5, 0.0, 0.0], - [0.0, 0.5, 0.0], - [0.0, 0.0, 0.5], - [0.0, 0.0, 0.0], - [0.0, 0.5, 0.5], - [0.5, 0.0, 0.5], - [0.5, 0.5, 0.0], - ] - ) - assert np.allclose(actual_fractional_coords, expected_fractional_coords) - - -def test_get_cartesian_coordinates(datafile): - """Check Structure.get_cartesian_coordinates()""" - cdse_stru = Structure(filename=datafile("CdSe_bulk.stru")) - actual_cartesian_coords = cdse_stru.get_cartesian_coordinates() - expected_cartesian_coords = np.array( - [ - [1.22284264, 2.11760202, 0.0], - [2.44495161, 0.0, 3.4530135], - [1.22284264, 2.11760202, 2.60129319], - [2.44495161, 0.0, 6.05430669], - ] - ) - assert np.allclose(actual_cartesian_coords, expected_cartesian_coords, atol=1e-6) - - -@pytest.mark.parametrize( - "input,expected", - [ # case: user wants ADPs as an array so they set return_array=True - # expected: a 3D array of shape (num_atoms, 3, 3) with the Uij values - [ - True, - np.array( - [ - [[0.0211, 0.0, 0.0109], [0.0, 0.0195, 0.0], [0.0109, 0.0, 0.016]], - [[0.0223, 0.0, 0.0179], [0.0, 0.018, 0.0], [0.0179, 0.0, 0.0254]], - [[0.025, 0.0, 0.0226], [0.0, 0.0234, 0.0], [0.0226, 0.0, 0.0345]], - [[0.0234, 0.0, 0.0138], [0.0, 0.0295, 0.0], [0.0138, 0.0, 0.0253]], - ] - ), - ], - # case: user wants ADPs as a dictionary so they set return_array=False (default behavior) - # expected: a dictionary with keys like "I_8_11" and values as the corresponding Uij values - [ - False, - { - # Iodine - "I_8_11": 0.025, - "I_8_12": 0.0, - "I_8_13": 0.0226, - "I_8_22": 0.0234, - "I_8_23": 0.0, - "I_8_33": 0.0345, - "I_9_11": 0.025, - "I_9_12": 0.0, - "I_9_13": 0.0226, - "I_9_22": 0.0234, - "I_9_23": 0.0, - "I_9_33": 0.0345, - "I_10_11": 0.025, - "I_10_12": 0.0, - "I_10_13": 0.0226, - "I_10_22": 0.0234, - "I_10_23": 0.0, - "I_10_33": 0.0345, - "I_11_11": 0.025, - "I_11_12": 0.0, - "I_11_13": 0.0226, - "I_11_22": 0.0234, - "I_11_23": 0.0, - "I_11_33": 0.0345, - "I_12_11": 0.0234, - "I_12_12": 0.0, - "I_12_13": 0.0138, - "I_12_22": 0.0295, - "I_12_23": 0.0, - "I_12_33": 0.0253, - "I_13_11": 0.0234, - "I_13_12": 0.0, - "I_13_13": 0.0138, - "I_13_22": 0.0295, - "I_13_23": 0.0, - "I_13_33": 0.0253, - "I_14_11": 0.0234, - "I_14_12": 0.0, - "I_14_13": 0.0138, - "I_14_22": 0.0295, - "I_14_23": 0.0, - "I_14_33": 0.0253, - "I_15_11": 0.0234, - "I_15_12": 0.0, - "I_15_13": 0.0138, - "I_15_22": 0.0295, - "I_15_23": 0.0, - "I_15_33": 0.0253, - # Tellurium - "Te_0_11": 0.0211, - "Te_0_12": 0.0, - "Te_0_13": 0.0109, - "Te_0_22": 0.0195, - "Te_0_23": 0.0, - "Te_0_33": 0.016, - "Te_1_11": 0.0211, - "Te_1_12": 0.0, - "Te_1_13": 0.0109, - "Te_1_22": 0.0195, - "Te_1_23": 0.0, - "Te_1_33": 0.016, - "Te_2_11": 0.0211, - "Te_2_12": 0.0, - "Te_2_13": 0.0109, - "Te_2_22": 0.0195, - "Te_2_23": 0.0, - "Te_2_33": 0.016, - "Te_3_11": 0.0211, - "Te_3_12": 0.0, - "Te_3_13": 0.0109, - "Te_3_22": 0.0195, - "Te_3_23": 0.0, - "Te_3_33": 0.016, - "Te_4_11": 0.0223, - "Te_4_12": 0.0, - "Te_4_13": 0.0179, - "Te_4_22": 0.018, - "Te_4_23": 0.0, - "Te_4_33": 0.0254, - "Te_5_11": 0.0223, - "Te_5_12": 0.0, - "Te_5_13": 0.0179, - "Te_5_22": 0.018, - "Te_5_23": 0.0, - "Te_5_33": 0.0254, - "Te_6_11": 0.0223, - "Te_6_12": 0.0, - "Te_6_13": 0.0179, - "Te_6_22": 0.018, - "Te_6_23": 0.0, - "Te_6_33": 0.0254, - "Te_7_11": 0.0223, - "Te_7_12": 0.0, - "Te_7_13": 0.0179, - "Te_7_22": 0.018, - "Te_7_23": 0.0, - "Te_7_33": 0.0254, - }, - ], - ], -) -def test_get_anisotropic_displacement_parameters(datafile, input, expected): - """Check Structure.get_anisotropic_displacement_parameters()""" - tei_stru = Structure(filename=datafile("TeI.cif")) - actual_displacement = tei_stru.get_anisotropic_displacement_parameters(return_array=input) - if isinstance(expected, np.ndarray): - expected_displacement = np.repeat(expected, 4, axis=0) - assert np.allclose(actual_displacement, expected_displacement) - if isinstance(expected, dict): - assert actual_displacement == expected - - -@pytest.mark.parametrize( - "input,expected", - [ # case: user wants isotropic displacement parameters as an array - # so they set return_array=True - # expected: a 1D array of shape (num_atoms,) with the Uiso values - [ - True, - np.array([0.0225566, 0.0225566, 0.0225566, 0.0225566, 0.0155528, 0.0155528, 0.0155528, 0.0155528]), - ], - # case: user wants isotropic displacement parameters as a dictionary - # so they set return_array=False (default behavior) - # expected: a dictionary with keys like "I_Uiso" and values as the corresponding Uiso values - [ - False, - { - "Pb_1_Uiso": 0.0225566, - "Pb_2_Uiso": 0.0225566, - "Pb_3_Uiso": 0.0225566, - "Pb_4_Uiso": 0.0225566, - "Te_5_Uiso": 0.0155528, - "Te_6_Uiso": 0.0155528, - "Te_7_Uiso": 0.0155528, - "Te_8_Uiso": 0.0155528, - }, - ], - ], -) -def test_get_isotropic_displacement_parameters(datafile, input, expected): - """Check Structure.get_isotropic_displacement_parameters()""" - pbte_stru = Structure(filename=datafile("PbTe.cif")) - actual_isotropic_displacement = pbte_stru.get_isotropic_displacement_parameters(return_array=input) - if isinstance(expected, np.ndarray): - assert np.allclose(actual_isotropic_displacement, expected) - if isinstance(expected, dict): - assert actual_isotropic_displacement == expected - - -def test_get_occupancies(datafile): - """Check Structure.get_occupancies()""" - pbte_stru = Structure(filename=datafile("PbTe.cif")) - actual_occupancies = pbte_stru.get_occupancies() - expected_occupancies = np.ones(8) - assert np.allclose(actual_occupancies, expected_occupancies) - - -def test_get_lattice_vectors(datafile): - """Check Structure.get_lattice_vectors()""" - pbte_stru = Structure(filename=datafile("PbTe.cif")) - actual_lattice_vectors = pbte_stru.get_lattice_vectors() - expected_lattice_vectors = np.array([[6.461, 0.0, 0.0], [0.0, 6.461, 0.0], [0.0, 0.0, 6.461]]) - assert np.allclose(actual_lattice_vectors, expected_lattice_vectors) - - -def test_get_lattice_vector_angles(datafile): - """Check Structure.get_lattice_vector_angles()""" - pbte_stru = Structure(filename=datafile("PbTe.cif")) - actual_lattice_vector_angles = pbte_stru.get_lattice_vector_angles() - expected_lattice_vector_angles = np.array([90.0, 90.0, 90.0]) - assert np.allclose(actual_lattice_vector_angles, expected_lattice_vector_angles) - - -# ---------------------------------------------------------------------------- -@pytest.mark.parametrize( - "existing, atype, xyz, expected_len, expected_element, expected_xyz", - [ - # Case 1: valid atom added to an empty structure. - # Expect the atom list length to go from 0 to 1. - # Expect the atom attributes are successfully loaded. - ( - None, - "C", - [0.1, 0.2, 0.3], - 1, - "C", - [0.1, 0.2, 0.3], - ), - # Case 2: valid atom added to existing atom list. - # Expect the atom list length to go from 1 to 2. - # Expect the atom attributes are successfully loaded. - ( - [Atom("C", [0, 0, 0])], - "Ni", - [0.8, 1.2, 0.9], - 2, - "Ni", - [0.8, 1.2, 0.9], - ), - ], -) -def test_add_new_atom(existing, atype, xyz, expected_len, expected_element, expected_xyz): - """Check Structure.add_new_item()""" - structure = Structure(existing, lattice=Lattice()) - structure.add_new_atom(atype=atype, xyz=xyz) - actual_length = len(structure) - assert expected_len == actual_length - atom_object = structure[-1] - assert atom_object.element == expected_element - assert np.allclose(atom_object.xyz, expected_xyz) - - -def test_add_new_atom_duplicate(): - # Case 3: duplicated atom added to the existing atom list. - # Expect the atom to be added and gives a UserWarning. - structure = Structure( - [Atom("C", [0.1, 0.2, 0.3]), Atom("Ni", [0.8, 1.2, 0.9])], - lattice=Lattice(), - ) - with pytest.warns(UserWarning): - structure.add_new_atom(atype="C", xyz=[0.1, 0.2, 0.3]) - assert len(structure) == 3 - assert structure[-1].element == "C" - assert np.allclose(structure[-1].xyz, [0.1, 0.2, 0.3]) - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_supercell.py b/tests/test_supercell.py deleted file mode 100644 index 1b476c46..00000000 --- a/tests/test_supercell.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Unit tests for supercell.py.""" - -import unittest - -import pytest - -from diffpy.structure import Structure -from diffpy.structure.expansion import supercell - -# ---------------------------------------------------------------------------- - - -class TestSuperCell(unittest.TestCase): - @pytest.fixture(autouse=True) - def prepare_fixture(self, datafile): - self.datafile = datafile - - stru_cdse = None - stru_ni = None - - def setUp(self): - # load test structures once - if TestSuperCell.stru_cdse is None: - cdsefile = self.datafile("CdSe_bulk.stru") - TestSuperCell.stru_cdse = Structure(filename=cdsefile) - if TestSuperCell.stru_ni is None: - nifile = self.datafile("Ni.stru") - TestSuperCell.stru_ni = Structure(filename=nifile) - # bring them to the instance - self.stru_cdse = TestSuperCell.stru_cdse - self.stru_ni = TestSuperCell.stru_ni - return - - def tearDown(self): - return - - def test_exceptions(self): - """Check argument checking of supercell.""" - self.assertRaises(ValueError, supercell, self.stru_ni, (0, 1, 1)) - self.assertRaises(ValueError, supercell, self.stru_ni, (0, 1)) - self.assertRaises(TypeError, supercell, list(self.stru_ni), (1, 1, 1)) - return - - def test_ni_supercell(self): - """Check supercell expansion for Ni.""" - ni_123 = supercell(self.stru_ni, (1, 2, 3)) - self.assertEqual(6 * len(self.stru_ni), len(ni_123)) - a, b, c = self.stru_ni.lattice.cell_parms()[:3] - a1, b2, c3 = ni_123.lattice.cell_parms()[:3] - self.assertAlmostEqual(a, a1, 8) - self.assertAlmostEqual(b * 2, b2, 8) - self.assertAlmostEqual(c * 3, c3, 8) - x, y, z = self.stru_ni[-1].xyz - x1, y2, z3 = ni_123[-1 * 2 * 3].xyz - self.assertAlmostEqual(x / 1, x1, 8) - self.assertAlmostEqual(y / 2, y2, 8) - self.assertAlmostEqual(z / 3, z3, 8) - return - - def test_cdse_supercell(self): - """Check supercell expansion for CdSe.""" - cdse_222 = supercell(self.stru_cdse, (2, 2, 2)) - # new atoms should be grouped together - elems = sum([8 * [a.element] for a in self.stru_cdse], []) - elems_222 = [a.element for a in cdse_222] - self.assertEqual(elems, elems_222) - return - - -# End of class TestRoutines - -# ---------------------------------------------------------------------------- - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_symmetryutilities.py b/tests/test_symmetryutilities.py deleted file mode 100644 index c5b37fc8..00000000 --- a/tests/test_symmetryutilities.py +++ /dev/null @@ -1,1288 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2006 trustees of the Michigan State University. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. -# -############################################################################## -"""Unit tests for SymmetryUtilities.py.""" - -import re -import sys -import unittest - -import numpy -import pytest - -from diffpy.structure.spacegroups import get_space_group -from diffpy.structure.structureerrors import SymmetryError -from diffpy.structure.symmetryutilities import ( - ExpandAsymmetricUnit, - GeneratorSite, - SymmetryConstraints, - _Position2Tuple, - equal_positions, - equalPositions, - expand_position, - expandPosition, - is_constant_formula, - is_space_group_latt_parms, - isconstantFormula, - isSpaceGroupLatPar, - nearest_site_index, - nearestSiteIndex, - null_space, - nullSpace, - position_difference, - positionDifference, - prune_formula_dictionary, - pruneFormulaDictionary, -) - -# ---------------------------------------------------------------------------- - - -class TestRoutines(unittest.TestCase): - - def setUp(self): - return - - def tearDown(self): - return - - def test_isSpaceGroupLatPar(self): - """Check isSpaceGroupLatPar()""" - triclinic = get_space_group("P1") - monoclinic = get_space_group("P2") - orthorhombic = get_space_group("P222") - tetragonal = get_space_group("P4") - trigonal = get_space_group("P3") - hexagonal = get_space_group("P6") - cubic = get_space_group("P23") - self.assertTrue(isSpaceGroupLatPar(triclinic, 1, 2, 3, 40, 50, 60)) - self.assertFalse(isSpaceGroupLatPar(monoclinic, 1, 2, 3, 40, 50, 60)) - self.assertTrue(isSpaceGroupLatPar(monoclinic, 1, 2, 3, 90, 50, 90)) - self.assertFalse(isSpaceGroupLatPar(orthorhombic, 1, 2, 3, 90, 50, 90)) - self.assertTrue(isSpaceGroupLatPar(orthorhombic, 1, 2, 3, 90, 90, 90)) - self.assertFalse(isSpaceGroupLatPar(tetragonal, 1, 2, 3, 90, 90, 90)) - self.assertTrue(isSpaceGroupLatPar(tetragonal, 2, 2, 3, 90, 90, 90)) - self.assertFalse(isSpaceGroupLatPar(trigonal, 2, 2, 3, 90, 90, 90)) - self.assertTrue(isSpaceGroupLatPar(trigonal, 2, 2, 2, 80, 80, 80)) - self.assertFalse(isSpaceGroupLatPar(hexagonal, 2, 2, 2, 80, 80, 80)) - self.assertTrue(isSpaceGroupLatPar(hexagonal, 2, 2, 3, 90, 90, 120)) - self.assertFalse(isSpaceGroupLatPar(cubic, 2, 2, 3, 90, 90, 120)) - self.assertTrue(isSpaceGroupLatPar(cubic, 3, 3, 3, 90, 90, 90)) - return - - def test_is_space_group_lat_par(self): - """Check isSpaceGroupLatPar()""" - triclinic = get_space_group("P1") - monoclinic = get_space_group("P2") - orthorhombic = get_space_group("P222") - tetragonal = get_space_group("P4") - trigonal = get_space_group("P3") - hexagonal = get_space_group("P6") - cubic = get_space_group("P23") - self.assertTrue(is_space_group_latt_parms(triclinic, 1, 2, 3, 40, 50, 60)) - self.assertFalse(is_space_group_latt_parms(monoclinic, 1, 2, 3, 40, 50, 60)) - self.assertTrue(is_space_group_latt_parms(monoclinic, 1, 2, 3, 90, 50, 90)) - self.assertFalse(is_space_group_latt_parms(orthorhombic, 1, 2, 3, 90, 50, 90)) - self.assertTrue(is_space_group_latt_parms(orthorhombic, 1, 2, 3, 90, 90, 90)) - self.assertFalse(is_space_group_latt_parms(tetragonal, 1, 2, 3, 90, 90, 90)) - self.assertTrue(is_space_group_latt_parms(tetragonal, 2, 2, 3, 90, 90, 90)) - self.assertFalse(is_space_group_latt_parms(trigonal, 2, 2, 3, 90, 90, 90)) - self.assertTrue(is_space_group_latt_parms(trigonal, 2, 2, 2, 80, 80, 80)) - self.assertFalse(is_space_group_latt_parms(hexagonal, 2, 2, 2, 80, 80, 80)) - self.assertTrue(is_space_group_latt_parms(hexagonal, 2, 2, 3, 90, 90, 120)) - self.assertFalse(is_space_group_latt_parms(cubic, 2, 2, 3, 90, 90, 120)) - self.assertTrue(is_space_group_latt_parms(cubic, 3, 3, 3, 90, 90, 90)) - return - - def test_sgtbx_spacegroup_aliases(self): - """Check get_space_group for non-standard aliases from sgtbx.""" - self.assertIs(get_space_group("Fm3m"), get_space_group(225)) - self.assertIs(get_space_group("Ia3d"), get_space_group("I a -3 d")) - return - - def test_positionDifference(self): - """Check positionDifference in normal and boundary cases.""" - self.assertTrue(numpy.allclose(positionDifference([0.1, 0.9, 0.2], [0.9, 0.1, 0.8]), [0.2, 0.2, 0.4])) - self.assertTrue(numpy.allclose(positionDifference([1.2, -0.1, 2.75], [0.1, 0.4, 0.25]), [0.1, 0.5, 0.5])) - return - - def test_nearestSiteIndex(self): - """Check nearestSiteIndex with single and multiple sites.""" - self.assertEqual(nearestSiteIndex([[0.1, 0.9, 0.2], [0.8, 0.1, 0.8]], [0.8, 0.1, 0.8]), 1) - self.assertEqual(nearestSiteIndex([[1.2, -0.1, 2.75]], [0.7, 0.4, 0.25]), 0) - return - - def test_expandPosition(self): - """Check expandPosition()""" - # ok again Ni example - fcc = get_space_group(225) - pos, pops, pmult = expandPosition(fcc, [0, 0, 0]) - self.assertTrue(numpy.all(pos[0] == 0.0)) - self.assertEqual(4, len(pos)) - self.assertEqual(192, sum([len(line) for line in pops])) - self.assertEqual(4, pmult) - return - - def test_expand_position(self): - """Check expand_position()""" - # ok again Ni example - fcc = get_space_group(225) - pos, pops, pmult = expand_position(fcc, [0, 0, 0]) - self.assertTrue(numpy.all(pos[0] == 0.0)) - self.assertEqual(4, len(pos)) - self.assertEqual(192, sum([len(line) for line in pops])) - self.assertEqual(4, pmult) - return - - def test_pruneFormulaDictionary(self): - """Check pruneFormulaDictionary()""" - fmdict = {"x": "3*y-0.17", "y": "0", "z": "0.13"} - pruned = pruneFormulaDictionary(fmdict) - self.assertEqual({"x": "3*y-0.17"}, pruned) - return - - def test_prune_formula_dictionary(self): - """Check prune_formula_dictionary()""" - fmdict = {"x": "3*y-0.17", "y": "0", "z": "0.13"} - pruned = prune_formula_dictionary(fmdict) - self.assertEqual({"x": "3*y-0.17"}, pruned) - return - - def test_isconstantFormula(self): - """Check isconstantFormula()""" - self.assertFalse(isconstantFormula("x-y+z")) - self.assertTrue(isconstantFormula("6.023e23")) - self.assertTrue(isconstantFormula("22/7")) - self.assertTrue(isconstantFormula("- 22/7")) - self.assertTrue(isconstantFormula("+13/ 9")) - return - - def test_is_constant_formula(self): - """Check isconstantFormula()""" - self.assertFalse(is_constant_formula("x-y+z")) - self.assertTrue(is_constant_formula("6.023e23")) - self.assertTrue(is_constant_formula("22/7")) - self.assertTrue(is_constant_formula("- 22/7")) - self.assertTrue(is_constant_formula("+13/ 9")) - return - - def test_equalPositions(self): - """Check equalPositions()""" - self.assertTrue(equalPositions([0.1, 0.2, 0.3], [0.1, 0.2, 0.3], 1.0e-5)) - self.assertTrue(equalPositions([0.1 + 0.5e-5, 0.2 + 0.5e-5, 0.3 + 0.5e-5], [0.1, 0.2, 0.3], 1.0e-5)) - self.assertFalse(equalPositions([0.2, 0.2, 0.3], [0.1, 0.2, 0.3], 1.0e-5)) - - -# End of class TestRoutines - -# ---------------------------------------------------------------------------- - - -class Test_Position2Tuple(unittest.TestCase): - - def setUp(self): - self.eps = 1.0e-4 - self.pos2tuple = _Position2Tuple(self.eps) - return - - def tearDown(self): - del self.pos2tuple - return - - def test___init__(self): - """Check _Position2Tuple.__init__()""" - self.assertNotEqual(0.0, self.pos2tuple.eps) - self.pos2tuple = _Position2Tuple(1.0 / sys.maxsize / 2) - self.assertEqual(0.0, self.pos2tuple.eps) - return - - def test___call__(self): - """Check _Position2Tuple.__call__()""" - pos2tuple = self.pos2tuple - positions = numpy.zeros((100, 3), dtype=float) - positions[:, 0] = numpy.arange(100) / 100.0 * pos2tuple.eps + 0.1 - positions = positions - numpy.floor(positions) - # pos2tuple should generate at most 2 distinct tuples - alltuples = dict.fromkeys([pos2tuple(xyz) for xyz in positions]) - self.assertFalse(len(alltuples) > 2) - return - - -# End of class Test_Position2Tuple - -# ---------------------------------------------------------------------------- - - -class TestGeneratorSite(unittest.TestCase): - - generators = {} - - def setUp(self): - x, y, z = 0.07, 0.11, 0.13 - self.x, self.y, self.z = x, y, z - if TestGeneratorSite.generators: - self.__dict__.update(TestGeneratorSite.generators) - return - sg117 = get_space_group(117) - sg143 = get_space_group(143) - sg164 = get_space_group(164) - sg167h = get_space_group("H-3c") - sg167r = get_space_group("R-3c") - sg186 = get_space_group(186) - sg227 = get_space_group(227) - g117c = GeneratorSite(sg117, [0, 0.5, 0]) - g117h = GeneratorSite(sg117, [x, x + 0.5, 0.5]) - g143a = GeneratorSite(sg143, [0, 0, z]) - g143b = GeneratorSite(sg143, [1.0 / 3, 2.0 / 3, z]) - g143c = GeneratorSite(sg143, [2.0 / 3, 1.0 / 3, z]) - g143d = GeneratorSite(sg143, [x, y, z]) - g164e = GeneratorSite(sg164, (0.5, 0, 0)) - g164f = GeneratorSite(sg164, (0.5, 0, 0.5)) - g164g = GeneratorSite(sg164, (x, 0, 0)) - g164h = GeneratorSite(sg164, (x, 0, 0.5)) - gh167e = GeneratorSite(sg167h, (0.30624, 0.0, 0.25)) - gr167e = GeneratorSite(sg167r, (0.1, 0.4, 0.25)) - g186c = GeneratorSite(sg186, (0.1695, 1.0 - 0.1695, 0.6365)) - g227a = GeneratorSite(sg227, [0, 0, 0]) - g227c = GeneratorSite(sg227, 3 * [1.0 / 8]) - g227oa = GeneratorSite(sg227, 3 * [1.0 / 8], sgoffset=3 * [1.0 / 8]) - g227oc = GeneratorSite(sg227, [0, 0, 0], sgoffset=3 * [1.0 / 8]) - TestGeneratorSite.generators = { - "g117c": g117c, - "g117h": g117h, - "g143a": g143a, - "g143b": g143b, - "g143c": g143c, - "g143d": g143d, - "g164e": g164e, - "g164f": g164f, - "g164g": g164g, - "g164h": g164h, - "gh167e": gh167e, - "gr167e": gr167e, - "g186c": g186c, - "g227a": g227a, - "g227c": g227c, - "g227oa": g227oa, - "g227oc": g227oc, - } - self.__dict__.update(TestGeneratorSite.generators) - return - - def tearDown(self): - return - - def test___init__(self): - """Check GeneratorSite.__init__()""" - # check multiplicities - self.assertEqual(2, self.g117c.multiplicity) - self.assertEqual(4, self.g117h.multiplicity) - self.assertEqual(1, self.g143a.multiplicity) - self.assertEqual(1, self.g143b.multiplicity) - self.assertEqual(1, self.g143c.multiplicity) - self.assertEqual(3, self.g143d.multiplicity) - self.assertEqual(3, self.g164e.multiplicity) - self.assertEqual(3, self.g164f.multiplicity) - self.assertEqual(6, self.g164g.multiplicity) - self.assertEqual(6, self.g164h.multiplicity) - self.assertEqual(18, self.gh167e.multiplicity) - self.assertEqual(6, self.gr167e.multiplicity) - self.assertEqual(8, self.g227a.multiplicity) - self.assertEqual(16, self.g227c.multiplicity) - self.assertEqual(8, self.g227oa.multiplicity) - self.assertEqual(16, self.g227oc.multiplicity) - return - - def test_signedRatStr(self): - "check GeneratorSite.signedRatStr()" - g = self.g117c - self.assertEqual("-1", g.signedRatStr(-1.00000000000002)) - self.assertEqual("+1", g.signedRatStr(1.00000000000002)) - return - - def test_convert_fp_num_to_signed_rational(self): - "check GeneratorSite.test_convert_fp_num_to_signed_rational()" - g = self.g117c - self.assertEqual("-1", g.convert_fp_num_to_signed_rational(-1.00000000000002)) - self.assertEqual("+1", g.convert_fp_num_to_signed_rational(1.00000000000002)) - return - - def test_positionFormula(self): - """Check GeneratorSite.positionFormula()""" - # 117c - self.assertEqual([], self.g117c.pparameters) - self.assertEqual([("x", self.x)], self.g117h.pparameters) - # 143c - pfm143c = self.g143c.positionFormula(self.g143c.xyz) - self.assertEqual("+2/3", pfm143c["x"]) - self.assertEqual("+1/3", pfm143c["y"]) - self.assertEqual("z", pfm143c["z"]) - # 143d - x, y, z = self.x, self.y, self.z - pfm143d = self.g143d.positionFormula([-x + y, -x, z]) - self.assertEqual("-x+y", pfm143d["x"].replace(" ", "")) - self.assertEqual("-x+1", pfm143d["y"].replace(" ", "")) - self.assertTrue(re.match("[+]?z", pfm143d["z"].strip())) - # 227a - self.assertEqual([], self.g227a.pparameters) - self.assertEqual([], self.g227oa.pparameters) - # 227c - self.assertEqual([], self.g227c.pparameters) - self.assertEqual([], self.g227oc.pparameters) - return - - def test_position_formula(self): - """Check GeneratorSite.positionFormula()""" - # 117c - self.assertEqual([], self.g117c.pparameters) - self.assertEqual([("x", self.x)], self.g117h.pparameters) - # 143c - pfm143c = self.g143c.position_formula(self.g143c.xyz) - self.assertEqual("+2/3", pfm143c["x"]) - self.assertEqual("+1/3", pfm143c["y"]) - self.assertEqual("z", pfm143c["z"]) - # 143d - x, y, z = self.x, self.y, self.z - pfm143d = self.g143d.position_formula([-x + y, -x, z]) - self.assertEqual("-x+y", pfm143d["x"].replace(" ", "")) - self.assertEqual("-x+1", pfm143d["y"].replace(" ", "")) - self.assertTrue(re.match("[+]?z", pfm143d["z"].strip())) - # 227a - self.assertEqual([], self.g227a.pparameters) - self.assertEqual([], self.g227oa.pparameters) - # 227c - self.assertEqual([], self.g227c.pparameters) - self.assertEqual([], self.g227oc.pparameters) - return - - def test_positionFormula_sg209(self): - "check positionFormula at [x, 1-x, -x] site of the F432 space group." - sg209 = get_space_group("F 4 3 2") - xyz = [0.05198, 0.94802, -0.05198] - g209e = GeneratorSite(sg209, xyz) - pfm = g209e.positionFormula(xyz) - self.assertEqual("x", pfm["x"]) - self.assertEqual("-x+1", pfm["y"].replace(" ", "")) - self.assertEqual("-x+1", pfm["z"].replace(" ", "")) - return - - def test_position_formula_sg209(self): - "check positionFormula at [x, 1-x, -x] site of the F432 space group." - sg209 = get_space_group("F 4 3 2") - xyz = [0.05198, 0.94802, -0.05198] - g209e = GeneratorSite(sg209, xyz) - pfm = g209e.position_formula(xyz) - self.assertEqual("x", pfm["x"]) - self.assertEqual("-x+1", pfm["y"].replace(" ", "")) - self.assertEqual("-x+1", pfm["z"].replace(" ", "")) - return - - def test_UFormula(self): - """Check GeneratorSite.UFormula()""" - # Ref: Willis and Pryor, Thermal Vibrations in Crystallography, - # Cambridge University Press 1975, p. 104-110 - smbl = ("A", "B", "C", "D", "E", "F") - norule = { - "U11": "A", - "U22": "B", - "U33": "C", - "U12": "D", - "U13": "E", - "U23": "F", - } - rule05 = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "0", - "U23": "0", - } - rule06 = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "E", - "U23": "E", - } - rule07 = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "E", - "U23": "-E", - } - rule15 = { - "U11": "A", - "U22": "B", - "U33": "C", - "U12": "0.5*B", - "U13": "0.5*F", - "U23": "F", - } - rule16 = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "0.5*A", - "U13": "0", - "U23": "0", - } - rule17 = { - "U11": "A", - "U22": "A", - "U33": "A", - "U12": "0", - "U13": "0", - "U23": "0", - } - rule18 = { - "U11": "A", - "U22": "A", - "U33": "A", - "U12": "D", - "U13": "D", - "U23": "D", - } - ufm = self.g117c.UFormula(self.g117c.xyz, smbl) - self.assertEqual(rule05, ufm) - ufm = self.g117h.UFormula(self.g117h.xyz, smbl) - self.assertEqual(rule07, ufm) - ufm = self.g143a.UFormula(self.g143a.xyz, smbl) - self.assertEqual(rule16, ufm) - ufm = self.g143b.UFormula(self.g143b.xyz, smbl) - self.assertEqual(rule16, ufm) - ufm = self.g143c.UFormula(self.g143c.xyz, smbl) - self.assertEqual(rule16, ufm) - ufm = self.g143d.UFormula(self.g143d.xyz, smbl) - self.assertEqual(norule, ufm) - ufm = self.g164e.UFormula(self.g164e.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.g164f.UFormula(self.g164f.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.g164g.UFormula(self.g164g.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.g164h.UFormula(self.g164h.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.g186c.UFormula(self.g186c.xyz, smbl) - self.assertEqual(rule07, ufm) - ufm = self.g227a.UFormula(self.g227a.xyz, smbl) - self.assertEqual(rule17, ufm) - ufm = self.g227c.UFormula(self.g227c.xyz, smbl) - self.assertEqual(rule18, ufm) - ufm = self.g227oa.UFormula(self.g227oa.xyz, smbl) - self.assertEqual(rule17, ufm) - ufm = self.g227oc.UFormula(self.g227oc.xyz, smbl) - self.assertEqual(rule18, ufm) - # SG 167 in hexagonal and rhombohedral setting - ufm = self.gh167e.UFormula(self.gh167e.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.gr167e.UFormula(self.gr167e.xyz, smbl) - self.assertEqual(rule06, ufm) - return - - def test_u_formula(self): - """Check GeneratorSite.UFormula()""" - # Ref: Willis and Pryor, Thermal Vibrations in Crystallography, - # Cambridge University Press 1975, p. 104-110 - smbl = ("A", "B", "C", "D", "E", "F") - norule = { - "U11": "A", - "U22": "B", - "U33": "C", - "U12": "D", - "U13": "E", - "U23": "F", - } - rule05 = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "0", - "U23": "0", - } - rule06 = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "E", - "U23": "E", - } - rule07 = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "E", - "U23": "-E", - } - rule15 = { - "U11": "A", - "U22": "B", - "U33": "C", - "U12": "0.5*B", - "U13": "0.5*F", - "U23": "F", - } - rule16 = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "0.5*A", - "U13": "0", - "U23": "0", - } - rule17 = { - "U11": "A", - "U22": "A", - "U33": "A", - "U12": "0", - "U13": "0", - "U23": "0", - } - rule18 = { - "U11": "A", - "U22": "A", - "U33": "A", - "U12": "D", - "U13": "D", - "U23": "D", - } - ufm = self.g117c.u_formula(self.g117c.xyz, smbl) - self.assertEqual(rule05, ufm) - ufm = self.g117h.u_formula(self.g117h.xyz, smbl) - self.assertEqual(rule07, ufm) - ufm = self.g143a.u_formula(self.g143a.xyz, smbl) - self.assertEqual(rule16, ufm) - ufm = self.g143b.u_formula(self.g143b.xyz, smbl) - self.assertEqual(rule16, ufm) - ufm = self.g143c.u_formula(self.g143c.xyz, smbl) - self.assertEqual(rule16, ufm) - ufm = self.g143d.u_formula(self.g143d.xyz, smbl) - self.assertEqual(norule, ufm) - ufm = self.g164e.u_formula(self.g164e.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.g164f.u_formula(self.g164f.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.g164g.u_formula(self.g164g.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.g164h.u_formula(self.g164h.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.g186c.u_formula(self.g186c.xyz, smbl) - self.assertEqual(rule07, ufm) - ufm = self.g227a.u_formula(self.g227a.xyz, smbl) - self.assertEqual(rule17, ufm) - ufm = self.g227c.u_formula(self.g227c.xyz, smbl) - self.assertEqual(rule18, ufm) - ufm = self.g227oa.u_formula(self.g227oa.xyz, smbl) - self.assertEqual(rule17, ufm) - ufm = self.g227oc.u_formula(self.g227oc.xyz, smbl) - self.assertEqual(rule18, ufm) - # SG 167 in hexagonal and rhombohedral setting - ufm = self.gh167e.u_formula(self.gh167e.xyz, smbl) - self.assertEqual(rule15, ufm) - ufm = self.gr167e.u_formula(self.gr167e.xyz, smbl) - self.assertEqual(rule06, ufm) - return - - def test_UFormula_g186c_eqxyz(self): - """Check rotated U formulas at the symmetry positions of c-site - in 186.""" - sg186 = get_space_group(186) - crules = [ - { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "E", - "U23": "-E", - }, - { - "U11": "A", - "U22": "2*A-2*D", - "U33": "C", - "U12": "A-D", - "U13": "E", - "U23": "2*E", - }, - { - "U11": "2*A-2*D", - "U22": "A", - "U33": "C", - "U12": "A-D", - "U13": "-2*E", - "U23": "-E", - }, - { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "-E", - "U23": "E", - }, - { - "U11": "A", - "U22": "2*A-2*D", - "U33": "C", - "U12": "A-D", - "U13": "-E", - "U23": "-2*E", - }, - { - "U11": "2*A-2*D", - "U22": "A", - "U33": "C", - "U12": "A-D", - "U13": "2*E", - "U23": "E", - }, - ] - self.assertEqual(6, len(self.g186c.eqxyz)) - gc = self.g186c - for idx in range(6): - self.assertEqual(crules[idx], gc.UFormula(gc.eqxyz[idx], "ABCDEF")) - uiso = numpy.array([[2, 1, 0], [1, 2, 0], [0, 0, 2]]) - eau = ExpandAsymmetricUnit(sg186, [gc.xyz], [uiso]) - for u in eau.expandedUijs: - du = numpy.linalg.norm((uiso - u).flatten()) - self.assertAlmostEqual(0.0, du, 8) - symcon = SymmetryConstraints(sg186, sum(eau.expandedpos, []), sum(eau.expandedUijs, [])) - upd = dict(symcon.Upars) - self.assertEqual(2.0, upd["U110"]) - self.assertEqual(2.0, upd["U330"]) - self.assertEqual(1.0, upd["U120"]) - self.assertEqual(0.0, upd["U130"]) - uisod = { - "U11": 2.0, - "U22": 2.0, - "U33": 2.0, - "U12": 1.0, - "U13": 0.0, - "U23": 0.0, - } - for ufms in symcon.UFormulas(): - for n, fm in ufms.items(): - self.assertEqual(uisod[n], eval(fm, upd)) - return - - def test_u_formula_g186c_eqxyz(self): - """Check rotated U formulas at the symmetry positions of c-site - in 186.""" - sg186 = get_space_group(186) - crules = [ - { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "E", - "U23": "-E", - }, - { - "U11": "A", - "U22": "2*A-2*D", - "U33": "C", - "U12": "A-D", - "U13": "E", - "U23": "2*E", - }, - { - "U11": "2*A-2*D", - "U22": "A", - "U33": "C", - "U12": "A-D", - "U13": "-2*E", - "U23": "-E", - }, - { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "D", - "U13": "-E", - "U23": "E", - }, - { - "U11": "A", - "U22": "2*A-2*D", - "U33": "C", - "U12": "A-D", - "U13": "-E", - "U23": "-2*E", - }, - { - "U11": "2*A-2*D", - "U22": "A", - "U33": "C", - "U12": "A-D", - "U13": "2*E", - "U23": "E", - }, - ] - self.assertEqual(6, len(self.g186c.eqxyz)) - gc = self.g186c - for idx in range(6): - self.assertEqual(crules[idx], gc.u_formula(gc.eqxyz[idx], "ABCDEF")) - uiso = numpy.array([[2, 1, 0], [1, 2, 0], [0, 0, 2]]) - eau = ExpandAsymmetricUnit(sg186, [gc.xyz], [uiso]) - for u in eau.expandedUijs: - du = numpy.linalg.norm((uiso - u).flatten()) - self.assertAlmostEqual(0.0, du, 8) - symcon = SymmetryConstraints(sg186, sum(eau.expandedpos, []), sum(eau.expandedUijs, [])) - upd = dict(symcon.Upars) - self.assertEqual(2.0, upd["U110"]) - self.assertEqual(2.0, upd["U330"]) - self.assertEqual(1.0, upd["U120"]) - self.assertEqual(0.0, upd["U130"]) - uisod = { - "U11": 2.0, - "U22": 2.0, - "U33": 2.0, - "U12": 1.0, - "U13": 0.0, - "U23": 0.0, - } - for ufms in symcon.u_formulas(): - for n, fm in ufms.items(): - self.assertEqual(uisod[n], eval(fm, upd)) - return - - def test_UFormula_self_reference(self): - "Ensure U formulas have no self reference such as U13=0.5*U13." - for g in self.generators.values(): - badformulas = [(n, fm) for n, fm in g.UFormula(g.xyz).items() if n in fm and n != fm] - self.assertEqual([], badformulas) - return - - def test_u_formula_self_reference(self): - "Ensure U formulas have no self reference such as U13=0.5*U13." - for g in self.generators.values(): - badformulas = [(n, fm) for n, fm in g.u_formula(g.xyz).items() if n in fm and n != fm] - self.assertEqual([], badformulas) - return - - def test__findUParameters(self): - """Check GeneratorSite._findUParameters()""" - # by default all Uparameters equal zero, this would fail for NaNs - for gen in TestGeneratorSite.generators.values(): - for usym, uval in gen.Uparameters: - self.assertEqual(0.0, uval) - # special test for g117h - Uij = numpy.array([[1, 3, 4], [3, 1, -4], [4, -4, 2]]) - sg117 = get_space_group(117) - g117h = GeneratorSite(sg117, self.g117h.xyz, Uij) - upd = dict(g117h.Uparameters) - self.assertEqual(1, upd["U11"]) - self.assertEqual(2, upd["U33"]) - self.assertEqual(3, upd["U12"]) - self.assertEqual(4, upd["U13"]) - return - - def test_eqIndex(self): - """Check GeneratorSite.eqIndex()""" - self.assertEqual(13, self.g227oc.eqIndex(self.g227oc.eqxyz[13])) - return - - def test_eq_index(self): - """Check GeneratorSite.eqIndex()""" - self.assertEqual(13, self.g227oc.eq_index(self.g227oc.eqxyz[13])) - return - - -# End of class TestGeneratorSite - -# ---------------------------------------------------------------------------- - - -class TestSymmetryConstraints(unittest.TestCase): - - def setUp(self): - return - - def tearDown(self): - return - - def test___init__(self): - """Check SymmetryConstraints.__init__()""" - sg225 = get_space_group(225) - # initialize from nested lists and arrays from ExpandAsymmetricUnit - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc0 = SymmetryConstraints(sg225, eau.expandedpos) - self.assertEqual(1, len(sc0.coremap)) - # initialize from list of arrays of coordinates - poslistarrays = [xyz for xyz in sc0.positions] - sc1 = SymmetryConstraints(sg225, poslistarrays) - self.assertEqual(1, len(sc1.coremap)) - # initialize from list of lists of coordinates - poslistlist = [list(xyz) for xyz in poslistarrays] - sc2 = SymmetryConstraints(sg225, poslistlist) - self.assertEqual(1, len(sc2.coremap)) - # initialize from nx3 array - posarray = numpy.array(poslistlist) - sc3 = SymmetryConstraints(sg225, posarray) - self.assertEqual(1, len(sc3.coremap)) - # finally initialize from a single coordinate - sc4 = SymmetryConstraints(sg225, [0, 0, 0]) - self.assertEqual(1, len(sc4.coremap)) - return - - def test_corepos(self): - """test_corepos - find positions in the asymmetric unit.""" - sg225 = get_space_group(225) - corepos = [[0, 0, 0], [0.1, 0.13, 0.17]] - eau = ExpandAsymmetricUnit(sg225, corepos) - sc = SymmetryConstraints(sg225, eau.expandedpos) - self.assertEqual(2, len(sc.corepos)) - self.assertTrue(numpy.all(corepos[0] == sc.corepos[0])) - self.assertTrue(numpy.all(corepos[1] == sc.corepos[1])) - self.assertEqual(2, len(sc.coremap)) - mapped_count = sum(len(idcs) for idcs in sc.coremap.values()) - self.assertEqual(len(sc.positions), mapped_count) - self.assertTrue(sc.coremap[0] == list(range(4))) - self.assertTrue(sc.coremap[4] == list(range(4, 4 + 192))) - return - - def test_Uisotropy(self): - """Check isotropy value for ADP-s at specified sites.""" - sg225 = get_space_group(225) - corepos = [[0, 0, 0], [0.1, 0.13, 0.17]] - eau = ExpandAsymmetricUnit(sg225, corepos) - self.assertEqual([True, False], eau.Uisotropy) - sc = SymmetryConstraints(sg225, eau.expandedpos) - self.assertEqual(4 * [True] + 192 * [False], sc.Uisotropy) - return - - # def test__findConstraints(self): - # """check SymmetryConstraints._findConstraints() - # """ - # return - # - # def test_posparSymbols(self): - # """check SymmetryConstraints.posparSymbols() - # """ - # return - # - # def test_posparValues(self): - # """check SymmetryConstraints.posparValues() - # """ - # return - # - # def test_positionFormulas(self): - # """check SymmetryConstraints.positionFormulas() - # """ - # return - # - # def test_positionFormulasPruned(self): - # """check SymmetryConstraints.positionFormulasPruned() - # """ - # return - # - def test_UparSymbols(self): - """Check SymmetryConstraints.UparSymbols()""" - sg1 = get_space_group(1) - sg225 = get_space_group(225) - pos = [[0, 0, 0]] - Uijs = numpy.zeros((1, 3, 3)) - sc1 = SymmetryConstraints(sg1, pos, Uijs) - self.assertEqual(6, len(sc1.UparSymbols())) - sc225 = SymmetryConstraints(sg225, pos, Uijs) - self.assertEqual(["U110"], sc225.UparSymbols()) - return - - def test_upar_symbols(self): - """Check SymmetryConstraints.UparSymbols()""" - sg1 = get_space_group(1) - sg225 = get_space_group(225) - pos = [[0, 0, 0]] - Uijs = numpy.zeros((1, 3, 3)) - sc1 = SymmetryConstraints(sg1, pos, Uijs) - self.assertEqual(6, len(sc1.u_parm_symbols())) - sc225 = SymmetryConstraints(sg225, pos, Uijs) - self.assertEqual(["U110"], sc225.u_parm_symbols()) - return - - def test_UparValues(self): - """Check SymmetryConstraints.UparValues()""" - places = 12 - sg1 = get_space_group(1) - sg225 = get_space_group(225) - pos = [[0, 0, 0]] - Uijs = [[[0.1, 0.4, 0.5], [0.4, 0.2, 0.6], [0.5, 0.6, 0.3]]] - sc1 = SymmetryConstraints(sg1, pos, Uijs) - duv = 0.1 * numpy.arange(1, 7) - sc1.UparValues() - self.assertAlmostEqual(0, max(numpy.fabs(duv)), places) - sc225 = SymmetryConstraints(sg225, pos, Uijs) - self.assertEqual(1, len(sc225.UparValues())) - self.assertAlmostEqual(0.2, sc225.UparValues()[0], places) - return - - def test_upar_values(self): - """Check SymmetryConstraints.UparValues()""" - places = 12 - sg1 = get_space_group(1) - sg225 = get_space_group(225) - pos = [[0, 0, 0]] - Uijs = [[[0.1, 0.4, 0.5], [0.4, 0.2, 0.6], [0.5, 0.6, 0.3]]] - sc1 = SymmetryConstraints(sg1, pos, Uijs) - duv = 0.1 * numpy.arange(1, 7) - sc1.u_parm_values() - self.assertAlmostEqual(0, max(numpy.fabs(duv)), places) - sc225 = SymmetryConstraints(sg225, pos, Uijs) - self.assertEqual(1, len(sc225.u_parm_values())) - self.assertAlmostEqual(0.2, sc225.u_parm_values()[0], places) - return - - def test_posparSymbols_and_posparValues(self): - """Check SymmetryConstraints.posparSymbols and_posparValues()""" - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - sc.pospars = [("x", 0.12), ("y", 0.34), ("z", 0.56)] - actual_symbols = sc.posparSymbols() - actual_values = sc.posparValues() - expected_symbols = ["x", "y", "z"] - expected_values = [0.12, 0.34, 0.56] - assert expected_symbols == actual_symbols - assert expected_values == actual_values - - def test_positionFormulas(self): - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - # C1: Simulate the "not enough symbols" branch - sc.pospars = [("x1", 0.12), ("y1", 0.34), ("z1", 0.56)] - sc.poseqns = [ - {"x": "x1", "y": "y1 +0.5", "z": "-z1 +0.25"}, - {"x": "-x1 +0.5", "y": "y1", "z": "z1 +0.5"}, - ] - with pytest.raises(SymmetryError): - sc.positionFormulas(["x1"]) # too few custom symbols - # C2: Normal case, does substitution of x0/y0/z0 tokens in formulas - # Make pospars consistent with what positionFormulas expects to replace - actual = sc.positionFormulas(["xA", "yA", "zA"]) - expected = [ - {"x": "xA", "y": "yA +0.5", "z": "-zA +0.25"}, - {"x": "-xA +0.5", "y": "yA", "z": "zA +0.5"}, - ] - assert actual == expected - - def test_positionFormulasPruned(self): - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - # C1: Remove any key-value pairs with constant values - sc.pospars = [("x1", 0.12), ("y1", 0.34), ("z1", 0.56)] - sc.poseqns = [ - {"x": "x1", "y": "0.25", "z": "-z1 +0.5"}, - {"x": "0", "y": "y1 +0.5", "z": "0.125"}, - ] - actual = sc.positionFormulasPruned(["xA", "yA", "zA"]) - expected = [ - {"x": "xA", "z": "-zA +0.5"}, - {"y": "yA +0.5"}, - ] - assert actual == expected - - def test_UFormulasPruned(self): - """Check SymmetryConstraints.UFormulasPruned()""" - u_formulas = { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "0.5*A", - "U13": "0", - "U23": "0", - } - expected = [ - { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "0.5*A", - } - ] - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - sc.Ueqns = [u_formulas] - actual = sc.UFormulasPruned(u_formulas) - assert actual == expected - - -# def test_UFormulas(self): -# """check SymmetryConstraints.UFormulas() -# """ -# return -# -# def test_UFormulasPruned(self): -# """check SymmetryConstraints.UFormulasPruned() -# """ -# return - -# End of class TestSymmetryConstraints - -# ---------------------------------------------------------------------------- - - -@pytest.mark.parametrize( - "xyz0, xyz1, expected", - [ - pytest.param( # C1: Generic case for symmetry mapping for periodic lattice - [0.1, 0.9, 0.2], - [0.8, 0.1, 0.8], - [0.3, 0.2, 0.4], - ), - pytest.param( # C2: Boundary case for entries with mapping on difference equal to 0.5 - [1.2, -0.1, 2.75], - [0.1, 0.4, 0.25], - [0.1, 0.5, 0.5], - ), - ], -) -def test_position_difference(xyz0, xyz1, expected): - actual = position_difference(xyz0, xyz1) - assert numpy.allclose(actual, expected) - - -@pytest.mark.parametrize( - "sites, xyz, expected", - [ - pytest.param( # C1: We have two sites, and the xyz is closest to the index 1 site - [[0.1, 0.9, 0.2], [0.8, 0.1, 0.8]], - [0.8, 0.1, 0.8], - 1, - ), - pytest.param( # C2: we have one site, and the xyz is closest to the index 0 site by default - [[1.2, -0.1, 2.75]], - [0.7, 0.4, 0.25], - 0, - ), - ], -) -def test_nearest_site_index(sites, xyz, expected): - actual = nearest_site_index(sites, xyz) - assert actual == expected - - -@pytest.mark.parametrize( - "xyz0, xyz1, eps, expected", - [ - pytest.param([0.1, 0.2, 0.3], [0.1, 0.2, 0.3], 1.0e-5, True), # C1: same position - pytest.param( - [0.1 + 0.5e-5, 0.2 + 0.5e-5, 0.3 + 0.5e-5], [0.1, 0.2, 0.3], 1.0e-5, True - ), # C2: same position with some tolerance - pytest.param([0.2, 0.2, 0.3], [0.1, 0.2, 0.3], 1.0e-5, False), # C3: different positions - ], -) -def test_equal_positions(xyz0, xyz1, eps, expected): - """Check equalPositions.""" - actual = equal_positions(xyz0, xyz1, eps) - assert actual == expected - - -@pytest.mark.parametrize( - "A, expected_dim", - [ - pytest.param( # C1: full-rank 2x2 matrix - [[1.0, 0.0], [0.0, 1.0]], - 0, - ), - pytest.param( # C2: Nullspace has dim 1 - [[1.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 2.0]], - 1, - ), - pytest.param( # C3: Nullspace has dim 2 - [[1.0, 2.0, 3.0], [2.0, 4.0, 6.0], [0.0, 0.0, 0.0]], - 2, - ), - pytest.param( # C4: Nullspace has dim 2 - [[0.0, 0.0], [0.0, 0.0]], - 2, - ), - ], -) -def test_nullSpace(A, expected_dim): - """Check nullSpace returns an orthonormal basis on supported square - matrices.""" - A = numpy.asarray(A, dtype=float) - actual = nullSpace(A) - - assert actual.shape == (expected_dim, A.shape[1]) - assert numpy.allclose(A @ actual.T, numpy.zeros((A.shape[0], expected_dim)), atol=1e-12) - assert numpy.allclose(actual @ actual.T, numpy.eye(expected_dim), atol=1e-12) - - -@pytest.mark.parametrize( - "A, expected_dim", - [ - pytest.param( # C1: full-rank 2x2 matrix - [[1.0, 0.0], [0.0, 1.0]], - 0, - ), - pytest.param( # C2: Nullspace has dim 1 - [[1.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 2.0]], - 1, - ), - pytest.param( # C3: Nullspace has dim 2 - [[1.0, 2.0, 3.0], [2.0, 4.0, 6.0], [0.0, 0.0, 0.0]], - 2, - ), - pytest.param( # C4: Nullspace has dim 2 - [[0.0, 0.0], [0.0, 0.0]], - 2, - ), - ], -) -def test_null_space(A, expected_dim): - """Check null_space returns an orthonormal basis on supported square - matrices.""" - A = numpy.asarray(A, dtype=float) - actual = null_space(A) - - assert actual.shape == (expected_dim, A.shape[1]) - assert numpy.allclose(A @ actual.T, numpy.zeros((A.shape[0], expected_dim)), atol=1e-12) - assert numpy.allclose(actual @ actual.T, numpy.eye(expected_dim), atol=1e-12) - - -@pytest.mark.parametrize( - "params, expected_symbols, expected_values", - [ - pytest.param([("x", 0.12), ("y", 0.34), ("z", 0.56)], ["x", "y", "z"], [0.12, 0.34, 0.56]), - ], -) -def test_pospar_symbols_and_pospar_values(params, expected_symbols, expected_values): - """Check SymmetryConstraints.pospar_symbols and_pospar_values()""" - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - sc.pospars = params - actual_symbols, actual_values = sc.pos_parm_symbols(), sc.pos_parm_values() - assert actual_symbols == expected_symbols - assert actual_values == expected_values - - -@pytest.mark.parametrize( - "params", - [ - pytest.param(["x1"]), - ], -) -def test_position_formulas_raises_SymmetryError(params): - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - sc.pospars = [("x1", 0.12), ("y1", 0.34), ("z1", 0.56)] - sc.poseqns = [ - {"x": "x1", "y": "y1 +0.5", "z": "-z1 +0.25"}, - {"x": "-x1 +0.5", "y": "y1", "z": "z1 +0.5"}, - ] - # C1: Simulate the "not enough symbols" in position_formula - with pytest.raises(SymmetryError): - sc.position_formulas(params) - - -@pytest.mark.parametrize( - "params, expected", - [ - pytest.param( # C2: Normal case, does substitution of x1/y1/z1 tokens in formulas - # Make pospars consistent with what position_formulas expects to replace - ["xA", "yA", "zA"], - [ - {"x": "xA", "y": "yA +0.5", "z": "-zA +0.25"}, - {"x": "-xA +0.5", "y": "yA", "z": "zA +0.5"}, - ], - ), - ], -) -def test_position_formulas(params, expected): - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - sc.pospars = [("x1", 0.12), ("y1", 0.34), ("z1", 0.56)] - sc.poseqns = [ - {"x": "x1", "y": "y1 +0.5", "z": "-z1 +0.25"}, - {"x": "-x1 +0.5", "y": "y1", "z": "z1 +0.5"}, - ] - actual = sc.position_formulas(params) - assert actual == expected - - -@pytest.mark.parametrize( - "poseqns, expected", - [ - pytest.param( - [ - {"x": "x1", "y": "0.25", "z": "-z1 +0.5"}, - {"x": "0", "y": "y1 +0.5", "z": "0.125"}, - ], - [ - {"x": "xA", "z": "-zA +0.5"}, - {"y": "yA +0.5"}, - ], - ) - ], -) -def test_position_formulas_pruned(poseqns, expected): - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - - sc.pospars = [("x1", 0.12), ("y1", 0.34), ("z1", 0.56)] - sc.poseqns = poseqns - - actual = sc.position_formulas_pruned(["xA", "yA", "zA"]) - assert actual == expected - - -@pytest.mark.parametrize( - "u_formulas, expected", - [ - pytest.param( - [ - { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "0.5*A", - "U13": "0", - "U23": "0", - } - ], - [ - { - "U11": "A", - "U22": "A", - "U33": "C", - "U12": "0.5*A", - } - ], - ) - ], -) -def test_u_formula_pruned(u_formulas, expected): - sg225 = get_space_group(225) - eau = ExpandAsymmetricUnit(sg225, [[0, 0, 0]]) - sc = SymmetryConstraints(sg225, eau.expandedpos) - sc.Ueqns = u_formulas - actual = sc.u_formulas_pruned(u_formulas) - assert actual == expected - - -if __name__ == "__main__": - unittest.main() diff --git a/tests/test_utils.py b/tests/test_utils.py deleted file mode 100644 index 0c89ae09..00000000 --- a/tests/test_utils.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure Complex Modeling Initiative -# (c) 2016 Brookhaven Science Associates, -# Brookhaven National Laboratory. -# All rights reserved. -# -# File coded by: Pavol Juhas -# -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE.txt for license information. -# -############################################################################## -"""Test for Structure utilities.""" -import pytest - -from diffpy.structure.utils import atom_bare_symbol, atomBareSymbol - - -def test_atomBareSymbol(): - assert atomBareSymbol("Cl-") == "Cl" - assert atomBareSymbol("Ca2+") == "Ca" - assert atomBareSymbol("12-C") == "C" - - -@pytest.mark.parametrize( - "symbol, expected", - [ - ("Cl-", "Cl"), - ("Ca2+", "Ca"), - ("12-C", "C"), - ], -) -def test_atom_bare_symbol(symbol, expected): - actual = atom_bare_symbol(symbol) - assert actual == expected diff --git a/tests/test_version.py b/tests/test_version.py deleted file mode 100644 index 5d55a864..00000000 --- a/tests/test_version.py +++ /dev/null @@ -1,10 +0,0 @@ -"""Unit tests for __version__.py.""" - -import diffpy.structure # noqa - - -def test_package_version(): - """Ensure the package version is defined and not set to the initial - placeholder.""" - assert hasattr(diffpy.structure, "__version__") - assert diffpy.structure.__version__ != "0.0.0" diff --git a/tests/testdata/BubbleRaftShort.xcfg b/tests/testdata/BubbleRaftShort.xcfg deleted file mode 100644 index 0fdd9363..00000000 --- a/tests/testdata/BubbleRaftShort.xcfg +++ /dev/null @@ -1,523 +0,0 @@ -Number of particles = 500 -A = 4.37576470588235 Angstrom (basic length-scale) -H0(1,1) = 127.5 A -H0(1,2) = 0 A -H0(1,3) = 0 A -H0(2,1) = 0 A -H0(2,2) = 119.5 A -H0(2,3) = 0 A -H0(3,1) = 0 A -H0(3,2) = 0 A -H0(3,3) = 3 A -.NO_VELOCITY. -entry_count = 11 -auxiliary[0] = kine [reduced unit] -auxiliary[1] = pote [reduced unit] -auxiliary[2] = s11 [reduced unit] -auxiliary[3] = s22 [reduced unit] -auxiliary[4] = s12 [reduced unit] -auxiliary[5] = hydro [reduced unit] -auxiliary[6] = mises [reduced unit] -auxiliary[7] = Lmin [reduced unit] -1.000000 -Ar -0.0016667 0.00616 0.5 0 -2 -1.9431e-13 -2.9917e-13 1.6811e-13 -2.4674e-13 1.7609e-13 98.648 -0.005 0.01232 0.5 0 -2.9819 0.79705 2.3326 0.022255 1.5648 0.76808 102.82 -0.0083333 0.00616 0.5 0 -2 1.0294e-14 -1.2064e-16 -4.5444e-15 5.0866e-15 6.9114e-15 98.648 -0.011667 0.01232 0.5 0 -2.9825 0.79347 2.321 0.053629 1.5573 0.76567 102.92 -0.015 0.00616 0.5 0 -2 -1.8561e-14 7.7449e-15 -9.0856e-15 -5.4079e-15 1.5986e-14 98.648 -0.018333 0.01232 0.5 0 -2.9826 0.80111 2.3436 0.091454 1.5724 0.77665 102.71 -0.021667 0.00616 0.5 0 -2 1.8167e-14 -7.9919e-15 3.4682e-34 5.0876e-15 1.3079e-14 98.648 -0.025 0.01232 0.5 0 -2.9826 0.8041 2.3503 0.11105 1.5772 0.78105 102.98 -0.028333 0.00616 0.5 0 -2 -5.7907e-14 -1.5863e-14 -3.1805e-14 -3.6885e-14 3.8124e-14 98.648 -0.031667 0.01232 0.5 0 -2.9817 0.80768 2.3621 0.13788 1.5849 0.78933 103.01 -0.035 0.00616 0.5 0 -2 2.6034e-14 4.7095e-14 3.1805e-14 3.6564e-14 3.3503e-14 98.648 -0.038333 0.01232 0.5 0 -2.9815 0.81018 2.3704 0.17084 1.5903 0.79862 103.03 -0.041667 0.00616 0.5 0 -2 8.1122e-14 -7.9919e-15 3.4682e-34 3.6565e-14 4.4557e-14 98.648 -0.045 0.01232 0.5 0 -2.9818 0.8142 2.3803 0.2047 1.5972 0.80934 103.06 -0.048333 0.00616 0.5 0 -2 -5.5283e-14 -7.9919e-15 3.4682e-34 -3.1637e-14 2.3645e-14 98.648 -0.051667 0.01232 0.5 0 -2.981 0.81914 2.3988 0.24067 1.6089 0.82567 102.38 -0.055 0.00616 0.5 0 -2 -5.5283e-14 -7.9919e-15 3.4682e-34 -3.1637e-14 2.3645e-14 98.648 -0.058333 0.01232 0.5 0 -2.9813 0.82431 2.4129 0.27837 1.6186 0.84165 102.29 -0.061667 0.00616 0.5 0 -2 8.1122e-14 -7.9919e-15 3.4682e-34 3.6565e-14 4.4557e-14 98.648 -0.065 0.01232 0.5 0 -2.9806 0.83509 2.446 0.30826 1.6406 0.86245 103.08 -0.068333 0.00616 0.5 0 -2 8.1122e-14 -7.9919e-15 -6.3609e-14 3.6565e-14 7.7662e-14 98.648 -0.071667 0.01232 0.5 0 -2.9802 0.84335 2.4734 0.33002 1.6584 0.87931 103.09 -0.075 0.00616 0.5 0 -2 -5.5283e-14 -7.9919e-15 -6.3609e-14 -3.1637e-14 6.7862e-14 98.648 -0.078333 0.01232 0.5 0 -2.9797 0.84914 2.4933 0.35451 1.6712 0.89527 102.08 -0.081667 0.00616 0.5 0 -2 -5.5283e-14 -7.9919e-15 -6.3609e-14 -3.1637e-14 6.7862e-14 98.648 -0.085 0.01232 0.5 0 -2.9799 0.85175 2.4974 0.38103 1.6746 0.90679 102.01 -0.088333 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.091667 0.01232 0.5 0 -2.9792 0.85791 2.5159 0.40995 1.6869 0.92484 103.07 -0.095 0.00616 0.5 0 -2 -5.5283e-14 -7.9919e-15 6.3609e-14 -3.1637e-14 6.7862e-14 98.648 -0.098333 0.01232 0.5 0 -2.9784 0.86862 2.5501 0.44537 1.7093 0.9514 101.82 -0.10167 0.00616 0.5 0 -2 -5.5283e-14 -7.9919e-15 6.3609e-14 -3.1637e-14 6.7862e-14 98.648 -0.105 0.01232 0.5 0 -2.9778 0.88016 2.5845 0.4617 1.7323 0.9692 103.05 -0.10833 0.00616 0.5 0 -2 -5.5283e-14 -7.9919e-15 6.3609e-14 -3.1637e-14 6.7862e-14 98.648 -0.11167 0.01232 0.5 0 -2.9773 0.8954 2.6272 0.48733 1.7613 0.99363 103.06 -0.115 0.00616 0.5 0 -2 -5.5283e-14 -7.9919e-15 6.3609e-14 -3.1637e-14 6.7862e-14 98.648 -0.11833 0.01232 0.5 0 -2.9762 0.90808 2.6688 0.50676 1.7884 1.0158 101.65 -0.12167 0.00616 0.5 0 -2 2.2802e-13 -7.9919e-15 6.3609e-14 1.1002e-13 1.3406e-13 98.648 -0.125 0.01232 0.5 0 -2.9753 0.91811 2.6991 0.53921 1.8086 1.041 103.04 -0.12833 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.13167 0.01232 0.5 0 -2.9753 0.92706 2.7241 0.55563 1.8256 1.0564 101.49 -0.135 0.00616 0.5 0 -2 -8.9384e-14 -1.103e-13 1.2267e-13 -9.9839e-14 1.2312e-13 98.648 -0.13833 0.01232 0.5 0 -2.9743 0.93771 2.7615 0.58526 1.8496 1.0836 101.42 -0.14167 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.145 0.01232 0.5 0 -2.9736 0.95017 2.7976 0.60393 1.8739 1.1036 103.01 -0.14833 0.00616 0.5 0 -2 -8.9384e-14 -1.103e-13 1.2267e-13 -9.9839e-14 1.2312e-13 98.648 -0.15167 0.01232 0.5 0 -2.9731 0.96396 2.8373 0.62514 1.9006 1.1261 101.3 -0.155 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 -8.5463e-34 3.2512e-13 2.2293e-13 98.648 -0.15833 0.01232 0.5 0 -2.9718 0.97659 2.8785 0.64088 1.9276 1.1468 101.25 -0.16167 0.00616 0.5 0 -2 -8.9384e-14 -1.103e-13 -1.2267e-13 -9.9839e-14 1.2312e-13 98.648 -0.165 0.01232 0.5 0 -2.9713 0.98709 2.9103 0.65849 1.9487 1.1655 102.99 -0.16833 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.17167 0.01232 0.5 0 -2.971 1.0017 2.9488 0.67815 1.9752 1.1864 101.15 -0.175 0.00616 0.5 0 -2 -8.9384e-14 -1.103e-13 -1.2267e-13 -9.9839e-14 1.2312e-13 98.648 -0.17833 0.01232 0.5 0 -2.9693 1.0194 3.001 0.691 2.0102 1.2079 102.98 -0.18167 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.185 0.01232 0.5 0 -2.9686 1.0378 3.0526 0.6997 2.0452 1.2266 103 -0.18833 0.00616 0.5 0 -2 -8.9384e-14 -1.103e-13 -1.2267e-13 -9.9839e-14 1.2312e-13 98.648 -0.19167 0.01232 0.5 0 -2.9675 1.0558 3.1033 0.7166 2.0795 1.2496 103 -0.195 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.19833 0.01232 0.5 0 -2.9675 1.0624 3.1212 0.71752 2.0918 1.2548 101.03 -0.20167 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.205 0.01232 0.5 0 -2.9669 1.0706 3.1518 0.73231 2.1112 1.2725 102.98 -0.20833 0.00616 0.5 0 -2 -8.9384e-14 -1.103e-13 1.2267e-13 -9.9839e-14 1.2312e-13 98.648 -0.21167 0.01232 0.5 0 -2.9668 1.0872 3.1951 0.74478 2.1411 1.2906 100.98 -0.215 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.21833 0.01232 0.5 0 -2.9658 1.1015 3.2332 0.73335 2.1673 1.2938 101.01 -0.22167 0.00616 0.5 0 -2 -8.9384e-14 -1.103e-13 1.2267e-13 -9.9839e-14 1.2312e-13 98.648 -0.225 0.01232 0.5 0 -2.9654 1.1097 3.2563 0.74401 2.183 1.306 103 -0.22833 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 -8.5463e-34 3.2512e-13 2.2293e-13 98.648 -0.23167 0.01232 0.5 0 -2.9644 1.1236 3.2974 0.74628 2.2105 1.3184 100.98 -0.235 0.00616 0.5 0 -2 -8.9384e-14 -1.103e-13 -1.2267e-13 -9.9839e-14 1.2312e-13 98.648 -0.23833 0.01232 0.5 0 -2.9636 1.1363 3.3337 0.76175 2.235 1.3369 100.94 -0.24167 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.245 0.01232 0.5 0 -2.9629 1.1506 3.3768 0.76059 2.2637 1.3481 100.95 -0.24833 0.00616 0.5 0 -2 -1.8558e-14 1.0218e-13 -8.5463e-34 4.1812e-14 6.037e-14 98.648 -0.25167 0.01232 0.5 0 -2.9627 1.1612 3.4034 0.75319 2.2823 1.3506 103.03 -0.255 0.00616 0.5 0 -2 -1.6021e-13 -3.2277e-13 -1.2266e-32 -2.4149e-13 8.1282e-14 98.648 -0.25833 0.01232 0.5 0 -2.9624 1.1731 3.4335 0.7457 2.3033 1.354 103.04 -0.26167 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 -2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.265 0.01232 0.5 0 -2.9612 1.1876 3.4745 0.73962 2.3311 1.3618 101.04 -0.26833 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 -2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.27167 0.01232 0.5 0 -2.9616 1.1937 3.4886 0.73303 2.3411 1.3616 103.06 -0.275 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.27833 0.01232 0.5 0 -2.9612 1.202 3.5136 0.73043 2.3578 1.3673 103.08 -0.28167 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.285 0.01232 0.5 0 -2.9609 1.2122 3.5397 0.72662 2.376 1.372 103.08 -0.28833 0.00616 0.5 0 -2 4.064e-13 -3.2277e-13 -1.2266e-32 4.1813e-14 3.6459e-13 98.648 -0.29167 0.01232 0.5 0 -2.9601 1.2271 3.5795 0.71128 2.4033 1.3745 101.15 -0.295 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 -2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.29833 0.01232 0.5 0 -2.9599 1.2401 3.6108 0.70415 2.4254 1.3787 103.11 -0.30167 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.305 0.01232 0.5 0 -2.9594 1.2496 3.6358 0.68564 2.4427 1.3761 103.11 -0.30833 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.31167 0.01232 0.5 0 -2.9588 1.258 3.6574 0.67928 2.4577 1.3787 103.12 -0.315 0.00616 0.5 0 -2 4.064e-13 -3.2277e-13 -1.2266e-32 4.1813e-14 3.6459e-13 98.648 -0.31833 0.01232 0.5 0 -2.9584 1.267 3.6823 0.66552 2.4746 1.3789 103.13 -0.32167 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 -2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.325 0.01232 0.5 0 -2.9584 1.2745 3.701 0.64687 2.4877 1.3749 101.35 -0.32833 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 -2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.33167 0.01232 0.5 0 -2.9582 1.2841 3.7223 0.6407 2.5032 1.3772 103.14 -0.335 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.33833 0.01232 0.5 0 -2.9579 1.2927 3.7423 0.61241 2.5175 1.3694 103.14 -0.34167 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.345 0.01232 0.5 0 -2.9577 1.2952 3.7495 0.58725 2.5223 1.3604 101.51 -0.34833 0.00616 0.5 0 -2 4.064e-13 -3.2277e-13 -1.2266e-32 4.1813e-14 3.6459e-13 98.648 -0.35167 0.01232 0.5 0 -2.9582 1.2972 3.7506 0.58081 2.5239 1.3573 103.15 -0.355 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 -2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.35833 0.01232 0.5 0 -2.957 1.3054 3.7745 0.56135 2.54 1.3562 101.58 -0.36167 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.365 0.01232 0.5 0 -2.9568 1.3165 3.7995 0.54648 2.558 1.3565 101.64 -0.36833 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.37167 0.01232 0.5 0 -2.9565 1.3225 3.8167 0.51631 2.5696 1.3497 101.7 -0.375 0.00616 0.5 0 -2 4.064e-13 -3.2277e-13 -1.2266e-32 4.1813e-14 3.6459e-13 98.648 -0.37833 0.01232 0.5 0 -2.9567 1.3234 3.8219 0.49012 2.5726 1.3419 101.78 -0.38167 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 -2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.385 0.01232 0.5 0 -2.9571 1.3246 3.8196 0.46734 2.5721 1.3321 103.14 -0.38833 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 -2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.39167 0.01232 0.5 0 -2.9568 1.3315 3.8348 0.44403 2.5831 1.3281 101.89 -0.395 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.39833 0.01232 0.5 0 -2.9558 1.3424 3.8649 0.42049 2.6036 1.3295 101.95 -0.40167 0.00616 0.5 0 -2 4.064e-13 -3.2277e-13 -1.2266e-32 4.1813e-14 3.6459e-13 98.648 -0.405 0.01232 0.5 0 -2.9565 1.344 3.8671 0.38232 2.6055 1.3182 102.03 -0.40833 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 -2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.41167 0.01232 0.5 0 -2.9563 1.3427 3.8632 0.36187 2.603 1.3112 103.11 -0.415 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 -2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.41833 0.01232 0.5 0 -2.956 1.3433 3.8642 0.33205 2.6038 1.3035 102.15 -0.42167 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.425 0.01232 0.5 0 -2.9565 1.3446 3.8666 0.31664 2.6056 1.3001 103.08 -0.42833 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.43167 0.01232 0.5 0 -2.9557 1.3509 3.8862 0.28822 2.6185 1.3 103.07 -0.435 0.00616 0.5 0 -2 4.064e-13 -3.2277e-13 -1.2266e-32 4.1813e-14 3.6459e-13 98.648 -0.43833 0.01232 0.5 0 -2.9563 1.3472 3.8716 0.25272 2.6094 1.2873 102.31 -0.44167 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 -2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.445 0.01232 0.5 0 -2.9566 1.352 3.8826 0.22049 2.6173 1.2844 102.39 -0.44833 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 -2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.45167 0.01232 0.5 0 -2.9561 1.3589 3.9017 0.20717 2.6303 1.2881 102.43 -0.455 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.45833 0.01232 0.5 0 -2.9565 1.3549 3.8879 0.18245 2.6214 1.2796 102.45 -0.46167 0.00616 0.5 0 -2 4.064e-13 -3.2277e-13 -1.2266e-32 4.1813e-14 3.6459e-13 98.648 -0.465 0.01232 0.5 0 -2.9565 1.354 3.8841 0.15416 2.6191 1.2744 102.5 -0.46833 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 -2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.47167 0.01232 0.5 0 -2.9561 1.3611 3.9033 0.12413 2.6322 1.2771 102.91 -0.475 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 -2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.47833 0.01232 0.5 0 -2.9559 1.3618 3.9038 0.084944 2.6328 1.2738 102.86 -0.48167 0.00616 0.5 0 -2 -5.9566e-13 1.0218e-13 2.4535e-13 -2.4674e-13 4.2655e-13 98.648 -0.485 0.01232 0.5 0 -2.9557 1.3575 3.889 0.055501 2.6233 1.2669 102.66 -0.48833 0.00616 0.5 0 -2 5.4805e-13 1.0218e-13 2.4535e-13 3.2512e-13 3.315e-13 98.648 -0.49167 0.01232 0.5 0 -2.9557 1.3595 3.8978 0.042501 2.6286 1.2698 102.81 -0.495 0.00616 0.5 0 -2 -7.3731e-13 -3.2277e-13 -1.2266e-32 -5.3004e-13 2.0727e-13 98.648 -0.49833 0.01232 0.5 0 -2.9551 1.3671 3.917 0.025574 2.6421 1.2752 102.78 -0.50167 0.00616 0.5 0 -2 5.3755e-13 1.0218e-13 2.4535e-13 3.1987e-13 3.28e-13 98.648 -0.505 0.01232 0.5 0 -2.956 1.3606 3.8953 -0.023791 2.6279 1.2676 102.77 -0.50833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.51167 0.01232 0.5 0 -2.9567 1.3551 3.8829 -0.045337 2.619 1.2647 102.81 -0.515 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.51833 0.01232 0.5 0 -2.9557 1.3574 3.8926 -0.066928 2.625 1.2694 102.65 -0.52167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.525 0.01232 0.5 0 -2.9555 1.3618 3.9031 -0.094404 2.6324 1.2742 102.59 -0.52833 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.53167 0.01232 0.5 0 -2.9565 1.3606 3.8941 -0.12746 2.6274 1.2731 102.9 -0.535 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.53833 0.01232 0.5 0 -2.9561 1.3598 3.8964 -0.16416 2.6281 1.2789 102.94 -0.54167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.545 0.01232 0.5 0 -2.9564 1.3582 3.893 -0.19351 2.6256 1.2821 102.98 -0.54833 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.55167 0.01232 0.5 0 -2.9575 1.3527 3.8787 -0.22474 2.6157 1.2828 103.01 -0.555 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.55833 0.01232 0.5 0 -2.9563 1.3542 3.8914 -0.2434 2.6228 1.2917 103.04 -0.56167 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.565 0.01232 0.5 0 -2.9563 1.3514 3.8818 -0.26447 2.6166 1.2925 102.29 -0.56833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.57167 0.01232 0.5 0 -2.9564 1.3525 3.8813 -0.28409 2.6169 1.2959 102.25 -0.575 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.57833 0.01232 0.5 0 -2.9563 1.3504 3.879 -0.32338 2.6147 1.305 102.17 -0.58167 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.585 0.01232 0.5 0 -2.9567 1.3431 3.8605 -0.35381 2.6018 1.3075 102.1 -0.58833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.59167 0.01232 0.5 0 -2.9563 1.336 3.8424 -0.37725 2.5892 1.3088 102.04 -0.595 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.59833 0.01232 0.5 0 -2.9564 1.3376 3.8482 -0.39451 2.5929 1.3158 102.01 -0.60167 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.605 0.01232 0.5 0 -2.956 1.3397 3.8535 -0.41832 2.5966 1.3246 101.94 -0.60833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.61167 0.01232 0.5 0 -2.956 1.3344 3.8412 -0.45756 2.5878 1.3343 103.13 -0.615 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.61833 0.01232 0.5 0 -2.9569 1.3253 3.8191 -0.47529 2.5722 1.3344 101.81 -0.62167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.625 0.01232 0.5 0 -2.9572 1.3179 3.8027 -0.50827 2.5603 1.3423 103.14 -0.62833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.63167 0.01232 0.5 0 -2.9568 1.3172 3.806 -0.52787 2.5616 1.3517 101.68 -0.635 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.63833 0.01232 0.5 0 -2.9569 1.3148 3.7974 -0.54532 2.5561 1.3558 103.15 -0.64167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.645 0.01232 0.5 0 -2.9576 1.3059 3.7736 -0.57226 2.5397 1.3601 101.57 -0.64833 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.65167 0.01232 0.5 0 -2.9571 1.302 3.7708 -0.58092 2.5364 1.3643 101.53 -0.655 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.65833 0.01232 0.5 0 -2.9576 1.2947 3.7514 -0.61002 2.5231 1.3715 103.15 -0.66167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.665 0.01232 0.5 0 -2.9583 1.2879 3.7303 -0.61651 2.5091 1.368 103.14 -0.66833 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.67167 0.01232 0.5 0 -2.9577 1.2852 3.7246 -0.63696 2.5049 1.376 101.37 -0.675 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.67833 0.01232 0.5 0 -2.958 1.2807 3.7136 -0.65209 2.4972 1.3802 103.13 -0.68167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.685 0.01232 0.5 0 -2.9583 1.2703 3.6878 -0.6714 2.479 1.3827 101.28 -0.68833 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.69167 0.01232 0.5 0 -2.9586 1.2601 3.6601 -0.67788 2.4601 1.3782 103.11 -0.695 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.69833 0.01232 0.5 0 -2.9585 1.2506 3.6359 -0.70159 2.4432 1.3837 103.1 -0.70167 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.705 0.01232 0.5 0 -2.9598 1.2335 3.5917 -0.71065 2.4126 1.3767 103.09 -0.70833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.71167 0.01232 0.5 0 -2.9604 1.223 3.5656 -0.71703 2.3943 1.3733 101.12 -0.715 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.71833 0.01232 0.5 0 -2.9601 1.2153 3.5471 -0.71991 2.3812 1.3702 101.11 -0.72167 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.725 0.01232 0.5 0 -2.9601 1.2035 3.5158 -0.72895 2.3596 1.3668 101.07 -0.72833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.73167 0.01232 0.5 0 -2.9609 1.1941 3.4922 -0.73977 2.3432 1.3666 101.04 -0.735 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.73833 0.01232 0.5 0 -2.9611 1.1835 3.4633 -0.74848 2.3234 1.3637 103.04 -0.74167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.745 0.01232 0.5 0 -2.9621 1.1698 3.4259 -0.75187 2.2979 1.3556 103.04 -0.74833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.75167 0.01232 0.5 0 -2.9627 1.1565 3.3928 -0.75737 2.2747 1.3505 103.03 -0.755 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.75833 0.01232 0.5 0 -2.9632 1.1488 3.3688 -0.75417 2.2588 1.342 100.97 -0.76167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.765 0.01232 0.5 0 -2.9636 1.1374 3.3377 -0.75812 2.2376 1.3361 103.02 -0.76833 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.77167 0.01232 0.5 0 -2.9637 1.124 3.3034 -0.75603 2.2137 1.3263 103.01 -0.775 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.77833 0.01232 0.5 0 -2.9645 1.1086 3.2569 -0.75299 2.1828 1.3118 100.94 -0.78167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.785 0.01232 0.5 0 -2.9653 1.0948 3.2159 -0.7456 2.1554 1.2964 100.96 -0.78833 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.79167 0.01232 0.5 0 -2.9664 1.0806 3.1739 -0.7438 2.1272 1.284 102.98 -0.795 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.79833 0.01232 0.5 0 -2.9666 1.0688 3.1429 -0.73031 2.1058 1.2684 100.99 -0.80167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.805 0.01232 0.5 0 -2.967 1.0578 3.1093 -0.72416 2.0836 1.2556 101 -0.80833 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.81167 0.01232 0.5 0 -2.9683 1.0393 3.0566 -0.70801 2.048 1.2323 101.06 -0.815 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.81833 0.01232 0.5 0 -2.9694 1.0235 3.0142 -0.69518 2.0188 1.2141 102.98 -0.82167 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.825 0.01232 0.5 0 -2.9704 1.0136 2.9819 -0.67865 1.9977 1.1955 103 -0.82833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.83167 0.01232 0.5 0 -2.9704 1.0016 2.9468 -0.66196 1.9742 1.1765 102.99 -0.835 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.83833 0.01232 0.5 0 -2.9713 0.98677 2.904 -0.65225 1.9454 1.1595 102.99 -0.84167 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.845 0.01232 0.5 0 -2.9724 0.9766 2.8747 -0.63345 1.9257 1.141 101.27 -0.84833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.85167 0.01232 0.5 0 -2.9734 0.96114 2.8282 -0.61936 1.8947 1.1203 101.32 -0.855 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.85833 0.01232 0.5 0 -2.9742 0.94585 2.7844 -0.5917 1.8651 1.0932 101.4 -0.86167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.865 0.01232 0.5 0 -2.975 0.93125 2.7398 -0.57509 1.8355 1.0717 101.44 -0.86833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.87167 0.01232 0.5 0 -2.975 0.92084 2.7107 -0.55156 1.8158 1.0512 101.51 -0.875 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.87833 0.01232 0.5 0 -2.9762 0.91128 2.6805 -0.52695 1.7959 1.0297 103.05 -0.88167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.885 0.01232 0.5 0 -2.9765 0.89938 2.6432 -0.49638 1.7713 1.0033 101.67 -0.88833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.89167 0.01232 0.5 0 -2.9774 0.88707 2.6052 -0.47381 1.7461 0.98104 101.74 -0.895 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.89833 0.01232 0.5 0 -2.9775 0.87498 2.5721 -0.45057 1.7235 0.96076 103.06 -0.90167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.905 0.01232 0.5 0 -2.9772 0.87202 2.5596 -0.41177 1.7158 0.93891 101.9 -0.90833 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.91167 0.01232 0.5 0 -2.979 0.86091 2.5207 -0.40119 1.6908 0.9218 103.07 -0.915 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.91833 0.01232 0.5 0 -2.9792 0.85665 2.5129 -0.36954 1.6848 0.90684 102.04 -0.92167 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.925 0.01232 0.5 0 -2.9801 0.84675 2.4815 -0.35431 1.6641 0.89088 103.09 -0.92833 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.93167 0.01232 0.5 0 -2.98 0.83856 2.459 -0.31612 1.6488 0.8697 102.19 -0.935 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.93833 0.01232 0.5 0 -2.9803 0.83011 2.4308 -0.29177 1.6304 0.85186 103.08 -0.94167 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.945 0.01232 0.5 0 -2.9804 0.81847 2.3988 -0.2643 1.6086 0.83321 103.07 -0.94833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.95167 0.01232 0.5 0 -2.9814 0.8116 2.376 -0.23367 1.5938 0.81635 102.39 -0.955 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.95833 0.01232 0.5 0 -2.9815 0.80818 2.367 -0.2037 1.5876 0.80559 102.47 -0.96167 0.00616 0.5 0 -2 -1.5977e-12 5.2714e-13 5.9945e-33 -5.3529e-13 1.0624e-12 98.648 -0.965 0.01232 0.5 0 -2.9813 0.80385 2.3542 -0.16674 1.579 0.79292 102.54 -0.96833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.97167 0.01232 0.5 0 -2.9818 0.80587 2.3562 -0.14011 1.581 0.7877 103.01 -0.975 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.97833 0.01232 0.5 0 -2.9822 0.80416 2.3529 -0.10961 1.5785 0.78209 102.68 -0.98167 0.00616 0.5 0 -2 6.7921e-13 5.2714e-13 5.9945e-33 6.0317e-13 7.6034e-14 98.648 -0.985 0.01232 0.5 0 -2.9817 0.80254 2.3512 -0.066711 1.5769 0.77721 102.76 -0.98833 0.00616 0.5 0 -2 3.9328e-13 -3.3064e-13 -4.9524e-13 3.1317e-14 6.1342e-13 98.648 -0.99167 0.01232 0.5 0 -2.9815 0.80274 2.3496 -0.035719 1.5762 0.77426 102.9 -0.995 0.00616 0.5 0 -2 -8.1077e-13 5.2714e-13 5.9945e-33 -1.4181e-13 6.6895e-13 98.648 -0.99833 0.01232 0.5 0 -2.9821 0.80061 2.339 -0.011368 1.5698 0.76928 102.87 -0.0016374 0.018344 0.5 0.012922 -2.9604 1.77 4.613 0.010209 3.1915 1.4215 103.58 -0.0049885 0.024372 0.5 0.0099682 -2.961 1.8652 4.5616 0.030856 3.2134 1.3485 104.11 -0.0083295 0.018336 0.5 0.013692 -2.9596 1.7584 4.6102 0.075455 3.1843 1.4279 103.65 -0.011618 0.024407 0.5 0.010802 -2.9604 1.8574 4.5693 0.10546 3.2134 1.3601 103.88 -0.015019 0.018396 0.5 0.010454 -2.9615 1.7508 4.6103 0.14122 3.1806 1.4367 103.33 -0.018274 0.024455 0.5 0.011154 -2.9609 1.8559 4.5755 0.17239 3.2157 1.3707 104.28 -0.021665 0.018412 0.5 0.0091023 -2.9621 1.7529 4.6447 0.1981 3.1988 1.4594 103.8 -0.025011 0.024438 0.5 0.0097398 -2.9618 1.8638 4.5762 0.22536 3.22 1.3748 104.34 -0.028334 0.018384 0.5 0.0094404 -2.9615 1.7513 4.6608 0.25072 3.2061 1.4762 103.8 -0.031698 0.024458 0.5 0.011318 -2.9599 1.8818 4.6032 0.28352 3.2425 1.3899 104.36 -0.035038 0.018369 0.5 0.010921 -2.9609 1.7622 4.6772 0.31576 3.2197 1.4914 103.87 -0.038326 0.024521 0.5 0.010873 -2.9595 1.8889 4.6366 0.35215 3.2628 1.4183 103.4 -0.041691 0.018389 0.5 0.0092323 -2.9613 1.7766 4.6891 0.37202 3.2328 1.503 102.9 -0.044899 0.024529 0.5 0.011616 -2.9596 1.8881 4.6593 0.39479 3.2737 1.4408 104.4 -0.04832 0.018428 0.5 0.0094954 -2.9606 1.7878 4.7138 0.43189 3.2508 1.5254 104 -0.051626 0.024508 0.5 0.0098566 -2.9591 1.9005 4.6831 0.45147 3.2918 1.4628 103.17 -0.054948 0.018371 0.5 0.0099049 -2.9598 1.7935 4.7549 0.50566 3.2742 1.5646 102.57 -0.058253 0.02446 0.5 0.010835 -2.9588 1.8929 4.7222 0.51777 3.3075 1.5064 102.97 -0.061569 0.0184 0.5 0.0079983 -2.9591 1.8021 4.8014 0.56432 3.3017 1.6023 102.37 -0.064893 0.024466 0.5 0.009507 -2.9584 1.9003 4.7735 0.57781 3.3369 1.5484 104.4 -0.0683 0.018375 0.5 0.0090553 -2.958 1.8206 4.8661 0.61625 3.3433 1.6427 103.96 -0.071603 0.024444 0.5 0.00979 -2.9591 1.9041 4.7994 0.62492 3.3518 1.5768 104.45 -0.074937 0.018412 0.5 0.011727 -2.9555 1.8374 4.9117 0.66942 3.3746 1.6766 102.07 -0.078262 0.024444 0.5 0.0084605 -2.9574 1.9168 4.8538 0.68689 3.3853 1.6212 104.41 -0.081612 0.018386 0.5 0.0097566 -2.9559 1.8443 4.9346 0.73737 3.3895 1.7121 101.89 -0.084925 0.024494 0.5 0.010102 -2.9559 1.9085 4.9227 0.72642 3.4156 1.673 102.25 -0.088324 0.018375 0.5 0.010296 -2.9549 1.8577 4.9739 0.77861 3.4158 1.7418 103.91 -0.091581 0.024448 0.5 0.0083625 -2.9558 1.9028 4.9691 0.78157 3.4359 1.7209 104.15 -0.095002 0.01843 0.5 0.0091164 -2.9552 1.8584 5.0203 0.8334 3.4393 1.7872 101.59 -0.098258 0.024503 0.5 0.0096451 -2.9537 1.9369 5.0302 0.84609 3.4836 1.7629 101.88 -0.10158 0.018396 0.5 0.010667 -2.953 1.869 5.1013 0.88137 3.4852 1.8409 103.8 -0.10492 0.024476 0.5 0.0092339 -2.9535 1.961 5.0749 0.89032 3.5179 1.7935 101.79 -0.10833 0.018424 0.5 0.010283 -2.9517 1.896 5.1666 0.93034 3.5313 1.8814 101.25 -0.11158 0.024425 0.5 0.009213 -2.9517 1.9972 5.1479 0.94924 3.5726 1.8392 101.65 -0.11501 0.018306 0.5 0.0095238 -2.9503 1.9366 5.2448 0.97576 3.5907 1.9204 101.17 -0.1183 0.024415 0.5 0.0064381 -2.9513 2.0222 5.2131 0.98928 3.6177 1.8773 101.55 -0.12166 0.01837 0.5 0.013124 -2.9487 1.9547 5.3067 1.0344 3.6307 1.9695 103.81 -0.12495 0.024447 0.5 0.011002 -2.9479 2.0267 5.2923 1.0389 3.6595 1.9353 101.28 -0.12831 0.018376 0.5 0.012735 -2.9458 1.9767 5.3824 1.0832 3.6795 2.0182 103.73 -0.13155 0.02441 0.5 0.01036 -2.9464 2.0355 5.3617 1.0966 3.6986 1.9921 104.02 -0.13495 0.018361 0.5 0.0096559 -2.9468 1.987 5.4362 1.1284 3.7116 2.061 103.72 -0.13824 0.024434 0.5 0.0094643 -2.9452 2.0599 5.4454 1.1334 3.7527 2.0372 104 -0.14159 0.018354 0.5 0.013139 -2.9439 2.0098 5.5282 1.1676 3.769 2.1115 100.52 -0.14491 0.024466 0.5 0.012827 -2.9423 2.0871 5.5312 1.1683 3.8091 2.081 100.82 -0.14825 0.018417 0.5 0.011447 -2.9423 2.0385 5.6011 1.2061 3.8198 2.1512 100.38 -0.15155 0.024468 0.5 0.010871 -2.9418 2.0871 5.6004 1.2148 3.8438 2.1358 103.9 -0.15496 0.018394 0.5 0.012434 -2.9401 2.069 5.6749 1.2463 3.872 2.1918 100.26 -0.15827 0.024412 0.5 0.0093599 -2.9414 2.0976 5.6805 1.2471 3.889 2.1828 103.84 -0.16165 0.01837 0.5 0.014944 -2.938 2.0947 5.7547 1.2781 3.9247 2.2321 103.58 -0.16491 0.024396 0.5 0.0084328 -2.9413 2.1183 5.749 1.2864 3.9336 2.2249 100.36 -0.16829 0.018388 0.5 0.011253 -2.938 2.1085 5.8279 1.3219 3.9682 2.2816 103.57 -0.17154 0.024423 0.5 0.013611 -2.9358 2.1417 5.8722 1.311 4.0069 2.2799 103.69 -0.17495 0.018364 0.5 0.01518 -2.9333 2.1408 5.9353 1.3475 4.038 2.327 99.847 -0.17817 0.024484 0.5 0.01222 -2.9339 2.1596 5.9629 1.3459 4.0612 2.3298 99.985 -0.18159 0.018389 0.5 0.014075 -2.9327 2.1627 6.0291 1.3745 4.0959 2.372 103.46 -0.18485 0.024481 0.5 0.01295 -2.9335 2.1876 6.0486 1.3706 4.1181 2.3676 99.944 -0.18825 0.018425 0.5 0.011959 -2.9326 2.1911 6.125 1.3976 4.158 2.4129 99.769 -0.19149 0.024451 0.5 0.012571 -2.9304 2.2202 6.1446 1.3854 4.1824 2.402 103.61 -0.19496 0.018407 0.5 0.014725 -2.9299 2.22 6.2085 1.4166 4.2143 2.4461 99.696 -0.19822 0.024452 0.5 0.011924 -2.9284 2.2459 6.2281 1.4079 4.237 2.4386 103.6 -0.20161 0.018362 0.5 0.014927 -2.9291 2.2248 6.2578 1.4265 4.2413 2.47 99.598 -0.20488 0.0244 0.5 0.011125 -2.9295 2.2454 6.2807 1.4177 4.2631 2.4659 103.57 -0.20826 0.018355 0.5 0.011781 -2.9289 2.233 6.3255 1.4516 4.2792 2.5088 99.499 -0.21152 0.02434 0.5 0.009805 -2.9297 2.2444 6.3349 1.4533 4.2897 2.509 103.5 -0.21497 0.018347 0.5 0.01036 -2.9285 2.2519 6.4004 1.4646 4.3261 2.5392 99.459 -0.21821 0.024387 0.5 0.0093804 -2.9282 2.2526 6.425 1.43 4.3388 2.5293 99.564 -0.22161 0.018376 0.5 0.011443 -2.9275 2.2632 6.4784 1.4693 4.3708 2.5692 99.435 -0.22488 0.024388 0.5 0.0090571 -2.9261 2.2806 6.5184 1.4562 4.3995 2.571 103.42 -0.22823 0.018442 0.5 0.010848 -2.9264 2.2909 6.5543 1.4645 4.4226 2.5863 103.43 -0.23154 0.024401 0.5 0.010567 -2.9248 2.3129 6.5963 1.4525 4.4546 2.5878 103.46 -0.23496 0.018358 0.5 0.012337 -2.9236 2.33 6.6241 1.4803 4.477 2.6079 99.47 -0.23814 0.024431 0.5 0.011755 -2.9227 2.3244 6.6626 1.4719 4.4935 2.6213 103.4 -0.24159 0.018346 0.5 0.013403 -2.9216 2.3587 6.6991 1.4936 4.5289 2.6345 99.378 -0.2448 0.024431 0.5 0.010435 -2.922 2.3445 6.7354 1.4681 4.5399 2.6411 99.403 -0.24818 0.018385 0.5 0.012851 -2.9196 2.3712 6.8006 1.4917 4.5859 2.6702 99.303 -0.25153 0.024393 0.5 0.01208 -2.9203 2.3538 6.8277 1.4676 4.5908 2.6754 99.33 -0.25493 0.018361 0.5 0.011263 -2.9197 2.3748 6.8544 1.4772 4.6146 2.6831 103.29 -0.25822 0.024372 0.5 0.013657 -2.9179 2.374 6.8939 1.4494 4.634 2.6848 99.339 -0.26159 0.018339 0.5 0.0126 -2.9186 2.4086 6.9176 1.4586 4.6631 2.6852 99.419 -0.26489 0.024405 0.5 0.012798 -2.9164 2.3984 6.9546 1.4508 4.6765 2.7009 99.374 -0.26829 0.01834 0.5 0.014875 -2.9162 2.4356 6.9757 1.463 4.7056 2.7006 103.38 -0.2716 0.024358 0.5 0.011501 -2.9159 2.407 7.0267 1.4446 4.7169 2.7244 99.358 -0.27495 0.018343 0.5 0.010913 -2.9181 2.4384 7.0176 1.4465 4.728 2.7083 99.495 -0.2782 0.024376 0.5 0.0098099 -2.917 2.4115 7.0869 1.4319 4.7492 2.7414 99.348 -0.2816 0.018321 0.5 0.010364 -2.918 2.4369 7.0692 1.4387 4.7531 2.7266 103.33 -0.28484 0.024429 0.5 0.0078739 -2.917 2.4221 7.141 1.4135 4.7816 2.7505 103.2 -0.28819 0.018358 0.5 0.010722 -2.9164 2.4539 7.154 1.4161 4.8039 2.7437 103.31 -0.29152 0.024372 0.5 0.0095981 -2.9159 2.4456 7.195 1.4001 4.8203 2.7567 103.23 -0.29494 0.018354 0.5 0.010732 -2.9153 2.4845 7.2136 1.4066 4.849 2.7513 99.531 -0.29819 0.024372 0.5 0.0090581 -2.9139 2.4563 7.2714 1.3985 4.8638 2.7843 103.16 -0.30162 0.018357 0.5 0.0090463 -2.9154 2.5018 7.2608 1.3805 4.8813 2.751 99.602 -0.30492 0.024396 0.5 0.009091 -2.914 2.4646 7.3105 1.3548 4.8875 2.776 103.14 -0.30828 0.018359 0.5 0.010795 -2.9143 2.5181 7.3151 1.3533 4.9166 2.754 99.671 -0.31155 0.02437 0.5 0.0083893 -2.9128 2.4816 7.3581 1.3375 4.9199 2.781 103.1 -0.31495 0.018318 0.5 0.010988 -2.9131 2.533 7.354 1.3309 4.9435 2.7535 99.685 -0.31819 0.024342 0.5 0.0095833 -2.9125 2.4805 7.3985 1.3073 4.9395 2.7849 99.526 -0.32154 0.018303 0.5 0.013848 -2.9114 2.5507 7.4076 1.3046 4.9792 2.7566 103.32 -0.32484 0.024318 0.5 0.010229 -2.9116 2.4925 7.4517 1.275 4.9721 2.7882 99.569 -0.3283 0.018359 0.5 0.0098099 -2.9116 2.5667 7.4436 1.278 5.0051 2.7531 103.31 -0.33151 0.024372 0.5 0.0089045 -2.9105 2.5109 7.5092 1.2443 5.0101 2.7918 103.01 -0.33495 0.018339 0.5 0.011586 -2.9107 2.569 7.504 1.2424 5.0365 2.7626 99.884 -0.33822 0.024399 0.5 0.0099928 -2.9098 2.524 7.5409 1.2079 5.0324 2.7841 99.721 -0.34162 0.018424 0.5 0.011517 -2.9107 2.5838 7.5259 1.1946 5.0549 2.7447 103.27 -0.34491 0.024385 0.5 0.01099 -2.9098 2.5351 7.5632 1.1686 5.0491 2.7724 102.98 -0.34825 0.018341 0.5 0.010173 -2.911 2.5944 7.5332 1.1658 5.0638 2.7308 100.12 -0.35158 0.02442 0.5 0.012119 -2.9079 2.5449 7.6037 1.1338 5.0743 2.7719 99.815 -0.35491 0.018359 0.5 0.011476 -2.9104 2.5895 7.5678 1.1244 5.0787 2.7313 100.16 -0.35824 0.024396 0.5 0.010818 -2.9086 2.5444 7.6182 1.0991 5.0813 2.7648 99.861 -0.36163 0.018339 0.5 0.010845 -2.9101 2.603 7.5924 1.0938 5.0977 2.724 103.23 -0.36488 0.024346 0.5 0.01446 -2.9066 2.5551 7.659 1.0526 5.107 2.7605 102.82 -0.36825 0.018358 0.5 0.013867 -2.9068 2.6408 7.6511 1.0469 5.146 2.7151 103.2 -0.37149 0.024332 0.5 0.014812 -2.906 2.5692 7.7063 1.0129 5.1377 2.761 102.81 -0.37499 0.018362 0.5 0.015179 -2.9057 2.659 7.6715 0.99482 5.1653 2.6964 103.15 -0.37827 0.024372 0.5 0.010312 -2.9077 2.5703 7.7153 0.96133 5.1428 2.7463 102.78 -0.38167 0.018338 0.5 0.013717 -2.9064 2.6629 7.6793 0.94678 5.1711 2.6809 100.54 -0.38498 0.024398 0.5 0.011345 -2.9074 2.5712 7.733 0.91848 5.1521 2.7395 102.76 -0.3883 0.018335 0.5 0.015293 -2.9061 2.6685 7.7011 0.91335 5.1848 2.677 100.63 -0.39161 0.024361 0.5 0.012692 -2.9047 2.5774 7.7758 0.8814 5.1766 2.7446 100.21 -0.395 0.018297 0.5 0.016098 -2.9051 2.6893 7.7348 0.85555 5.2121 2.6639 100.74 -0.39823 0.024352 0.5 0.012845 -2.9052 2.5823 7.7861 0.80966 5.1842 2.725 102.62 -0.4016 0.018321 0.5 0.016552 -2.9033 2.703 7.7861 0.80291 5.2446 2.6653 100.85 -0.40491 0.024337 0.5 0.013542 -2.9043 2.5972 7.7898 0.7767 5.1935 2.71 100.5 -0.40828 0.018339 0.5 0.014284 -2.9049 2.7112 7.7603 0.74445 5.2357 2.632 101.01 -0.41158 0.024397 0.5 0.014126 -2.9039 2.598 7.8183 0.69835 5.2082 2.7019 100.59 -0.41496 0.018345 0.5 0.020759 -2.9017 2.7405 7.7822 0.693 5.2614 2.6144 103.02 -0.41829 0.024339 0.5 0.013087 -2.9053 2.5929 7.8302 0.65835 5.2115 2.7001 100.69 -0.42165 0.018367 0.5 0.017377 -2.9044 2.7215 7.7818 0.64957 5.2516 2.6122 101.21 -0.42497 0.024335 0.5 0.010326 -2.9061 2.5954 7.8387 0.60881 5.217 2.6914 102.46 -0.42825 0.01834 0.5 0.014551 -2.9042 2.7306 7.7977 0.59277 5.2642 2.602 102.92 -0.43161 0.024385 0.5 0.010195 -2.9057 2.5948 7.8519 0.54266 5.2233 2.684 102.41 -0.43496 0.018354 0.5 0.022677 -2.9013 2.7337 7.8292 0.54449 5.2814 2.6053 102.82 -0.43829 0.024345 0.5 0.01289 -2.905 2.6002 7.8553 0.50406 5.2277 2.6754 102.34 -0.44158 0.018333 0.5 0.015799 -2.9045 2.7164 7.8131 0.47316 5.2647 2.5919 102.77 -0.44492 0.024326 0.5 0.011823 -2.9063 2.6043 7.8513 0.44585 5.2278 2.6612 102.32 -0.44835 0.018345 0.5 0.014543 -2.9063 2.747 7.81 0.42668 5.2785 2.5672 101.75 -0.45162 0.024344 0.5 0.0098597 -2.9061 2.6179 7.8758 0.39042 5.2468 2.6578 101.22 -0.45493 0.018375 0.5 0.015908 -2.9054 2.7473 7.8164 0.37672 5.2818 2.5624 101.8 -0.45835 0.02436 0.5 0.012218 -2.9061 2.6105 7.8747 0.33319 5.2426 2.6531 101.29 -0.46164 0.018358 0.5 0.0152 -2.9053 2.7121 7.8272 0.32298 5.2696 2.5779 101.71 -0.46501 0.024364 0.5 0.011301 -2.9058 2.6064 7.8874 0.28271 5.2469 2.6556 102.12 -0.46836 0.018381 0.5 0.017991 -2.9036 2.7148 7.8585 0.27092 5.2867 2.5861 102.52 -0.47168 0.02434 0.5 0.01262 -2.9048 2.6311 7.8973 0.24943 5.2642 2.6449 102.14 -0.47492 0.018348 0.5 0.013239 -2.9067 2.7102 7.8538 0.20804 5.282 2.5802 101.92 -0.4783 0.024363 0.5 0.012414 -2.9051 2.6369 7.8774 0.17352 5.2571 2.626 101.53 -0.48155 0.018379 0.5 0.017887 -2.9044 2.7183 7.8563 0.15167 5.2873 2.5735 102.42 -0.48499 0.024347 0.5 0.01536 -2.9027 2.6294 7.9188 0.12369 5.2741 2.6476 101.84 -0.4883 0.018377 0.5 0.016131 -2.9054 2.7211 7.8329 0.089207 5.277 2.5575 102.15 -0.49167 0.024419 0.5 0.014685 -2.9037 2.6482 7.8966 0.073297 5.2724 2.6252 101.89 -0.49496 0.018413 0.5 0.013575 -2.9075 2.7242 7.8428 0.052066 5.2835 2.5598 102.43 -0.49831 0.024413 0.5 0.015863 -2.9051 2.663 7.8985 0.0086108 5.2807 2.6178 101.98 -0.50158 0.018342 0.5 0.019186 -2.9039 2.7199 7.8783 -0.0038711 5.2991 2.5792 102.22 -0.50497 0.024339 0.5 0.013678 -2.9046 2.6338 7.8867 -0.049883 5.2603 2.6269 101.87 -0.50829 0.018323 0.5 0.011972 -2.9075 2.6956 7.8221 -0.066849 5.2589 2.5641 102.31 -0.51168 0.024349 0.5 0.011812 -2.9048 2.602 7.8983 -0.11407 5.2501 2.6506 101.51 -0.51495 0.018348 0.5 0.018712 -2.9047 2.7181 7.8201 -0.1217 5.2691 2.5539 102.06 -0.51837 0.02432 0.5 0.010827 -2.9062 2.6049 7.8724 -0.15724 5.2386 2.6384 101.95 -0.5216 0.01827 0.5 0.014986 -2.906 2.7075 7.8391 -0.16857 5.2733 2.5713 102.45 -0.52499 0.024271 0.5 0.014625 -2.9048 2.6269 7.884 -0.20592 5.2554 2.6366 102.07 -0.5283 0.018288 0.5 0.015289 -2.9059 2.6978 7.8373 -0.22445 5.2675 2.5795 101.86 -0.53163 0.024274 0.5 0.014903 -2.9042 2.6172 7.8782 -0.25541 5.2477 2.6429 102.02 -0.53504 0.018335 0.5 0.014431 -2.9052 2.7117 7.8443 -0.28712 5.278 2.5823 101.75 -0.53833 0.024361 0.5 0.01267 -2.906 2.6092 7.8867 -0.32127 5.248 2.6583 102.15 -0.54164 0.018388 0.5 0.016842 -2.9054 2.7134 7.8401 -0.34886 5.2767 2.587 102.64 -0.545 0.024376 0.5 0.0092096 -2.9074 2.612 7.8719 -0.37323 5.242 2.6563 102.25 -0.54835 0.018403 0.5 0.010696 -2.9085 2.6935 7.8191 -0.40366 5.2563 2.5944 101.63 -0.55173 0.024342 0.5 0.0091813 -2.9081 2.609 7.8422 -0.41934 5.2256 2.65 102.36 -0.55506 0.018316 0.5 0.012124 -2.9082 2.6993 7.8108 -0.45285 5.255 2.5956 101.61 -0.55834 0.024304 0.5 0.011504 -2.9057 2.6111 7.8661 -0.4654 5.2386 2.6684 101.08 -0.56171 0.018324 0.5 0.014575 -2.9067 2.7047 7.8077 -0.50121 5.2562 2.6003 101.51 -0.56503 0.024299 0.5 0.013955 -2.9049 2.6063 7.8604 -0.52493 5.2334 2.679 100.9 -0.5684 0.018392 0.5 0.012484 -2.9071 2.6955 7.7978 -0.55323 5.2466 2.6104 101.35 -0.57168 0.024342 0.5 0.012666 -2.906 2.6118 7.8466 -0.58143 5.2292 2.6812 100.85 -0.57507 0.01838 0.5 0.015005 -2.9057 2.6998 7.8091 -0.61265 5.2544 2.6271 101.22 -0.57843 0.024326 0.5 0.010305 -2.9065 2.5903 7.8153 -0.64891 5.2028 2.6919 102.49 -0.58175 0.018315 0.5 0.014448 -2.9064 2.6794 7.7745 -0.67865 5.2269 2.6364 102.96 -0.58505 0.024312 0.5 0.011274 -2.906 2.5779 7.8127 -0.70063 5.1953 2.7095 102.51 -0.58836 0.018326 0.5 0.014944 -2.9067 2.6656 7.7473 -0.72003 5.2065 2.6409 102.99 -0.59168 0.024358 0.5 0.013636 -2.9049 2.5842 7.8123 -0.75419 5.1983 2.7207 100.46 -0.59499 0.018366 0.5 0.015212 -2.9064 2.6701 7.7319 -0.78122 5.201 2.6487 100.89 -0.5984 0.024338 0.5 0.013732 -2.9042 2.6011 7.7798 -0.80103 5.1905 2.7105 102.62 -0.60175 0.01836 0.5 0.016109 -2.9054 2.6736 7.7367 -0.82177 5.2052 2.6616 103.08 -0.60512 0.024343 0.5 0.018539 -2.9017 2.6229 7.7606 -0.84934 5.1917 2.7056 100.37 -0.60841 0.018297 0.5 0.01763 -2.904 2.6653 7.7387 -0.87404 5.202 2.6831 100.64 -0.61182 0.024385 0.5 0.013619 -2.9046 2.6011 7.7394 -0.88644 5.1703 2.7178 100.27 -0.61504 0.018336 0.5 0.013514 -2.9075 2.6396 7.6846 -0.92634 5.1621 2.6872 103.1 -0.6184 0.024426 0.5 0.014347 -2.9048 2.5799 7.7245 -0.94673 5.1522 2.741 100.1 -0.6217 0.018362 0.5 0.015299 -2.9061 2.6354 7.6704 -0.97094 5.1529 2.6983 100.43 -0.62508 0.024377 0.5 0.012993 -2.905 2.5671 7.7053 -0.98455 5.1362 2.7513 100.01 -0.62841 0.018357 0.5 0.014793 -2.9073 2.6389 7.6432 -1.0273 5.141 2.7048 100.35 -0.63175 0.024403 0.5 0.012304 -2.9079 2.5584 7.6702 -1.0322 5.1143 2.7564 99.998 -0.63503 0.018351 0.5 0.011451 -2.9088 2.6355 7.6207 -1.0735 5.1281 2.7139 100.31 -0.63844 0.024388 0.5 0.0095772 -2.9084 2.562 7.6404 -1.0911 5.1012 2.7637 99.937 -0.64169 0.018327 0.5 0.015616 -2.9068 2.6185 7.6207 -1.101 5.1196 2.7327 103.23 -0.6451 0.024389 0.5 0.012514 -2.9058 2.5624 7.6401 -1.1104 5.1013 2.7711 102.95 -0.64835 0.01834 0.5 0.010474 -2.9105 2.5947 7.5678 -1.1477 5.0813 2.7386 103.26 -0.65176 0.024321 0.5 0.0094054 -2.9107 2.534 7.5745 -1.1556 5.0542 2.7725 103 -0.65507 0.018305 0.5 0.01476 -2.9082 2.5996 7.5564 -1.1795 5.078 2.7448 100.04 -0.65844 0.024429 0.5 0.011194 -2.9092 2.5255 7.547 -1.1814 5.0363 2.7748 102.99 -0.66177 0.018331 0.5 0.010929 -2.9111 2.5847 7.4975 -1.205 5.0411 2.7361 100.02 -0.66507 0.024407 0.5 0.011225 -2.9085 2.5238 7.5311 -1.2215 5.0275 2.7857 99.665 diff --git a/tests/testdata/CdSe_bulk.stru b/tests/testdata/CdSe_bulk.stru deleted file mode 100644 index dbd3179c..00000000 --- a/tests/testdata/CdSe_bulk.stru +++ /dev/null @@ -1,33 +0,0 @@ -title Cell structure file of CdSe #186 -format pdffit -scale 0.846685 -sharp 0.366927, 0.591251, 3.700000 -spcgr P63mc -cell 4.235204, 4.235204, 6.906027, 90.000000, 90.000000,120.000000 -dcell 0.000493, 0.000493, 0.001368, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -CD 0.33340001 0.66670001 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.01303035 0.01303035 0.01401959 - 0.00011127 0.00011127 0.00019575 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -CD 0.66659999 0.33329999 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.01303035 0.01303035 0.01401959 - 0.00011127 0.00011127 0.00019575 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SE 0.33340001 0.66670001 0.37667000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.01567255 0.01567255 0.04616401 - 0.00022268 0.00022268 0.00071372 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SE 0.66659999 0.33329999 0.87667000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.01567255 0.01567255 0.04616401 - 0.00022268 0.00022268 0.00071372 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/LiCl-bad.cif b/tests/testdata/LiCl-bad.cif deleted file mode 100644 index 4c6f6f83..00000000 --- a/tests/testdata/LiCl-bad.cif +++ /dev/null @@ -1,231 +0,0 @@ -#### CIF created by Crystallographica 2 #### - -data_LithiumChloride - -_audit_creation_method 'Crystallographica 2' -_cell_angle_alpha 90 -_cell_angle_beta 90 -_cell_angle_gamma 90 -_cell_formula_units_Z 4 -_cell_length_a 5.12952 -_cell_length_b 5.12952 -_cell_length_c 5.12952 -_cell_volume 134.968 -_cgraph_comments 'Praezisionsbestimmung von Gitterkonstanten hygroskopischer - Verbindungen (Li Cl. Na Br). -' -_cgraph_title 'Lithium Chloride' -_chemical_formula_sum 'Li Cl' -_symmetry_space_group_name_H-M 'F m -3 m' -_symmetry_space_group_name_Hall '-F 4 2 3' - -loop_ - _symmetry_equiv_pos_as_xyz - 'x, y, z' - 'x, y+1/2, z+1/2' - 'x+1/2, y, z+1/2' - 'x+1/2, y+1/2, z' - '-x, -y, -z' - '-x, -y+1/2, -z+1/2' - '-x+1/2, -y, -z+1/2' - '-x+1/2, -y+1/2, -z' - '-y, x, z' - '-y, x+1/2, z+1/2' - '-y+1/2, x, z+1/2' - '-y+1/2, x+1/2, z' - 'y, -x, -z' - 'y, -x+1/2, -z+1/2' - 'y+1/2, -x, -z+1/2' - 'y+1/2, -x+1/2, -z' - '-x, -y, z' - '-x, -y+1/2, z+1/2' - '-x+1/2, -y, z+1/2' - '-x+1/2, -y+1/2, z' - 'x, y, -z' - 'x, y+1/2, -z+1/2' - 'x+1/2, y, -z+1/2' - 'x+1/2, y+1/2, -z' - 'y, -x, z' - 'y, -x+1/2, z+1/2' - 'y+1/2, -x, z+1/2' - 'y+1/2, -x+1/2, z' - '-y, x, -z' - '-y, x+1/2, -z+1/2' - '-y+1/2, x, -z+1/2' - '-y+1/2, x+1/2, -z' - 'x, -z, y' - 'x, -z+1/2, y+1/2' - 'x+1/2, -z, y+1/2' - 'x+1/2, -z+1/2, y' - '-x, z, -y' - '-x, z+1/2, -y+1/2' - '-x+1/2, z, -y+1/2' - '-x+1/2, z+1/2, -y' - 'x, -y, -z' - 'x, -y+1/2, -z+1/2' - 'x+1/2, -y, -z+1/2' - 'x+1/2, -y+1/2, -z' - '-x, y, z' - '-x, y+1/2, z+1/2' - '-x+1/2, y, z+1/2' - '-x+1/2, y+1/2, z' - 'x, z, -y' - 'x, z+1/2, -y+1/2' - 'x+1/2, z, -y+1/2' - 'x+1/2, z+1/2, -y' - '-x, -z, y' - '-x, -z+1/2, y+1/2' - '-x+1/2, -z, y+1/2' - '-x+1/2, -z+1/2, y' - 'z, y, -x' - 'z, y+1/2, -x+1/2' - 'z+1/2, y, -x+1/2' - 'z+1/2, y+1/2, -x' - '-z, -y, x' - '-z, -y+1/2, x+1/2' - '-z+1/2, -y, x+1/2' - '-z+1/2, -y+1/2, x' - '-x, y, -z' - '-x, y+1/2, -z+1/2' - '-x+1/2, y, -z+1/2' - '-x+1/2, y+1/2, -z' - 'x, -y, z' - 'x, -y+1/2, z+1/2' - 'x+1/2, -y, z+1/2' - 'x+1/2, -y+1/2, z' - '-z, y, x' - '-z, y+1/2, x+1/2' - '-z+1/2, y, x+1/2' - '-z+1/2, y+1/2, x' - 'z, -y, -x' - 'z, -y+1/2, -x+1/2' - 'z+1/2, -y, -x+1/2' - 'z+1/2, -y+1/2, -x' - 'z, x, y' - 'z, x+1/2, y+1/2' - 'z+1/2, x, y+1/2' - 'z+1/2, x+1/2, y' - '-z, -x, -y' - '-z, -x+1/2, -y+1/2' - '-z+1/2, -x, -y+1/2' - '-z+1/2, -x+1/2, -y' - 'y, z, x' - 'y, z+1/2, x+1/2' - 'y+1/2, z, x+1/2' - 'y+1/2, z+1/2, x' - '-y, -z, -x' - '-y, -z+1/2, -x+1/2' - '-y+1/2, -z, -x+1/2' - '-y+1/2, -z+1/2, -x' - '-y, -z, x' - '-y, -z+1/2, x+1/2' - '-y+1/2, -z, x+1/2' - '-y+1/2, -z+1/2, x' - 'y, z, -x' - 'y, z+1/2, -x+1/2' - 'y+1/2, z, -x+1/2' - 'y+1/2, z+1/2, -x' - 'z, -x, -y' - 'z, -x+1/2, -y+1/2' - 'z+1/2, -x, -y+1/2' - 'z+1/2, -x+1/2, -y' - '-z, x, y' - '-z, x+1/2, y+1/2' - '-z+1/2, x, y+1/2' - '-z+1/2, x+1/2, y' - '-y, z, -x' - '-y, z+1/2, -x+1/2' - '-y+1/2, z, -x+1/2' - '-y+1/2, z+1/2, -x' - 'y, -z, x' - 'y, -z+1/2, x+1/2' - 'y+1/2, -z, x+1/2' - 'y+1/2, -z+1/2, x' - '-z, -x, y' - '-z, -x+1/2, y+1/2' - '-z+1/2, -x, y+1/2' - '-z+1/2, -x+1/2, y' - 'z, x, -y' - 'z, x+1/2, -y+1/2' - 'z+1/2, x, -y+1/2' - 'z+1/2, x+1/2, -y' - '-z, x, -y' - '-z, x+1/2, -y+1/2' - '-z+1/2, x, -y+1/2' - '-z+1/2, x+1/2, -y' - 'z, -x, y' - 'z, -x+1/2, y+1/2' - 'z+1/2, -x, y+1/2' - 'z+1/2, -x+1/2, y' - 'y, -z, -x' - 'y, -z+1/2, -x+1/2' - 'y+1/2, -z, -x+1/2' - 'y+1/2, -z+1/2, -x' - '-y, z, x' - '-y, z+1/2, x+1/2' - '-y+1/2, z, x+1/2' - '-y+1/2, z+1/2, x' - 'y, x, -z' - 'y, x+1/2, -z+1/2' - 'y+1/2, x, -z+1/2' - 'y+1/2, x+1/2, -z' - '-y, -x, z' - '-y, -x+1/2, z+1/2' - '-y+1/2, -x, z+1/2' - '-y+1/2, -x+1/2, z' - '-y, -x, -z' - '-y, -x+1/2, -z+1/2' - '-y+1/2, -x, -z+1/2' - '-y+1/2, -x+1/2, -z' - 'y, x, z' - 'y, x+1/2, z+1/2' - 'y+1/2, x, z+1/2' - 'y+1/2, x+1/2, z' - '-x, z, y' - '-x, z+1/2, y+1/2' - '-x+1/2, z, y+1/2' - '-x+1/2, z+1/2, y' - 'x, -z, -y' - 'x, -z+1/2, -y+1/2' - 'x+1/2, -z, -y+1/2' - 'x+1/2, -z+1/2, -y' - '-x, -z, -y' - '-x, -z+1/2, -y+1/2' - '-x+1/2, -z, -y+1/2' - '-x+1/2, -z+1/2, -y' - 'x, z, y' - 'x, z+1/2, y+1/2' - 'x+1/2, z, y+1/2' - 'x+1/2, z+1/2, y' - 'z, -y, x' - 'z, -y+1/2, x+1/2' - 'z+1/2, -y, x+1/2' - 'z+1/2, -y+1/2, x' - '-z, y, -x' - '-z, y+1/2, -x+1/2' - '-z+1/2, y, -x+1/2' - '-z+1/2, y+1/2, -x' - '-z, -y, -x' - '-z, -y+1/2, -x+1/2' - '-z+1/2, -y, -x+1/2' - '-z+1/2, -y+1/2, -x' - 'z, y, x' - 'z, y+1/2, x+1/2' - 'z+1/2, y, x+1/2' - 'z+1/2, y+1/2, x' - -loop_ - _atom_site_label - _atom_site_type_symbol - _atom_site_fract_x - _atom_site_fract_y - _atom_site_fract_z - _atom_site_U_iso_or_equiv - _atom_site_thermal_displace_type - _atom_site_occupancy - Li1 Li1+ 0 0 0 0 Uiso 1 - Cl1 Cl1- 0.5 0.5 0.5 0 Uiso 1 - -_eof - -#### End of Crystallographic Information File #### diff --git a/tests/testdata/Ni-bad.stru b/tests/testdata/Ni-bad.stru deleted file mode 100644 index 766ca134..00000000 --- a/tests/testdata/Ni-bad.stru +++ /dev/null @@ -1,32 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/Ni-discus.stru b/tests/testdata/Ni-discus.stru deleted file mode 100644 index 3e5fab07..00000000 --- a/tests/testdata/Ni-discus.stru +++ /dev/null @@ -1,9 +0,0 @@ -title structure Ni FCC -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 0.1000 -NI 0.00000000 0.50000000 0.50000000 0.1000 -NI 0.50000000 0.00000000 0.50000000 0.1000 -NI 0.50000000 0.50000000 0.00000000 0.1000 diff --git a/tests/testdata/Ni.stru b/tests/testdata/Ni.stru deleted file mode 100644 index e13f2693..00000000 --- a/tests/testdata/Ni.stru +++ /dev/null @@ -1,33 +0,0 @@ -title structure Ni FCC -format pdffit -scale 1.000000 -sharp 0.000000, 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 4 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.50000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.00000000 0.50000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -NI 0.50000000 0.50000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/Ni_prim123.stru b/tests/testdata/Ni_prim123.stru deleted file mode 100644 index af7230a2..00000000 --- a/tests/testdata/Ni_prim123.stru +++ /dev/null @@ -1,45 +0,0 @@ -title structure of Ni rhombohedral 1x2x3 supercell -format pdffit -scale 1.000000 -sharp 0.000000, 0.000000, 1.000000, 0.000000 -spcgr Fm-3m -cell 2.489016, 2.489016, 2.489016, 60.000000, 60.000000, 60.000000 -dcell 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000 -ncell 1, 2, 3, 1 -atoms -NI 0.00000000 0.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - -0.00042217 -0.00042217 -0.00042217 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.00000000 1.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - -0.00042217 -0.00042217 -0.00042217 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 0.00000000 2.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - -0.00042217 -0.00042217 -0.00042217 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 1.00000000 0.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - -0.00042217 -0.00042217 -0.00042217 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 1.00000000 1.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - -0.00042217 -0.00042217 -0.00042217 - 0.00000000 0.00000000 0.00000000 -NI 0.00000000 1.00000000 2.00000000 1.0000 - 0.00000000 0.00000000 0.00000000 0.0000 - 0.00126651 0.00126651 0.00126651 - 0.00000000 0.00000000 0.00000000 - -0.00042217 -0.00042217 -0.00042217 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/Ni_ref.cif b/tests/testdata/Ni_ref.cif deleted file mode 100644 index 858dd3c6..00000000 --- a/tests/testdata/Ni_ref.cif +++ /dev/null @@ -1,20 +0,0 @@ -data_2102245 -_cell_length_a 3.562 -_cell_length_b 3.562 -_cell_length_c 3.562 -_cell_angle_alpha 90.00000000 -_cell_angle_beta 90.00000000 -_cell_angle_gamma 90.00000000 -_space_group_name_H-M_ref 'F m -3 m' - - -loop_ -_atom_site_label -_atom_site_type_symbol -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -_atom_site_occupancy -_atom_site_adp_type -_atom_site_U_iso_or_equiv -Ni Ni 0.00000000 0.00000000 0.00000000 1.00000000 Uiso 0.025 diff --git a/tests/testdata/PbTe.cif b/tests/testdata/PbTe.cif deleted file mode 100644 index 908ee76b..00000000 --- a/tests/testdata/PbTe.cif +++ /dev/null @@ -1,227 +0,0 @@ -#### CIF created by Crystallographica 2 #### - -data_LeadTelluride - -_audit_creation_method 'Crystallographica 2' -_cell_angle_alpha 90 -_cell_angle_beta 90 -_cell_angle_gamma 90 -_cell_formula_units_Z 4 -_cell_length_a 6.461 -_cell_length_b 6.461 -_cell_length_c 6.461 -_cell_volume 269.711 -_cgraph_comments 'Charge distribution and atomic thermal vibration in lead chalcogenide crystals' -_cgraph_title 'Lead Telluride' -_chemical_formula_sum 'Pb Te' -_symmetry_space_group_name_H-M 'F m -3 m' -_symmetry_space_group_name_Hall '-F 4 2 3' - -loop_ - _symmetry_equiv_pos_as_xyz - 'x, y, z' - 'x, y+1/2, z+1/2' - 'x+1/2, y, z+1/2' - 'x+1/2, y+1/2, z' - '-x, -y, -z' - '-x, -y+1/2, -z+1/2' - '-x+1/2, -y, -z+1/2' - '-x+1/2, -y+1/2, -z' - '-y, x, z' - '-y, x+1/2, z+1/2' - '-y+1/2, x, z+1/2' - '-y+1/2, x+1/2, z' - 'y, -x, -z' - 'y, -x+1/2, -z+1/2' - 'y+1/2, -x, -z+1/2' - 'y+1/2, -x+1/2, -z' - '-x, -y, z' - '-x, -y+1/2, z+1/2' - '-x+1/2, -y, z+1/2' - '-x+1/2, -y+1/2, z' - 'x, y, -z' - 'x, y+1/2, -z+1/2' - 'x+1/2, y, -z+1/2' - 'x+1/2, y+1/2, -z' - 'y, -x, z' - 'y, -x+1/2, z+1/2' - 'y+1/2, -x, z+1/2' - 'y+1/2, -x+1/2, z' - '-y, x, -z' - '-y, x+1/2, -z+1/2' - '-y+1/2, x, -z+1/2' - '-y+1/2, x+1/2, -z' - 'x, -z, y' - 'x, -z+1/2, y+1/2' - 'x+1/2, -z, y+1/2' - 'x+1/2, -z+1/2, y' - '-x, z, -y' - '-x, z+1/2, -y+1/2' - '-x+1/2, z, -y+1/2' - '-x+1/2, z+1/2, -y' - 'x, -y, -z' - 'x, -y+1/2, -z+1/2' - 'x+1/2, -y, -z+1/2' - 'x+1/2, -y+1/2, -z' - '-x, y, z' - '-x, y+1/2, z+1/2' - '-x+1/2, y, z+1/2' - '-x+1/2, y+1/2, z' - 'x, z, -y' - 'x, z+1/2, -y+1/2' - 'x+1/2, z, -y+1/2' - 'x+1/2, z+1/2, -y' - '-x, -z, y' - '-x, -z+1/2, y+1/2' - '-x+1/2, -z, y+1/2' - '-x+1/2, -z+1/2, y' - 'z, y, -x' - 'z, y+1/2, -x+1/2' - 'z+1/2, y, -x+1/2' - 'z+1/2, y+1/2, -x' - '-z, -y, x' - '-z, -y+1/2, x+1/2' - '-z+1/2, -y, x+1/2' - '-z+1/2, -y+1/2, x' - '-x, y, -z' - '-x, y+1/2, -z+1/2' - '-x+1/2, y, -z+1/2' - '-x+1/2, y+1/2, -z' - 'x, -y, z' - 'x, -y+1/2, z+1/2' - 'x+1/2, -y, z+1/2' - 'x+1/2, -y+1/2, z' - '-z, y, x' - '-z, y+1/2, x+1/2' - '-z+1/2, y, x+1/2' - '-z+1/2, y+1/2, x' - 'z, -y, -x' - 'z, -y+1/2, -x+1/2' - 'z+1/2, -y, -x+1/2' - 'z+1/2, -y+1/2, -x' - 'z, x, y' - 'z, x+1/2, y+1/2' - 'z+1/2, x, y+1/2' - 'z+1/2, x+1/2, y' - '-z, -x, -y' - '-z, -x+1/2, -y+1/2' - '-z+1/2, -x, -y+1/2' - '-z+1/2, -x+1/2, -y' - 'y, z, x' - 'y, z+1/2, x+1/2' - 'y+1/2, z, x+1/2' - 'y+1/2, z+1/2, x' - '-y, -z, -x' - '-y, -z+1/2, -x+1/2' - '-y+1/2, -z, -x+1/2' - '-y+1/2, -z+1/2, -x' - '-y, -z, x' - '-y, -z+1/2, x+1/2' - '-y+1/2, -z, x+1/2' - '-y+1/2, -z+1/2, x' - 'y, z, -x' - 'y, z+1/2, -x+1/2' - 'y+1/2, z, -x+1/2' - 'y+1/2, z+1/2, -x' - 'z, -x, -y' - 'z, -x+1/2, -y+1/2' - 'z+1/2, -x, -y+1/2' - 'z+1/2, -x+1/2, -y' - '-z, x, y' - '-z, x+1/2, y+1/2' - '-z+1/2, x, y+1/2' - '-z+1/2, x+1/2, y' - '-y, z, -x' - '-y, z+1/2, -x+1/2' - '-y+1/2, z, -x+1/2' - '-y+1/2, z+1/2, -x' - 'y, -z, x' - 'y, -z+1/2, x+1/2' - 'y+1/2, -z, x+1/2' - 'y+1/2, -z+1/2, x' - '-z, -x, y' - '-z, -x+1/2, y+1/2' - '-z+1/2, -x, y+1/2' - '-z+1/2, -x+1/2, y' - 'z, x, -y' - 'z, x+1/2, -y+1/2' - 'z+1/2, x, -y+1/2' - 'z+1/2, x+1/2, -y' - '-z, x, -y' - '-z, x+1/2, -y+1/2' - '-z+1/2, x, -y+1/2' - '-z+1/2, x+1/2, -y' - 'z, -x, y' - 'z, -x+1/2, y+1/2' - 'z+1/2, -x, y+1/2' - 'z+1/2, -x+1/2, y' - 'y, -z, -x' - 'y, -z+1/2, -x+1/2' - 'y+1/2, -z, -x+1/2' - 'y+1/2, -z+1/2, -x' - '-y, z, x' - '-y, z+1/2, x+1/2' - '-y+1/2, z, x+1/2' - '-y+1/2, z+1/2, x' - 'y, x, -z' - 'y, x+1/2, -z+1/2' - 'y+1/2, x, -z+1/2' - 'y+1/2, x+1/2, -z' - '-y, -x, z' - '-y, -x+1/2, z+1/2' - '-y+1/2, -x, z+1/2' - '-y+1/2, -x+1/2, z' - '-y, -x, -z' - '-y, -x+1/2, -z+1/2' - '-y+1/2, -x, -z+1/2' - '-y+1/2, -x+1/2, -z' - 'y, x, z' - 'y, x+1/2, z+1/2' - 'y+1/2, x, z+1/2' - 'y+1/2, x+1/2, z' - '-x, z, y' - '-x, z+1/2, y+1/2' - '-x+1/2, z, y+1/2' - '-x+1/2, z+1/2, y' - 'x, -z, -y' - 'x, -z+1/2, -y+1/2' - 'x+1/2, -z, -y+1/2' - 'x+1/2, -z+1/2, -y' - '-x, -z, -y' - '-x, -z+1/2, -y+1/2' - '-x+1/2, -z, -y+1/2' - '-x+1/2, -z+1/2, -y' - 'x, z, y' - 'x, z+1/2, y+1/2' - 'x+1/2, z, y+1/2' - 'x+1/2, z+1/2, y' - 'z, -y, x' - 'z, -y+1/2, x+1/2' - 'z+1/2, -y, x+1/2' - 'z+1/2, -y+1/2, x' - '-z, y, -x' - '-z, y+1/2, -x+1/2' - '-z+1/2, y, -x+1/2' - '-z+1/2, y+1/2, -x' - '-z, -y, -x' - '-z, -y+1/2, -x+1/2' - '-z+1/2, -y, -x+1/2' - '-z+1/2, -y+1/2, -x' - 'z, y, x' - 'z, y+1/2, x+1/2' - 'z+1/2, y, x+1/2' - 'z+1/2, y+1/2, x' - -loop_ - _atom_site_label - _atom_site_type_symbol - _atom_site_fract_x - _atom_site_fract_y - _atom_site_fract_z - _atom_site_U_iso_or_equiv - _atom_site_thermal_displace_type - _atom_site_occupancy - Pb1 Pb2+ 0.5 0.5 0.5 0.0225566 Uiso 1 - Te1 Te 0 0 0 0.0155528 Uiso 1 - -#### End of Crystallographic Information File #### diff --git a/tests/testdata/TeI-unkocc.cif b/tests/testdata/TeI-unkocc.cif deleted file mode 100644 index 051b0a18..00000000 --- a/tests/testdata/TeI-unkocc.cif +++ /dev/null @@ -1,37 +0,0 @@ -data_TeI -_audit_creation_date 2011-02-15 - -_symmetry_space_group_name_H-M 'C 1 2/m 1' - -_cell_length_a 15.383 -_cell_length_b 4.182 -_cell_length_c 11.999 -_cell_angle_alpha 90 -_cell_angle_beta 128.09 -_cell_angle_gamma 90 - -loop_ - _atom_site_label - _atom_site_type_symbol - _atom_site_fract_x - _atom_site_fract_y - _atom_site_fract_z - _atom_site_U_iso_or_equiv - _atom_site_adp_type - _atom_site_occupancy - Te1 Te1+ 0.306590 0.000000 0.185920 0.019227 Uani ? - Te2 Te1+ 0.429170 0.500000 0.168170 0.019784 Uani ? - I1 I1- 0.153740 0.500000 0.182510 0.024813 Uani ? - I2 I1- 0.610730 0.500000 0.448390 0.026878 Uani ? -loop_ - _atom_site_aniso_label - _atom_site_aniso_U_11 - _atom_site_aniso_U_22 - _atom_site_aniso_U_33 - _atom_site_aniso_U_12 - _atom_site_aniso_U_13 - _atom_site_aniso_U_23 - Te1 0.021100 0.019500 0.016000 0.000000 0.010900 0.000000 - Te2 0.022300 0.018000 0.025400 0.000000 0.017900 0.000000 - I1 0.025000 0.023400 0.034500 0.000000 0.022600 0.000000 - I2 0.023400 0.029500 0.025300 0.000000 0.013800 0.000000 diff --git a/tests/testdata/TeI.cif b/tests/testdata/TeI.cif deleted file mode 100644 index b1784f65..00000000 --- a/tests/testdata/TeI.cif +++ /dev/null @@ -1,37 +0,0 @@ -data_TeI -_audit_creation_date 2011-02-15 - -_symmetry_space_group_name_H-M 'C 1 2/m 1' - -_cell_length_a 15.383 -_cell_length_b 4.182 -_cell_length_c 11.999 -_cell_angle_alpha 90 -_cell_angle_beta 128.09 -_cell_angle_gamma 90 - -loop_ - _atom_site_label - _atom_site_type_symbol - _atom_site_fract_x - _atom_site_fract_y - _atom_site_fract_z - _atom_site_U_iso_or_equiv - _atom_site_adp_type - _atom_site_occupancy - Te1 Te1+ 0.306590 0.000000 0.185920 0.019227 Uani 1.0000 - Te2 Te1+ 0.429170 0.500000 0.168170 0.019784 Uani 1.0000 - I1 I1- 0.153740 0.500000 0.182510 0.024813 Uani 1.0000 - I2 I1- 0.610730 0.500000 0.448390 0.026878 Uani 1.0000 -loop_ - _atom_site_aniso_label - _atom_site_aniso_U_11 - _atom_site_aniso_U_22 - _atom_site_aniso_U_33 - _atom_site_aniso_U_12 - _atom_site_aniso_U_13 - _atom_site_aniso_U_23 - Te1 0.021100 0.019500 0.016000 0.000000 0.010900 0.000000 - Te2 0.022300 0.018000 0.025400 0.000000 0.017900 0.000000 - I1 0.025000 0.023400 0.034500 0.000000 0.022600 0.000000 - I2 0.023400 0.029500 0.025300 0.000000 0.013800 0.000000 diff --git a/tests/testdata/ZnSb_RT_Q28X_VM_20_fxiso.rstr b/tests/testdata/ZnSb_RT_Q28X_VM_20_fxiso.rstr deleted file mode 100644 index 1858edf7..00000000 --- a/tests/testdata/ZnSb_RT_Q28X_VM_20_fxiso.rstr +++ /dev/null @@ -1,405 +0,0 @@ -title Cell structure file of Zn4Sb3 #167 interstitial -format pdffit -scale 0.826145 -sharp 4.687951, 0.010000, 1.020000, 0.030000 -spcgr R-3c -cell 12.309436, 12.309436, 12.392839, 90.000000, 90.000000, 120.000000 -dcell 0.000008, 0.000008, 0.000013, 0.000000, 0.000000, 0.000000 -ncell 1, 1, 1, 66 -atoms -ZN 0.09094387 0.24639539 0.40080261 0.9000 - 0.00000079 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.75761054 0.57972872 0.73413594 0.9000 - 0.00000079 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.42427720 0.91306206 0.06746928 0.9000 - 0.00000079 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.75360461 0.84454848 0.40080261 0.9000 - 0.00000076 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.42027128 0.17788181 0.73413594 0.9000 - 0.00000076 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.08693794 0.51121515 0.06746928 0.9000 - 0.00000076 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.15545152 0.90905613 0.40080261 0.9000 - 0.00000062 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.82211819 0.24238946 0.73413594 0.9000 - 0.00000062 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.48878485 0.57572280 0.06746928 0.9000 - 0.00000062 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.24639539 0.09094387 0.09919739 0.9000 - 0.00000076 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.57972872 0.75761054 0.76586406 0.9000 - 0.00000076 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.91306206 0.42427720 0.43253072 0.9000 - 0.00000076 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.84454848 0.75360461 0.09919739 0.9000 - 0.00000062 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.17788181 0.42027128 0.76586406 0.9000 - 0.00000062 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.51121515 0.08693794 0.43253072 0.9000 - 0.00000062 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.90905613 0.15545152 0.09919739 0.9000 - 0.00000079 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.24238946 0.82211819 0.76586406 0.9000 - 0.00000079 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.57572280 0.48878485 0.43253072 0.9000 - 0.00000079 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.90905613 0.75360461 0.59919739 0.9000 - 0.00000079 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.24238946 0.42027128 0.26586406 0.9000 - 0.00000079 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.57572280 0.08693794 0.93253072 0.9000 - 0.00000079 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.24639539 0.15545152 0.59919739 0.9000 - 0.00000076 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.57972872 0.82211819 0.26586406 0.9000 - 0.00000076 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.91306206 0.48878485 0.93253072 0.9000 - 0.00000076 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.84454848 0.09094387 0.59919739 0.9000 - 0.00000062 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.17788181 0.75761054 0.26586406 0.9000 - 0.00000062 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.51121515 0.42427720 0.93253072 0.9000 - 0.00000062 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.75360461 0.90905613 0.90080261 0.9000 - 0.00000076 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.42027128 0.24238946 0.23413594 0.9000 - 0.00000076 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.08693794 0.57572280 0.56746928 0.9000 - 0.00000076 0.00000079 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.15545152 0.24639539 0.90080261 0.9000 - 0.00000062 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.82211819 0.57972872 0.23413594 0.9000 - 0.00000062 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.48878485 0.91306206 0.56746928 0.9000 - 0.00000062 0.00000076 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.09094387 0.84454848 0.90080261 0.9000 - 0.00000079 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.75761054 0.17788181 0.23413594 0.9000 - 0.00000079 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -ZN 0.42427720 0.51121515 0.56746928 0.9000 - 0.00000079 0.00000062 0.00000064 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.64758205 0.64758205 0.25000000 1.0000 - 0.00000090 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.31424872 0.98091538 0.58333302 1.0000 - 0.00000090 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.98091538 0.31424872 0.91666698 1.0000 - 0.00000090 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.35241795 0.00000000 0.25000000 1.0000 - 0.00000090 0.00000000 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.01908462 0.33333299 0.58333302 1.0000 - 0.00000090 0.00000000 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.68575128 0.66666698 0.91666698 1.0000 - 0.00000090 0.00000000 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.00000000 0.35241795 0.25000000 1.0000 - 0.00000000 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.66666698 0.68575128 0.58333302 1.0000 - 0.00000000 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.33333299 0.01908462 0.91666698 1.0000 - 0.00000000 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.35241795 0.35241795 0.75000000 1.0000 - 0.00000090 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.68575128 0.01908462 0.41666701 1.0000 - 0.00000090 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.01908462 0.68575128 0.08333300 1.0000 - 0.00000090 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.64758205 0.00000000 0.75000000 1.0000 - 0.00000090 0.00000000 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.98091538 0.66666698 0.41666701 1.0000 - 0.00000090 0.00000000 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.31424872 0.33333299 0.08333300 1.0000 - 0.00000090 0.00000000 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.00000000 0.64758205 0.75000000 1.0000 - 0.00000000 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.33333299 0.31424872 0.41666701 1.0000 - 0.00000000 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.66666698 0.98091538 0.08333300 1.0000 - 0.00000000 0.00000090 0.00000000 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.00000000 0.00000000 0.13881880 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.66666698 0.33333299 0.47215213 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.33333299 0.66666698 0.80548547 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.00000000 0.00000000 0.36118120 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.33333299 0.66666698 0.02784787 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.66666698 0.33333299 0.69451453 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.00000000 0.00000000 0.86118120 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.33333299 0.66666698 0.52784787 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.66666698 0.33333299 0.19451453 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.00000000 0.00000000 0.63881880 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.66666698 0.33333299 0.97215213 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 -SB 0.33333299 0.66666698 0.30548547 1.0000 - 0.00000000 0.00000000 0.00000098 0.0000 - 0.01000000 0.01000000 0.01000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 - 0.00000000 0.00000000 0.00000000 diff --git a/tests/testdata/arginine.pdb b/tests/testdata/arginine.pdb deleted file mode 100644 index 008c09ce..00000000 --- a/tests/testdata/arginine.pdb +++ /dev/null @@ -1,28 +0,0 @@ -ATOM 1 N ARG 1 0.735 2.219 1.389 1.00 0.00 -ATOM 2 CA ARG 1 2.189 2.285 1.274 1.00 0.00 -ATOM 3 C ARG 1 2.600 3.010 0.014 1.00 0.00 -ATOM 4 O ARG 1 1.774 3.463 -0.774 1.00 0.00 -ATOM 5 CB ARG 1 2.760 0.838 1.308 1.00 0.00 -ATOM 6 CG ARG 1 4.302 0.731 1.473 1.00 0.00 -ATOM 7 CD ARG 1 4.786 -0.729 1.460 1.00 0.00 -ATOM 8 NE ARG 1 6.267 -0.770 1.642 1.00 0.00 -ATOM 9 CZ ARG 1 7.007 -1.874 1.673 1.00 0.00 -ATOM 10 NH1 ARG 1 6.518 -3.074 1.538 1.00 0.00 -ATOM 11 NH2 ARG 1 8.285 -1.752 1.846 1.00 0.00 -ATOM 12 H ARG 1 0.115 2.627 0.682 1.00 0.00 -ATOM 13 H ARG 1 0.273 1.763 2.183 1.00 0.00 -ATOM 14 HA ARG 1 2.575 2.864 2.134 1.00 0.00 -ATOM 15 HB ARG 1 2.277 0.276 2.132 1.00 0.00 -ATOM 16 HB ARG 1 2.438 0.307 0.388 1.00 0.00 -ATOM 17 HG ARG 1 4.812 1.292 0.662 1.00 0.00 -ATOM 18 HG ARG 1 4.604 1.231 2.416 1.00 0.00 -ATOM 19 HD ARG 1 4.269 -1.296 2.264 1.00 0.00 -ATOM 20 HD ARG 1 4.490 -1.205 0.499 1.00 0.00 -ATOM 21 HE ARG 1 6.806 0.094 1.761 1.00 0.00 -ATOM 22 HH1 ARG 1 7.154 -3.872 1.573 1.00 0.00 -ATOM 23 HH1 ARG 1 5.505 -3.100 1.403 1.00 0.00 -ATOM 24 HH2 ARG 1 8.649 -0.803 1.949 1.00 0.00 -ATOM 25 HH2 ARG 1 8.837 -2.612 1.868 1.00 0.00 -ATOM 26 OC ARG 1 4.007 3.160 -0.192 1.00 0.00 -ATOM 27 HC ARG 1 4.448 3.496 0.676 1.00 0.00 -TER diff --git a/tests/testdata/badspacegroup.cif b/tests/testdata/badspacegroup.cif deleted file mode 100644 index 5add37be..00000000 --- a/tests/testdata/badspacegroup.cif +++ /dev/null @@ -1,49 +0,0 @@ -#------------------------------------------------------------------------------ -#$Date: 2015-01-27 21:58:39 +0200 (Tue, 27 Jan 2015) $ -#$Revision: 130149 $ -#$URL: svn://www.crystallography.net/cod/cif/1/10/01/1100106.cif $ -#------------------------------------------------------------------------------ -# -# This file is available in the Crystallography Open Database (COD), -# http://www.crystallography.net/ -# -# All data on this site have been placed in the public domain by the -# contributors. -# -data_1100106 -_publ_section_title 'Clay Montmorillonite' -_chemical_name_common Montmorillonite -_symmetry_cell_setting monoclinic -_symmetry_space_group_name_H-M C2:b1 -_audit_update_record 'Last update Thu Dec 18 14:12:16 CET 2003' -_cell_angle_alpha 90 -_cell_angle_beta 100.3(1) -_cell_angle_gamma 90 -_cell_formula_units_Z 1 -_cell_length_a 5.411(4) -_cell_length_b 9.0(5) -_cell_length_c 10.25(2) -_refine_ls_goodness_of_fit_all 1.1109964 -_refine_ls_R_factor_all 0.04240644 -_refine_ls_wR_factor_all 0.06303699 -_cod_database_code 1100106 -loop_ -_atom_site_label -_atom_site_type_symbol -_atom_site_occupancy -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -_atom_site_B_iso_or_equiv -Al1 Al3+ 1.00000 0 0 0 0.5 -Al2 Al3+ 1.00000 0 0.321 0 0.5 -Mg1 Mg2+ 1.00000 0 0.654 0 0.5 -Si1 Si4+ 1.00000 0.432 0.333 0.27 0.5 -Si2 Si4+ 1.00000 0.432 0.662 0.27 0.5 -K1 K1+ 1.00000 0.5 0 0.5 0.5 -O1 O2- 1.00000 0.489 0.496 0.335 0.8 -O2 O2- 1.00000 0.173 0.725 0.335 0.8 -O3 O2- 1.00000 0.17 0.268 0.32 0.8 -O4 O2- 1.00000 0.334 -0.024 0.105 0.8 -O5 O2- 1.00000 0.417 0.656 0.109 0.8 -O6 O2- 1.00000 0.343 0.347 0.109 0.8 diff --git a/tests/testdata/bucky-bad1.xyz b/tests/testdata/bucky-bad1.xyz deleted file mode 100644 index f5151f02..00000000 --- a/tests/testdata/bucky-bad1.xyz +++ /dev/null @@ -1,61 +0,0 @@ -60 - C 1.22650 0.00000 3.31450 - C 0.37900 1.16640 3.31450 - C -0.99220 0.72090 3.31450 - C -0.99220 -0.72090 3.31450 - C 0.37900 -1.16640 3.31450 - C 3.40840 0.72090 0.59480 - C 2.79510 1.16640 1.82130 - C 2.41610 0.00000 2.57930 - C 2.79510 -1.16640 1.82130 - C 3.40840 -0.72090 0.59480 - C 0.36760 3.46430 0.59480 - C -0.24560 3.01880 1.82130 - C 0.74660 2.29790 2.57930 - C 1.97310 2.29790 1.82130 - C 1.73890 3.01880 0.59480 - C -3.18120 1.42020 0.59480 - C -2.94690 0.69930 1.82130 - C -1.95470 1.42020 2.57930 - C -1.57570 2.58660 1.82130 - C -2.33370 2.58660 0.59480 - C -2.33370 -2.58660 0.59480 - C -1.57570 -2.58660 1.82130 - C -1.95470 -1.42020 2.57930 - C -2.94690 -0.69930 1.82130 - C -3.18120 -1.42020 0.59480 - C 1.73890 -3.01880 0.59480 - C 1.97310 -2.29790 1.82130 - C 0.74660 -2.29790 2.57930 - C -0.24560 -3.01880 1.82130 - C 0.36760 -3.46430 0.59480 - C 0.99220 0.72090 -3.31450 - C -0.37900 1.16640 -3.31450 - C -1.22650 0.00000 -3.31450 - C -0.37900 -1.16640 -3.31450 - C 0.99220 -0.72090 -3.31450 - C 2.33370 2.58660 -0.59480 - C 1.57570 2.58660 -1.82130 - C 1.95470 1.42020 -2.57930 - C 2.94690 0.69930 -1.82130 - C 3.18120 1.42020 -0.59480 - C -1.73890 3.01880 -0.59480 - C -1.97310 2.29790 -1.82130 - C -0.74660 2.29790 -2.57930 - C 0.24560 3.01880 -1.82130 - C -0.36760 3.46430 -0.59480 - C -3.40840 -0.72090 -0.59480 - C -2.79510 -1.16640 -1.82130 - C -2.41610 0.00000 -2.57930 - C -2.79510 1.16640 -1.82130 - C -3.40840 0.72090 -0.59480 - C -0.36760 -3.46430 -0.59480 - C 0.24560 -3.01880 -1.82130 - C -0.74660 -2.29790 -2.57930 - C -1.97310 -2.29790 -1.82130 - C -1.73890 -3.01880 -0.59480 - C 3.18120 -1.42020 -0.59480 - C 2.94690 -0.69930 -1.82130 - C 1.95470 -1.42020 -2.57930 - C 1.57570 -2.58660 -1.82130 - C 2.33370 -2.58660 -0.59480 diff --git a/tests/testdata/bucky-bad2.xyz b/tests/testdata/bucky-bad2.xyz deleted file mode 100644 index 5f4012bf..00000000 --- a/tests/testdata/bucky-bad2.xyz +++ /dev/null @@ -1,62 +0,0 @@ -60 -bucky-ball - C 0.00000 3.31450 - C 0.37900 1.16640 3.31450 - C -0.99220 0.72090 3.31450 - C -0.99220 -0.72090 3.31450 - C 0.37900 -1.16640 3.31450 - C 3.40840 0.72090 0.59480 - C 2.79510 1.16640 1.82130 - C 2.41610 0.00000 2.57930 - C 2.79510 -1.16640 1.82130 - C 3.40840 -0.72090 0.59480 - C 0.36760 3.46430 0.59480 - C -0.24560 3.01880 1.82130 - C 0.74660 2.29790 2.57930 - C 1.97310 2.29790 1.82130 - C 1.73890 3.01880 0.59480 - C -3.18120 1.42020 0.59480 - C -2.94690 0.69930 1.82130 - C -1.95470 1.42020 2.57930 - C -1.57570 2.58660 1.82130 - C -2.33370 2.58660 0.59480 - C -2.33370 -2.58660 0.59480 - C -1.57570 -2.58660 1.82130 - C -1.95470 -1.42020 2.57930 - C -2.94690 -0.69930 1.82130 - C -3.18120 -1.42020 0.59480 - C 1.73890 -3.01880 0.59480 - C 1.97310 -2.29790 1.82130 - C 0.74660 -2.29790 2.57930 - C -0.24560 -3.01880 1.82130 - C 0.36760 -3.46430 0.59480 - C 0.99220 0.72090 -3.31450 - C -0.37900 1.16640 -3.31450 - C -1.22650 0.00000 -3.31450 - C -0.37900 -1.16640 -3.31450 - C 0.99220 -0.72090 -3.31450 - C 2.33370 2.58660 -0.59480 - C 1.57570 2.58660 -1.82130 - C 1.95470 1.42020 -2.57930 - C 2.94690 0.69930 -1.82130 - C 3.18120 1.42020 -0.59480 - C -1.73890 3.01880 -0.59480 - C -1.97310 2.29790 -1.82130 - C -0.74660 2.29790 -2.57930 - C 0.24560 3.01880 -1.82130 - C -0.36760 3.46430 -0.59480 - C -3.40840 -0.72090 -0.59480 - C -2.79510 -1.16640 -1.82130 - C -2.41610 0.00000 -2.57930 - C -2.79510 1.16640 -1.82130 - C -3.40840 0.72090 -0.59480 - C -0.36760 -3.46430 -0.59480 - C 0.24560 -3.01880 -1.82130 - C -0.74660 -2.29790 -2.57930 - C -1.97310 -2.29790 -1.82130 - C -1.73890 -3.01880 -0.59480 - C 3.18120 -1.42020 -0.59480 - C 2.94690 -0.69930 -1.82130 - C 1.95470 -1.42020 -2.57930 - C 1.57570 -2.58660 -1.82130 - C 2.33370 -2.58660 -0.59480 diff --git a/tests/testdata/bucky-plain-bad.xyz b/tests/testdata/bucky-plain-bad.xyz deleted file mode 100644 index 2895b234..00000000 --- a/tests/testdata/bucky-plain-bad.xyz +++ /dev/null @@ -1,60 +0,0 @@ -C 1.224937164 0 -C 0.3785264007 1.164984472 3.351511349 -C -0.9909949827 0.72 3.351511349 -C -0.9909949827 -0.72 3.351511349 -C 0.3785264007 -1.164984472 3.351511349 -C 2.449874328 0 2.594458547 -C 2.828400729 -1.164984472 1.837405746 -C 3.440869311 -0.72 0.612468582 -C 3.440869311 0.72 0.612468582 -C 2.828400729 1.164984472 1.837405746 -C 0.7570528015 2.329968944 2.594458547 -C 1.981989965 2.329968944 1.837405746 -C 1.748047784 3.049968944 0.612468582 -C 0.3785264007 3.494953416 0.612468582 -C -0.2339421813 3.049968944 1.837405746 -C -1.981989965 1.44 2.594458547 -C -1.603463565 2.604984472 1.837405746 -C -2.360516366 2.604984472 0.612468582 -C -3.20692713 1.44 0.612468582 -C -2.972984948 0.72 1.837405746 -C -1.981989965 -1.44 2.594458547 -C -2.972984948 -0.72 1.837405746 -C -3.20692713 -1.44 0.612468582 -C -2.360516366 -2.604984472 0.612468582 -C -1.603463565 -2.604984472 1.837405746 -C 0.7570528015 -2.329968944 2.594458547 -C -0.2339421813 -3.049968944 1.837405746 -C 0.3785264007 -3.494953416 0.612468582 -C 1.748047784 -3.049968944 0.612468582 -C 1.981989965 -2.329968944 1.837405746 -C -1.981989965 2.329968944 -1.837405746 -C -1.748047784 3.049968944 -0.612468582 -C -0.3785264007 3.494953416 -0.612468582 -C 0.2339421813 3.049968944 -1.837405746 -C -0.7570528015 2.329968944 -2.594458547 -C 1.603463565 2.604984472 -1.837405746 -C 2.360516366 2.604984472 -0.612468582 -C 3.20692713 1.44 -0.612468582 -C 2.972984948 0.72 -1.837405746 -C 1.981989965 1.44 -2.594458547 -C 2.972984948 -0.72 -1.837405746 -C 3.20692713 -1.44 -0.612468582 -C 2.360516366 -2.604984472 -0.612468582 -C 1.603463565 -2.604984472 -1.837405746 -C 1.981989965 -1.44 -2.594458547 -C 0.2339421813 -3.049968944 -1.837405746 -C -0.3785264007 -3.494953416 -0.612468582 -C -1.748047784 -3.049968944 -0.612468582 -C -1.981989965 -2.329968944 -1.837405746 -C -0.7570528015 -2.329968944 -2.594458547 -C -2.828400729 -1.164984472 -1.837405746 -C -3.440869311 -0.72 -0.612468582 -C -3.440869311 0.72 -0.612468582 -C -2.828400729 1.164984472 -1.837405746 -C -2.449874328 3.000230754e-16 -2.594458547 -C -0.3785264007 1.164984472 -3.351511349 -C 0.9909949827 0.72 -3.351511349 -C 0.9909949827 -0.72 -3.351511349 -C -0.3785264007 -1.164984472 -3.351511349 -C -1.224937164 1.500115377e-16 -3.351511349 diff --git a/tests/testdata/bucky-plain.xyz b/tests/testdata/bucky-plain.xyz deleted file mode 100644 index d9f25708..00000000 --- a/tests/testdata/bucky-plain.xyz +++ /dev/null @@ -1,60 +0,0 @@ -C 1.224937164 0 3.351511349 -C 0.3785264007 1.164984472 3.351511349 -C -0.9909949827 0.72 3.351511349 -C -0.9909949827 -0.72 3.351511349 -C 0.3785264007 -1.164984472 3.351511349 -C 2.449874328 0 2.594458547 -C 2.828400729 -1.164984472 1.837405746 -C 3.440869311 -0.72 0.612468582 -C 3.440869311 0.72 0.612468582 -C 2.828400729 1.164984472 1.837405746 -C 0.7570528015 2.329968944 2.594458547 -C 1.981989965 2.329968944 1.837405746 -C 1.748047784 3.049968944 0.612468582 -C 0.3785264007 3.494953416 0.612468582 -C -0.2339421813 3.049968944 1.837405746 -C -1.981989965 1.44 2.594458547 -C -1.603463565 2.604984472 1.837405746 -C -2.360516366 2.604984472 0.612468582 -C -3.20692713 1.44 0.612468582 -C -2.972984948 0.72 1.837405746 -C -1.981989965 -1.44 2.594458547 -C -2.972984948 -0.72 1.837405746 -C -3.20692713 -1.44 0.612468582 -C -2.360516366 -2.604984472 0.612468582 -C -1.603463565 -2.604984472 1.837405746 -C 0.7570528015 -2.329968944 2.594458547 -C -0.2339421813 -3.049968944 1.837405746 -C 0.3785264007 -3.494953416 0.612468582 -C 1.748047784 -3.049968944 0.612468582 -C 1.981989965 -2.329968944 1.837405746 -C -1.981989965 2.329968944 -1.837405746 -C -1.748047784 3.049968944 -0.612468582 -C -0.3785264007 3.494953416 -0.612468582 -C 0.2339421813 3.049968944 -1.837405746 -C -0.7570528015 2.329968944 -2.594458547 -C 1.603463565 2.604984472 -1.837405746 -C 2.360516366 2.604984472 -0.612468582 -C 3.20692713 1.44 -0.612468582 -C 2.972984948 0.72 -1.837405746 -C 1.981989965 1.44 -2.594458547 -C 2.972984948 -0.72 -1.837405746 -C 3.20692713 -1.44 -0.612468582 -C 2.360516366 -2.604984472 -0.612468582 -C 1.603463565 -2.604984472 -1.837405746 -C 1.981989965 -1.44 -2.594458547 -C 0.2339421813 -3.049968944 -1.837405746 -C -0.3785264007 -3.494953416 -0.612468582 -C -1.748047784 -3.049968944 -0.612468582 -C -1.981989965 -2.329968944 -1.837405746 -C -0.7570528015 -2.329968944 -2.594458547 -C -2.828400729 -1.164984472 -1.837405746 -C -3.440869311 -0.72 -0.612468582 -C -3.440869311 0.72 -0.612468582 -C -2.828400729 1.164984472 -1.837405746 -C -2.449874328 3.000230754e-16 -2.594458547 -C -0.3785264007 1.164984472 -3.351511349 -C 0.9909949827 0.72 -3.351511349 -C 0.9909949827 -0.72 -3.351511349 -C -0.3785264007 -1.164984472 -3.351511349 -C -1.224937164 1.500115377e-16 -3.351511349 diff --git a/tests/testdata/bucky-raw.xyz b/tests/testdata/bucky-raw.xyz deleted file mode 100644 index da21df7c..00000000 --- a/tests/testdata/bucky-raw.xyz +++ /dev/null @@ -1,60 +0,0 @@ -1.224937164 0 3.351511349 -0.3785264007 1.164984472 3.351511349 --0.9909949827 0.72 3.351511349 --0.9909949827 -0.72 3.351511349 -0.3785264007 -1.164984472 3.351511349 -2.449874328 0 2.594458547 -2.828400729 -1.164984472 1.837405746 -3.440869311 -0.72 0.612468582 -3.440869311 0.72 0.612468582 -2.828400729 1.164984472 1.837405746 -0.7570528015 2.329968944 2.594458547 -1.981989965 2.329968944 1.837405746 -1.748047784 3.049968944 0.612468582 -0.3785264007 3.494953416 0.612468582 --0.2339421813 3.049968944 1.837405746 --1.981989965 1.44 2.594458547 --1.603463565 2.604984472 1.837405746 --2.360516366 2.604984472 0.612468582 --3.20692713 1.44 0.612468582 --2.972984948 0.72 1.837405746 --1.981989965 -1.44 2.594458547 --2.972984948 -0.72 1.837405746 --3.20692713 -1.44 0.612468582 --2.360516366 -2.604984472 0.612468582 --1.603463565 -2.604984472 1.837405746 -0.7570528015 -2.329968944 2.594458547 --0.2339421813 -3.049968944 1.837405746 -0.3785264007 -3.494953416 0.612468582 -1.748047784 -3.049968944 0.612468582 -1.981989965 -2.329968944 1.837405746 --1.981989965 2.329968944 -1.837405746 --1.748047784 3.049968944 -0.612468582 --0.3785264007 3.494953416 -0.612468582 -0.2339421813 3.049968944 -1.837405746 --0.7570528015 2.329968944 -2.594458547 -1.603463565 2.604984472 -1.837405746 -2.360516366 2.604984472 -0.612468582 -3.20692713 1.44 -0.612468582 -2.972984948 0.72 -1.837405746 -1.981989965 1.44 -2.594458547 -2.972984948 -0.72 -1.837405746 -3.20692713 -1.44 -0.612468582 -2.360516366 -2.604984472 -0.612468582 -1.603463565 -2.604984472 -1.837405746 -1.981989965 -1.44 -2.594458547 -0.2339421813 -3.049968944 -1.837405746 --0.3785264007 -3.494953416 -0.612468582 --1.748047784 -3.049968944 -0.612468582 --1.981989965 -2.329968944 -1.837405746 --0.7570528015 -2.329968944 -2.594458547 --2.828400729 -1.164984472 -1.837405746 --3.440869311 -0.72 -0.612468582 --3.440869311 0.72 -0.612468582 --2.828400729 1.164984472 -1.837405746 --2.449874328 3.000230754e-16 -2.594458547 --0.3785264007 1.164984472 -3.351511349 -0.9909949827 0.72 -3.351511349 -0.9909949827 -0.72 -3.351511349 --0.3785264007 -1.164984472 -3.351511349 --1.224937164 1.500115377e-16 -3.351511349 diff --git a/tests/testdata/bucky.xyz b/tests/testdata/bucky.xyz deleted file mode 100644 index 539793b5..00000000 --- a/tests/testdata/bucky.xyz +++ /dev/null @@ -1,65 +0,0 @@ -# some stupid comments -# -# -60 -bucky-ball - C 1.22650 0.00000 3.31450 - C 0.37900 1.16640 3.31450 - C -0.99220 0.72090 3.31450 - C -0.99220 -0.72090 3.31450 - C 0.37900 -1.16640 3.31450 - C 3.40840 0.72090 0.59480 - C 2.79510 1.16640 1.82130 - C 2.41610 0.00000 2.57930 - C 2.79510 -1.16640 1.82130 - C 3.40840 -0.72090 0.59480 - C 0.36760 3.46430 0.59480 - C -0.24560 3.01880 1.82130 - C 0.74660 2.29790 2.57930 - C 1.97310 2.29790 1.82130 - C 1.73890 3.01880 0.59480 - C -3.18120 1.42020 0.59480 - C -2.94690 0.69930 1.82130 - C -1.95470 1.42020 2.57930 - C -1.57570 2.58660 1.82130 - C -2.33370 2.58660 0.59480 - C -2.33370 -2.58660 0.59480 - C -1.57570 -2.58660 1.82130 - C -1.95470 -1.42020 2.57930 - C -2.94690 -0.69930 1.82130 - C -3.18120 -1.42020 0.59480 - C 1.73890 -3.01880 0.59480 - C 1.97310 -2.29790 1.82130 - C 0.74660 -2.29790 2.57930 - C -0.24560 -3.01880 1.82130 - C 0.36760 -3.46430 0.59480 - C 0.99220 0.72090 -3.31450 - C -0.37900 1.16640 -3.31450 - C -1.22650 0.00000 -3.31450 - C -0.37900 -1.16640 -3.31450 - C 0.99220 -0.72090 -3.31450 - C 2.33370 2.58660 -0.59480 - C 1.57570 2.58660 -1.82130 - C 1.95470 1.42020 -2.57930 - C 2.94690 0.69930 -1.82130 - C 3.18120 1.42020 -0.59480 - C -1.73890 3.01880 -0.59480 - C -1.97310 2.29790 -1.82130 - C -0.74660 2.29790 -2.57930 - C 0.24560 3.01880 -1.82130 - C -0.36760 3.46430 -0.59480 - C -3.40840 -0.72090 -0.59480 - C -2.79510 -1.16640 -1.82130 - C -2.41610 0.00000 -2.57930 - C -2.79510 1.16640 -1.82130 - C -3.40840 0.72090 -0.59480 - C -0.36760 -3.46430 -0.59480 - C 0.24560 -3.01880 -1.82130 - C -0.74660 -2.29790 -2.57930 - C -1.97310 -2.29790 -1.82130 - C -1.73890 -3.01880 -0.59480 - C 3.18120 -1.42020 -0.59480 - C 2.94690 -0.69930 -1.82130 - C 1.95470 -1.42020 -2.57930 - C 1.57570 -2.58660 -1.82130 - C 2.33370 -2.58660 -0.59480 diff --git a/tests/testdata/curlybrackets.cif b/tests/testdata/curlybrackets.cif deleted file mode 100644 index a0da91c7..00000000 --- a/tests/testdata/curlybrackets.cif +++ /dev/null @@ -1,120 +0,0 @@ -#------------------------------------------------------------------------------ -#$Date: 2016-02-16 22:30:59 +0200 (Tue, 16 Feb 2016) $ -#$Revision: 176467 $ -#$URL: svn://www.crystallography.net/cod/cif/4/34/14/4341415.cif $ -#------------------------------------------------------------------------------ -# -# This file is available in the Crystallography Open Database (COD), -# http://www.crystallography.net/ -# -# All data on this site have been placed in the public domain by the -# contributors. -# -data_4341415 -loop_ -_publ_author_name -'Bernal, Fabian L.' -'Yusenko, Kirill V.' -'Sottmann, Jonas' -'Drathen, Christina' -'Guignard, J\'er\'emy' -'L\/ovvik, Ole Martin' -'Crichton, Wilson A.' -'Margadonna, Serena' -_publ_section_title -; - Perovskite to Postperovskite Transition in NaFeF3 -; -_journal_name_full 'Inorganic Chemistry' -_journal_page_first 141029080759008 -_journal_paper_doi 10.1021/ic502224y -_journal_year 2014 -_chemical_formula_analytical NaFeF3 -_chemical_formula_moiety NaFeF3 -_chemical_formula_structural NaFeF3 -_chemical_formula_sum 'F3 Fe Na' -_chemical_formula_weight 135.84 -_space_group_IT_number 63 -_symmetry_cell_setting orthorhombic -_symmetry_space_group_name_Hall '-C 2c 2' -_symmetry_space_group_name_H-M 'C m c m' -_audit_update_record -; -2014-09-10 # Formatted by publCIF - -; -_cell_angle_alpha 90.0 -_cell_angle_beta 90.0 -_cell_angle_gamma 90.0 -_cell_formula_units_Z 4 -_cell_length_a 3.13774(4) -_cell_length_b 10.20870(10) -_cell_length_c 7.45875(9) -_cell_measurement_temperature 300 -_cell_volume 238.921(5) -_computing_structure_refinement GSAS -_diffrn_ambient_temperature 300 -_diffrn_measurement_device_type ID31 -_diffrn_radiation_type synchrotron -_diffrn_radiation_wavelength 0.3999 -_pd_block_id 2014-09-10T16:28|PPV_RT_phase1|BaAs_233-2|| -_pd_phase_name 'NaFeF3 FM001 RT ID09 ESRF' -_refine_ls_goodness_of_fit_all 1.33 -_refine_ls_matrix_type full -_refine_ls_number_parameters 23 -_refine_ls_number_restraints 0 -_refine_ls_shift/su_max 0.07 -_refine_ls_shift/su_mean 0.01 -_cod_data_source_file ic502224y_si_002.cif -_cod_data_source_block PPV_RT_phase_1 -_cod_original_cell_volume 238.921(4) -_cod_original_formula_sum F3FeNa -_cod_database_code 4341415 -#BEGIN Tags that were not found in dictionaries: -_publcif_datablock.id {15d6793f-0b54-44dd-81a5-d864469fb48d} -#END Tags that were not found in dictionaries -loop_ -_symmetry_equiv_pos_site_id -_symmetry_equiv_pos_as_xyz -1 +x,+y,+z -2 -x,+y,+z -3 +x,-y,+z+1/2 -4 -x,-y,+z+1/2 --1 -x,-y,-z --2 +x,-y,-z --3 -x,+y,-z+1/2 --4 +x,+y,-z+1/2 -101 +x+1/2,+y+1/2,+z -102 -x+1/2,+y+1/2,+z -103 +x+1/2,-y+1/2,+z+1/2 -104 -x+1/2,-y+1/2,+z+1/2 --101 -x+1/2,-y+1/2,-z --102 +x+1/2,-y+1/2,-z --103 -x+1/2,+y+1/2,-z+1/2 --104 +x+1/2,+y+1/2,-z+1/2 -loop_ -_atom_site_type_symbol -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -_atom_site_occupancy -_atom_site_thermal_displace_type -_atom_site_U_iso_or_equiv -_atom_site_symmetry_multiplicity -Na Na 0.0 0.7457 0.25 1.0 Uiso 0.01658 4 -Fe Fe 0.0 0.0 0.0 1.0 Uiso 0.00792 4 -F F1 0.0 0.0842 0.25 1.0 Uiso 0.01837 4 -F F2 0.0 0.6278 0.94370 1.0 Uiso 0.02025 8 -loop_ -_pd_block_diffractogram_id -2014-09-10T16:28|PPV_RT_H_01|BaAs_233-2|PPV -#BEGIN Loops that were not found in dictionaries: -loop_ -_publcif_info_datablock.id -_publcif_info_datablock.publ_exptl -_publcif_info_datablock.publ_geom -_publcif_info_datablock.structure -{15d6793f-0b54-44dd-81a5-d864469fb48d} y ? y -{f121c8c0-c58f-4149-a4e0-8a727689246c} n y y -#END Loops that were not found in dictionaries diff --git a/tests/testdata/customsg.cif b/tests/testdata/customsg.cif deleted file mode 100644 index 042240ca..00000000 --- a/tests/testdata/customsg.cif +++ /dev/null @@ -1,44 +0,0 @@ -data_9008569 -_chemical_name 'Graphite' -loop_ -_publ_author_name -'Wyckoff R W G' -_journal_name_full "Crystal Structures" -_journal_volume 1 -_journal_year 1963 -_journal_page_first 7 -_journal_page_last 83 -_publ_section_title -; - Second edition. Interscience Publishers, New York, New York -; -_chemical_formula_sum 'C' -_cell_length_a 2.456 -_cell_length_b 2.456 -_cell_length_c 6.696 -_cell_angle_alpha 90 -_cell_angle_beta 90 -_cell_angle_gamma 120 -_cell_volume 34.979 -# _symmetry_space_group_name_H-M 'P 63 m c' -loop_ -_symmetry_equiv_pos_as_xyz - 'x,y,z' - '-x,-x+y,1/2+z' - 'x-y,x,1/2+z' - '-y,-x,z' - '-y,x-y,z' - 'x-y,-y,1/2+z' -# '-x,-y,1/2+z' -# 'x,x-y,z' -# '-x+y,-x,z' -# 'y,x,1/2+z' -# 'y,-x+y,1/2+z' -# '-x+y,y,z' -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -C1 0.00000 0.00000 0.00000 -C2 0.33333 0.66667 0.00000 diff --git a/tests/testdata/graphite.cif b/tests/testdata/graphite.cif deleted file mode 100644 index 5cc3eb81..00000000 --- a/tests/testdata/graphite.cif +++ /dev/null @@ -1,44 +0,0 @@ -data_9008569 -_chemical_name 'Graphite' -loop_ -_publ_author_name -'Wyckoff R W G' -_journal_name_full "Crystal Structures" -_journal_volume 1 -_journal_year 1963 -_journal_page_first 7 -_journal_page_last 83 -_publ_section_title -; - Second edition. Interscience Publishers, New York, New York -; -_chemical_formula_sum 'C' -_cell_length_a 2.456 -_cell_length_b 2.456 -_cell_length_c 6.696 -_cell_angle_alpha 90 -_cell_angle_beta 90 -_cell_angle_gamma 120 -_cell_volume 34.979 -_symmetry_space_group_name_H-M 'P 63 m c' -loop_ -_symmetry_equiv_pos_as_xyz - 'x,y,z' - '-x,-x+y,1/2+z' - 'x-y,x,1/2+z' - '-y,-x,z' - '-y,x-y,z' - 'x-y,-y,1/2+z' - '-x,-y,1/2+z' - 'x,x-y,z' - '-x+y,-x,z' - 'y,x,1/2+z' - 'y,-x+y,1/2+z' - '-x+y,y,z' -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -C1 0.00000 0.00000 0.00000 -C2 0.33333 0.66667 0.00000 diff --git a/tests/testdata/hexagon-raw-bad.xyz b/tests/testdata/hexagon-raw-bad.xyz deleted file mode 100644 index 0143d44d..00000000 --- a/tests/testdata/hexagon-raw-bad.xyz +++ /dev/null @@ -1,6 +0,0 @@ -1.4 0.0 0.0 -0.7 1.212435565 --0.7 1.212435565 0.0 --1.4 0.0 0.0 --0.7 -1.212435565 0.0 -0.7 -1.212435565 0.0 diff --git a/tests/testdata/hexagon-raw.xy b/tests/testdata/hexagon-raw.xy deleted file mode 100644 index a93dcde8..00000000 --- a/tests/testdata/hexagon-raw.xy +++ /dev/null @@ -1,6 +0,0 @@ -1.4 0 -0.7 1.212435565 --0.7 1.212435565 --1.4 0.0 --0.7 -1.212435565 -0.7 -1.212435565 diff --git a/tests/testdata/hexagon-raw.xyz b/tests/testdata/hexagon-raw.xyz deleted file mode 100644 index 1ed9aacb..00000000 --- a/tests/testdata/hexagon-raw.xyz +++ /dev/null @@ -1,6 +0,0 @@ -1.4 0 0.0 -0.7 1.212435565 0.0 --0.7 1.212435565 0.0 --1.4 0.0 0.0 --0.7 -1.212435565 0.0 -0.7 -1.212435565 0.0 diff --git a/tests/testdata/nosites.cif b/tests/testdata/nosites.cif deleted file mode 100644 index ff40f5c6..00000000 --- a/tests/testdata/nosites.cif +++ /dev/null @@ -1,44 +0,0 @@ -#------------------------------------------------------------------------------ -#$Date: 2016-02-09 20:42:54 +0200 (Tue, 09 Feb 2016) $ -#$Revision: 176292 $ -#$URL: svn://www.crystallography.net/cod/cif/6/00/03/6000333.cif $ -#------------------------------------------------------------------------------ -# -# This file is available in the Crystallography Open Database (COD), -# http://www.crystallography.net/ -# -# All data on this site have been placed in the public domain by the -# contributors. -# -data_6000333 -loop_ -_publ_author_name -'Malecki, G.' -'Ratuszna, A.' -_publ_section_title -; - Crystal structure of cyanometallates Me-3[Co(CN)(6)](2) and - KMe[Fe(CN)(6)] with Me = Mn2+, Ni2+ Cu2+ -; -_journal_name_full 'Powder Diffraction' -_journal_page_first 25 -_journal_page_last 30 -_journal_paper_doi 10.1017/S0885715600010265 -_journal_volume 14 -_journal_year 1999 -_chemical_formula_sum 'C12 Co2 Mn3 N12' -_space_group_name_H-M_alt Fm3m -_cell_angle_alpha 90.000 -_cell_angle_beta 90.000 -_cell_angle_gamma 90.000 -_cell_length_a 10.4130 -_cell_length_b 10.4130 -_cell_length_c 10.4130 -_cell_volume 1129.09 -_cod_database_code 6000333 -loop_ -_atom_site_label -_atom_site_fract_x -_atom_site_fract_y -_atom_site_fract_z -? ? ? ?