diff --git a/.codecov.yml b/.codecov.yml index 86671410..4af5eb24 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,2 +1,14 @@ -fixes: - - ".*/site-packages/::src/" +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 new file mode 100644 index 00000000..07fa7c8c --- /dev/null +++ b/.codespell/ignore_lines.txt @@ -0,0 +1,2 @@ +;; 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 new file mode 100644 index 00000000..eccf37a8 --- /dev/null +++ b/.codespell/ignore_words.txt @@ -0,0 +1,28 @@ +;; 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/.coveragerc b/.coveragerc deleted file mode 100644 index a90c45c4..00000000 --- a/.coveragerc +++ /dev/null @@ -1,25 +0,0 @@ -# Configuration of the coverage.py tool for reporting test coverage. - -[report] -# RE patterns for lines to be excluded from consideration. -exclude_lines = - ## Have to re-enable the standard pragma - pragma: no cover - ## Don't complain if tests don't hit defensive assertion code: - raise AssertionError - raise NotImplementedError - ^[ ]*assert False - - ## Don't complain if non-runnable code isn't run: - ^[ ]*@unittest.skip\b - ^[ ]{4}unittest.main() - if __name__ == .__main__.: - - -[run] -omit = - ## Exclude from codecov report: - */tests/debug.py - */apps/*.py - # TODO remove in version 3.1 - */applications/*.py diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..a5105116 --- /dev/null +++ b/.flake8 @@ -0,0 +1,13 @@ +# 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/.gitarchive.cfg b/.gitarchive.cfg deleted file mode 100644 index 95e1448c..00000000 --- a/.gitarchive.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[DEFAULT] -commit = $Format:%H$ -date = $Format:%ci$ -timestamp = $Format:%ct$ -refnames = $Format:%D$ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 13fc0b54..00000000 --- a/.gitattributes +++ /dev/null @@ -1,8 +0,0 @@ -/.gitattributes export-ignore -/.gitignore export-ignore -/.travis.yml export-ignore -/conda-recipe/ export-ignore -/devutils export-ignore -/doc export-ignore -.gitarchive.cfg export-subst -*.bat text eol=crlf diff --git a/.github/ISSUE_TEMPLATE/bug_feature.md b/.github/ISSUE_TEMPLATE/bug_feature.md new file mode 100644 index 00000000..b3454deb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_feature.md @@ -0,0 +1,16 @@ +--- +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 new file mode 100644 index 00000000..56c5fca3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release_checklist.md @@ -0,0 +1,47 @@ +--- +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 new file mode 100644 index 00000000..1099d862 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,15 @@ +### 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 new file mode 100644 index 00000000..ff9a22b7 --- /dev/null +++ b/.github/workflows/build-and-publish-docs-on-dispatch.yml @@ -0,0 +1,18 @@ +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 new file mode 100644 index 00000000..794bf94c --- /dev/null +++ b/.github/workflows/build-wheel-release-upload.yml @@ -0,0 +1,18 @@ +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 new file mode 100644 index 00000000..e5853983 --- /dev/null +++ b/.github/workflows/check-news-item.yml @@ -0,0 +1,12 @@ +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 new file mode 100644 index 00000000..aa3ea76f --- /dev/null +++ b/.github/workflows/matrix-and-codecov.yml @@ -0,0 +1,21 @@ +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 new file mode 100644 index 00000000..1ac611fb --- /dev/null +++ b/.github/workflows/tests-on-pr.yml @@ -0,0 +1,15 @@ +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 index a3fed051..099e2948 100644 --- a/.gitignore +++ b/.gitignore @@ -1,47 +1,93 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ *.py[cod] +*$py.class # C extensions *.so -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -bin -var -sdist -temp -develop-eggs +# Distribution / packaging +.Python +env/ +build/ +_build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +venv/ +*.egg-info/ .installed.cfg -lib -lib64 -tags +*.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 -.tox +.coverage.* +.cache nosetests.xml +coverage.xml +*,cover +.hypothesis/ # Translations *.mo +*.pot # Mr Developer .mr.developer.cfg .project .pydevproject -.settings -# version information -setup.cfg -/src/diffpy/*/version.cfg +# 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/ -# Rever -rever/ +# Ipython Notebook +.ipynb_checkpoints diff --git a/.isort.cfg b/.isort.cfg new file mode 100644 index 00000000..7ce0fb1f --- /dev/null +++ b/.isort.cfg @@ -0,0 +1,5 @@ +[settings] +# Keep import statement below line_length character limit +line_length = 115 +multi_line_output = 3 +include_trailing_comma = True diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..0e4a84d1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,66 @@ +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 new file mode 100644 index 00000000..aaa88895 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,13 @@ +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/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index 13ef5323..00000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,9 +0,0 @@ -requirements_file: doc/manual/requirements.txt - -python: - version: 3 - setup_py_install: true - use_system_site_packages: true - -# For more fields that can be specified here, see: -# http://docs.readthedocs.io/en/latest/yaml-config.html diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 196bc046..00000000 --- a/.travis.yml +++ /dev/null @@ -1,113 +0,0 @@ -dist: xenial -language: generic - -os: - - linux - - osx - -env: - - MYUSEMC=true MYPYTHON_VERSION=2.7 - - MYUSEMC=true MYPYTHON_VERSION=3.7 - - MYUSEMC=true MYPYTHON_VERSION=3.8 - - MYUSEMC=true MYPYTHON_VERSION=3.9 - - MYUSEMC=true MYPYTHON_VERSION=3.10 - - MYUSEMC=false - -git: - depth: 999999 - -branches: - except: - - /^v[0-9]/ - - -before_install: - - MYNAME=diffpy.structure - - MYCOMMIT="$(git rev-parse HEAD)" - - umask 022 - - git fetch origin --tags - - MYPYTHON=python; MYPIP=pip - - NOSYS=true; NOAPT=true; NOBREW=true; NOMC=true - - if ${MYUSEMC}; then - NOMC=false; - elif [[ ${TRAVIS_OS_NAME} == linux ]]; then - NOAPT=false; NOSYS=false; - MYPIPFLAGS="--user"; - elif [[ ${TRAVIS_OS_NAME} == osx ]]; then - NOBREW=false; NOSYS=false; - MYPYTHON=python3; - MYPIP=pip3; - MYPIPFLAGS="--user"; - fi - - MYMCREPO=https://repo.anaconda.com/miniconda - - case ${TRAVIS_OS_NAME} in - linux) - MYMCBUNDLE=Miniconda3-latest-Linux-x86_64.sh ;; - osx) - MYMCBUNDLE=Miniconda3-latest-MacOSX-x86_64.sh ;; - *) - echo "Unsupported operating system." >&2; - exit 2 ;; - esac - - MYRUNDIR=${PWD}/build/rundir - - - mkdir -p ~/pkgs - - mkdir -p ${MYRUNDIR} - - cp .coveragerc ${MYRUNDIR}/ - - - $NOMC || pushd ~/pkgs - - $NOMC || wget --timestamping ${MYMCREPO}/${MYMCBUNDLE} - - $NOMC || test -x ~/mc/bin/conda || bash ${MYMCBUNDLE} -b -f -p ~/mc - - $NOMC || popd - - $NOMC || source ~/mc/bin/activate base - - $NOMC || conda update --yes conda - - $NOMC || conda install --yes conda-build conda-verify jinja2 - - $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION} coverage - - $NOMC || conda config --add channels diffpy - - - $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $? - - $NOAPT || PATH="$(echo "$PATH" | sed 's,:/opt/pyenv/[^:]*,,g')" - - $NOAPT || test "$(which python)" = "/usr/bin/python" || ( - which python; exit 1) - - $NOAPT || sudo apt-get update -qq - - $NOAPT || sudo apt-get install -y - python-dev python-numpy python-setuptools build-essential - - - $NOBREW || test "${TRAVIS_OS_NAME}" = "osx" || exit $? - - $NOBREW || brew update - - $NOBREW || brew install gcc || brew link --overwrite gcc - - - $NOSYS || devutils/makesdist - - $NOSYS || MYTARBUNDLE="$(ls -t "${PWD}"/dist/*.tar.gz | head -1)" - - -install: - - $NOMC || conda build --python=${MYPYTHON_VERSION} conda-recipe - - $NOMC || conda render --python=${MYPYTHON_VERSION} --output conda-recipe | - sed 's,.*/,,; s/[.]tar[.]bz2$//; s/-/=/g' > /tmp/mypackage.txt - - $NOMC || source activate testenv - - $NOMC || conda install --yes --use-local --file=/tmp/mypackage.txt - - - $NOSYS || $MYPIP install $MYPIPFLAGS coverage - - $NOSYS || $MYPIP install $MYPIPFLAGS "${MYTARBUNDLE}" - - - cd ${MYRUNDIR} - - MYGIT_REV=$($MYPYTHON -c "import ${MYNAME}.version as v; print(v.__git_commit__)") - - if [[ "${MYCOMMIT}" != "${MYGIT_REV}" ]]; then - echo "Version mismatch ${MYCOMMIT} vs ${MYGIT_REV}."; - exit 1; - fi - - -before_script: - - $NOBREW || USER_BASE="$($MYPYTHON -c 'import site; print(site.USER_BASE)')" - - $NOBREW || PATH="${USER_BASE}/bin:${PATH}" - - -script: - - coverage run --source ${MYNAME} -m ${MYNAME}.tests.run - - -after_success: - - $MYPIP install $MYPIPFLAGS codecov - - codecov diff --git a/AUTHORS.txt b/AUTHORS.rst similarity index 53% rename from AUTHORS.txt rename to AUTHORS.rst index 2d8753c6..1abf16be 100644 --- a/AUTHORS.txt +++ b/AUTHORS.rst @@ -1,10 +1,14 @@ -Authors: +Authors +======= +Billinge Group and community contributors, Pavol Juhas, Christopher L. Farrow, Xiaohao Yang, Simon J.L. Billinge -Contributors: +Contributors +------------ +For a list of contributors, visit https://github.com/diffpy/diffpy.structure/graphs/contributors diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 83ce9191..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,106 +0,0 @@ -# Release notes - -## 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/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 00000000..9a35bf76 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,426 @@ +============= +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 new file mode 100644 index 00000000..25fafe27 --- /dev/null +++ b/CODE-OF-CONDUCT.rst @@ -0,0 +1,133 @@ +===================================== + 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.txt b/LICENSE-DANSE.rst similarity index 87% rename from LICENSE_DANSE.txt rename to LICENSE-DANSE.rst index 2a101560..a650d915 100644 --- a/LICENSE_DANSE.txt +++ b/LICENSE-DANSE.rst @@ -1,26 +1,32 @@ +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 sb2896@columbia.edu + +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 +- 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 +- 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 +- 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. diff --git a/LICENSE-pymmlib.rst b/LICENSE-pymmlib.rst new file mode 100644 index 00000000..ef484f5a --- /dev/null +++ b/LICENSE-pymmlib.rst @@ -0,0 +1,203 @@ +.. 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 new file mode 100644 index 00000000..c967838d --- /dev/null +++ b/LICENSE.rst @@ -0,0 +1,144 @@ +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/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index f6d92af7..00000000 --- a/LICENSE.txt +++ /dev/null @@ -1,137 +0,0 @@ -OPEN SOURCE LICENSE AGREEMENT -============================= - -Copyright (c) 2009-2011, University of Tennessee -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) 2014, Australian Synchrotron Research Program Inc., ("ASRP") -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) 2014-2019, Brookhaven Science Associates, Brookhaven National - Laboratory - - -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 diff --git a/LICENSE_pymmlib.txt b/LICENSE_pymmlib.txt deleted file mode 100644 index 7d61f060..00000000 --- a/LICENSE_pymmlib.txt +++ /dev/null @@ -1,201 +0,0 @@ - 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/MANIFEST.in b/MANIFEST.in index eb0a5627..f1a78eec 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,15 +1,12 @@ -recursive-include src * -include AUTHORS.txt LICENSE*.txt README.rst -recursive-exclude src *.pyc -global-exclude .gitattributes .gitignore .gitarchive.cfg -global-exclude .DS_Store +graft src +graft tests +graft requirements -# Avoid user content in setup.cfg to make distribution reproducible. -exclude setup.cfg +include AUTHORS.rst LICENSE*.rst README.rst -# Exclude git-tracked files spuriously added by setuptools_scm -exclude .coveragerc -exclude .travis* -prune conda-recipe -prune devutils -prune doc +# 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 index 3e0538e7..3ce08dfa 100644 --- a/README.rst +++ b/README.rst @@ -1,14 +1,42 @@ -.. image:: https://travis-ci.org/diffpy/diffpy.structure.svg?branch=master - :target: https://travis-ci.org/diffpy/diffpy.structure +|Icon| |title|_ +=============== -.. image:: https://codecov.io/gh/diffpy/diffpy.structure/branch/master/graph/badge.svg - :target: https://codecov.io/gh/diffpy/diffpy.structure +.. |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 -diffpy.structure -======================================================================== +|PyPI| |Forge| |PythonVersion| |PR| -storage and manipulation of crystal structure data +|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. @@ -20,94 +48,120 @@ of symmetry constraints for atom positions and displacement parameters. diffpy.structure includes definitions of all space groups in over 500 symmetry settings. -To learn more about diffpy.structure library see the -user manual at http://diffpy.github.io/diffpy.structure. +For more information about the diffpy.structure library, please consult our `online documentation `_. -REQUIREMENTS ------------------------------------------------------------------------- +Citation +-------- -The diffpy.structure package requires Python 3.7 or later or 2.7 and -the following software: +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: -* ``setuptools`` - software distribution tools for Python -* ``NumPy`` - numerical mathematics and fast array operations for Python + 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). -We recommend to use `Anaconda Python `_ -as it allows to install all software dependencies together with -diffpy.structure. For other Python distributions it is necessary to -install the required software separately. As an example on Ubuntu -Linux the required software can be installed with :: +Installation +------------ - sudo aptitude install python3-setuptools python3-numpy +The preferred method is to use `Miniconda Python +`_ +and install from the "conda-forge" channel of Conda packages. -diffpy.structure also uses the -`PyCifRW `_ -library, which is automatically deployed during the -installation process. +To add "conda-forge" to the conda channels, run the following in a terminal. :: + conda config --add channels conda-forge -INSTALLATION ------------------------------------------------------------------------- +We want to install our packages in a suitable conda environment. +The following creates and activates a new environment named ``diffpy.structure_env`` :: -The preferred method is to use Anaconda Python and install from the -"diffpy" channel of Anaconda packages :: + conda create -n diffpy.structure_env diffpy.structure + conda activate diffpy.structure_env - conda config --add channels diffpy - conda install diffpy.structure +To confirm that the installation was successful, type :: -diffpy.structure is also included in the "diffpy-cmi" collection -of packages for structure analysis :: + python -c "import diffpy.structure; print(diffpy.structure.__version__)" - conda install diffpy-cmi +The output should print the latest version displayed on the badges above. -Another installation option is to use ``easy_install`` to download and -install the latest release from -`Python Package Index `_ :: +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 :: - easy_install diffpy.structure + pip install diffpy.structure -If you prefer to install from sources, navigate to the source archive -directory and run :: +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 :: - python setup.py install + pip install . -You may need to use ``sudo`` with system Python so it is allowed to -copy files to system directories. If sudo is not available, check -the usage info from ``python setup.py install --help`` for options to -install to user-writable locations. The installation integrity can be -verified by changing to the HOME directory and running :: +This package also provides command-line utilities. To check the software has been installed correctly, type :: - python -m diffpy.structure.tests.run + diffpy.structure --version +You can also type the following command to verify the installation. :: -DEVELOPMENT ------------------------------------------------------------------------- + python -c "import diffpy.structure; print(diffpy.structure.__version__)" -diffpy.structure is an open-source software developed as a part of the -DiffPy-CMI complex modeling initiative at the Brookhaven National -Laboratory. The diffpy.structure sources are hosted at -https://github.com/diffpy/diffpy.structure. -Feel free to fork the project and contribute. To install diffpy.structure -in a development mode, where the sources are directly used by Python -rather than copied to a system directory, use :: +To view the basic usage and available commands, type :: - python setup.py develop --user + diffpy.structure -h +Getting Started +--------------- -ACKNOWLEDGEMENT ------------------------------------------------------------------------- +You may consult our `online documentation `_ for tutorials and API references. -Space group codes in *spacegroupmod.py* and *mmlibspacegroups.py* -originate from the pymmlib project, http://pymmlib.sourceforge.net. +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 :: -CONTACTS ------------------------------------------------------------------------- + pip install -e . -For more information on diffpy.structure please visit the project web-page +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 `_. -http://www.diffpy.org/ +Less common settings of space groups were generating using the +`Computational Crystallography Toolbox `_. -or email Prof. Simon Billinge at sb2896@columbia.edu. +``diffpy.structure`` is built and maintained with `scikit-package `_. diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat deleted file mode 100644 index 0a79fa23..00000000 --- a/conda-recipe/bld.bat +++ /dev/null @@ -1,7 +0,0 @@ -"%PYTHON%" setup.py install -if errorlevel 1 exit 1 - -:: Add more build steps here, if they are necessary. - -:: See http://docs.continuum.io/conda/build.html -:: for a list of environment variables that are set during the build process. diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh deleted file mode 100644 index b7920393..00000000 --- a/conda-recipe/build.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -$PYTHON setup.py install - -# Add more build steps here, if they are necessary. - -# See http://docs.continuum.io/conda/build.html -# for a list of environment variables that are set during the build process. diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml deleted file mode 100644 index 93c0a64f..00000000 --- a/conda-recipe/meta.yaml +++ /dev/null @@ -1,76 +0,0 @@ -{% set setupdata = load_setup_py_data() %} - -package: - name: diffpy.structure - version: {{ setupdata['version'] }} - -source: - # git_url: https://github.com/diffpy/diffpy.structure - git_url: .. - -build: - preserve_egg_dir: True - noarch: python - - # entry_points: - # Put any entry points (scripts to be generated automatically) here. The - # syntax is module:function. For example - # - # - diffpy.structure = diffpy.structure:main - # - # Would create an entry point called diffpy.structure that calls diffpy.structure.main() - - # If this is a new build for the same version, increment the build - # number. If you do not include this key, it defaults to 0. - # number: 0 - -requirements: - build: - - python >=3.5|2.7* - - setuptools - - six - - pycifrw - - run: - - python >=3.5|2.7* - - setuptools - - numpy >=1.3 - - pycifrw - - six - -test: - # Python imports - imports: - - diffpy.structure - - diffpy.structure.parsers - - diffpy.structure.apps - - diffpy.structure.expansion - - diffpy.structure.tests - # legacy imports - - diffpy.Structure - - diffpy.Structure.Parsers - - diffpy.Structure.apps - - diffpy.Structure.expansion - - diffpy.Structure.tests - - diffpy.structure.applications - - # commands: - # You can put test commands to be run here. Use this to test that the - # entry points work. - - - # You can also put a file called run_test.py in the recipe that will be run - # at test time. - - # requires: - # Put any additional test requirements here. For example - # - nose - -about: - home: https://github.com/diffpy/diffpy.structure - summary: Crystal structure container and parsers for structure formats. - license: Modified BSD License - license_file: LICENSE.txt - -# See http://docs.continuum.io/conda/build.html -# for more information about meta.yaml. diff --git a/conda-recipe/run_test.py b/conda-recipe/run_test.py deleted file mode 100644 index 270ddc42..00000000 --- a/conda-recipe/run_test.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python - -import diffpy.structure.tests -assert diffpy.structure.tests.test().wasSuccessful() diff --git a/cookiecutter.json b/cookiecutter.json new file mode 100644 index 00000000..5b4de11a --- /dev/null +++ b/cookiecutter.json @@ -0,0 +1,20 @@ +{ + "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 new file mode 100644 index 00000000..773f4f74 --- /dev/null +++ b/devutils/README.md @@ -0,0 +1 @@ +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/makesdist b/devutils/makesdist deleted file mode 100755 index 6aaae616..00000000 --- a/devutils/makesdist +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python - -'''Create source distribution tar.gz archive, where each file belongs -to a root user and modification time is set to the git commit time. -''' - -import sys -import os -import subprocess -import glob -import tarfile -import gzip - -BASEDIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) -sys.path.insert(0, BASEDIR) - -from setup import versiondata, FALLBACK_VERSION -timestamp = versiondata.getint('DEFAULT', 'timestamp') - -vfb = versiondata.get('DEFAULT', 'version').split('.post')[0] + '.post0' -emsg = "Invalid FALLBACK_VERSION. Expected %r got %r." -assert vfb == FALLBACK_VERSION, emsg % (vfb, FALLBACK_VERSION) - -def inform(s): - sys.stdout.write(s) - sys.stdout.flush() - return - -inform('Run "setup.py sdist --formats=tar" ') -cmd_sdist = [sys.executable] + 'setup.py sdist --formats=tar'.split() -ec = subprocess.call(cmd_sdist, cwd=BASEDIR, stdout=open(os.devnull, 'w')) -if ec: sys.exit(ec) -inform("[done]\n") - -tarname = max(glob.glob(BASEDIR + '/dist/*.tar'), key=os.path.getmtime) - -tfin = tarfile.open(tarname) -fpout = gzip.GzipFile(tarname + '.gz', 'w', mtime=0) -tfout = tarfile.open(fileobj=fpout, mode='w') - -def fixtarinfo(tinfo): - tinfo.uid = tinfo.gid = 0 - tinfo.uname = tinfo.gname = 'root' - tinfo.mtime = timestamp - tinfo.mode &= ~0o022 - return tinfo - -inform('Filter %s --> %s.gz ' % (2 * (os.path.basename(tarname),))) -for ti in tfin: - tfout.addfile(fixtarinfo(ti), tfin.extractfile(ti)) - -tfin.close() -os.remove(tarname) -inform("[done]\n") diff --git a/devutils/sgtbx_extra_groups.py b/devutils/sgtbx_extra_groups.py index 5c61ded0..48dfdb99 100644 --- a/devutils/sgtbx_extra_groups.py +++ b/devutils/sgtbx_extra_groups.py @@ -1,28 +1,32 @@ #!/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. +"""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. +This is a utility script that should not be included with code +distribution. Not to be included with code distributions. -''' +""" -import re import math +import re + import numpy -from diffpy.structure.spacegroups import SpaceGroup, SymOp -from diffpy.structure.spacegroups import mmLibSpaceGroupList -from diffpy.structure.spacegroups import IsSpaceGroupIdentifier from cctbx import sgtbx -def tupleToSGArray(tpl): +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 + if not n.startswith("Rot_") and not n.startswith("Tr_"): + continue a = getattr(sgmod, n) t = tuple(a.flatten()) _rtarrays[t] = a @@ -31,54 +35,56 @@ def tupleToSGArray(tpl): if tpl not in _rtarrays: _rtarrays[tpl] = numpy.array(tpl, dtype=float) return _rtarrays[tpl] + + _rtarrays = {} -def mmSpaceGroupFromSymbol(symbol): - """Construct SpaceGroup instance from a string symbol using sgtbx data. - """ +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 = getSymOpList(sginfo.group()) + 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'] = countUniqueRotations(symop_list) - kw['short_name'] = sgsmbls.hermann_mauguin().replace(' ', '') + 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 + 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 adjustMMSpaceGroupNumber(mmsg): +def adjust_mm_space_group_number(mmsg): sg0 = [x for x in mmLibSpaceGroupList if x.number == mmsg.number] - if sg0 and cmpSpaceGroups(sg0[0], mmsg): + if sg0 and cmp_space_groups(sg0[0], mmsg): return while mmsg.number in sgnumbers: mmsg.number += 1000 sgnumbers.append(mmsg.number) -def getSymOpList(grp): +def get_symop_list(grp): symop_list = [] for op in grp: r_sgtbx = op.r().as_double() t_sgtbx = op.t().as_double() - R = tupleToSGArray(r_sgtbx) - t = tupleToSGArray(t_sgtbx) + R = tuple_to_sg_array(r_sgtbx) + t = tuple_to_sg_array(t_sgtbx) symop_list.append(SymOp(R, t)) return symop_list -def countUniqueRotations(symop_list): +def count_unique_rotations(symop_list): unique_rotations = set() for op in symop_list: tpl = tuple(op.R.flatten()) @@ -86,50 +92,56 @@ def countUniqueRotations(symop_list): return len(unique_rotations) -def cmpSpaceGroups(sg0, sg1): - if sg0 is sg1: return True - s0 = hashMMSpaceGroup(sg0) - s1 = hashMMSpaceGroup(sg1) +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 findEquivalentMMSpaceGroup(grp): +def find_equivalent_mm_space_group(grp): if not _equivmmsg: for sgn in mmLibSpaceGroupList: - ssgn = hashMMSpaceGroup(sgn) + ssgn = hash_mm_space_group(sgn) _equivmmsg.setdefault(ssgn, sgn) - ssg = hashSgtbxGroup(grp) + ssg = hash_sgtbx_group(grp) return _equivmmsg.get(ssg) + + _equivmmsg = {} -def findEquivalentSgtbxSpaceGroup(sgmm): +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 = hashSgtbxGroup(grp) + hgrp = hash_sgtbx_group(grp) _equivsgtbx.setdefault(hgrp, grp) - hgmm = hashMMSpaceGroup(sgmm) + hgmm = hash_mm_space_group(sgmm) return _equivsgtbx.get(hgmm) + + _equivsgtbx = {} -def hashMMSpaceGroup(sg): +def hash_mm_space_group(sg): lines = [str(sg.number % 1000)] + sorted(map(str, sg.iter_symops())) - s = '\n'.join(lines) + s = "\n".join(lines) return s -def hashSgtbxGroup(grp): +def hash_sgtbx_group(grp): n = grp.type().number() - lines = [str(n)] + sorted(map(str, getSymOpList(grp))) - s = '\n'.join(lines) + lines = [str(n)] + sorted(map(str, get_symop_list(grp))) + s = "\n".join(lines) return s + sgnumbers = [sg.number for sg in mmLibSpaceGroupList] -_SGsrc = '''\ +_SGsrc = """\ sg%(number)i = SpaceGroup( number = %(number)i, num_sym_equiv = %(num_sym_equiv)i, @@ -142,32 +154,37 @@ def hashSgtbxGroup(grp): @SYMOPS@ ] ) -''' +""" + -def SGCode(mmsg): +def sg_code(mmsg): src0 = _SGsrc % mmsg.__dict__ - src1 = src0.replace('@SYMOPS@', SymOpsCode(mmsg)) + src1 = src0.replace("@SYMOPS@", symops_code(mmsg)) return src1 -def SymOpsCode(mmsg): - lst = ["%8s%s," % ('', SymOpCode(op)) for op in mmsg.iter_symops()] - src = '\n'.join(lst).strip() +def symops_code(mmsg): + lst = ["%8s%s," % ("", symop_code(op)) for op in mmsg.iter_symops()] + src = "\n".join(lst).strip() return src -def SymOpCode(op): +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 + if not n.startswith("Rot_") and not n.startswith("Tr_"): + continue a = getattr(sgmod, n) at = tuple(a.flatten()) - _rtnames[at] = 'sgmod.' + n + _rtnames[at] = "sgmod." + n nR = _rtnames[tuple(op.R.flatten())] nt = _rtnames[tuple(op.t)] - src = 'SymOp(%s, %s)' % (nR, nt) + src = "SymOp(%s, %s)" % (nR, nt) return src + + _rtnames = {} @@ -176,16 +193,20 @@ def main(): for smbls in sgtbx.space_group_symbol_iterator(): uhm = smbls.universal_hermann_mauguin() grp = sgtbx.space_group_info(uhm).group() - if findEquivalentMMSpaceGroup(grp): continue - shn = smbls.hermann_mauguin().replace(' ', '') - if IsSpaceGroupIdentifier(shn): continue - sg = mmSpaceGroupFromSymbol(uhm) - hsg = hashMMSpaceGroup(sg) - if hsg in duplicates: continue - adjustMMSpaceGroupNumber(sg) + 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(SGCode(sg)) + print(sg_code(sg)) return -if __name__ == '__main__': + +if __name__ == "__main__": main() diff --git a/doc/manual/source/conf.py b/doc/manual/source/conf.py deleted file mode 100644 index 33d28b8d..00000000 --- a/doc/manual/source/conf.py +++ /dev/null @@ -1,223 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# diffpy.structure documentation build configuration file, created by -# sphinx-quickstart on Mon Mar 27 11:16:48 2017. -# -# 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. - -# 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 os.path.abspath to make it absolute, like shown here. - -import os -import sys -import time -import importlib - -sys.path.insert(0, os.path.abspath('../../..')) - -# abbreviations -ab_authors = 'Pavol Juhás, Christopher L. Farrow, Simon J.L. Billinge group' - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -needs_sphinx = '1.5' - -# 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.intersphinx', -# 'sphinx.ext.coverage', -# 'sphinx.ext.doctest', - 'm2r', -] - -# 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'] -source_suffix = ['.rst', '.md'] - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = 'diffpy.structure' -copyright = '%Y, Brookhaven National Laboratory' -author = ab_authors - -# 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. -from setup import versiondata -fullversion = versiondata.get('DEFAULT', 'version') -# 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. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -today_seconds = versiondata.getint('DEFAULT', 'timestamp') -today = time.strftime('%B %d, %Y', time.localtime(today_seconds)) -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) - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = [] - -# The reST default role (used for this markup: `text`) to use for all documents. -#default_role = None -default_role = 'any' - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True -add_function_parentheses = False - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True -add_module_names = False - -# 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_py3doc_enhanced_theme' -tmod = importlib.import_module(html_theme) -html_theme_path = [tmod.get_html_theme_path()] - -# 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 = { - 'collapsiblesidebar' : 'true', - 'navigation_with_keys' : 'true', -} - -# 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'] - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'diffpystructuredoc' - - -# -- 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': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# 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 = [ - (master_doc, 'diffpy.structure_manual.tex', 'diffpy.structure Documentation', - ab_authors, 'manual'), -] - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'diffpy.structure', 'diffpy.structure Documentation', - ab_authors.split(', '), 1) -] - - -# -- 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 = [ - (master_doc, 'diffpy.structure', 'diffpy.structure Documentation', - ab_authors, 'diffpy.structure', 'One line description of project.', - 'Miscellaneous'), -] - - -# -- intersphinx configuration -------------------------------------------- - -intersphinx_mapping = { - 'python' : ('https://docs.python.org/3.10', None), - 'numpy' : ('https://docs.scipy.org/doc/numpy', None), -} - -# -- autodoc configuration ------------------------------------------------ -# See http://www.sphinx-doc.org/en/stable/ext/autodoc.html - -autodoc_member_order = 'bysource' - - -# -- napoleon configuration ----------------------------------------------- -# See https://sphinxcontrib-napoleon.readthedocs.io. - -napoleon_google_docstring = False -napoleon_numpy_docstring = True -napoleon_use_param = False -napoleon_use_rtype = False diff --git a/doc/manual/source/license.rst b/doc/manual/source/license.rst deleted file mode 100644 index 7d78e94f..00000000 --- a/doc/manual/source/license.rst +++ /dev/null @@ -1,142 +0,0 @@ -.. index:: license - -License -####### - -OPEN SOURCE LICENSE AGREEMENT -============================= - -| Copyright (c) 2009-2011, University of Tennessee -| 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) 2014, Australian Synchrotron Research Program Inc., ("ASRP") -| 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) 2014-2019, Brookhaven Science Associates, - Brookhaven National Laboratory - - -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. - - -.. rubric:: END OF LICENSE diff --git a/doc/manual/source/package.rst b/doc/manual/source/package.rst deleted file mode 100644 index 4179f8e3..00000000 --- a/doc/manual/source/package.rst +++ /dev/null @@ -1,130 +0,0 @@ -:tocdepth: 2 - -Package API -########### - - -Submodules -========== - -.. toctree:: - :titlesonly: - - mod_atom - mod_lattice - mod_spacegroup - diffpy.structure.parsers - diffpy.structure.apps - diffpy.structure.expansion - - -diffpy.structure -================ - -.. module:: diffpy.structure - -The top-level diffpy.structure module provides the following objects. - - -Functions ---------- - -.. autofunction:: loadStructure - - -Classes -------- - -:py:class:`~atom.Atom` - describes one atom site in the structure - its type, position, - displacement parameters and so forth. - -:py:class:`~lattice.Lattice` - depicts general coordinate system and associated operations. - -:py:class:`~structure.Structure` - collection of :class:`!Atom` objects that form the structure together - with associated :py:class:`!Lattice`. - - -Exceptions ----------- - -.. autoclass:: StructureFormatError - -.. autoclass:: LatticeError - -.. autoclass:: SymmetryError - - -diffpy.structure.spacegroups -============================ - -.. automodule:: diffpy.structure.spacegroups - :members: - :undoc-members: - :show-inheritance: - -diffpy.structure.structureerrors -================================ - -.. automodule:: diffpy.structure.structureerrors - :members: - :undoc-members: - :show-inheritance: - -diffpy.structure.symmetryutilities -================================== - -.. automodule:: diffpy.structure.symmetryutilities - :members: - :undoc-members: - :show-inheritance: - -diffpy.structure.mmlibspacegroups -================================= - -.. automodule:: diffpy.structure.mmlibspacegroups - :members: - :undoc-members: - :show-inheritance: - -diffpy.structure.pdffitstructure -================================ - -.. automodule:: diffpy.structure.pdffitstructure - :members: - :undoc-members: - :show-inheritance: - -diffpy.structure.sgtbxspacegroups -================================= - -.. automodule:: diffpy.structure.sgtbxspacegroups - :members: - :undoc-members: - :show-inheritance: - -diffpy.structure.structure -========================== - -.. automodule:: diffpy.structure.structure - :members: - :undoc-members: - :show-inheritance: - -diffpy.structure.utils -====================== - -.. automodule:: diffpy.structure.utils - :members: - :undoc-members: - :show-inheritance: - -diffpy.structure.version -======================== - -.. automodule:: diffpy.structure.version - :members: - :undoc-members: - :show-inheritance: diff --git a/doc/manual/source/release.rst b/doc/manual/source/release.rst deleted file mode 100644 index 7ec4f81d..00000000 --- a/doc/manual/source/release.rst +++ /dev/null @@ -1,3 +0,0 @@ -.. index:: release notes - -.. mdinclude:: ../../../CHANGELOG.md diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 00000000..fe03b556 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,194 @@ +# 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 new file mode 100644 index 00000000..ac53d5bd --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,36 @@ +@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/doc/manual/Makefile b/docs/manual/Makefile similarity index 100% rename from doc/manual/Makefile rename to docs/manual/Makefile diff --git a/doc/manual/requirements.txt b/docs/manual/requirements.txt similarity index 100% rename from doc/manual/requirements.txt rename to docs/manual/requirements.txt diff --git a/docs/source/_static/.placeholder b/docs/source/_static/.placeholder new file mode 100644 index 00000000..e69de29b diff --git a/docs/source/api/diffpy.structure.apps.rst b/docs/source/api/diffpy.structure.apps.rst new file mode 100644 index 00000000..3986ab73 --- /dev/null +++ b/docs/source/api/diffpy.structure.apps.rst @@ -0,0 +1,36 @@ +:tocdepth: -1 + +diffpy.structure.apps package +============================= + +.. automodule:: diffpy.structure.apps + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +diffpy.structure.apps.transtru module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.apps.transtru + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.apps.anyeye module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.apps.anyeye + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.apps.vesta_viewer module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.apps.vesta_viewer + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/api/diffpy.structure.expansion.rst b/docs/source/api/diffpy.structure.expansion.rst new file mode 100644 index 00000000..34529fcd --- /dev/null +++ b/docs/source/api/diffpy.structure.expansion.rst @@ -0,0 +1,36 @@ +:tocdepth: -1 + +diffpy.structure.expansion package +================================== + +.. automodule:: diffpy.structure.expansion + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +diffpy.structure.expansion.shapeutils module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.expansion.shapeutils + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.expansion.makeellipsoid module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.expansion.makeellipsoid + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.expansion.supercell_mod module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.expansion.supercell_mod + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/api/diffpy.structure.parsers.rst b/docs/source/api/diffpy.structure.parsers.rst new file mode 100644 index 00000000..8a5e9476 --- /dev/null +++ b/docs/source/api/diffpy.structure.parsers.rst @@ -0,0 +1,100 @@ +:tocdepth: -1 + +diffpy.structure.parsers package +================================ + +.. automodule:: diffpy.structure.parsers + :members: + :undoc-members: + :show-inheritance: + +Submodules +---------- + +diffpy.structure.parsers.p_rawxyz module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_rawxyz + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.structureparser module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.structureparser + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.p_cif module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_cif + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.p_auto module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_auto + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.p_pdffit module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_pdffit + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.p_xcfg module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_xcfg + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.parser_index_mod module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.parser_index_mod + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.p_pdb module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_pdb + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.p_discus module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_discus + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.p_vesta module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_vesta + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.parsers.p_xyz module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.parsers.p_xyz + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/api/diffpy.structure.rst b/docs/source/api/diffpy.structure.rst new file mode 100644 index 00000000..7807ec06 --- /dev/null +++ b/docs/source/api/diffpy.structure.rst @@ -0,0 +1,126 @@ +:tocdepth: -1 + +diffpy.structure package +======================== + +.. automodule:: diffpy.structure + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + :titlesonly: + + diffpy.structure.parsers + diffpy.structure.expansion + diffpy.structure.apps + +Submodules +---------- + +diffpy.structure.structure_app module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.structure_app + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.spacegroups module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.spacegroups + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure._legacy_importer module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure._legacy_importer + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.structureerrors module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.structureerrors + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.spacegroupmod module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.spacegroupmod + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.utils module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.utils + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.lattice module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.lattice + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.structure module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.structure + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.mmlibspacegroups module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.mmlibspacegroups + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.symmetryutilities module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.symmetryutilities + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.atom module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.atom + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.pdffitstructure module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.pdffitstructure + :members: + :undoc-members: + :show-inheritance: + +diffpy.structure.sgtbxspacegroups module +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. automodule:: diffpy.structure.sgtbxspacegroups + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 00000000..e3c1fd99 --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,322 @@ +#!/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/doc/manual/source/diffpy.structure.apps.rst b/docs/source/diffpy.structure.apps.rst similarity index 100% rename from doc/manual/source/diffpy.structure.apps.rst rename to docs/source/diffpy.structure.apps.rst diff --git a/doc/manual/source/diffpy.structure.expansion.rst b/docs/source/diffpy.structure.expansion.rst similarity index 100% rename from doc/manual/source/diffpy.structure.expansion.rst rename to docs/source/diffpy.structure.expansion.rst diff --git a/doc/manual/source/diffpy.structure.parsers.rst b/docs/source/diffpy.structure.parsers.rst similarity index 100% rename from doc/manual/source/diffpy.structure.parsers.rst rename to docs/source/diffpy.structure.parsers.rst diff --git a/docs/source/img/.placeholder b/docs/source/img/.placeholder new file mode 100644 index 00000000..e69de29b diff --git a/doc/manual/source/index.rst b/docs/source/index.rst similarity index 62% rename from doc/manual/source/index.rst rename to docs/source/index.rst index 520f8cb5..591a32a2 100644 --- a/doc/manual/source/index.rst +++ b/docs/source/index.rst @@ -1,12 +1,18 @@ -######################################################################## -diffpy.structure documentation -######################################################################## +####### +|title| +####### -diffpy.structure - simple storage and manipulation of crystal structures +.. |title| replace:: diffpy.structure documentation -| Software version |release|. +``diffpy.structure`` - Crystal structure container and parsers for structure formats. + +| Software version |release| | Last updated |today|. +=============== +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 @@ -16,20 +22,23 @@ 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 members of the Billinge Group at -Columbia University and at Brookhaven National Laboratory including -Pavol Juhás, Christopher L. Farrow, Xiaohao Yang, Simon J.L. Billinge. - -For a detailed list of contributors see +``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. -Acknowledgments -======================================================================== +================ +Acknowledgements +================ Space group codes in *spacegroupmod.py* and *mmlibspacegroups.py* originate from the pymmlib project, http://pymmlib.sourceforge.net. @@ -37,11 +46,13 @@ 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 `_. .. index:: citation, reference +========= Reference -======================================================================== +========= If you use this program for a scientific research that leads to publication, we ask that you acknowledge use of the program @@ -54,20 +65,19 @@ by citing the following paper in your publication: `__, *Acta Crystallogr. A* **71**, 562-568 (2015). - +================= Table of contents -======================================================================== - +================= .. toctree:: - :titlesonly: + :maxdepth: 2 - license + Package API release - package - + license +======= Indices -======================================================================== +======= * :ref:`genindex` * :ref:`search` diff --git a/docs/source/license.rst b/docs/source/license.rst new file mode 100644 index 00000000..e4c7e6c5 --- /dev/null +++ b/docs/source/license.rst @@ -0,0 +1,151 @@ +:tocdepth: -1 + +.. index:: license + +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: + +.. 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/doc/manual/source/mod_atom.rst b/docs/source/mod-atom.rst similarity index 100% rename from doc/manual/source/mod_atom.rst rename to docs/source/mod-atom.rst diff --git a/doc/manual/source/mod_lattice.rst b/docs/source/mod-lattice.rst similarity index 100% rename from doc/manual/source/mod_lattice.rst rename to docs/source/mod-lattice.rst diff --git a/doc/manual/source/mod_spacegroup.rst b/docs/source/mod-spacegroup.rst similarity index 100% rename from doc/manual/source/mod_spacegroup.rst rename to docs/source/mod-spacegroup.rst diff --git a/docs/source/release.rst b/docs/source/release.rst new file mode 100644 index 00000000..27cd0cc9 --- /dev/null +++ b/docs/source/release.rst @@ -0,0 +1,5 @@ +:tocdepth: -1 + +.. index:: release notes + +.. include:: ../../CHANGELOG.rst diff --git a/docs/source/snippets/.placeholder b/docs/source/snippets/.placeholder new file mode 100644 index 00000000..e69de29b diff --git a/news/CI-badge-fix.rst b/news/CI-badge-fix.rst new file mode 100644 index 00000000..2df63a8f --- /dev/null +++ b/news/CI-badge-fix.rst @@ -0,0 +1,23 @@ +**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 new file mode 100644 index 00000000..790d30b1 --- /dev/null +++ b/news/TEMPLATE.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/news/ase-adapter.rst b/news/ase-adapter.rst new file mode 100644 index 00000000..30b585bd --- /dev/null +++ b/news/ase-adapter.rst @@ -0,0 +1,30 @@ +**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/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..40645c0b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,88 @@ +[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/requirements/build.txt b/requirements/build.txt new file mode 100644 index 00000000..e69de29b diff --git a/requirements/conda.txt b/requirements/conda.txt new file mode 100644 index 00000000..4c4ff50e --- /dev/null +++ b/requirements/conda.txt @@ -0,0 +1,3 @@ +numpy +pycifrw +diffpy.utils diff --git a/requirements/docs.txt b/requirements/docs.txt new file mode 100644 index 00000000..1de813f9 --- /dev/null +++ b/requirements/docs.txt @@ -0,0 +1,5 @@ +sphinx +sphinx_rtd_theme +sphinx-copybutton +doctr +m2r2 diff --git a/requirements/pip.txt b/requirements/pip.txt new file mode 100644 index 00000000..4c4ff50e --- /dev/null +++ b/requirements/pip.txt @@ -0,0 +1,3 @@ +numpy +pycifrw +diffpy.utils diff --git a/requirements/tests.txt b/requirements/tests.txt new file mode 100644 index 00000000..a7277865 --- /dev/null +++ b/requirements/tests.txt @@ -0,0 +1,6 @@ +flake8 +pytest +codecov +coverage +pytest-cov +pytest-env diff --git a/rever.xsh b/rever.xsh deleted file mode 100644 index dda2765d..00000000 --- a/rever.xsh +++ /dev/null @@ -1,14 +0,0 @@ -$PROJECT = 'diffpy.structure' -$ACTIVITIES = [ - 'tag', # Creates a tag for the new version number - 'push_tag', # Pushes the tag up to the $TAG_REMOTE - 'pypi', # Sends the package to pypi - 'ghrelease' # Creates a Github release entry for the new tag - ] -$PUSH_TAG_REMOTE = 'git@github.com:diffpy/diffpy.structure.git' # Repo to push tags to -$GITHUB_ORG = 'diffpy' # Github org for Github releases and conda-forge -$GITHUB_REPO = 'diffpy.structure' # Github repo for Github releases and conda-forge -$GHRELEASE_PREPEND = """See [CHANGELOG.md](CHANGELOG.md) for detailed release notes. - -The release is also available at [PyPI](https://pypi.org/project/diffpy.structure/) and [Conda](https://anaconda.org/conda-forge/diffpy.structure). -""" # release message diff --git a/setup.py b/setup.py deleted file mode 100755 index 5a6fc69e..00000000 --- a/setup.py +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env python - -"""Objects for storage and manipulation of crystal structure data. - -Packages: diffpy.structure -""" - -import os -import re -import sys -from setuptools import setup, find_packages - -# Use this version when git data are not available, like in git zip archive. -# Update when tagging a new release. -FALLBACK_VERSION = '3.1.0' - -# determine if we run with Python 3. -PY3 = (sys.version_info[0] == 3) - -# versioncfgfile holds version data for git commit hash and date. -# It must reside in the same directory as version.py. -MYDIR = os.path.dirname(os.path.abspath(__file__)) -versioncfgfile = os.path.join(MYDIR, 'src/diffpy/structure/version.cfg') -gitarchivecfgfile = os.path.join(MYDIR, '.gitarchive.cfg') - - -def gitinfo(): - from subprocess import Popen, PIPE - kw = dict(stdout=PIPE, cwd=MYDIR, universal_newlines=True) - proc = Popen(['git', 'describe', '--tags', '--match=v[[:digit:]]*'], **kw) - desc = proc.stdout.read() - proc = Popen(['git', 'log', '-1', '--format=%H %ct %ci'], **kw) - glog = proc.stdout.read() - rv = {} - rv['version'] = '.post'.join(desc.strip().split('-')[:2]).lstrip('v') - rv['commit'], rv['timestamp'], rv['date'] = glog.strip().split(None, 2) - return rv - - -def getversioncfg(): - if PY3: - from configparser import RawConfigParser - else: - from ConfigParser import RawConfigParser - vd0 = dict(version=FALLBACK_VERSION, commit='', date='', timestamp=0) - # first fetch data from gitarchivecfgfile, ignore if it is unexpanded - g = vd0.copy() - cp0 = RawConfigParser(vd0) - cp0.read(gitarchivecfgfile) - if len(cp0.get('DEFAULT', 'commit')) > 20: - g = cp0.defaults() - mx = re.search(r'\btag: v(\d[^,]*)', g.pop('refnames')) - if mx: - g['version'] = mx.group(1) - # then try to obtain version data from git. - gitdir = os.path.join(MYDIR, '.git') - if os.path.exists(gitdir) or 'GIT_DIR' in os.environ: - try: - g = gitinfo() - except OSError: - pass - # finally, check and update the active version file - cp = RawConfigParser() - cp.read(versioncfgfile) - d = cp.defaults() - rewrite = not d or (g['commit'] and ( - g['version'] != d.get('version') or g['commit'] != d.get('commit'))) - if rewrite: - cp.set('DEFAULT', 'version', g['version']) - cp.set('DEFAULT', 'commit', g['commit']) - cp.set('DEFAULT', 'date', g['date']) - cp.set('DEFAULT', 'timestamp', g['timestamp']) - with open(versioncfgfile, 'w') as fp: - cp.write(fp) - return cp - -versiondata = getversioncfg() - -with open(os.path.join(MYDIR, 'README.rst')) as fp: - long_description = fp.read() - -# define distribution -setup_args = dict( - name = "diffpy.structure", - version = versiondata.get('DEFAULT', 'version'), - packages = find_packages(os.path.join(MYDIR, 'src')), - py_modules = ['diffpy.Structure'], - package_dir = {'' : 'src'}, - test_suite = 'diffpy.structure.tests', - include_package_data = True, - zip_safe = False, - install_requires = [ - 'six', - 'pycifrw>=4.4.3', - ], - author = 'Simon J.L. Billinge group', - author_email = 'sb2896@columbia.edu', - maintainer = 'Pavol Juhas', - maintainer_email = 'pavol.juhas@gmail.com', - url = 'https://github.com/diffpy/diffpy.structure', - description = "Crystal structure container " - "and parsers for structure formats.", - long_description = long_description, - long_description_content_type = 'text/x-rst', - license = 'BSD-style license', - keywords = "crystal structure data storage CIF PDB", - classifiers = [ - # List of possible values at - # http://pypi.python.org/pypi?:action=list_classifiers - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - '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 :: 2.7', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Topic :: Scientific/Engineering :: Chemistry', - 'Topic :: Scientific/Engineering :: Physics', - ], -) - -if __name__ == '__main__': - setup(**setup_args) diff --git a/src/diffpy/Structure.py b/src/diffpy/Structure.py deleted file mode 100644 index ee3c69ab..00000000 --- a/src/diffpy/Structure.py +++ /dev/null @@ -1,34 +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. - -This module is deprecated and will be removed in the future. -""" - - -import sys - -# install legacy import hooks -import diffpy.structure._legacy_importer - -# replace this module with the new one -sys.modules['diffpy.Structure'] = diffpy.structure - -# End of file diff --git a/src/diffpy/__init__.py b/src/diffpy/__init__.py index 0e070285..1cd13da0 100644 --- a/src/diffpy/__init__.py +++ b/src/diffpy/__init__.py @@ -1,26 +1,14 @@ #!/usr/bin/env python ############################################################################## # -# diffpy by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2008 trustees of the Michigan State University. -# All rights reserved. +# (c) 2024-2026 The Trustees of Columbia University in the City of New York. +# All rights reserved. # -# File coded by: Pavol Juhas +# File coded by: Billinge Group members and community contributors. # -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. +# See GitHub contributions for a more detailed list of contributors. +# https://github.com/diffpy/diffpy.structure/graphs/contributors +# +# See LICENSE.rst for license information. # ############################################################################## - -"""diffpy - tools for structure analysis by diffraction. - -Blank namespace package. -""" - - -from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) - - -# End of file diff --git a/src/diffpy/structure/__init__.py b/src/diffpy/structure/__init__.py index 2f0661a5..0b07bb8c 100644 --- a/src/diffpy/structure/__init__.py +++ b/src/diffpy/structure/__init__.py @@ -1,60 +1,112 @@ #!/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. +# (c) 2024-2026 The Trustees of Columbia University in the City of New York. +# All rights reserved. # -# File coded by: Pavol Juhas +# File coded by: Chris Farrow, Pavol Juhas, Simon Billinge, Billinge Group members. # -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. +# 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 -"""classes related to structure of materials -Classes: - Atom - Lattice - Structure - PDFFitStructure Exceptions: - StructureFormatError - LatticeError - SymmetryError + * StructureFormatError + * LatticeError + * SymmetryError """ -# Interface definitions ------------------------------------------------------ -from diffpy.structure.structureerrors import (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.structure import Structure +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 -# obtain version information +# 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 -def loadStructure(filename, fmt='auto', **kw): + +@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. """ - Load new structure object from the specified file. + 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 + 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 : misc, optional + kw : Optional Extra keyword arguments that are passed to `parsers.getParser` - function. These configure the dedicated Parser object that + function. These configure the dedicated Parser object that is used to read content in filename. Returns @@ -64,16 +116,20 @@ def loadStructure(filename, fmt='auto', **kw): Return a more specific PDFFitStructure type for 'pdffit' and 'discus' formats. """ - from diffpy.structure.parsers import getParser - p = getParser(fmt, **kw) - rv = p.parseFile(filename) + 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 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 index 8bb36114..672d0835 100644 --- a/src/diffpy/structure/_legacy_importer.py +++ b/src/diffpy/structure/_legacy_importer.py @@ -12,41 +12,34 @@ # See LICENSE.txt for license information. # ############################################################################## - -""" -Support import of old camel-case module names with DeprecationWarning. +"""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. +instances. Their `__name__` attributes are thus all in lower-case. -This module is deprecated and will be removed in the future. +Note +---- +this module must be only imported from `diffpy.Structure`. -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 -import six - -if six.PY2: - import importlib - class mock_importlib_abc(object): - MetaPathFinder = object - Loader = object - importlib.abc = mock_importlib_abc - sys.modules.setdefault('importlib.abc', mock_importlib_abc) - del mock_importlib_abc - -import importlib.abc -WMSG = "Module {!r} is deprecated. Use {!r} instead." +WMSG = "Module {!r} is deprecated. Use {!r} instead." # ---------------------------------------------------------------------------- + class FindRenamedStructureModule(importlib.abc.MetaPathFinder): - prefix = 'diffpy.Structure.' + prefix = "diffpy.Structure." def find_spec(self, fullname, path=None, target=None): # only handle submodules of diffpy.Structure @@ -60,21 +53,13 @@ def find_spec(self, fullname, path=None, target=None): return spec - if six.PY2: - def find_module(self, fullname, path): - # only handle submodules of diffpy.Structure - loader = None - if fullname.startswith(self.prefix): - loader = MapRenamedStructureModule() - return loader - # end of class FindRenamedStructureModule # ---------------------------------------------------------------------------- + class MapRenamedStructureModule(importlib.abc.Loader): - """ - Loader for old camel-case module names. + """Loader for old camel-case module names. Import the current module and alias it under the old name. """ @@ -86,26 +71,20 @@ def create_module(self, spec): warn(WMSG.format(spec.name, lcname), DeprecationWarning, stacklevel=2) return mod - def exec_module(self, module): return - if six.PY2: - from collections import namedtuple - ModuleSpec = namedtuple('ModuleSpec', 'name') - - def load_module(self, fullname): - spec = self.ModuleSpec(fullname) - return self.create_module(spec) - # end of class MapRenamedStructureModule # ---------------------------------------------------------------------------- # show deprecation warning for diffpy.Structure -warn(WMSG.format('diffpy.Structure', 'diffpy.structure'), - DeprecationWarning, stacklevel=2) +warn( + WMSG.format("diffpy.Structure", "diffpy.structure"), + DeprecationWarning, + stacklevel=2, +) # install meta path finder for diffpy.Structure submodules sys.meta_path.append(FindRenamedStructureModule()) diff --git a/src/diffpy/structure/applications/__init__.py b/src/diffpy/structure/applications/__init__.py deleted file mode 100644 index 50e8dae2..00000000 --- a/src/diffpy/structure/applications/__init__.py +++ /dev/null @@ -1,29 +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. -# -############################################################################## - -""" -Import support for renamed subpackage diffpy.structure.applications. - -This module is deprecated and will be removed in version 3.1. -""" - -# TODO remove this module in version 3.1. - -from warnings import warn - - -warn("Module 'diffpy.structure.applications' is deprecated. " - "Import 'diffpy.structure.apps' instead.", - DeprecationWarning, stacklevel=2) diff --git a/src/diffpy/structure/applications/anyeye.py b/src/diffpy/structure/applications/anyeye.py deleted file mode 100755 index c2b9b334..00000000 --- a/src/diffpy/structure/applications/anyeye.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python - -""" -Temporary support for old import name. - -This module is deprecated and will be removed in version 3.1. -""" - -# TODO remove this module in version 3.1. - -from diffpy.structure.apps.anyeye import main - -if __name__ == "__main__": - main() diff --git a/src/diffpy/structure/applications/transtru.py b/src/diffpy/structure/applications/transtru.py deleted file mode 100755 index 8c911912..00000000 --- a/src/diffpy/structure/applications/transtru.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python - -""" -Temporary support for old import name. - -This module is deprecated and will be removed in version 3.1. -""" - -# TODO remove this module in version 3.1. - -from diffpy.structure.apps.transtru import main - -if __name__ == "__main__": - main() diff --git a/src/diffpy/structure/apps/__init__.py b/src/diffpy/structure/apps/__init__.py index 7a953806..98aa2feb 100644 --- a/src/diffpy/structure/apps/__init__.py +++ b/src/diffpy/structure/apps/__init__.py @@ -12,6 +12,4 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""Script applications that use the diffpy.structure package. -""" +"""Script applications that use the `diffpy.structure` package.""" diff --git a/src/diffpy/structure/apps/anyeye.py b/src/diffpy/structure/apps/anyeye.py index cf101da3..c00756c6 100755 --- a/src/diffpy/structure/apps/anyeye.py +++ b/src/diffpy/structure/apps/anyeye.py @@ -12,54 +12,109 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Anyeye view structure file in atomeye. -"""anyeye view structure file in atomeye -Usage: anyeye [options] strufile +Usage: ``anyeye [options] strufile`` -anyeye understands more structure formats than atomeye. It converts strufile -to a temporary XCFG file which is opened in atomeye. Supported file formats: - inputFormats +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, 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 + -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 sys import os import re import signal -from diffpy.structure import StructureFormatError +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'], +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""" +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 + if style == "brief": + msg = msg.split("\n")[1] + "\n" + "Try `%s --help' for more information." % myname else: - from diffpy.structure.parsers import inputFormats - fmts = [ f for f in inputFormats() if f != 'auto' ] + 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 @@ -67,113 +122,178 @@ def usage(style = None): 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. - Return a tuple of (Structure, fileformat). + 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: + 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 + + 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') + fmt = pd.get("format", "auto") stru = None - if fmt == 'auto': + if fmt == "auto": stru, fmt = loadStructureFile(strufile) - pd['fmt'] = fmt + pd["fmt"] = fmt # if fmt is recognized by the viewer, use as is - if fmt in pd['formats'] and pd['formula'] is None: + if fmt in pd["formats"] and pd["formula"] is None: import shutil - shutil.copyfile(strufile, tmpfile+'.tmp') - os.rename(tmpfile+'.tmp', tmpfile) + + shutil.copyfile(strufile, tmpfile + ".tmp") + os.rename(tmpfile + ".tmp", tmpfile) return # otherwise convert to the first recognized viewer format if stru is None: - stru = loadStructureFile(strufile, fmt)[0] - if pd['formula']: - formula = pd['formula'] + 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) ) + 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) + 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']: + + strufile = pd["strufile"] + tmpfile = pd["tmpfile"] + while pd["watch"]: if os.path.getmtime(tmpfile) < os.path.getmtime(strufile): - convertStructureFile(pd) + convert_structure_file(pd) sleep(1) return +@deprecated(cleanUp_deprecation_msg) def cleanUp(pd): - if 'tmpfile' in pd: - os.remove(pd['tmpfile']) - del pd['tmpfile'] - if 'tmpdir' in pd: - os.rmdir(pd['tmpdir']) - del pd['tmpdir'] + 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""" + """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): + 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:] + 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 = elcnt[i + 1] cnt = (cnt == "") and 1 or int(cnt) - ellst.extend(cnt*[el]) + ellst.extend(cnt * [el]) except ValueError: - emsg = "Invalid formula, %r is not valid count" % elcnt[i+1] + emsg = "Invalid formula, %r is not valid count" % elcnt[i + 1] raise RuntimeError(emsg) return ellst def die(exit_status=0, pd={}): - cleanUp(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) + exit_status = (exit_status >> 8) + (exit_status & 0x00FF) die(exit_status, pd) else: die(1, pd) @@ -182,12 +302,15 @@ def signalHandler(signum, stackframe): def main(): import getopt + # default parameters - pd['watch'] = False + pd["watch"] = False try: - opts, args = getopt.getopt(sys.argv[1:], "f:whV", - ["formula=", "watch", "viewer=", "formats=", - "help", "version"]) + 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) @@ -195,16 +318,16 @@ def main(): for o, a in opts: if o in ("-f", "--formula"): try: - pd['formula'] = parseFormula(a) + pd["formula"] = parse_formula(a) except RuntimeError as msg: print(msg, file=sys.stderr) die(2) elif o in ("-w", "--watch"): - pd['watch'] = True + pd["watch"] = True elif o == "--viewer": - pd['viewer'] = a + pd["viewer"] = a elif o == "--formats": - pd['formats'] = [w.strip() for w in a.split(',')] + pd["formats"] = [w.strip() for w in a.split(",")] elif o in ("-h", "--help"): usage() die() @@ -212,30 +335,30 @@ def main(): version() die() if len(args) < 1: - usage('brief') + usage("brief") die() elif len(args) > 1: print("too many structure files", file=sys.stderr) die(2) - pd['strufile'] = args[0] + pd["strufile"] = args[0] # trap the following signals - signal.signal(signal.SIGHUP, signalHandler) - signal.signal(signal.SIGQUIT, signalHandler) - signal.signal(signal.SIGSEGV, signalHandler) - signal.signal(signal.SIGTERM, signalHandler) - signal.signal(signal.SIGINT, signalHandler) + 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" + if os.path.basename(pd["viewer"]).startswith("atomeye"): + env["XLIB_SKIP_ARGB_VISUALS"] = "1" # try to run the thing: try: - convertStructureFile(pd) - spawnargs = (pd['viewer'], pd['viewer'], pd['tmpfile'], env) + convert_structure_file(pd) + spawnargs = (pd["viewer"], pd["viewer"], pd["tmpfile"], env) # load strufile in atomeye - if pd['watch']: - signal.signal(signal.SIGCLD, signalHandler) + if pd["watch"]: + signal.signal(signal.SIGCHLD, signal_handler) os.spawnlpe(os.P_NOWAIT, *spawnargs) - watchStructureFile(pd) + watch_structure_file(pd) else: status = os.spawnlpe(os.P_WAIT, *spawnargs) die(status, pd) diff --git a/src/diffpy/structure/apps/transtru.py b/src/diffpy/structure/apps/transtru.py index 05207ed1..d942564e 100755 --- a/src/diffpy/structure/apps/transtru.py +++ b/src/diffpy/structure/apps/transtru.py @@ -12,59 +12,67 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Translate structure file to different format. -"""transtru translate structure file to different format -Usage: transtru INFMT..OUTFMT strufile +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 +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 + ``transtru INFMT..OUTFMT strufile > strufile.out`` Supported input and output structure formats are - INFMT: inputFormats - OUTFMT: outputFormats + * `INFMT`: ``inputFormats`` + * `OUTFMT`: ``outputFormats`` Options: - -h, --help display this message - -V, --version show script version + -h, --help + Display this message. + + -V, --version + Show script version. """ from __future__ import print_function import sys -from diffpy.structure import Structure, StructureFormatError +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""" +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 + if style == "brief": + msg = msg.split("\n")[1] + "\n" + "Try `%s --help' for more information." % myname else: - from diffpy.structure.parsers import inputFormats, outputFormats - msg = msg.replace("inputFormats", " ".join(inputFormats())) - msg = msg.replace("outputFormats", " ".join(outputFormats())) + 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"]) + opts, args = getopt.getopt(sys.argv[1:], "hV", ["help", "version"]) except getopt.GetoptError as errmsg: print(errmsg, file=sys.stderr) sys.exit(2) @@ -77,30 +85,34 @@ def main(): version() sys.exit() if len(args) < 1: - usage('brief') + usage("brief") sys.exit() # process arguments - from diffpy.structure.parsers import inputFormats, outputFormats + from diffpy.structure.parsers import input_formats, output_formats + try: - infmt, outfmt = args[0].split('..', 1) - if infmt not in inputFormats(): + 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 outputFormats(): + 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) + 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.readStr(sys.stdin.read(), infmt) + stru.read_structure(sys.stdin.read(), infmt) else: stru.read(strufile, infmt) - sys.stdout.write( stru.writeStr(outfmt) ) + sys.stdout.write(stru.write_structure(outfmt)) except IndexError: print("strufile not specified", file=sys.stderr) sys.exit(2) diff --git a/src/diffpy/structure/apps/vesta_viewer.py b/src/diffpy/structure/apps/vesta_viewer.py new file mode 100644 index 00000000..b90ae0f4 --- /dev/null +++ b/src/diffpy/structure/apps/vesta_viewer.py @@ -0,0 +1,366 @@ +#!/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 index 2742b6a7..75581454 100644 --- a/src/diffpy/structure/atom.py +++ b/src/diffpy/structure/atom.py @@ -12,25 +12,37 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -""" -Provide class Atom for managing properties of an atom in structure model. -""" +"""Provide class Atom for managing properties of an atom in structure +model.""" import numpy -import six 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 +_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. + """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 @@ -38,40 +50,40 @@ class Atom(object): Parameters ---------- - atype : str or Atom, optional + 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 : ndarray, optional + 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. + label : str, Optional + A unique string `label` for referring to this `Atom`. By default an empty string. - occupancy : float, optional + occupancy : float, Optional The initial `occupancy` of this atom, by default ``1``. - anisotropy : bool, optional + 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`` + *U* or *Uisoequiv* arguments. Defaults to ``False`` when not set in any other way. - U : ndarray, optional + 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 + 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 + 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 : ndarray + 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". @@ -83,6 +95,10 @@ class Atom(object): 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 @@ -91,26 +107,37 @@ class Atom(object): # Internal storage of the displacement parameters. # instance attributes that have immutable default values - element = '' - label = '' + element = "" + """str: Default values of `element`.""" + + label = "" + """str: Default values of `label`.""" + occupancy = 1.0 + """float: Default values of `occupancy`.""" + _anisotropy = False lattice = None - - def __init__(self, atype=None, xyz=None, label=None, occupancy=None, - anisotropy=None, U=None, Uisoequiv=None, lattice=None): - """ - Create atom of the specified type at the given lattice coordinates. - - Atom(a) creates a copy of Atom instance *a*. - """ + """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) + self._U = numpy.zeros((3, 3), dtype=float) # assign them as needed if isinstance(atype, Atom): atype.__copy__(target=self) @@ -137,10 +164,17 @@ def __init__(self, atype=None, xyz=None, label=None, occupancy=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. """ - Calculate mean square displacement along the lattice vector. + return self.msd_latt(vl) + + def msd_latt(self, vl): + """Calculate mean square displacement along the lattice vector. Parameters ---------- @@ -152,22 +186,29 @@ def msdLat(self, vl): float The mean square displacement along *vl*. """ - if not self.anisotropy: return self.Uisoequiv + 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) + 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.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. """ - Calculate mean square displacement along the Cartesian vector. + return self.msd_cart(vc) + + def msd_cart(self, vc): + """Calculate mean square displacement along the Cartesian + vector. Parameters ---------- @@ -179,7 +220,8 @@ def msdCart(self, vc): float The mean square displacement along *vc*. """ - if not self.anisotropy: return self.Uisoequiv + 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) @@ -189,26 +231,26 @@ def msdCart(self, vc): msd = numpy.dot(vcn, numpy.dot(Uc, vcn)) return msd - def __repr__(self): - """ - String representation of this Atom. - """ + """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) + 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. + """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. + 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. @@ -228,25 +270,31 @@ def __copy__(self, target=None): # 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]``.') + 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): - """ - ndarray: Atom position in absolute Cartesian coordinates. + """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 + current `lattice` setup. Assignment to *xyz_cartn* or its components is applied on fractional coordinates `xyz`. """ if not self.lattice: @@ -267,8 +315,7 @@ def xyz_cartn(self, value): @property def anisotropy(self): - """ - bool : Flag for allowing anisotropic displacement parameters. + """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 @@ -293,8 +340,8 @@ def anisotropy(self, value): @property def U(self): - """ - ndarray : The 3x3 matrix of anisotropic atomic displacements. + """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 @@ -305,7 +352,7 @@ def U(self): ---- 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`, + undefined behavior. Use the `U11`, `U22`, ..., or `B11`, `B22`, ..., descriptors to set only some *U* components. """ if not self.anisotropy: @@ -322,19 +369,15 @@ def U(self, value): # Uij elements - def _get_Uij(self, i, j): - """ - The getter function for the `U11`, `U22`, ..., properties. - """ + 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. - """ + 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: @@ -350,32 +393,44 @@ def _set_Uij(self, i, j, value): 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)) + 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 + 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)) + 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 @@ -384,8 +439,7 @@ def _set_Uij(self, i, j, value): @property def Uisoequiv(self): - """ - float : The isotropic displacement parameter or an equivalent value. + """float : The isotropic displacement parameter or an equivalent value. Setting a new value rescales tensor `U` so it yields equivalent direction-averaged displacements. @@ -395,13 +449,18 @@ def Uisoequiv(self): 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) + 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 @@ -424,36 +483,48 @@ def Uisoequiv(self, value): _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` + 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 + 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)) + 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 @@ -462,10 +533,9 @@ def Uisoequiv(self, value): @property def Bisoequiv(self): - """ - float : The Debye-Waller isotropic displacement or an equivalent value. + """float : The Debye-Waller isotropic displacement or an equivalent value. - This equals ``8 * pi**2 * Uisoequiv``. Setting a new value + This equals ``8 * pi**2 * Uisoequiv``. Setting a new value rescales `U` tensor to yield equivalent direction-average of Debye-Waller displacements. """ @@ -476,13 +546,14 @@ 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. + """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`. @@ -490,33 +561,25 @@ class _AtomCartesianCoordinates(numpy.ndarray): Parameters ---------- atom : Atom - Atom instance to be linked to these coordinate array. + `Atom` instance to be linked to these coordinate array. """ def __new__(self, atom): - """ - Create the underlying numpy array base object. - """ + """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. - """ + """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. + """Set some element or slice of this Cartesian coordinates. This overrides inplace array assignment to update the *xyz* fractional coordinate of the linked `Atom`. @@ -525,21 +588,10 @@ def __setitem__(self, idx, value): self._atom.xyz[:] = self._atom.lattice.fractional(self) return - - def __array_wrap__(self, out_arr, context=None): - """ - Ensure math operations on this type yield standard numpy array. - """ + 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) - # Python 2 Compatibility ------------------------------------------------- - - if six.PY2: - - def __setslice__(self, lo, hi, sequence): - self.__setitem__(slice(lo, hi), sequence) - return - - # ------------------------------------------------------------------------ # End of _AtomCartesianCoordinates diff --git a/src/diffpy/structure/expansion/__init__.py b/src/diffpy/structure/expansion/__init__.py index a00e7fcf..8e6d02c1 100644 --- a/src/diffpy/structure/expansion/__init__.py +++ b/src/diffpy/structure/expansion/__init__.py @@ -12,12 +12,10 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""Methods and classes for manipulating Structure instances. +"""Methods and classes for manipulating `Structure` instances. Package content: - -supercell -- create a supercell from an existing Structure. + * supercell -- create a supercell from an existing `Structure`. """ # Import below whatever should be available at package namespace. diff --git a/src/diffpy/structure/expansion/makeellipsoid.py b/src/diffpy/structure/expansion/makeellipsoid.py index 9b22b69b..217b1dd3 100644 --- a/src/diffpy/structure/expansion/makeellipsoid.py +++ b/src/diffpy/structure/expansion/makeellipsoid.py @@ -12,42 +12,95 @@ # 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 findCenter +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 makeSphere(S, radius): - """Create a spherical nanoparticle. - Arguments - S -- A Structure instance - radius -- primary equatorial radius (along x-axis) +def make_sphere(S, radius): + """Create a spherical nanoparticle. - Returns a new structure instance + Parameters + ---------- + S : Structure + A `Structure` instance. + radius : float + Primary equatorial radius (along x-axis). + + Returns + ------- + Structure + A new `Structure` instance. """ - return makeEllipsoid(S, radius) + return make_ellipsoid(S, radius) +@deprecated(makeEllipsoid_deprecation_msg) def makeEllipsoid(S, a, b=None, c=None): - """Cut a structure out of another one. - - Arguments - S -- A Structure instance - a -- primary equatorial radius (along x-axis) - b -- secondary equatorial radius (along y-axis). If b is None - (default) then it is set equal to a - c -- polar radius (along z-axis). If c is None (default), then it is - set equal to a. + """This function has been deprecated and will be removed in version + 4.0.0. - Returns a new structure instance + 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 + 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 @@ -56,11 +109,12 @@ def makeEllipsoid(S, a, b=None, c=None): 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 = findCenter(newS) + ncenter = find_center(newS) cxyz = lat.cartesian(newS[ncenter].xyz) @@ -72,8 +126,8 @@ def makeEllipsoid(S, a, b=None, c=None): # 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 + 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: @@ -84,24 +138,26 @@ def makeEllipsoid(S, a, b=None, c=None): return newS + # ---------------------------------------------------------------------------- if __name__ == "__main__": import os.path + datadir = "../../tests/testdata" S = Structure() S.read(os.path.join(datadir, "CdSe_bulk.stru"), "pdffit") - newS = makeEllipsoid(S, 12) + newS = make_ellipsoid(S, 12) newS.write("CdSe_d24.stru", "pdffit") - newS = makeEllipsoid(S, 20, 10, 10) + newS = make_ellipsoid(S, 20, 10, 10) newS.write("CdSe_a20_b10_c10.stru", "pdffit") - newS = makeEllipsoid(S, 20, 15, 10) + 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 = makeEllipsoid(S, 10) + newS = make_ellipsoid(S, 10) newS.write("Ni_d20.stru", "pdffit") - newS = makeEllipsoid(S, 20, 4) + newS = make_ellipsoid(S, 20, 4) newS.write("Ni_a20_b4_c20.stru", "pdffit") - newS = makeEllipsoid(S, 20, 15, 10) + 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 index 6638ee77..0b1de0c0 100644 --- a/src/diffpy/structure/expansion/shapeutils.py +++ b/src/diffpy/structure/expansion/shapeutils.py @@ -12,19 +12,47 @@ # 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): - """Find the approximate center atom of a structure. + """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)``. - 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 atom. + Returns + ------- + int + The index of the center `Atom`. """ best = -1 bestd = len(S) - center = [0.5, 0.5, 0.5] # the cannonical center + center = [0.5, 0.5, 0.5] # the canonical center for i in range(len(S)): d = S.lattice.dist(S[i].xyz, center) diff --git a/src/diffpy/structure/expansion/supercell_mod.py b/src/diffpy/structure/expansion/supercell_mod.py index aa71a8fe..bcaceb70 100644 --- a/src/diffpy/structure/expansion/supercell_mod.py +++ b/src/diffpy/structure/expansion/supercell_mod.py @@ -12,28 +12,40 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""This module contains functions for simple structure manipulation. -""" +"""This module contains functions for simple `Structure` +manipulation.""" import numpy -from diffpy.structure import Structure, Atom + +from diffpy.structure import Atom, Structure def supercell(S, mno): - """Perform supercell expansion for a structure. + """Perform supercell expansion for a `Structure`. - New lattice parameters are multiplied and fractional coordinates - divided by corresponding multiplier. New atoms are grouped with + New `lattice` parameters are multiplied and fractional coordinates + divided by corresponding multiplier. New `Atoms` are grouped with their source in the original cell. - S -- an instance of Structure from diffpy.structure. - mno -- sequence of 3 integers for cell multipliers along - the a, b and c axes. + 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. - Return a new expanded structure instance. - Raise TypeError when S is not Structure instance. - Raise ValueError for invalid mno argument. + 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: @@ -55,10 +67,7 @@ def supercell(S, mno): 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])] + 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) @@ -67,16 +76,14 @@ def supercell(S, mno): for a in S: for ijk in ijklist: adup = Atom(a) - adup.xyz = (a.xyz + ijk)/mnofloats + 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.setLatPar( - a=mno[0]*S.lattice.a, - b=mno[1]*S.lattice.b, - c=mno[2]*S.lattice.c ) + 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 index e18e9fc0..bdef059a 100644 --- a/src/diffpy/structure/lattice.py +++ b/src/diffpy/structure/lattice.py @@ -12,53 +12,109 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Class Lattice stores properties and provides simple operations in +lattice coordinate system. -"""class Lattice stores properties and provides simple operations in lattice -coordinate system. - -Module variables: - cartesian -- constant instance of Lattice, default Cartesian system +Attributes +---------- +cartesian : Lattice + Constant instance of Lattice, default Cartesian system. """ import math + import numpy import numpy.linalg as numalg -from diffpy.structure import LatticeError + +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 + 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). + """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)) + if rv is None: + rv = math.cos(math.radians(x)) return rv def sind(x): - """Return the sine of x (measured in degrees). + """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. + """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 : 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*. @@ -70,59 +126,59 @@ class Lattice(object): 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 + 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 + base : array_like, Optional + The 3x3 array of row base vectors. This must be the only argument when present. Attributes ---------- - metrics : ndarray + metrics : numpy.ndarray The metrics tensor. - base : ndarray + base : numpy.ndarray The 3x3 matrix of row base vectors in Cartesian coordinates, which may be rotated, i.e., ``base = stdbase @ baserot``. - stdbase : ndarray + stdbase : numpy.ndarray The 3x3 matrix of row base vectors in standard orientation. - baserot : ndarray + baserot : numpy.ndarray The rotation matrix for the `base`. - recbase : ndarray + recbase : numpy.ndarray The inverse of the `base` matrix, where the columns give reciprocal vectors in Cartesian coordinates. - normbase : ndarray + normbase : numpy.ndarray The `base` vectors scaled by magnitudes of reciprocal cell lengths. - recnormbase : ndarray + recnormbase : numpy.ndarray The inverse of the `normbase` matrix. - isotropicunit : ndarray + isotropicunit : numpy.ndarray The 3x3 tensor for a unit isotropic displacement parameters in this - coordinate system. This is an identity matrix when this Lattice + coordinate system. This is an identity matrix when this Lattice is orthonormal. Note ---- - The array attributes are read-only. They get updated by changing + 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:: + Create a Cartesian coordinate system: >>> Lattice() - Create coordinate system with the cell lengths ``a``, ``b``, ``c`` - and cell angles ``alpha``, ``beta``, ``gamma`` in degrees:: + 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``:: + Create a duplicate of an existing Lattice `lat`: >>> Lattice(lat) Create coordinate system with the base vectors given by rows - of the ``abc`` matrix:: + of the `abc` matrix: >>> Lattice(base=abc) """ @@ -132,110 +188,147 @@ class Lattice(object): # properties ------------------------------------------------------------- - a = property(lambda self: self._a, - lambda self, value: self.setLatPar(a=value), - doc='The unit cell length *a*.') - - b = property(lambda self: self._b, - lambda self, value: self.setLatPar(b=value), - doc='The unit cell length *b*.') - - c = property(lambda self: self._c, - lambda self, value: self.setLatPar(c=value), - doc='The unit cell length *c*.') - - alpha = property(lambda self: self._alpha, - lambda self, value: self.setLatPar(alpha=value), - doc='The cell angle *alpha* in degrees.') - - beta = property(lambda self: self._beta, - lambda self, value: self.setLatPar(beta=value), - doc='The cell angle *beta* in degrees.') - - gamma = property(lambda self: self._gamma, - lambda self, value: self.setLatPar(gamma=value), - doc='The cell angle *gamma* in degrees.') + 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. - ''' + """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) + 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.') + 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.') + 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.') + 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.') + 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.') + 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') + 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') + 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*.') + 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*.') + 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*.') + 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*.') + 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*.') + 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*.') + 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*.') + 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*.') + 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*.') + 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*.') + sar = property(lambda self: self._sar, doc="The sine of the reciprocal angle *alpha*.") - sbr = property(lambda self: self._sbr, - doc='flot: Sine of the reciprocal angle *beta*.') + 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*.') + 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): + 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)) + 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 @@ -252,12 +345,12 @@ def __init__(self, a=None, b=None, c=None, # work out argument variants # Lattice() if not argset: - self.setLatPar(1.0, 1.0, 1.0, 90.0, 90.0, 90.0, baserot) + 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.setLatBase(base) + self.set_new_latt_base_vec(base) # Lattice(lat) elif isinstance(a, Lattice): if len(argset) > 1: @@ -265,34 +358,41 @@ def __init__(self, a=None, b=None, c=None, self.__dict__.update(a.__dict__) # otherwise do default Lattice(a, b, c, alpha, beta, gamma) else: - abcabg = ('a', 'b', 'c', 'alpha', 'beta', 'gamma') + abcabg = ("a", "b", "c", "alpha", "beta", "gamma") if not argset.issuperset(abcabg): raise ValueError("Provide all 6 cell parameters.") - self.setLatPar(a, b, c, alpha, beta, gamma, baserot=baserot) + self.set_latt_parms(a, b, c, alpha, beta, gamma, baserot=baserot) return - - def setLatPar(self, a=None, b=None, c=None, - alpha=None, beta=None, gamma=None, baserot=None): + 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 + a : float, Optional The new value of the cell length *a*. - b : float, optional + b : float, Optional The new value of the cell length *b*. - c : float, optional + c : float, Optional The new value of the cell length *c*. - alpha : float, optional + alpha : float, Optional The new value of the cell angle *alpha* in degrees. - beta : float, optional + beta : float, Optional The new value of the cell angle *beta* in degrees. - gamma : float, optional + gamma : float, Optional The new value of the cell angle *gamma* in degrees. - baserot : array_like, optional + baserot : array_like, Optional The new 3x3 rotation matrix of the base vectors with respect to their standard setting in Cartesian coordinates. @@ -301,13 +401,20 @@ def setLatPar(self, a=None, b=None, c=None, 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) + 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) @@ -317,30 +424,36 @@ def setLatPar(self, a=None, b=None, c=None, # 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._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 ) + 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 ) + 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) @@ -350,12 +463,38 @@ def setLatPar(self, a=None, b=None, c=None, 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 + new base. The `stdbase`, `baserot`, and `metrics` attributes are also updated. Parameters @@ -372,12 +511,12 @@ def setLatBase(self, base): 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._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) @@ -387,12 +526,12 @@ def setLatBase(self, base): # 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._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) @@ -400,12 +539,15 @@ def setLatBase(self, base): 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.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 @@ -413,26 +555,39 @@ def setLatBase(self, base): 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) + 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 @@ -441,7 +596,6 @@ def reciprocal(self): rv = Lattice(base=numpy.transpose(self.recbase)) return rv - def cartesian(self, u): """Transform lattice vector to Cartesian coordinates. @@ -453,13 +607,12 @@ def cartesian(self, u): Returns ------- - rc : ndarray + 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. @@ -471,13 +624,12 @@ def fractional(self, rc): Returns ------- - u : ndarray + 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. @@ -491,13 +643,12 @@ def dot(self, u, v): Returns ------- - float or ndarray + 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. @@ -508,12 +659,11 @@ def norm(self, xyz): Returns ------- - float or ndarray + 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)) - + return numpy.sqrt((self.cartesian(xyz) ** 2).sum(axis=-1)) def rnorm(self, hkl): """Calculate norm of a reciprocal vector. @@ -525,13 +675,12 @@ def rnorm(self, hkl): Returns ------- - float or ndarray + 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. @@ -539,7 +688,7 @@ def dist(self, u, v): ---------- u : array_like A vector or an Nx3 matrix of fractional coordinates. - v : ndarray + v : numpy.ndarray A vector or an Nx3 matrix of fractional coordinates. Note @@ -548,13 +697,12 @@ def dist(self, u, v): Returns ------- - float or ndarray + 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. @@ -570,7 +718,7 @@ def angle(self, u, v): float The angle between lattice vectors *u* and *v* in degrees. """ - ca = self.dot(u, v)/( self.norm(u)*self.norm(v) ) + 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) @@ -581,7 +729,6 @@ def angle(self, u, v): rv = numpy.degrees(numpy.arccos(ca)) return rv - def isanisotropic(self, umx): """True if displacement parameter matrix is anisotropic. @@ -605,38 +752,37 @@ def isanisotropic(self, umx): rv = udmax > self._epsilon return rv - def __repr__(self): - """String representation of this lattice. - """ + """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]) + 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() + 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 : ndarray + recnormbase : numpy.ndarray The inverse of normalized base vectors of some lattice. Returns ------- - ndarray + numpy.ndarray The 3x3 matrix of displacement parameters corresponding to a unit isotropic displacements. """ @@ -647,6 +793,7 @@ def _isotropicunit(recnormbase): isounit[2, 2] = 1 return isounit + # Module Constants ----------------------------------------------------------- cartesian = Lattice() diff --git a/src/diffpy/structure/mmlibspacegroups.py b/src/diffpy/structure/mmlibspacegroups.py index ef2c97bd..c3507f92 100644 --- a/src/diffpy/structure/mmlibspacegroups.py +++ b/src/diffpy/structure/mmlibspacegroups.py @@ -1,7332 +1,7905 @@ #!/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 SpaceGroup, SymOp +# 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_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, -) - -## spacegroup definitions + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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), + 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)]) + 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)]) + 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), + 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)]) + 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)]) + 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), + 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)]) + 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), + 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_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_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_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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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_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_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)]) + 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)]) + 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), + 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_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_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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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), + 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)]) + 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), + 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)]) + 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), + 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_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)]) + 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), + 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_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)]) + 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), + 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_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)]) + 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), + 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_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)]) + 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), + 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_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)]) + 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), + 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_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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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)]) + 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 + 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, @@ -7592,4 +8165,5 @@ sg1023, sg1059, sg1094, - sg1197] + sg1197, +] diff --git a/src/diffpy/structure/parsers/__init__.py b/src/diffpy/structure/parsers/__init__.py index 00b0479b..124b91a7 100644 --- a/src/diffpy/structure/parsers/__init__.py +++ b/src/diffpy/structure/parsers/__init__.py @@ -12,61 +12,123 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Conversion plugins for various structure formats. -"""Conversion plugins for various structure formats - -The recognized structure formats are defined by subclassing StructureParser, -by convention these classes are named P_. The parser classes should -to override the parseLines() and toLines() methods of StructureParser. -Any structure parser needs to be registered in parser_index module. +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 + * 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 import StructureFormatError -from diffpy.structure.parsers.structureparser import StructureParser 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. - kw -- keyword arguments passed to the Parser init function. + 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 exception when format is not defined. + 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'] + pmod = parser_index[format]["module"] ns = {} - import_cmd = 'from diffpy.structure.parsers import %s as pm' % pmod + import_cmd = "from diffpy.structure.parsers import %s as pm" % pmod exec(import_cmd, ns) - return ns['pm'].getParser(**kw) + return ns["pm"].get_parser(**kw) +@deprecated(inputFormats_deprecation_msg) def inputFormats(): - """Return list of implemented input structure formats""" - input_formats = [ fmt for fmt, prop in parser_index.items() - if prop['has_input'] ] + """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(): - """return list of implemented output structure formats""" - output_formats = [ fmt for fmt, prop in parser_index.items() - if prop['has_output'] ] + """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 index 523cbf66..a0683d58 100644 --- a/src/diffpy/structure/parsers/p_auto.py +++ b/src/diffpy/structure/parsers/p_auto.py @@ -12,22 +12,53 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Parser for automatic file format detection. -"""Parser for automatic file format detection - -This Parser does not provide the the toLines() method. +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, +) -from diffpy.structure import StructureFormatError -from diffpy.structure.parsers import StructureParser -from diffpy.structure.parsers import parser_index class P_auto(StructureParser): """Parser with automatic detection of structure format. - When successful, it sets its format attribute to detected - 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): @@ -37,74 +68,152 @@ def __init__(self, **kw): return # parseLines helpers - def _getOrderedFormats(self): + def _get_ordered_formats(self): """Build a list of relevance ordered structure formats. - This only works when self.filename has a known extension. + + This only works when `self.filename` has a known extension. """ - from diffpy.structure.parsers import inputFormats - ofmts = [fmt for fmt in inputFormats() if fmt != 'auto'] - if not self.filename: return ofmts + 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)] + 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): - """Detect format and create Structure instance from a list of lines. - Set format attribute to the detected file format. + """This function has been deprecated and will be removed in + version 4.0.0. - Return Structure object or raise StructureFormatError exception. + Please use diffpy.structure.P_auto.parse_lines instead. """ - return self._wrapParseMethod("parseLines", lines) + return self.parse_lines(lines) + def parse_lines(self, lines): + """Detect format and create `Structure` instance from a list of + lines. - def parse(self, s): - """Detect format and create Structure instance from a string. Set format attribute to the detected file format. - Return Structure object or raise StructureFormatError exception. + Parameters + ---------- + lines : list + List of lines with structure data. + + Returns + ------- + Structure + `Structure` object. + + Raises + ------ + StructureFormatError """ - return self._wrapParseMethod('parse', s) + 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): - '''Detect format and create Structure instance from an existing file. + """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. - filename -- path to structure file + Parameters + ---------- + filename : str + Path to structure file. + + Returns + ------- + Structure + `Structure` object. - Return Structure object. - Raise StructureFormatError or IOError. - ''' + Raises + ------ + StructureFormatError + If the structure format is unknown or invalid. + IOError + If the file cannot be read. + """ self.filename = filename - return self._wrapParseMethod("parseFile", 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. - def _wrapParseMethod(self, method, *args, **kwargs): - """A helper evaluator method. Try the specified parse method with - each registered structure parser and return the first successful - resul. Structure parsers that match structure file extension are + Structure parsers that match structure file extension are tried first. - Set format attribute to the detected file format. - Return Structure instance, or raise StructureFormatError. + 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 getParser - ofmts = self._getOrderedFormats() + 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 = getParser(fmt, **self.pkw) + p = get_parser(fmt, **self.pkw) try: pmethod = getattr(p, method) stru = pmethod(*args, **kwargs) @@ -115,16 +224,53 @@ def _wrapParseMethod(self, method, *args, **kwargs): except NotImplementedError: pass if stru is None: - emsg = "\n".join([ - "Unknown or invalid structure format.", - "Errors per each tested structure format:"] + parsers_emsgs) + 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 index 32c101bf..1dc39d7c 100644 --- a/src/diffpy/structure/parsers/p_cif.py +++ b/src/diffpy/structure/parsers/p_cif.py @@ -12,51 +12,98 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""Parser for basic CIF file format - -http://www.iucr.org/iucr-top/cif/home.html +"""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 sys +import io import re +import sys from contextlib import contextmanager + import numpy -import six +from CifFile.yapps3_compiled_rt import YappsSyntaxError -from diffpy.structure import Structure, Lattice, Atom -from diffpy.structure import StructureFormatError +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. - - Data members: - - format -- structure format name - ciffile -- instance of CifFile from PyCifRW - stru -- Structure instance used for cif input or output - - Data members used for input only: - - spacegroup -- instance of SpaceGroup used for symmetry expansion - eps -- resolution in fractional coordinates for non-equal - positions. Use for expansion of asymmetric unit. - eau -- instance of ExpandAsymmetricUnit from SymmetryUtilities - asymmetric_unit -- list of atom instances for the original asymmetric - unit in the CIF file - labelindex -- dictionary mapping unique atom label to index of atom - in self.asymmetric_unit - anisotropy -- dictionary mapping unique atom label to displacement - anisotropy resolved at that site - 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. + 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 ------------------------------------------------ @@ -64,42 +111,52 @@ class P_cif(StructureParser): # 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', - )) + # 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) + 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): @@ -107,133 +164,158 @@ def _tr_atom_site_label(a, 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[+-])?') + _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): + 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): + _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) + + _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): + 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): + _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): + _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): + _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): + _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): + _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): + _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): + _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): + _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): + _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): + _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): + _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) + _tr_atom_site_aniso_b_23 = staticmethod(_tr_atom_site_aniso_b_23) def _get_atom_setters(cifloop): - """Find translators of CifLoop items to data in Atom instance. - Static method. + """Static method for finding translators of CifLoop items to + data in `Atom` instance. - cifloop -- instance of CifLoop + Parameters + ---------- + cifloop : CifLoop + Instance of `CifLoop`. - Return a list of setter functions in the order of cifloop.keys(). + 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') + 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): - """Initialize the parser for CIF structure files. - - eps -- fractional coordinates cutoff for duplicate positions. - When None use the default for ExpandAsymmetricUnit. - """ StructureParser.__init__(self) self.format = "cif" self.ciffile = None @@ -247,60 +329,109 @@ def __init__(self, eps=None): self.cif_sgname = None pass - def parse(self, s): - """Create Structure instance from a string in CIF format. + """Create `Structure` instance from a string in CIF format. + + Parameters + ---------- + s : str + A string in CIF format. + + Returns + ------- + Structure + `Structure` instance. - Return Structure instance or raise StructureFormatError. + Raises + ------ + StructureFormatError + When the data do not constitute a valid CIF format. """ self.ciffile = None - self.filename = '' - fp = six.StringIO(s) - rv = self._parseCifDataSource(fp) + 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. - lines -- list of strings stripped of line terminator + Parameters + ---------- + lines : list + List of strings stripped of line terminator. - Return Structure instance or raise StructureFormatError. + Returns + ------- + Structure + `Structure` instance. + + Raises + ------ + StructureFormatError + When the data do not constitute a valid CIF format. """ - s = "\n".join(lines) + '\n' + 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. - filename -- path to structure file + Parameters + ---------- + filename : str + Path to structure file. + + Returns + ------- + Structure + `Structure` instance. - Return Structure object. - Raise StructureFormatError or IOError. + 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._parseCifDataSource(filename) + rv = self._parse_cif_data_source(filename) # all good here return rv - - def _parseCifDataSource(self, datasource): - """\ - Open and process CIF data from the specified `datasource`. - + 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 + 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. + The `Structure` object loaded from the specified data source. Raises ------ @@ -308,35 +439,37 @@ def _parseCifDataSource(self, datasource): When the data do not constitute a valid CIF format. """ from CifFile import CifFile, StarError + self.stru = None try: - with _suppressCifParserOutput(): + 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') + self.ciffile = CifFile(datasource, grammar="auto") for blockname in self.ciffile.keys(): - self._parseCifBlock(blockname) + self._parse_cif_block(blockname) # stop after reading the first structure if self.stru is not None: break - except (StarError, ValueError, IndexError) as err: + except (YappsSyntaxError, StarError, ValueError, IndexError) as err: exc_type, exc_value, exc_traceback = sys.exc_info() emsg = str(err).strip() e = StructureFormatError(emsg) - six.reraise(StructureFormatError, e, exc_traceback) + 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`. - def _parseCifBlock(self, blockname): - """Translate CIF file block, skip blocks without _atom_site_label. - Updates data members stru, eau. - - blockname -- name of top level block in self.ciffile - - No return value. + Parameters + ---------- + blockname : str + Name of top level block in `self.ciffile`. """ block = self.ciffile[blockname] - if '_atom_site_label' not in block: return + if "_atom_site_label" not in block: + return # here block contains structure, initialize output data self.stru = Structure() self.labelindex.clear() @@ -348,116 +481,130 @@ def _parseCifBlock(self, blockname): 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.lattice. + """Obtain `lattice` parameters from a `CifBlock`. - block -- instance of CifBlock + This method updates `self.stru.lattic`e. - No return value. + Parameters + ---------- + block : CifBlock + Instance of CifBlock. """ - if '_cell_length_a' not in block: return + 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']), + 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) - six.reraise(StructureFormatError, e, exc_traceback) + 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. + """Obtain atoms in asymmetric unit from a `CifBlock`. - block -- instance of CifBlock + This method inserts `Atom` instances to `self.stru` and + updates `labelindex` dictionary. - No return value. + 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) + 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') + 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 == '?': + if curlabel == "?": continue self.labelindex[curlabel] = len(self.stru) - self.stru.addNewAtom() - a = self.stru.getLastAtom() + 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. + """Obtain value of anisotropic thermal displacements from a + `CifBlock`. - block -- instance of CifBlock + This method updates `U` members of `Atom` instances in `self.stru`. + The `labelindex` dictionary has to be defined beforehand. - No return value. + Parameters + ---------- + block : CifBlock + Instance of `CifBlock`. """ - if '_atom_site_aniso_label' not in block: return + if "_atom_site_aniso_label" not in block: + return # something to do here: - adp_loop = block.GetLoop('_atom_site_aniso_label') + adp_loop = block.GetLoop("_atom_site_aniso_label") # index of the _atom_site_label column - ilb = adp_loop.keys().index('_atom_site_aniso_label') + 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 == '?': + if lb == "?": break idx = self.labelindex[lb] a = self.stru[idx] - if not lb in self.anisotropy: + 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. + """Process symmetry operations from a CifBlock. - block -- instance of 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`. - No return value. + Parameters + ---------- + block : CifBlock + Instance of `CifBlock`. """ - from diffpy.structure.spacegroups import IsSpaceGroupIdentifier - from diffpy.structure.spacegroups import SpaceGroup, GetSpaceGroup - from diffpy.structure.spacegroups import FindSpaceGroup + 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_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 = [] @@ -466,50 +613,50 @@ def _parse_space_group_symop_operation_xyz(self, block): sym_loop_name = sym_loop_name[0] sym_loop = block.GetLoop(sym_loop_name) for eqxyz in sym_loop[sym_loop_name]: - opcif = getSymOp(eqxyz) + 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('_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) + 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 = FindSpaceGroup(symop_list) + 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 IsSpaceGroupIdentifier(sgid): - self.spacegroup = GetSpaceGroup(sgid) + 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_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() + 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) + 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._expandAsymmetricUnit(block) + self._expand_asymmetric_unit(block) return + def _expand_asymmetric_unit(self, block): + """Perform symmetry expansion of `self.stru` using + `self.spacegroup`. - def _expandAsymmetricUnit(self, block): - """Perform symmetry expansion of self.stru using self.spacegroup. - - This method updates data in stru and eau. + This method updates data in `stru` and `eau`. Parameters ---------- @@ -517,25 +664,25 @@ def _expandAsymmetricUnit(self, block): 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) + 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 not ca.label in self.anisotropy: + 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 + 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) + a.label += "_" + str(j + 1) if a.anisotropy: a.U = self.eau.expandedUijs[i][j] eca.append(a) @@ -546,96 +693,155 @@ def _expandAsymmetricUnit(self, block): # conversion to CIF ------------------------------------------------------ + @deprecated(toLines_deprecation_msg) def toLines(self, stru): - """Convert Structure stru to a list of lines in basic CIF format. + """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. - Return list of strings. + 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 ]) + 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"), - "" ]) + 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), - "" ]) + 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)): + 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" ]) + 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 ) + 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" ] + 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" ]) + 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] ) + 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+)?') +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. + """Extract the first float from a string and ignore trailing + characters. Useful for extracting values from "value(std)" syntax. @@ -643,7 +849,7 @@ def leading_float(s, d=0.0): ---------- s : str The string to be scanned for floating point value. - d : float, optional + d : float, Optional The default value when `s` is "." or "?", which in CIF format stands for inapplicable and unknown, respectively. @@ -661,7 +867,7 @@ def leading_float(s, d=0.0): mx = rx_float.match(sbare) if mx: rv = float(mx.group()) - elif sbare == '.' or sbare == '?': + elif sbare == "." or sbare == "?": # CIF files may contain "." or "?" for unknown values rv = d else: @@ -671,58 +877,97 @@ def leading_float(s, d=0.0): # 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), + "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'] +symvec["+x"] = symvec["x"] +symvec["+y"] = symvec["y"] +symvec["+z"] = symvec["z"] + +@deprecated(getSymOp_deprecation_msg) def getSymOp(s): - """Create SpaceGroups.SymOp instance from a string. + """This function has been deprecated and will be removed in version + 4.0.0. - s -- formula for equivalent coordinates, for example 'x,1/2-y,1/2+z' + Please use diffpy.structure.get_symop instead. + """ + return get_symop(s) + + +def get_symop(s): + """Create `SpaceGroups.SymOp` instance from a string. - Return instance of SymOp. + 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) + + 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]) + eqparts = re.split("(?i)([+-]?[xyz])", eqlist[i]) for Rpart in eqparts[1::2]: - R[i,:] += symvec[Rpart.lower()] + R[i, :] += symvec[Rpart.lower()] for tpart in eqparts[::2]: - t[i] += eval('1.0*%s+0' % tpart) + 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): - """Return new parser object for CIF structure format. + """This function has been deprecated and will be removed in version + 4.0.0. - eps -- fractional coordinates cutoff for duplicate positions. - When None use the default for ExpandAsymmetricUnit. + 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 _suppressCifParserOutput(): - """\ - Context manager which suppresses diagnostic messages from CIF parser. - """ +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 + yapps3_compiled_rt.print_error = lambda *a, **kw: None try: yield print_error finally: diff --git a/src/diffpy/structure/parsers/p_discus.py b/src/diffpy/structure/parsers/p_discus.py index d0334736..3e77b55f 100644 --- a/src/diffpy/structure/parsers/p_discus.py +++ b/src/diffpy/structure/parsers/p_discus.py @@ -12,21 +12,54 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""Parser for DISCUS structure format -""" +"""Parser for DISCUS structure format.""" import sys from functools import reduce -import six -from diffpy.structure import PDFFitStructure, Lattice -from diffpy.structure import StructureFormatError +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. + """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): @@ -42,32 +75,47 @@ def __init__(self): self.ncell_read = False return - + @deprecated(parseLines_deprecation_msg) def parseLines(self, lines): """Parse list of lines in DISCUS format. - Return PDFFitStructure instance or raise StructureFormatError. + 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._linesIterator() + 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, + "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 + 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 @@ -76,35 +124,129 @@ def parseLines(self, lines): raise StructureFormatError(emsg) # parse atoms for self.line in ilines: - words = self.line.replace(',', ' ').split() - if not words or words[0][0] == '#': continue + 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']) + 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)) + 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]: + 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:] + superlatpars = [latpars[i] * self.stru.pdffit["ncell"][i] for i in range(3)] + latpars[3:] superlattice = Lattice(*superlatpars) - self.stru.placeInLattice(superlattice) - self.stru.pdffit['ncell'] = [1, 1, 1, exp_natoms] + 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) - six.reraise(StructureFormatError, e, exc_traceback) + 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): - """Convert Structure stru to a list of lines in DISCUS format. - Return list of strings. + """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 @@ -118,29 +260,34 @@ def toLines(self, stru): # 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("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'] + 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" ) + 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)) + 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 _linesIterator(self): - """Iterator over self.lines, which increments self.nl - """ + 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() == "": + while stop > 0 and self.lines[stop - 1].strip() == "": stop -= 1 self.nl = 0 # read header of PDFFit file @@ -149,105 +296,148 @@ def _linesIterator(self): yield self.line pass - def _parse_cell(self, words): - """Process the cell record from DISCUS structure file. - """ + """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] ] + words = self.line.replace(",", " ").split() + latpars = [float(w) for w in words[1:7]] try: - self.stru.lattice.setLatPar(*latpars) + self.stru.lattice.set_latt_parms(*latpars) except ZeroDivisionError: - emsg = "%d: Invalid lattice parameters - zero cell volume" % \ - self.nl + 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': + """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. - """ + """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] ] + 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:]) + """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. - """ + """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(',', ' ') + 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]) + 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 + 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. - """ + """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.addNewAtom(element, xyz) - a = self.stru.getLastAtom() + 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 - Raises StructureFormatError. + + 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. - Raises NotImplementedError. + + 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]) + 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 index 6e325ded..98bc4b74 100644 --- a/src/diffpy/structure/parsers/p_pdb.py +++ b/src/diffpy/structure/parsers/p_pdb.py @@ -12,59 +12,165 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - """Basic parser for PDB structure format. -References - - http://www.wwpdb.org/documentation/format23/v2.3.html - http://www.wwpdb.org/documentation/format30/index.html +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 six + import numpy from numpy import pi from diffpy.structure import Structure -from diffpy.structure import StructureFormatError 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 - Static data members: + The parser understands following PDB records: `TITLE, CRYST1, SCALE1, + SCALE2, SCALE3, ATOM, SIGATM, ANISOU, SIGUIJ, TER, HETATM, END`. - orderOfRecords -- order of PDB record labels - validRecords -- dictionary of valid PDB records + 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", + "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", ] - validRecords = dict.fromkeys(orderOfRecords) + """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. - Return Structure instance or raise StructureFormatError. + Parameters + ---------- + lines : list of str + List of lines in PDB format. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + Invalid PDB record. """ try: stru = Structure() @@ -74,7 +180,8 @@ def parseLines(self, lines): for line in lines: p_nl += 1 # skip blank lines - if not line.strip(): continue + if not line.strip(): + continue # make sure line has 80 characters if len(line) < 80: line = "%-80s" % line @@ -93,26 +200,25 @@ def parseLines(self, lines): alpha = float(line[33:40]) beta = float(line[40:47]) gamma = float(line[47:54]) - stru.lattice.setLatPar(a, b, c, alpha, beta, gamma) + 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()] + 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()] + 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()] + 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.setLatBase(base) + stru.lattice.set_new_latt_base_vec(base) abcABGscale = numpy.array(stru.lattice.abcABG()) - reldiff = numpy.fabs(1.0 - abcABGscale/abcABGcryst) + 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." + 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." @@ -126,7 +232,7 @@ def parseLines(self, lines): occupancy = 1.0 try: B = float(line[60:66]) - uiso = B/(8*pi**2) + uiso = B / (8 * pi**2) except ValueError: uiso = 0.0 element = line[76:78].strip() @@ -134,9 +240,8 @@ def parseLines(self, lines): # get element from the first 2 characters of name element = line[12:14].strip() element = element[0].upper() + element[1:].lower() - stru.addNewAtom(element, - occupancy=occupancy, label=name) - last_atom = stru.getLastAtom() + 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": @@ -148,28 +253,28 @@ def parseLines(self, lines): sigo = 0.0 try: sigB = float(line[60:66]) - sigU = numpy.identity(3)*sigB/(8*pi**2) + sigU = numpy.identity(3) * sigB / (8 * pi**2) except ValueError: - sigU = numpy.zeros((3,3), dtype=float) + 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() ] + 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] + 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() ] + 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] + 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: @@ -179,132 +284,237 @@ def parseLines(self, lines): emsg = "%d: invalid PDB record" % p_nl exc_type, exc_value, exc_traceback = sys.exc_info() e = StructureFormatError(emsg) - six.reraise(StructureFormatError, e, exc_traceback) + raise e.with_traceback(exc_traceback) return stru - + @deprecated(titleLines_deprecation_msg) def titleLines(self, stru): - """build lines corresponding to TITLE record""" + """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 + 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]) ) + 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""" + """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 ) + 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 ) + 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 - """ + """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" : "" } + 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)) + 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] ])) ) + 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) + 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) ) + 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) + 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] ])) ) + 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): - """Convert Structure stru to a list of lines in PDFFit format. + """This function has been deprecated and will be removed in + version 4.0.0. - Return list of strings. + 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.titleLines(stru) ) - lines.extend( self.cryst1Lines(stru) ) + lines.extend(self.title_lines(stru)) + lines.extend(self.cryst1_lines(stru)) for idx in range(len(stru)): - lines.extend( self.atomLines(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.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 index 0ef532d2..2347f3ff 100644 --- a/src/diffpy/structure/parsers/p_pdffit.py +++ b/src/diffpy/structure/parsers/p_pdffit.py @@ -12,23 +12,39 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""Parser for PDFfit structure format -""" +"""Parser for PDFfit structure format.""" import sys +from functools import reduce + import numpy -import six -from diffpy.structure import PDFFitStructure, Lattice -from diffpy.structure import StructureFormatError +from diffpy.structure import Lattice, PDFFitStructure from diffpy.structure.parsers import StructureParser -from functools import reduce +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. - stru -- Structure instance used for cif input or output + 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): @@ -38,11 +54,32 @@ def __init__(self): 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. - Return Structure object or raise StructureFormatError. + 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: @@ -50,75 +87,75 @@ def parseLines(self, lines): stru = self.stru cell_line_read = False stop = len(lines) - while stop>0 and lines[stop-1].strip() == "": + while stop > 0 and lines[stop - 1].strip() == "": stop -= 1 ilines = iter(lines[:stop]) # read header of PDFFit file - for l in ilines: + for line in ilines: p_nl += 1 - words = l.split() - if len(words) == 0 or words[0][0] == '#': + words = line.split() + if len(words) == 0 or words[0][0] == "#": continue - elif words[0] == 'title': - stru.title = l.lstrip()[5:].strip() - elif words[0] == 'scale': - stru.pdffit['scale'] = float(words[1]) - elif words[0] == 'sharp': - l1 = l.replace(',', ' ') - sharp_pars = [ float(w) for w in l1.split()[1:] ] + 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] + 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 = l.find(key) + len(key) - value = l[start:].strip() - stru.pdffit['spcgr'] = value - elif words[0] == 'shape': - self._parse_shape(l) - elif words[0] == 'cell': + 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 = l.replace(',', ' ') - latpars = [ float(w) for w in l1.split()[1:7] ] + l1 = line.replace(",", " ") + latpars = [float(w) for w in l1.split()[1:7]] stru.lattice = Lattice(*latpars) - elif words[0] == 'dcell': - l1 = l.replace(',', ' ') - stru.pdffit['dcell'] = [ float(w) for w in l1.split()[1:7] ] - elif words[0] == 'ncell': - l1 = l.replace(',', ' ') - stru.pdffit['ncell'] = [ int(w) for w in l1.split()[1:5] ] - elif words[0] == 'format': - if words[1] != 'pdffit': + 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: + elif words[0] == "atoms" and cell_line_read: break else: - self.ignored_lines.append(l) + 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']) + p_natoms = reduce(lambda x, y: x * y, stru.pdffit["ncell"]) # we are now inside data block - for l in ilines: + for line in ilines: p_nl += 1 - wl1 = l.split() + wl1 = line.split() element = wl1[0][0].upper() + wl1[0][1:].lower() - xyz = [ float(w) for w in wl1[1:4] ] + xyz = [float(w) for w in wl1[1:4]] occ = float(wl1[4]) - stru.addNewAtom(element, xyz=xyz, occupancy=occ) - a = stru.getLastAtom() + 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.sigxyz = [float(w) for w in wl2[0:3]] a.sigo = float(wl2[3]) p_nl += 1 wl3 = next(ilines).split() @@ -128,44 +165,58 @@ def parseLines(self, lines): 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]) + 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:] + 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.placeInLattice(superlattice) - stru.pdffit['ncell'] = [1, 1, 1, p_natoms] + 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) - six.reraise(StructureFormatError, e, exc_traceback) + raise e.with_traceback(exc_traceback) return stru - def toLines(self, stru): - """Convert Structure stru to a list of lines in PDFfit format. + """This function has been deprecated and will be removed in + version 4.0.0. - Return list of strings. + 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 @@ -176,75 +227,110 @@ def toLines(self, stru): # default values of standard deviations d_sigxyz = numpy.zeros(3, dtype=float) d_sigo = 0.0 - d_sigU = numpy.zeros((3,3), dtype=float) + d_sigU = numpy.zeros((3, 3), dtype=float) # here we can start - l = "title " + stru.title - lines.append( l.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'] + 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'] + 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" ) + 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) ) + 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 ) + 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 + """Process shape line from PDFfit file and update self.stru. - line -- line containing data for particle shape correction + Parameters + ---------- + line : str + Line containing data for particle shape correction. - No return value. - Raise StructureFormatError for invalid record. + Raises + ------ + StructureFormatError + Invalid type of particle shape correction. """ - line_nocommas = line.replace(',', ' ') + line_nocommas = line.replace(",", " ") words = line_nocommas.split() - assert words[0] == 'shape' + 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]) + 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 + 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 index f82221c0..2a8332b8 100644 --- a/src/diffpy/structure/parsers/p_rawxyz.py +++ b/src/diffpy/structure/parsers/p_rawxyz.py @@ -12,35 +12,78 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Parser for raw XYZ file format. -"""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. +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 -import six from diffpy.structure import Structure -from diffpy.structure import StructureFormatError -from diffpy.structure.utils import isfloat 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""" + """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. - Return Structure object or raise StructureFormatError. + Parameters + ---------- + lines : list of str + List of lines in RAWXYZ format. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + Invalid RAWXYZ format. """ - linefields = [l.split() for l in lines] + linefields = [line.split() for line in lines] # prepare output structure stru = Structure() # find first valid record @@ -52,18 +95,17 @@ def parseLines(self, lines): break # find the last valid record stop = len(lines) - while stop > start and len(linefields[stop-1]) == 0: + 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] ] + 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)) + 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) @@ -75,31 +117,46 @@ def parseLines(self, lines): # now try to read all record lines try: p_nl = start - for fields in linefields[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 + 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] ] + xyz = [float(f) for f in fields[x_idx : x_idx + 3]] if len(xyz) == 2: xyz.append(0.0) - stru.addNewAtom(element, xyz=xyz) + 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) - six.reraise(StructureFormatError, e, exc_traceback) + raise e.with_traceback(exc_traceback) return stru - + @deprecated(toLines_deprecation_msg) def toLines(self, stru): - """Convert Structure stru to a list of lines in XYZ format. + """This function has been deprecated and will be removed in + version 4.0.0. - Return list of strings. + 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: @@ -108,9 +165,36 @@ def toLines(self, stru): 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 new file mode 100644 index 00000000..1be850c0 --- /dev/null +++ b/src/diffpy/structure/parsers/p_vesta.py @@ -0,0 +1,370 @@ +#!/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 index c2467004..e94605c6 100644 --- a/src/diffpy/structure/parsers/p_xcfg.py +++ b/src/diffpy/structure/parsers/p_xcfg.py @@ -12,18 +12,24 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Parser for extended CFG format used by atomeye. -"""Parser for extended CFG format used by atomeye""" +Attributes +---------- +AtomicMass : dict + Dictionary of atomic masses for elements. +""" -import sys import re +import sys + import numpy -import six from diffpy.structure import Structure -from diffpy.structure import StructureFormatError -from diffpy.structure.utils import isfloat 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 ------------------------------------------------------------------ @@ -31,146 +37,187 @@ # 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 + "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. - cluster_boundary -- width of boundary around corners of non-periodic - cluster to avoid PBC effects in atomeye + 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): - """Parse list of lines in PDB format. + """This function has been deprecated and will be removed in + version 4.0.0. - Return Structure object or raise StructureFormatError. + 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_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 @@ -191,12 +238,11 @@ def parseLines(self, lines): p_nl += 1 stripped_line = line.strip() # blank lines and lines starting with # are ignored - if stripped_line == "" or line[0] == '#': + 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 + 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 @@ -204,8 +250,8 @@ def parseLines(self, lines): 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 + 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: @@ -213,30 +259,26 @@ def parseLines(self, lines): 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] + p_auxiliary[idx] = line[m.end() :].split(None, 1)[0] else: break # check header for consistency - if numpy.any(xcfg_H0_set == False): + 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 + p_auxnum = len(p_auxiliary) and max(p_auxiliary.keys()) + 1 for i in range(p_auxnum): - if not i in p_auxiliary: + 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 ] - } + 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 + emsg = ("%d: auxiliary fields are " "not consistent with entry_count") % p_nl raise StructureFormatError(emsg) # define proper lattice - stru.lattice.setLatBase(xcfg_H0) + stru.lattice.set_new_latt_base_vec(xcfg_H0) # here we are inside the data block p_element = None for line in ilines: @@ -252,10 +294,14 @@ def parseLines(self, lines): 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.addNewAtom(p_element, xyz=xyz) + stru.add_new_atom(p_element, xyz=xyz) a = stru[-1] - _assign_auxiliaries(a, fields, auxiliaries=p_auxiliary, - no_velocity=xcfg_NO_VELOCITY) + _assign_auxiliaries( + a, + fields, + auxiliaries=p_auxiliary, + no_velocity=xcfg_NO_VELOCITY, + ) else: emsg = "%d: invalid record" % p_nl raise StructureFormatError(emsg) @@ -266,14 +312,36 @@ def parseLines(self, lines): emsg = "%d: file is not in XCFG format" % p_nl exc_type, exc_value, exc_traceback = sys.exc_info() e = StructureFormatError(emsg) - six.reraise(StructureFormatError, e, exc_traceback) + raise e.with_traceback(exc_traceback) return stru - + @deprecated(toLines_deprecation_msg) def toLines(self, stru): - """Convert Structure stru to a list of lines in XCFG atomeye format. + """This function has been deprecated and will be removed in + version 4.0.0. - Return list of strings. + 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" @@ -284,29 +352,28 @@ def toLines(self, stru): 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.abcABG(), (1, 1, 1, 90, 90, 90)): + 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: + 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 + 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])) + 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 + if len(stru) == 0: + return lines a_first = stru[0] p_NO_VELOCITY = "v" not in a_first.__dict__ if p_NO_VELOCITY: @@ -315,14 +382,13 @@ def toLines(self, stru): # 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'] ] + 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')) + 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 @@ -331,26 +397,24 @@ def toLines(self, stru): 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)): + 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]')) + p_auxiliaries.append(("Uiso", "uflat[0]")) else: - p_auxiliaries.extend([('U11', 'uflat[0]'), - ('U22', 'uflat[4]'), - ('U33', 'uflat[8]')]) + 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]')) + 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) @@ -361,8 +425,8 @@ def toLines(self, stru): 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) + fmwords += (("{" + e + ":.8g}") for p, e in p_auxiliaries) + efmt = " ".join(fmwords) # we are ready to output atoms: lines.append("") p_element = None @@ -378,23 +442,52 @@ def toLines(self, stru): 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): - """\ - Assing auxiliary properties for Atom object when reading CFG format. + """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. + 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 @@ -403,8 +496,6 @@ def _assign_auxiliaries(a, fields, auxiliaries, no_velocity): no_velocity : bool When `False` set atom velocity `a.v` to `fields[3:6]`. Use `fields[3:6]` for auxiliary values otherwise. - - No return value. """ if not no_velocity: a.v = numpy.asarray(fields[3:6], dtype=float) @@ -415,9 +506,8 @@ def _assign_auxiliaries(a, fields, auxiliaries, no_velocity): 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]) + 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: diff --git a/src/diffpy/structure/parsers/p_xyz.py b/src/diffpy/structure/parsers/p_xyz.py index ea33af83..60c8dd8a 100644 --- a/src/diffpy/structure/parsers/p_xyz.py +++ b/src/diffpy/structure/parsers/p_xyz.py @@ -12,22 +12,43 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Parser for XYZ file format, where. -"""Parser for XYZ file format, where -first line gives number of atoms -second one has optional title -remaining lines contain element, x, y, z +* First line gives number of atoms. +* Second line has optional title. +* Remaining lines contain element, `x, y, z`. """ import sys -import six from diffpy.structure import Structure -from diffpy.structure import StructureFormatError 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): @@ -35,13 +56,34 @@ def __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. - Return Structure object or raise StructureFormatError. + Parameters + ---------- + lines : list of str + List of lines in XYZ format. + + Returns + ------- + Structure + Parsed structure instance. + + Raises + ------ + StructureFormatError + Invalid XYZ format. """ - linefields = [l.split() for l in lines] + linefields = [line.split() for line in lines] # prepare output structure stru = Structure() # find first valid record @@ -57,21 +99,19 @@ def parseLines(self, lines): w1 = linefields[start][0] if len(lfs) == 1 and str(int(w1)) == w1: p_natoms = int(w1) - stru.title = lines[start+1].strip() + stru.title = lines[start + 1].strip() start += 2 else: - emsg = ("%d: invalid XYZ format, missing number of atoms" % - (start + 1)) + 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)) + emsg = "%d: invalid XYZ format, missing number of atoms" % (start + 1) e = StructureFormatError(emsg) - six.reraise(StructureFormatError, e, exc_traceback) + raise e.with_traceback(exc_traceback) # find the last valid record stop = len(lines) - while stop > start and len(linefields[stop-1]) == 0: + while stop > start and len(linefields[stop - 1]) == 0: stop -= 1 # get out for empty structure if p_natoms == 0 or start >= stop: @@ -84,47 +124,89 @@ def parseLines(self, lines): # now try to read all record lines try: p_nl = start - for fields in linefields[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 + 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.addNewAtom(element, xyz=xyz) + 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) - six.reraise(StructureFormatError, e, exc_traceback) + 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. - Return list of strings. + 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 ) + 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 index e8462d9e..5f8c3ec7 100644 --- a/src/diffpy/structure/parsers/parser_index_mod.py +++ b/src/diffpy/structure/parsers/parser_index_mod.py @@ -12,83 +12,96 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - """Index of recognized structure formats, their IO capabilities and -associated modules where they are defined. Plugins for new structure -formats need to be added to the parser_index dictionary in this module. +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, - }, - + "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, - }, - + "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, - }, - + "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, - }, - + "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, - }, - + "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, - }, - + "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, - }, - + "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, - }, + "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 index 43326637..270fbb32 100644 --- a/src/diffpy/structure/parsers/structureparser.py +++ b/src/diffpy/structure/parsers/structureparser.py @@ -12,16 +12,41 @@ # 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, +) -"""Definition of StructureParser, a base class for specific parsers. -""" class StructureParser(object): """Base class for all structure parsers. - Data members: - format -- format of particular parser - filename -- path to structure file that is read or written + Attributes + ---------- + format : str + Format name of particular parser. + filename : str + Path to structure file that is read or written. """ def __init__(self): @@ -29,56 +54,75 @@ def __init__(self): 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("parseLines not defined for '%s' format" % self.format) + raise NotImplementedError("parse lines not defined for '%s' format" % self.format) return - + @deprecated(toLines_deprecation_msg) def toLines(self, stru): - """Convert Structure stru to a list of lines. - This method has to be overloaded in derived class. + """This function has been deprecated and will be removed in + version 4.0.0. - Return list of strings. + Please use diffpy.structure.StructureParser.to_lines instead. """ - raise NotImplementedError("toLines not defined for '%s' format" % self.format) + return self.to_lines(stru) + def to_lines(self, stru): + """Convert Structure stru to a list of lines. - def parse(self, s): - """Create Structure instance from a string. + Return list of strings. - Return Structure object or raise StructureFormatError exception. + Note + ---- + This method has to be overloaded in derived class. """ - lines = s.rstrip('\r\n').split('\n') + 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.toLines(stru) - s = '\n'.join(lines) + '\n' + """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): - """Create Structure instance from an existing file. - - filename -- path to structure file + """This function has been deprecated and will be removed in + version 4.0.0. - Return Structure object. - Raise StructureFormatError or IOError. + 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 index afafc314..2ee1f7ac 100644 --- a/src/diffpy/structure/pdffitstructure.py +++ b/src/diffpy/structure/pdffitstructure.py @@ -12,65 +12,116 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""definition of PDFFitStructure class derived from Structure -""" +"""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 + """PDFFitStructure --> Structure with extra pdffit member. - Data members: - pdffit -- dictionary for storing following extra parameters from - PDFFit structure files: - 'scale', 'delta1', 'delta2', 'sratio', - 'rcut', 'spcgr', 'dcell', 'ncell' + 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], + "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. - def read(self, filename, format='auto'): - """Same as Structure.read, but update spcgr value in - self.pdffit when parser can get spacegroup. + 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 instance of StructureParser used to load the data. - See Structure.read() for more info. + 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 + 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. - def readStr(self, s, format='auto'): - """Same as Structure.readStr, but update spcgr value in - self.pdffit when parser can get spacegroup. + 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. - Return instance of StructureParser used to load the data. - 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.readStr(self, s, format) - sg = getattr(p, 'spacegroup', None) - if sg: self.pdffit['spcgr'] = sg.short_name + 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 index 1cf198ff..30aacfcf 100644 --- a/src/diffpy/structure/sgtbxspacegroups.py +++ b/src/diffpy/structure/sgtbxspacegroups.py @@ -12,690 +12,707 @@ # 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. -'''Extra space group representations generated using sgtbx module from cctbx. -Import of this module extends the SpaceGroupList in the SpaceGroups module. -Notable variables: +Attributes +---------- +sgtbxSpaceGroupList : list + List of space group instances defined in this module. +""" -sgtbxSpaceGroupList -- list of space group instances defined in this module -''' - -from diffpy.structure.spacegroupmod import SpaceGroup, SymOp from diffpy.structure.spacegroupmod import ( - 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, - 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, + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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), @@ -704,18 +721,18 @@ 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 = [ + 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), @@ -724,18 +741,18 @@ 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 = [ + 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), @@ -744,18 +761,18 @@ 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 = [ + 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), @@ -764,18 +781,18 @@ 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 = [ + 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), @@ -784,18 +801,18 @@ 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 = [ + 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), @@ -804,18 +821,18 @@ 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 = [ + 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), @@ -824,242 +841,242 @@ 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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), @@ -1068,18 +1085,18 @@ 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 = [ + 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), @@ -1088,18 +1105,18 @@ 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 = [ + 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), @@ -1108,18 +1125,18 @@ 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 = [ + 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), @@ -1128,18 +1145,18 @@ 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 = [ + 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), @@ -1148,18 +1165,18 @@ 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 = [ + 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), @@ -1168,18 +1185,18 @@ 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 = [ + 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), @@ -1188,18 +1205,18 @@ 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 = [ + 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), @@ -1208,18 +1225,18 @@ 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 = [ + 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), @@ -1228,18 +1245,18 @@ 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 = [ + 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), @@ -1248,18 +1265,18 @@ 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 = [ + 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), @@ -1268,18 +1285,18 @@ 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 = [ + 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), @@ -1288,18 +1305,18 @@ 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 = [ + 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), @@ -1308,18 +1325,18 @@ 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 = [ + 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), @@ -1328,18 +1345,18 @@ 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 = [ + 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), @@ -1348,18 +1365,18 @@ 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 = [ + 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), @@ -1368,18 +1385,18 @@ 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 = [ + 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), @@ -1388,18 +1405,18 @@ 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 = [ + 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), @@ -1408,18 +1425,18 @@ 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 = [ + 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), @@ -1428,18 +1445,18 @@ 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 = [ + 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), @@ -1448,626 +1465,626 @@ 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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 = [ + 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), @@ -2076,18 +2093,18 @@ 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 = [ + 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), @@ -2096,18 +2113,18 @@ 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 = [ + 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), @@ -2116,18 +2133,18 @@ 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 = [ + 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), @@ -2136,18 +2153,18 @@ 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 = [ + 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), @@ -2156,18 +2173,18 @@ 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 = [ + 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), @@ -2176,18 +2193,18 @@ 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 = [ + 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), @@ -2196,18 +2213,18 @@ 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 = [ + 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), @@ -2216,18 +2233,18 @@ 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 = [ + 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), @@ -2236,18 +2253,18 @@ 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 = [ + 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), @@ -2256,18 +2273,18 @@ 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 = [ + 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), @@ -2276,18 +2293,18 @@ 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 = [ + 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), @@ -2296,18 +2313,18 @@ 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 = [ + 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), @@ -2316,18 +2333,18 @@ 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 = [ + 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), @@ -2336,18 +2353,18 @@ 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 = [ + 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), @@ -2356,18 +2373,18 @@ 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 = [ + 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), @@ -2376,18 +2393,18 @@ 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 = [ + 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), @@ -2396,18 +2413,18 @@ 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 = [ + 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), @@ -2416,18 +2433,18 @@ 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 = [ + 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), @@ -2436,18 +2453,18 @@ 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 = [ + 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), @@ -2456,18 +2473,18 @@ 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 = [ + 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), @@ -2476,18 +2493,18 @@ 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 = [ + 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), @@ -2496,18 +2513,18 @@ 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 = [ + 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), @@ -2516,18 +2533,18 @@ 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 = [ + 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), @@ -2536,18 +2553,18 @@ 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 = [ + 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), @@ -2556,18 +2573,18 @@ 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 = [ + 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), @@ -2576,18 +2593,18 @@ 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 = [ + 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), @@ -2596,18 +2613,18 @@ 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 = [ + 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), @@ -2616,18 +2633,18 @@ 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 = [ + 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), @@ -2636,18 +2653,18 @@ 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 = [ + 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), @@ -2664,18 +2681,18 @@ 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 = [ + 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), @@ -2692,18 +2709,18 @@ 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 = [ + 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), @@ -2720,18 +2737,18 @@ 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 = [ + 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), @@ -2748,18 +2765,18 @@ 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 = [ + 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), @@ -2768,18 +2785,18 @@ 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 = [ + 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), @@ -2788,18 +2805,18 @@ 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 = [ + 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), @@ -2808,18 +2825,18 @@ 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 = [ + 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), @@ -2828,18 +2845,18 @@ 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 = [ + 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), @@ -2848,18 +2865,18 @@ 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 = [ + 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), @@ -2868,18 +2885,18 @@ 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 = [ + 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), @@ -2888,18 +2905,18 @@ 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 = [ + 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), @@ -2908,18 +2925,18 @@ 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 = [ + 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), @@ -2928,18 +2945,18 @@ 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 = [ + 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), @@ -2948,18 +2965,18 @@ 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 = [ + 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), @@ -2968,18 +2985,18 @@ 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 = [ + 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), @@ -2988,18 +3005,18 @@ 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 = [ + 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), @@ -3008,18 +3025,18 @@ 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 = [ + 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), @@ -3028,18 +3045,18 @@ 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 = [ + 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), @@ -3048,18 +3065,18 @@ 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 = [ + 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), @@ -3068,18 +3085,18 @@ 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 = [ + 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), @@ -3088,18 +3105,18 @@ 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 = [ + 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), @@ -3108,18 +3125,18 @@ 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 = [ + 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), @@ -3128,18 +3145,18 @@ 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 = [ + 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), @@ -3148,18 +3165,18 @@ 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 = [ + 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), @@ -3168,18 +3185,18 @@ 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 = [ + 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), @@ -3188,18 +3205,18 @@ 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 = [ + 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), @@ -3208,18 +3225,18 @@ 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 = [ + 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), @@ -3228,18 +3245,18 @@ 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 = [ + 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), @@ -3248,18 +3265,18 @@ 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 = [ + 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), @@ -3268,18 +3285,18 @@ 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 = [ + 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), @@ -3288,18 +3305,18 @@ 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 = [ + 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), @@ -3308,18 +3325,18 @@ 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 = [ + 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), @@ -3328,18 +3345,18 @@ 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 = [ + 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), @@ -3348,18 +3365,18 @@ 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 = [ + 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), @@ -3368,18 +3385,18 @@ 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 = [ + 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), @@ -3388,18 +3405,18 @@ 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 = [ + 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), @@ -3408,18 +3425,18 @@ 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 = [ + 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), @@ -3428,18 +3445,18 @@ 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 = [ + 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), @@ -3448,18 +3465,18 @@ 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 = [ + 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), @@ -3468,18 +3485,18 @@ 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 = [ + 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), @@ -3488,18 +3505,18 @@ 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 = [ + 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), @@ -3508,18 +3525,18 @@ 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 = [ + 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), @@ -3528,18 +3545,18 @@ 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 = [ + 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), @@ -3548,18 +3565,18 @@ 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 = [ + 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), @@ -3568,18 +3585,18 @@ 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 = [ + 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), @@ -3588,18 +3605,18 @@ 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 = [ + 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), @@ -3608,18 +3625,18 @@ 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 = [ + 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), @@ -3628,18 +3645,18 @@ 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 = [ + 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), @@ -3648,18 +3665,18 @@ 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 = [ + 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), @@ -3668,18 +3685,18 @@ 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 = [ + 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), @@ -3688,18 +3705,18 @@ 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 = [ + 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), @@ -3708,18 +3725,18 @@ 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 = [ + 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), @@ -3728,18 +3745,18 @@ 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 = [ + 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), @@ -3748,18 +3765,18 @@ 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 = [ + 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), @@ -3768,18 +3785,18 @@ 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 = [ + 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), @@ -3788,18 +3805,18 @@ 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 = [ + 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), @@ -3808,18 +3825,18 @@ 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 = [ + 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), @@ -3828,18 +3845,18 @@ 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 = [ + 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), @@ -3848,18 +3865,18 @@ 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 = [ + 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), @@ -3868,18 +3885,18 @@ 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 = [ + 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), @@ -3888,18 +3905,18 @@ 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 = [ + 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), @@ -3908,18 +3925,18 @@ 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 = [ + 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), @@ -3928,18 +3945,18 @@ 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 = [ + 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), @@ -3948,18 +3965,18 @@ 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 = [ + 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), @@ -3968,18 +3985,18 @@ 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 = [ + 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), @@ -3996,18 +4013,18 @@ 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 = [ + 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), @@ -4024,18 +4041,18 @@ 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 = [ + 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), @@ -4052,18 +4069,18 @@ 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 = [ + 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), @@ -4080,18 +4097,18 @@ 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 = [ + 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), @@ -4108,18 +4125,18 @@ 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 = [ + 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), @@ -4136,18 +4153,18 @@ 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 = [ + 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), @@ -4164,18 +4181,18 @@ 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 = [ + 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), @@ -4192,18 +4209,18 @@ 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 = [ + 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), @@ -4220,18 +4237,18 @@ 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 = [ + 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), @@ -4248,18 +4265,18 @@ 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 = [ + 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), @@ -4276,18 +4293,18 @@ 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 = [ + 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), @@ -4304,18 +4321,18 @@ 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 = [ + 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), @@ -4332,18 +4349,18 @@ 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 = [ + 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), @@ -4360,18 +4377,18 @@ 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 = [ + 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), @@ -4388,18 +4405,18 @@ 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 = [ + 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), @@ -4416,18 +4433,18 @@ 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 = [ + 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), @@ -4444,18 +4461,18 @@ 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 = [ + 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), @@ -4472,18 +4489,18 @@ 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 = [ + 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), @@ -4500,18 +4517,18 @@ 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 = [ + 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), @@ -4528,18 +4545,18 @@ 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 = [ + 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), @@ -4556,18 +4573,18 @@ 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 = [ + 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), @@ -4584,18 +4601,18 @@ 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 = [ + 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), @@ -4612,18 +4629,18 @@ 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 = [ + 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), @@ -4640,18 +4657,18 @@ 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 = [ + 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), @@ -4668,18 +4685,18 @@ 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 = [ + 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), @@ -4696,18 +4713,18 @@ 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 = [ + 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), @@ -4724,18 +4741,18 @@ 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 = [ + 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), @@ -4752,18 +4769,18 @@ 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 = [ + 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), @@ -4780,18 +4797,18 @@ 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 = [ + 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), @@ -4808,18 +4825,18 @@ 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 = [ + 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), @@ -4836,18 +4853,18 @@ 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 = [ + 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), @@ -4864,18 +4881,18 @@ 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 = [ + 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), @@ -4892,18 +4909,18 @@ 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 = [ + 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), @@ -4920,7 +4937,7 @@ 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), - ] + ], ) ############################################################################## @@ -4929,36 +4946,253 @@ # 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, + 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 index 2b2a31d8..2403d32f 100644 --- a/src/diffpy/structure/spacegroupmod.py +++ b/src/diffpy/structure/spacegroupmod.py @@ -1,134 +1,132 @@ #!/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. -""" +# 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 matricies -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) +# 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 transformation of coordinates to a symmetry-related position. The SymOp operation involves rotation and translation in cell coordinates. Parameters ---------- - R : ndarray + R : numpy.ndarray The 3x3 matrix of rotation for this symmetry operation. - t : ndarray + t : numpy.ndarray The vector of translation in this symmetry operation. Attributes ---------- - R : ndarray + 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 : ndarray + or inversion. The determinant of *R* is either +1 or -1. + t : numpy.ndarray The translation of cell coordinates applied after rotation *R*. """ @@ -137,44 +135,52 @@ def __init__(self, R, t): 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]) + """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]) + 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]) + 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. + """Return symmetry-related position for the specified + coordinates. Parameters ---------- - vec : ndarray + vec : numpy.ndarray The initial position in fractional cell coordinates. Returns ------- - ndarray + 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. + """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. @@ -184,10 +190,10 @@ def is_identity(self): ``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))) + rv = numpy.allclose(self.R, numpy.identity(3, float)) and numpy.allclose(self.t, numpy.zeros(3, float)) return rv + # End of class SymOp @@ -219,9 +225,9 @@ class SpaceGroup(object): Attributes ---------- number : int - A unique space group number. This may be incremented by + 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`` + settings of the same space group. Use ``number % 1000`` to get the standard space group number from International Tables. num_sym_equiv : int @@ -233,7 +239,7 @@ class SpaceGroup(object): 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 + The crystal system of this space group. The possible values are ``"TRICLINIC", "MONOCLINIC", "ORTHORHOMBIC", "TETRAGONAL", "TRIGONAL" "HEXAGONAL", "CUBIC"``. pdb_name : str @@ -243,31 +249,30 @@ class SpaceGroup(object): 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 + 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 + 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" - ) % ( + 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(), @@ -275,18 +280,16 @@ def __repr__(self): self.num_primitive_sym_equiv, ) - def iter_symops(self): """Iterate over all symmetry operations in the space group. Yields ------ - `SymOp` + 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. @@ -303,15 +306,19 @@ def check_group_name(self, name): 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 + 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. + """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. @@ -320,12 +327,12 @@ def iter_equivalent_positions(self, vec): Parameters ---------- - vec : ndarray + vec : numpy.ndarray The initial position in fractional coordinates. Yields ------ - ndarray + numpy.ndarray The symmetry equivalent positions in fractional coordinates. The positions may be duplicate or outside of the ``0 <= x < 1`` unit cell bounds. @@ -334,4 +341,5 @@ def iter_equivalent_positions(self, vec): yield symop(vec) pass + # End of class SpaceGroup diff --git a/src/diffpy/structure/spacegroups.py b/src/diffpy/structure/spacegroups.py index 7f4b0748..8b6fb8c5 100644 --- a/src/diffpy/structure/spacegroups.py +++ b/src/diffpy/structure/spacegroups.py @@ -12,40 +12,710 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Space group classes and definitions from mmLib and sgtbx. -'''Space group classes and definitions from mmLib and sgtbx. -''' +Attributes +---------- +SpaceGroupList : list + List of all spacegroup definitions. +""" -import six +import copy +from itertools import zip_longest -from diffpy.structure.spacegroupmod import SymOp, SpaceGroup -from diffpy.structure.mmlibspacegroups import mmLibSpaceGroupList -from diffpy.structure.sgtbxspacegroups import sgtbxSpaceGroupList +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, +) -# all spacegroup definitions 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. - sgid -- space group symbol, either short_name or pdb_name, - whatever it means in mmlib. Can be also an integer. + 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. - Return space group instance. - Raise ValueError when not found. + Raises + ------ + ValueError + When the identifier is not found. """ if not _sg_lookup_table: - _buildSGLookupTable() + _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, six.string_types): + if not isinstance(sgid, str): raise ValueError(emsg) sgbare = sgid.strip() # short_name case adjusted - sgkey = sgbare.replace(' ', '') + sgkey = sgbare.replace(" ", "") sgkey = sgkey[:1].upper() + sgkey[1:].lower() if sgkey in _sg_lookup_table: return _sg_lookup_table[sgkey] @@ -57,10 +727,25 @@ def GetSpaceGroup(sgid): raise ValueError(emsg) +@deprecated(IsSpaceGroupIdentifier_deprecation_msg) def IsSpaceGroupIdentifier(sgid): - """Check if identifier can be used as an argument to GetSpaceGroup. + """Check if identifier can be used as an argument to + `GetSpaceGroup`. + + Returns + ------- + bool + """ + return is_space_group_identifier(sgid) - Return bool. + +def is_space_group_identifier(sgid): + """Check if identifier can be used as an argument to + `GetSpaceGroup`. + + Returns + ------- + bool """ try: GetSpaceGroup(sgid) @@ -70,22 +755,32 @@ def IsSpaceGroupIdentifier(sgid): 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 + shuffle : bool, Optional Flag for allowing different order of symops in the returned - SpaceGroup. The default is ``False``. + SpaceGroup. The default is ``False``. Returns ------- SpaceGroup The SpaceGroup object with equivalent list of symmetry - operations. Return predefined SpaceGroup instance when + operations. Return predefined SpaceGroup instance when symmetry operations have the same order or when the `shuffle` flag is set. @@ -94,15 +789,14 @@ def FindSpaceGroup(symops, shuffle=False): ValueError When `symops` do not match any known SpaceGroup. """ - import copy - from six.moves import zip_longest - tb = _getSGHashLookupTable() - hh = _hashSymOpList(symops) - if not hh in tb: - raise ValueError('Cannot find SpaceGroup for the specified symops.') + + 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='') + 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) @@ -110,7 +804,17 @@ def FindSpaceGroup(symops, shuffle=False): 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. @@ -130,11 +834,10 @@ def _hashSymOpList(symops): return rv -def _buildSGLookupTable(): - """Rebuild space group lookup table from the SpaceGroupList data. +def _build_sg_lookup_table(): + """Rebuild space group lookup table from the `SpaceGroupList` data. - This routine updates the global _sg_lookup_table dictionary. - No return value. + This routine updates the global `_sg_lookup_table` dictionary. """ _sg_lookup_table.clear() for sg in SpaceGroupList: @@ -145,236 +848,664 @@ def _buildSGLookupTable(): # 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'), + ("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(' ', '') + hmbare = hm.replace(" ", "") _sg_lookup_table.setdefault(a, _sg_lookup_table[hmbare]) # make sure None does not sneak into the dictionary - assert not None in _sg_lookup_table + assert None not in _sg_lookup_table return + + _sg_lookup_table = {} -def _getSGHashLookupTable(): - """Return lookup table of symop hashes to standard SpaceGroup objects. - """ +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 = _hashSymOpList(sg.symop_list) + h = _hash_symop_list(sg.symop_list) _sg_hash_lookup_table[h] = sg assert len(_sg_hash_lookup_table) == len(SpaceGroupList) - return _getSGHashLookupTable() -_sg_hash_lookup_table = {} - -# Import SpaceGroup objects -------------------------------------------------- + return _get_sg_hash_lookup_table() -from diffpy.structure.spacegroupmod import ( - 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, -) -from diffpy.structure.mmlibspacegroups import ( - 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, -) - -from diffpy.structure.sgtbxspacegroups import ( - 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, -) +_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, -)) +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 index bfec639e..a33f4643 100644 --- a/src/diffpy/structure/structure.py +++ b/src/diffpy/structure/structure.py @@ -12,70 +12,127 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""This module defines class Structure. -""" +"""This module defines class `Structure`.""" import copy as copymod +import warnings + import numpy -import codecs -import six -from diffpy.structure.lattice import Lattice from diffpy.structure.atom import Atom -from diffpy.structure.utils import _linkAtomAttribute, atomBareSymbol -from diffpy.structure.utils import isiterable +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 # ---------------------------------------------------------------------------- -class Structure(list): - """Structure --> group of atoms +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, +) - 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. - Data members: - title -- structure description - lattice -- coordinate system (instance of Lattice) - pdffit -- None or a dictionary of PDFFit-related metadata +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`.""" - title = '' _lattice = None pdffit = None + """None: default values for `pdffit`.""" - - def __init__(self, atoms=None, lattice=None, title=None, - filename=None, format=None): - """define group of atoms in a specified lattice. - - atoms -- 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 -- instance of Lattice defining coordinate systems, property. - title -- string description of the structure - filename -- optional, name of a file to load the structure from. - Overrides atoms argument when specified. - format -- optional structure format of the loaded filename. By default - all structure formats are tried one by one. Ignored when - filename has not been specified. - - Structure(stru) create a copy of Structure instance stru. - - Because Structure is inherited from a list it can use list expansions, - for example: - oxygen_atoms = [ for a in stru if a.element == "O" ] - oxygen_stru = Structure(oxygen_atoms, lattice=stru.lattice) - """ + 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 {} + readkwargs = (format is not None) and {"format": format} or {} self.read(filename, **readkwargs) return # copy initialization, must be first to allow lattice, title override @@ -93,22 +150,24 @@ def __init__(self, atoms=None, lattice=None, title=None, self.extend(atoms) return - def copy(self): - '''Return a copy of this Structure object. - ''' + """Return a copy of this `Structure` object.""" return copymod.copy(self) - def __copy__(self, target=None): - '''Create a deep copy of this instance. - - target -- optional target instance for copying, useful for - copying a derived class. Defaults to new instance - of the same type as self. + """Create a deep copy of this instance. - Return a duplicate instance of this object. - ''' + 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: @@ -121,93 +180,296 @@ def __copy__(self, target=None): target[:] = self return target - def __str__(self): - """simple string representation""" + """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 - + 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): - """Add new Atom instance to the end of this Structure. - - All arguments are forwarded to Atom constructor. + """This function has been deprecated and will be removed in + version 4.0.0. - No return value. + Please use diffpy.structure.Structure.add_new_atom instead. """ - kwargs['lattice'] = self.lattice - a = Atom(*args, **kwargs) - self.append(a, copy=False) + 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): - """Return Reference to the last Atom in this structure. + """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. - def assignUniqueLabels(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][+-]". - - No return value. """ elnum = {} # support duplicate atom instances islabeled = set() for a in self: - if a in islabeled: continue - baresmbl = atomBareSymbol(a.element) + 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. - def distance(self, aid0, aid1): - """Distance between 2 atoms, no periodic boundary conditions. + Please use diffpy.structure.Structure.assign_unique_labels + instead. + """ + return self.assign_unique_labels() - aid0 -- zero based index of the first atom or a string label - such as "Na1" - aid1 -- zero based index or string label of the second atom. + def distance(self, aid0, aid1): + """Calculate distance between 2 `Atoms`, no periodic boundary + conditions. - Return float. - Raise IndexError for invalid arguments. + 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. - - aid0 -- zero based index of the first atom or a string label - such as "Na1" - aid1 -- index or string label for the second atom, - where the angle is formed - aid2 -- index or string label for the third atom + """The bond angle at the second of three `Atoms` in degrees. - Return float. - Raise IndexError for invalid arguments. + 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): - """place structure into new_lattice coordinate system + """This function has been deprecated and will be removed in + version 4.0.0. - sets lattice to new_lattice and recalculate fractional coordinates - of all atoms so their absolute positions remain the same + Please use diffpy.structure.Structure.place_in_lattice instead. + """ + return self.place_in_lattice(new_lattice) - return self + 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) @@ -218,22 +480,29 @@ def placeInLattice(self, new_lattice): self.lattice = new_lattice return self - - def read(self, filename, format='auto'): + def read(self, filename, format="auto"): """Load structure from a file, any original data become lost. - filename -- file to be loaded - format -- all structure formats are defined in parsers submodule, - when format == 'auto' all parsers are tried one by one - - Return instance of data Parser used to process file. This - can be inspected for information related to particular format. + 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 - getParser = diffpy.structure.parsers.getParser - p = getParser(format) - new_structure = p.parseFile(filename) + + 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) @@ -242,24 +511,41 @@ def read(self, filename, format='auto'): 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. - def readStr(self, s, format='auto'): - """Load structure from a string, any original data become lost. + Please use diffpy.structure.Structure.read_structure instead. + """ + return self.read_structure(s, format) - s -- string with structure definition - format -- all structure formats are defined in parsers submodule, - when format == 'auto' all parsers are tried one by one + def read_structure(self, s, format="auto"): + """Read structure from a string. - Return instance of data Parser used to process input string. This - can be inspected for information related to particular format. + 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 getParser - p = getParser(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 @@ -269,87 +555,109 @@ def readStr(self, s, format='auto'): self[:] = new_structure return p - def write(self, filename, format): - """Save structure to file in the specified format + """Save structure to file in the specified format. - No return value. + 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 + Note + ---- + Available structure formats can be obtained by: + + ``from parsers import formats`` """ - from diffpy.structure.parsers import getParser - p = getParser(format) + from diffpy.structure.parsers import get_parser + + p = get_parser(format) p.filename = filename s = p.tostring(self) - with codecs.open(filename, 'w', encoding='UTF-8') as fp: + with open(filename, "w", encoding="utf-8", newline="") as fp: fp.write(s) return - + @deprecated(writeStr_deprecation_msg) def writeStr(self, format): - """return string representation of the structure in specified format + """This function has been deprecated and will be removed in + version 4.0.0. - Note: available structure formats can be obtained by: - from parsers import formats + Please use diffpy.structure.Structure.write_structure instead. """ - from diffpy.structure.parsers import getParser - p = getParser(format) + 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. - ''' + """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. - - a -- instance of Atom - copy -- flag for appending a copy of a. - When False, append a and update a.lattice. + """Append `Atom` to a structure and update its `lattice` + attribute. - No return value. + 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. - - idx -- position in atom list - a -- instance of Atom - copy -- flag for inserting a copy of a. - When False, append a and update a.lattice. + """Insert `Atom` a before position idx in this `Structure`. - No return value. + 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. + """Extend `Structure` with an iterable of `atoms`. - Update the `lattice` attribute of all added 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``. + 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. """ @@ -359,42 +667,67 @@ def extend(self, atoms, copy=None): newatoms = adups else: memo = set(id(a) for a in self) - nextatom = lambda a: (a if id(a) not in memo - else copymod.copy(a)) - mark = lambda a: (memo.add(id(a)), a)[-1] + + 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 - setlat = lambda a: (setattr(a, 'lattice', self.lattice), a)[-1] + + 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. + """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. - idx -- atom identifier, which can be integer, string or iterable. - 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. + Raises + ------ + IndexError + If the index is invalid or the `Atom` label is not unique. - Return an Atom instance for integer or string index or a substructure - in all other cases. Raise IndexError for invalid index or for - non-unique atom label. + Examples + -------- + First `Atom` in the `Structure`: - Examples: + >>> stru[0] - stru[0] --> first atom in the Structure - stru[stru.element == 'Na'] --> substructure of all Na atoms - stru['Na3'] --> atom with a unique label 'Na3' - stru['Na3', 2, 'Cl2'] --> substructure of three atoms, lookup by - label is more efficient when done for several atoms at once. + 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.__emptySharedStructure() + rv = self.__empty_shared_structure() lst = super(Structure, self).__getitem__(idx) rv.extend(lst, copy=False) return rv @@ -404,10 +737,8 @@ def __getitem__(self, idx): except TypeError: pass # check if there is any string label that should be resolved - scalarstringlabel = isinstance(idx, six.string_types) - hasstringlabel = scalarstringlabel or ( - isiterable(idx) and - any(isinstance(ii, six.string_types) for ii in idx)) + 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 @@ -415,7 +746,7 @@ def __getitem__(self, idx): idx1 = numpy.r_[idx] indices = numpy.arange(len(self))[idx1] rhs = [list.__getitem__(self, i) for i in indices] - rv = self.__emptySharedStructure() + rv = self.__empty_shared_structure() rv.extend(rhs, copy=False) return rv # here we need to resolve at least one string label @@ -423,8 +754,8 @@ def __getitem__(self, idx): duplicate = object() labeltoindex = {} for i, a in enumerate(self): - labeltoindex[a.label] = ( - duplicate if a.label in labeltoindex else i) + labeltoindex[a.label] = duplicate if a.label in labeltoindex else i + def _resolveindex(aid): aid1 = aid if type(aid) is str: @@ -434,6 +765,7 @@ def _resolveindex(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) @@ -446,91 +778,123 @@ def _resolveindex(aid): rv = self[idx2] return rv - def __setitem__(self, idx, value, copy=True): - """Assign self[idx] atom to value. - - idx -- index of atom in this Structure or a slice - value -- instance of Atom or an iterable. - copy -- flag for making a copy of the value. When False, update - the `lattice` attribute of Atom objects present in value. + """Assign `self[idx]` `Atom` to value. - No return 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 assingment + # 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. + """Return new `Structure` object with appended `Atoms` from + other. - other -- sequence of Atom instances + Parameters + ---------- + other : sequence of Atom + Sequence of `Atom` instances. - Return new Structure with a copy 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. + """Extend this `Structure` with `Atoms` from other. - other -- sequence of Atom instances + Parameters + ---------- + other : sequence of Atom + Sequence of `Atom` instances. - Return self. - ''' + 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. + """Return new `Structure` that has `Atoms` from the other + removed. - other -- sequence of Atom instances + Parameters + ---------- + other : sequence of Atom + Sequence of `Atom` instances. - Return new Structure with a copy 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 not a in otherset] + 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. + """Remove other `Atoms` if present in this structure. - other -- sequence of Atom instances + Parameters + ---------- + other : sequence of Atom + Sequence of `Atom` instances. - Return self. - ''' + 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. + """Return new `Structure` with n-times concatenated `Atoms` from + self. `Atoms` and `lattice` in the new structure are all copies. - n -- integer multiple + Parameters + ---------- + n : int + Integer multiple. - Return new Structure. - ''' + Returns + ------- + Structure + New `Structure` with n-times concatenated `Atoms`. + """ rv = copymod.copy(self[:0]) rv += n * self.tolist() return rv @@ -538,16 +902,21 @@ def __mul__(self, n): # 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. + """Concatenate this `Structure` to n-times more `Atoms`. For + positive multiple the current `Atom` objects remain at the + beginning of this `Structure`. - n -- integer multiple + Parameters + ---------- + n : int + Integer multiple. - Return self. - ''' + Returns + ------- + Structure + Reference to this `Structure` object. + """ if n <= 0: self[:] = [] else: @@ -562,12 +931,16 @@ def _get_lattice(self): return self._lattice def _set_lattice(self, value): - for a in self: a.lattice = value + for a in self: + a.lattice = value self._lattice = value return - lattice = property(_get_lattice, _set_lattice, doc = - "Coordinate system for this Structure.") + lattice = property( + _get_lattice, + _set_lattice, + doc="Coordinate system for this `Structure`.", + ) # composition @@ -577,129 +950,169 @@ def _get_composition(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.") + composition = property( + _get_composition, + doc="Dictionary of chemical symbols and their total occupancies.", + ) # linked atom attributes - element = _linkAtomAttribute('element', - '''Character array of atom types. Assignment updates - the element attribute of the respective atoms.''', - toarray=numpy.char.array) - - xyz = _linkAtomAttribute('xyz', - '''Array of fractional coordinates of all atoms. - Assignment updates xyz attribute of all atoms.''') - - x = _linkAtomAttribute('x', - '''Array of all fractional coordinates x. - Assignment updates xyz attribute of all atoms.''') - - y = _linkAtomAttribute('y', - '''Array of all fractional coordinates y. - Assignment updates xyz attribute of all atoms.''') - - z = _linkAtomAttribute('z', - '''Array of all fractional coordinates z. - Assignment updates xyz attribute of all atoms.''') - - label = _linkAtomAttribute('label', - '''Character array of atom names. Assignment updates - the label attribute of all atoms.''', - toarray=numpy.char.array) - - occupancy = _linkAtomAttribute('occupancy', - '''Array of atom occupancies. Assignment updates the - occupancy attribute of all atoms.''') - - xyz_cartn = _linkAtomAttribute('xyz_cartn', - '''Array of absolute Cartesian coordinates of all atoms. - Assignment updates the xyz attribute of all atoms.''') - - anisotropy = _linkAtomAttribute('anisotropy', - '''Boolean array for anisotropic thermal displacement flags. - Assignment updates the anisotropy attribute of all atoms.''') - - U = _linkAtomAttribute('U', - '''Array of anisotropic thermal displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - Uisoequiv = _linkAtomAttribute('Uisoequiv', - '''Array of isotropic thermal displacement or equivalent values. - Assignment updates the U attribute of all atoms.''') - - U11 = _linkAtomAttribute('U11', - '''Array of U11 elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - U22 = _linkAtomAttribute('U22', - '''Array of U22 elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - U33 = _linkAtomAttribute('U33', - '''Array of U33 elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - U12 = _linkAtomAttribute('U12', - '''Array of U12 elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - U13 = _linkAtomAttribute('U13', - '''Array of U13 elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - U23 = _linkAtomAttribute('U23', - '''Array of U23 elements of the anisotropic displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - Bisoequiv = _linkAtomAttribute('Bisoequiv', - '''Array of Debye-Waller isotropic thermal displacement or equivalent - values. Assignment updates the U attribute of all atoms.''') - - B11 = _linkAtomAttribute('B11', - '''Array of B11 elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - B22 = _linkAtomAttribute('B22', - '''Array of B22 elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - B33 = _linkAtomAttribute('B33', - '''Array of B33 elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - B12 = _linkAtomAttribute('B12', - '''Array of B12 elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - B13 = _linkAtomAttribute('B13', - '''Array of B13 elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') - - B23 = _linkAtomAttribute('B23', - '''Array of B23 elements of the Debye-Waller displacement tensors. - Assignment updates the U and anisotropy attributes of all atoms.''') + 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 __emptySharedStructure(self): - '''Return empty Structure with standard attributes same as in self. - ''' + 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 - # Python 2 Compatibility ------------------------------------------------- - - if six.PY2: - - def __getslice__(self, lo, hi): - return self.__getitem__(slice(lo, hi)) - - def __setslice__(self, lo, hi, sequence): - self.__setitem__(slice(lo, hi), sequence) - return - - # ------------------------------------------------------------------------ # End of class Structure diff --git a/src/diffpy/structure/structure_app.py b/src/diffpy/structure/structure_app.py new file mode 100644 index 00000000..56623a58 --- /dev/null +++ b/src/diffpy/structure/structure_app.py @@ -0,0 +1,33 @@ +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 index 80fdf87d..f9a2aaec 100644 --- a/src/diffpy/structure/structureerrors.py +++ b/src/diffpy/structure/structureerrors.py @@ -12,23 +12,22 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Exceptions used in Structure package.""" -"""Exceptions used in Structure package. -""" class StructureFormatError(Exception): - """Exception for failed IO from Structure file - """ + """Exception for failed IO from Structure file.""" + pass class LatticeError(Exception): - """Exception for impossible lattice parameters. - """ + """Exception for impossible lattice parameters.""" + pass class SymmetryError(Exception): - """Exception raised for invalid symmetry operations. - """ + """Exception raised for invalid symmetry operations.""" + pass diff --git a/src/diffpy/structure/symmetryutilities.py b/src/diffpy/structure/symmetryutilities.py index dfaba6be..5e744fbd 100644 --- a/src/diffpy/structure/symmetryutilities.py +++ b/src/diffpy/structure/symmetryutilities.py @@ -12,65 +12,148 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""Symmetry utility functions such as expansion of asymmetric unit, -and generation of positional constraints. +"""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 sys 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 ------------------------------------------------------------------ -# Default tolerance for equality of 2 positions, also -# used for identification of special positions. epsilon = 1.0e-5 -# Standard symbols denoting elements of anisotropic thermal -# displacement tensor. -stdUsymbols = ['U11', 'U22', 'U33', 'U12', 'U13', 'U23'] +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. - spacegroup -- instance of SpaceGroup - a, b, c, alpha, beta, gamma -- lattice parameters + Parameters + ---------- + spacegroup : SpaceGroup + Instance of `SpaceGroup`. + a, b, c, alpha, beta, gamma : float + `Lattice` parameters. - Return bool. + 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) + return alpha == beta == gamma == 90 + def check_tetragonal(): - return (a == b and alpha == beta == gamma == 90) + 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) + 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) + return a == b and alpha == beta == 90 and gamma == 120 + def check_cubic(): - return (a == b == c and alpha == beta == gamma == 90) + 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 + "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() @@ -80,145 +163,245 @@ def check_cubic(): # 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+)?$') +_rx_constant_formula = re.compile(r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)??(/[-+]?\d+)?$") + +@deprecated(isconstantFormula_deprecation_msg) def isconstantFormula(s): - """Check if formula string is constant. True when argument - is a floating point number or a fraction of float with integer. + """'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) + - s -- formula string +def is_constant_formula(s): + """Check if formula string is constant. - Return bool. + 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(' ', '')) + 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 + """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. + Note + ---- + Helper class intended for local use only. - Data members: + Parameters + ---------- + eps : float + Cutoff for equivalent coordinates. - eps -- cutoff for equivalent coordinates. When two coordiantes map to the - same tuple, they are closer than eps. + 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): - """Initialize _Position2Tuple - eps -- cutoff for equivalent coordinates - """ + 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: + 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. - xyz -- fractional coordinates + Parameters + ---------- + xyz : Iterable + Fractional coordinates. - Return a tuple of 3 numbers. + 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] ) + 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. - xyz0, xyz1 -- fractional coordinates + Parameters + ---------- + xyz0, xyz1 : array_like + Fractional coordinates. - Return dxyz, a numpy.array dxyz with 0 <= dxyz <= 0.5. + 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) + mask = dxyz > 0.5 dxyz[mask] = 1.0 - dxyz[mask] return dxyz +@deprecated(nearestSiteIndex_deprecation_msg) def nearestSiteIndex(sites, xyz): - """Index of the nearest site to a specified position. + """'diffpy.structure.nearestSiteIndex' is deprecated and will be + removed in version 4.0.0. - sites -- list of coordinates or a 2-dimensional numpy.array - xyz -- single position + Please use 'diffpy.structure.nearest_site_index' instead. + """ + # we use box distance to be consistent with _Position2Tuple conversion + return nearest_site_index(sites, xyz) - Return integer. + +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 = positionDifference(sites, xyz).max(axis=1) + dbox = position_difference(sites, xyz).max(axis=1) nearindex = numpy.argmin(dbox) return nearindex +@deprecated(equalPositions_deprecation_msg) def equalPositions(xyz0, xyz1, eps): - """Equality of two coordinates with optional tolerance. + """'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) - xyz0, xyz1 -- fractional coordinates - eps -- tolerance for equality of coordinates - Return bool. +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 = positionDifference(xyz0, xyz1) + dxyz = position_difference(xyz0, xyz1) return numpy.all(dxyz <= eps) -def expandPosition(spacegroup, xyz, sgoffset=[0,0,0], eps=None): - """Obtain unique equivalent positions and corresponding operations. +@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) + - spacegroup -- instance of SpaceGroup - xyz -- position to be expanded - sgoffset -- offset of space group origin [0, 0, 0] - eps -- cutoff for equal positions +def expand_position(spacegroup, xyz, sgoffset=[0, 0, 0], eps=None): + """Obtain unique equivalent positions and corresponding operations. - Return a tuple with (list of unique equivalent positions, nested - list of SpaceGroups.SymOp instances, site multiplicity). + 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] + 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 not tpl in site_symops: + 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[nearestSiteIndex(positions, pos)] + nearpos = positions[nearest_site_index(positions, pos)] # is it an equivalent position? - if equalPositions(nearpos, pos, eps): + if equal_positions(nearpos, pos, eps): # tpl should map to the same list as nearpos - site_symops[tpl] = site_symops[ pos2tuple(nearpos) ] + site_symops[tpl] = site_symops[pos2tuple(nearpos)] pos_is_new = False - if pos_is_new: positions.append(pos) + 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 @@ -227,10 +410,20 @@ def expandPosition(spacegroup, xyz, sgoffset=[0,0,0], eps=None): return positions, pos_symops, multiplicity +@deprecated(nullSpace_deprecation_msg) def nullSpace(A): - """Null space of matrix 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] @@ -240,13 +433,23 @@ def nullSpace(A): return null_space -def _findInvariants(symops): +def _find_invariants(symops): """Find a list of symmetry operations which contains identity. - symops -- nested list of SymOp instances + Parameters + ---------- + symops : list of SymOp + Nested list of `SymOp` instances. - Return the list-item in symops which contains identity. - Raise ValueError when identity was not found. + Return + ------ + list + List-item in symops which contains identity. + + Raise + ----- + ValueError + When identity is not found. """ invrnts = None R0 = numpy.identity(3, dtype=float) @@ -256,59 +459,130 @@ def _findInvariants(symops): if numpy.all(op.R == R0) and numpy.all(op.t == t0): invrnts = ops break - if invrnts: 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. - Data members: - xyz -- fractional coordinates of generator site - Uij -- anisotropic thermal displacement at generator site - sgoffset -- offset of space group origin [0, 0, 0] - eps -- cutoff for equal positions - eqxyz -- list of equivalent positions - eqUij -- list of displacement matrices at equivalent positions - symops -- nested list of operations per each eqxyz - multiplicity -- generator site multiplicity - Uisotropy -- bool flag for isotropic thermal factors - invariants -- list of invariant operations for generator site - null_space -- null space of all possible differences of invariant - rotational matrices, this is a base of symmetry - allowed shifts. - Uspace -- 3D array of independent components of U matrices. - pparameters -- list of (xyz symbol, value) pairs - Uparameters -- list of (U symbol, value) pairs + 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) - idx2Usymbol = { 0 : 'U11', 1 : 'U12', 2 : 'U13', - 3 : 'U12', 4 : 'U22', 5 : 'U23', - 6 : 'U13', 7 : 'U23', 8 : 'U33' } - - def __init__(self, spacegroup, xyz, Uij=numpy.zeros((3,3)), - sgoffset=[0,0,0], eps=None): - """Initialize GeneratorSite. - - spacegroup -- instance of SpaceGroup - xyz -- generating site. When xyz is close to special - position self.xyz will be adjusted. - Uij -- thermal factors at generator site. Yields self.Uij - after adjusting to spacegroup symmetry. - sgoffset -- offset of space group origin [0, 0, 0] - eps -- cutoff for equal positions - """ + 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 @@ -328,65 +602,84 @@ def __init__(self, spacegroup, xyz, Uij=numpy.zeros((3,3)), self.Uparameters = [] # fill in the values sites, ops, mult = expandPosition(spacegroup, xyz, sgoffset, eps) - invariants = _findInvariants(ops) + 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]) + 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 = _findInvariants(ops) + 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._findNullSpace() - self._findPosParameters() - self._findUSpace() - self._findUParameters() - self._findeqUij() + 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. - def signedRatStr(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. + are not close, return `%+g` format. + + Parameters + ---------- + x : float + Floating point number. - Return string. + Return + ------ + str + Signed rational representation of `x`. """ s = "{:.8g}".format(x) - if len(s) < 6: return "%+g" % 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 + 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`. - def _findNullSpace(self): - """Calculate self.null_space from self.invariants. - Try to represent self.null_space using small integers. + Try to represent `self.null_space` using small integers. """ R0 = self.invariants[0].R - Rdiff = [ (symop.R - R0) for symop in self.invariants ] + Rdiff = [(symop.R - R0) for symop in self.invariants] Rdiff = numpy.concatenate(Rdiff, axis=0) - self.null_space = nullSpace(Rdiff) - if self.null_space.size == 0: return + 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 + cutoff = 1.0 / 32 for row in self.null_space: abrow = numpy.abs(row) sgrow = numpy.sign(row) @@ -402,104 +695,122 @@ def _findNullSpace(self): row[:] = (sgrow * abrow) / sgrow[idx] / abrow[idx] return - - def _findPosParameters(self): - """Find pparameters and their values for expressing self.xyz. - """ + 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 + varvalue = txyz[idx] / nvec[idx] + txyz = txyz - varvalue * nvec # determine standard parameter name - vname = [s for s in "xyz"[idx:] if not s in usedsymbol][0] - self.pparameters.append( (vname, varvalue) ) + vname = [s for s in "xyz"[idx:] if s not in usedsymbol][0] + self.pparameters.append((vname, varvalue)) usedsymbol[vname] = True return - - def _findUSpace(self): + def _find_u_space(self): """Find independent U components with respect to invariant - rotations. - """ + 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))) + 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 = nullSpace(R6zall) + 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 /= 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) + Usp6 /= Usp6[mxrows, mxcols].reshape(-1, 1) self.Uspace = numpy.tensordot(Usp6, self.Ucomponents, axes=(1, 0)) - self.Uisotropy = (len(self.Uspace) == 1) + self.Uisotropy = len(self.Uspace) == 1 return - - def _findUParameters(self): - """Find Uparameters and their values for expressing self.Uij. - """ + 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) + 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) ) + self.Uparameters.append((vname, varvalue)) return - - def _findeqUij(self): - """Adjust self.Uij and self.eqUij to be consistent with spacegroup - """ - self.Uij = numpy.zeros((3,3), dtype=float) + 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 + 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)) ) + 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. - def positionFormula(self, pos, xyzsymbols=("x","y","z")): - """Formula of equivalent position with respect to generator site - - pos -- fractional coordinates of possibly equivalent site - xyzsymbols -- symbols for parametrized coordinates - - Return 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". + 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 = nearestSiteIndex(self.eqxyz, pos) + idx = nearest_site_index(self.eqxyz, pos) eqpos = self.eqxyz[idx] - if not equalPositions(eqpos, pos, self.eps): return {} + 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)) @@ -510,41 +821,62 @@ def positionFormula(self, pos, xyzsymbols=("x","y","z")): teqpos -= nvec * varvalue # map varnames to xyzsymbols name2sym = dict(zip(("x", "y", "z"), xyzsymbols)) - xyzformula = 3*[""] + 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.signedRatStr(nvec[i]), name2sym[vname]) + 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.signedRatStr(teqpos[i]) + 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 ] + 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): - """List of atom displacement formulas with custom parameter symbols. - - pos -- fractional coordinates of possibly equivalent site - Usymbols -- 6 symbols for possible U matrix parameters + """'diffpy.structure.GeneratorSite.UFormula' is deprecated and + will be removed in version 4.0.0. - Return 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. + 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 = nearestSiteIndex(self.eqxyz, pos) + idx = nearest_site_index(self.eqxyz, pos) eqpos = self.eqxyz[idx] - if not equalPositions(eqpos, pos, self.eps): return {} + 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, '') + Uformula = dict.fromkeys(stdUsymbols, "") name2sym = dict(zip(stdUsymbols, Usymbols)) for Usr, (vname, ignore) in zip(Usrotated, self.Uparameters): # avoid adding off-diagonal elements twice @@ -552,59 +884,89 @@ def UFormula(self, pos, Usymbols=stdUsymbols): Usr -= numpy.tril(Usr, -1) Usrflat = Usr.flatten() for i in numpy.where(Usrflat)[0]: - f = '%+g*%s' % (Usrflat[i], name2sym[vname]) + 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() + 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): - """Index of the nearest generator equivalent site + """'diffpy.structure.GeneratorSite.eqIndex' is deprecated and + will be removed in version 4.0.0. - pos -- fractional coordinates + 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. - Return integer. + Parameters + ---------- + pos : array_like + Fractional coordinates. + + Return + ------ + int + Index of the nearest generator equivalent site. """ - return nearestSiteIndex(self.eqxyz, pos) + return nearest_site_index(self.eqxyz, pos) + # End of class GeneratorSite # ---------------------------------------------------------------------------- + class ExpandAsymmetricUnit(object): - """Expand asymmetric unit and anisotropic thermal displacement - - Data members: - spacegroup -- instance of SpaceGroup - corepos -- list of positions in asymmetric unit, - it may contain duplicates - coreUijs -- thermal factors for corepos (defaults to zeros) - sgoffset -- optional offset of space group origin [0, 0, 0] - eps -- cutoff for equivalent positions - Calculated data members: - multiplicity -- multiplicity of each site in corepos - Uisotropy -- bool flags for isotropic sites in corepos - expandedpos -- list of equivalent positions per each site in corepos - expandedUijs -- list of thermal factors per each site in corepos + """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): - """Initialize and calculate instance of ExpandAsymmetricUnit - - spacegroup -- instance of SpaceGroup - corepos -- list of positions in asymmetric unit, - it may contain duplicates - coreUijs -- thermal factors for corepos (defaults to zeros) - sgoffset -- offset of space group origin [0, 0, 0] - eps -- cutoff for duplicate positions - """ + def __init__(self, spacegroup, corepos, coreUijs=None, sgoffset=[0, 0, 0], eps=None): if eps is None: eps = epsilon # declare data members @@ -622,73 +984,169 @@ def __init__(self, spacegroup, corepos, coreUijs=None, if coreUijs: self.coreUijs = coreUijs else: - self.coreUijs = numpy.zeros((corelen,3,3), dtype=float) + 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) + 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 +# 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. - eqdict -- formula dictionary which maps standard variable symbols - ("x", "U11") to string formulas ("0", "-x3", "z7 +0.5") + Parameters + ---------- + eqdict : dict + Formula dictionary which maps standard variable symbols + ``("x", "U11")`` to string formulas ``("0", "-x3", "z7 +0.5")``. - Return pruned formula dictionary. + Return + ------ + dict + Pruned formula dictionary. """ pruned = {} for smb, eq in eqdict.items(): - if not isconstantFormula(eq): pruned[smb] = eq + 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 - - Data members: - spacegroup -- instance of SpaceGroup - positions -- all positions to be constrained - Uijs -- thermal factors for all positions (defaults to zeros) - sgoffset -- optional offset of space group origin [0, 0, 0] - eps -- cutoff for equivalent positions - Calculated data members: - corepos -- list of of positions in the asymmetric unit - coremap -- dictionary mapping indices of asymmetric core positions - to indices of all symmetry related positions - 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". - pospars -- list of (xyz symbol, value) pairs - 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" - Upars -- list of (U symbol, value) pairs - Uisotropy -- list of bool flags for isotropic thermal displacements + """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): - """Initialize and calculate SymmetryConstraints. - - spacegroup -- instance of SpaceGroup - positions -- list of all positions to be constrained - Uijs -- list of U matrices for all constrained positions - sgoffset -- optional offset of space group origin [0, 0, 0] - eps -- cutoff for equivalent positions - """ + def __init__(self, spacegroup, positions, Uijs=None, sgoffset=[0, 0, 0], eps=None): if eps is None: eps = epsilon # fill in data members @@ -721,53 +1179,53 @@ def __init__(self, spacegroup, positions, Uijs=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] + self.poseqns = numpos * [None] + self.Ueqns = numpos * [None] + self.Uisotropy = numpos * [False] # all members should be initialized here - self._findConstraints() + self._find_constraints() return - - def _findConstraints(self): - """Find constraints for positions and anisotropic displacements Uij - """ + 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] + 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 not genidx in independent: continue + 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) + gen = GeneratorSite(self.spacegroup, genpos, genUij, self.sgoffset, self.eps) # append new pparameters if there are any - gxyzsymbols = xyzsymbols[3*genidx : 3*(genidx+1)] + 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)] + 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) ) + self.Upars.append((smbl, v)) # search for equivalents inside indies indies = sorted(independent) for indidx in indies: indpos = self.positions[indidx] - formula = gen.positionFormula(indpos, gxyzsymbols) + formula = gen.position_formula(indpos, gxyzsymbols) # formula is empty when indidx is independent - if not formula: continue + if not formula: + continue # indidx is dependent here independent.remove(indidx) self.coremap[genidx].append(indidx) self.poseqns[indidx] = formula - self.Ueqns[indidx] = gen.UFormula(indpos, gUsymbols) + self.Ueqns[indidx] = gen.u_formula(indpos, gUsymbols) # make sure positions and Uijs are consistent with spacegroup - eqidx = gen.eqIndex(indpos) + eqidx = gen.eq_index(indpos) dxyz = gen.eqxyz[eqidx] - indpos self.positions[indidx] += dxyz - dxyz.round() self.Uijs[indidx] = gen.eqUij[eqidx] @@ -777,39 +1235,69 @@ def _findConstraints(self): self.corepos = [self.positions[i] for i in coreidx] return - + @deprecated(posparSymbols_deprecation_msg) def posparSymbols(self): - """Return list of standard position parameter symbols. + """'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 [n for n, v in self.pospars] + 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): - """Return list of position parameters values. + """'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 [v for n, v in self.pospars] + 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): - """List of position formulas with custom parameter symbols. + """'diffpy.structure.SymmetryConstraints.positionFormulas' is + deprecated and will be removed in version 4.0.0. - xyzsymbols -- list of custom symbols used in formula strings + 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. - Return 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". + 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) + 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)) + emsg = "Not enough symbols for %i position parameters" % len(self.pospars) raise SymmetryError(emsg) # build translation dictionary - trsmbl = dict(zip(self.posparSymbols(), xyzsymbols)) + trsmbl = dict(zip(self.pos_parm_symbols(), xyzsymbols)) + def translatesymbol(matchobj): return trsmbl[matchobj.group(0)] - pat = re.compile(r'\b[xyz]\d+') + + pat = re.compile(r"\b[xyz]\d+") rv = [] for eqns in self.poseqns: treqns = {} @@ -818,52 +1306,104 @@ def translatesymbol(matchobj): rv.append(treqns) return rv - + @deprecated(positionFormulasPruned_deprecation_msg) def positionFormulasPruned(self, xyzsymbols=None): - """List of position formula dictionaries with constant items removed. - See also positionFormulas(). + """'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) - xyzsymbols -- list of custom symbols used in formula strings + def position_formulas_pruned(self, xyzsymbols=None): + """List of position formula dictionaries with constant items + removed. - Return list of coordinate formula dictionaries. + See also + -------- + positionFormulas() + + Parameters + ---------- + xyzsymbols : list, Optional + List of custom symbols used in formula strings. + + Return + ------ + list + List of coordinate formula dictionaries. """ - rv = [pruneFormulaDictionary(eqns) - for eqns in self.positionFormulas(xyzsymbols)] + rv = [prune_formula_dictionary(eqns) for eqns in self.position_formulas(xyzsymbols)] return rv - + @deprecated(UparSymbols_deprecation_msg) def UparSymbols(self): - """Return list of standard atom displacement parameter symbols. + """'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 [n for n, v in self.Upars] + 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): - """Return list of atom displacement parameters values. + """'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): - """List of atom displacement formulas with custom parameter symbols. - - Usymbols -- list of custom symbols used in formula strings + """'diffpy.structure.SymmetryConstraints.UFormulas' is + deprecated and will be removed in version 4.0.0. - Return 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". + Please use 'diffpy.structure.SymmetryConstraints.u_formulas' + instead. """ - if not Usymbols: return list(self.Ueqns) + 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.UparSymbols(), Usymbols)) + trsmbl = dict(zip(self.u_parm_symbols(), Usymbols)) + def translatesymbol(matchobj): return trsmbl[matchobj.group(0)] - pat = re.compile(r'\bU\d\d\d+') + + pat = re.compile(r"\bU\d\d\d+") rv = [] for eqns in self.Ueqns: treqns = {} @@ -872,20 +1412,39 @@ def translatesymbol(matchobj): rv.append(treqns) return rv - + @deprecated(UFormulasPruned_deprecation_msg) def UFormulasPruned(self, Usymbols=None): - """List of atom displacement formula dictionaries with constant items - removed. See also UFormulas(). + """'diffpy.structure.SymmetryConstraints.UFormulasPruned' is + deprecated and will be removed in version 4.0.0. - Usymbols -- list of custom symbols used in formula strings - - Return list of atom displacement formulas in tuples of - (U11, U22, U33, U12, U13, U23). + 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 = [ pruneFormulaDictionary(eqns) - for eqns in self.UFormulas(Usymbols) ] + rv = [prune_formula_dictionary(eqns) for eqns in self.u_formulas(Usymbols)] return rv + # End of class SymmetryConstraints # ---------------------------------------------------------------------------- @@ -893,12 +1452,13 @@ def UFormulasPruned(self, Usymbols=None): # basic demonstration if __name__ == "__main__": from diffpy.structure.spacegroups import sg100 - site = [.125, .625, .13] - Uij = [[1,2,3],[2,4,5],[3,5,6]] + + 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.positionFormula(site) + 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.UFormula(site)) + print("g.UFormula(%r) =" % site, g.u_formula(site)) diff --git a/src/diffpy/structure/tests/__init__.py b/src/diffpy/structure/tests/__init__.py deleted file mode 100644 index f5bfe145..00000000 --- a/src/diffpy/structure/tests/__init__.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2010 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. -# -############################################################################## - -"""Unit tests for diffpy.structure. -""" - -import unittest - - -def testsuite(pattern=''): - '''Create a unit tests suite for diffpy.structure package. - - Parameters - ---------- - pattern : str, optional - Regular expression pattern for selecting test cases. - Select all tests when empty. Ignore the pattern when - any of unit test modules fails to import. - - Returns - ------- - suite : `unittest.TestSuite` - The TestSuite object containing the matching tests. - ''' - import re - from os.path import dirname - from itertools import chain - from pkg_resources import resource_filename - loader = unittest.defaultTestLoader - thisdir = resource_filename(__name__, '') - depth = __name__.count('.') + 1 - topdir = thisdir - for i in range(depth): - topdir = dirname(topdir) - suite_all = loader.discover(thisdir, top_level_dir=topdir) - # always filter the suite by pattern to test-cover the selection code. - suite = unittest.TestSuite() - rx = re.compile(pattern) - tsuites = list(chain.from_iterable(suite_all)) - tsok = all(isinstance(ts, unittest.TestSuite) for ts in tsuites) - if not tsok: # pragma: no cover - return suite_all - tcases = chain.from_iterable(tsuites) - for tc in tcases: - tcwords = tc.id().split('.') - shortname = '.'.join(tcwords[-3:]) - if rx.search(shortname): - suite.addTest(tc) - # verify all tests are found for an empty pattern. - assert pattern or suite_all.countTestCases() == suite.countTestCases() - return suite - - -def test(): - '''Execute all unit tests for the diffpy.structure package. - - Returns - ------- - result : `unittest.TestResult` - ''' - suite = testsuite() - runner = unittest.TextTestRunner() - result = runner.run(suite) - return result diff --git a/src/diffpy/structure/tests/run.py b/src/diffpy/structure/tests/run.py deleted file mode 100644 index 5bd8b2a8..00000000 --- a/src/diffpy/structure/tests/run.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2010 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. -# -############################################################################## - -"""Convenience module for executing all unit tests with - -python -m diffpy.structure.tests.run -""" - - -if __name__ == '__main__': - import sys - # show warnings by default - if not sys.warnoptions: - import os, warnings - warnings.simplefilter("default") - # also affect subprocesses - os.environ["PYTHONWARNINGS"] = "default" - from diffpy.structure.tests import test - # produce zero exit code for a successful test - sys.exit(not test().wasSuccessful()) diff --git a/src/diffpy/structure/tests/testatom.py b/src/diffpy/structure/tests/testatom.py deleted file mode 100644 index dc6073f6..00000000 --- a/src/diffpy/structure/tests/testatom.py +++ /dev/null @@ -1,155 +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 - -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]) * .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_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 - -# ---------------------------------------------------------------------------- - -if __name__ == '__main__': - unittest.main() diff --git a/src/diffpy/structure/tests/testloadstructure.py b/src/diffpy/structure/tests/testloadstructure.py deleted file mode 100644 index bbcaf8ad..00000000 --- a/src/diffpy/structure/tests/testloadstructure.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python - -"""Unit tests for the loadStructure factory. -""" - -import unittest -from diffpy.structure.tests.testutils import datafile -from diffpy.structure import loadStructure -from diffpy.structure import Structure, PDFFitStructure, StructureFormatError - - -############################################################################## -class TestLoadStructure(unittest.TestCase): - - def test_xcfg(self): - """check loading of atomeye xcfg format - """ - f = datafile('BubbleRaftShort.xcfg') - stru = loadStructure(f) - self.assertTrue(type(stru) is Structure) - self.assertRaises(StructureFormatError, - loadStructure, f, 'xyz') - return - - - def test_discus(self): - """check loading of discus file format - """ - f = datafile('Ni-discus.stru') - stru = loadStructure(f) - self.assertTrue(type(stru) is PDFFitStructure) - return - - - def test_cif(self): - """check loading of CIF file format - """ - f = datafile('PbTe.cif') - stru = loadStructure(f) - self.assertTrue(isinstance(stru, Structure)) - self.assertFalse(isinstance(stru, PDFFitStructure)) - return - - - def test_badfile(self): - """check loading of CIF file format - """ - f = datafile('Ni-bad.stru') - self.assertRaises(StructureFormatError, loadStructure, f) - return - - - def test_goodkwarg(self): - """check loading of CIF file and passing of parser keyword argument. - """ - f = datafile('graphite.cif') - stru = loadStructure(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 = datafile('bucky.xyz') - self.assertRaises(TypeError, loadStructure, f, eps=1e-10) - return - -# End of class TestLoadStructure - -# ---------------------------------------------------------------------------- - -if __name__ == '__main__': - unittest.main() diff --git a/src/diffpy/structure/tests/testoldimports.py b/src/diffpy/structure/tests/testoldimports.py deleted file mode 100644 index a0a3852a..00000000 --- a/src/diffpy/structure/tests/testoldimports.py +++ /dev/null @@ -1,78 +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. -# -############################################################################## - -""" -Unit tests for imports of old camel-case names. -""" - - -import sys -import warnings -import importlib -import unittest - -import diffpy - -# ---------------------------------------------------------------------------- - -class TestOldImports(unittest.TestCase): - - @classmethod - def setUpClass(cls): - "Uncache any already-imported old modules." - for modname in tuple(sys.modules): - if modname.startswith('diffpy.Structure'): - del sys.modules[modname] # pragma: no cover - return - - - def test_00TopImport(self): - """check import of diffpy.Structure - """ - with warnings.catch_warnings(): - warnings.simplefilter('ignore', category=DeprecationWarning) - import diffpy.Structure as m0 - self.assertIs(diffpy.structure, m0) - # second import should raise no warning - with warnings.catch_warnings(): - warnings.simplefilter('error') - import diffpy.Structure as m1 - self.assertIs(diffpy.structure, m1) - return - - - def test_O1SubmoduleImport(self): - """check import of diffpy.Structure submodules. - """ - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter('always', category=DeprecationWarning) - import diffpy.Structure.SymmetryUtilities as symutil - self.assertIs(DeprecationWarning, w[0].category) - self.assertIs(diffpy.structure.symmetryutilities, symutil) - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter('always', category=DeprecationWarning) - import diffpy.Structure.Parsers.P_cif as pcif - self.assertIs(DeprecationWarning, w[0].category) - self.assertIs(diffpy.structure.parsers.p_cif, pcif) - self.assertRaises(ImportError, importlib.import_module, - 'diffpy.Structure.SSpaceGroups') - return - -# End of class TestOldImports - -# ---------------------------------------------------------------------------- - -if __name__ == '__main__': - unittest.main() diff --git a/src/diffpy/structure/tests/testp_cif.py b/src/diffpy/structure/tests/testp_cif.py deleted file mode 100644 index 9adf088d..00000000 --- a/src/diffpy/structure/tests/testp_cif.py +++ /dev/null @@ -1,410 +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 six - -from diffpy.structure.tests.testutils import datafile -from diffpy.structure.parsers.p_cif import P_cif, leading_float, getSymOp -from diffpy.structure.parsers import getParser -from diffpy.structure import Structure -from diffpy.structure 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 SymOp - from diffpy.structure.spacegroups import Rot_X_mY_Z, 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 - -# End of class TestRoutines - -# ---------------------------------------------------------------------------- - -class TestP_cif(unittest.TestCase): - - pbteciffile = datafile('PbTe.cif') - badciffile = datafile('LiCl-bad.cif') - graphiteciffile = datafile('graphite.cif') - cdsebulkpdffitfile = datafile('CdSe_bulk.stru') - teiciffile = datafile('TeI.cif') - 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_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 = six.u(self.graphiteciffile.replace('\\', '/')) - if hasbs: # pragma: no cover - uciffile = uciffile.replace(u'/', u'\\') - 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__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_eps(self): - """Test the P_cif.eps coordinates resolution. - """ - pcif = P_cif() - pcif.eps = 1e-8 - grph = pcif.parseFile(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.parseFile(self.graphiteciffile) - self.assertEqual(4, len(grph2)) - return - - - def test_unknown_occupancy(self): - "test CIF file with unknown occupancy data" - stru = self.ptest.parseFile(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 GetSpaceGroup, _hashSymOpList - 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 = _hashSymOpList(GetSpaceGroup(225).iter_symops()) - sgcif = self.ptest.spacegroup - self.assertEqual(h225, _hashSymOpList(sgcif.iter_symops())) - return - - - def test_nosites_cif(self): - """Test reading of CIF file with no valid sites. - """ - ptest = self.ptest - stru = ptest.parseFile(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 = datafile('badspacegroup.cif') - self.assertRaises(StructureFormatError, ptest.parseFile, filename) - return - - - def test_custom_spacegroup_cif(self): - """Test parsing of nonstandard symops-defined space group. - """ - pfile = self.pfile - filename = datafile('customsg.cif') - pfile.parseFile(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.parseFile(self.graphiteciffile) - self.assertTrue(all(stru.anisotropy)) - 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 not '_atom_site_adp_type' 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.parseFile(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.parseFile(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.parseFile(self.graphiteciffile) - self.assertEqual(4, len(grph2)) - return - -# End of class TestP_cif - -# ---------------------------------------------------------------------------- - -if __name__ == '__main__': - unittest.main() diff --git a/src/diffpy/structure/tests/testp_discus.py b/src/diffpy/structure/tests/testp_discus.py deleted file mode 100644 index a748f452..00000000 --- a/src/diffpy/structure/tests/testp_discus.py +++ /dev/null @@ -1,157 +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 unittest -import re - -from diffpy.structure.tests.testutils import datafile -from diffpy.structure import Structure, StructureFormatError - -# ---------------------------------------------------------------------------- - -class TestP_discus(unittest.TestCase): - """test Parser for PDFFit file format""" - - - 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(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.abcABG()) - # 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 = 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(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.readStr(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.readStr, - s_s2, self.format) - return - - - def test_spdiameter_parsing(self): - """check parsing of spdiameter record from a file. - """ - stru = self.stru - stru.read(datafile('Ni-discus.stru'), self.format) - self.assertEqual(0, stru.pdffit['spdiameter']) - snoshape = stru.writeStr(format=self.format) - self.assertTrue(not re.search('(?m)^shape', snoshape)) - # produce a string with non-zero spdiameter - stru.pdffit['spdiameter'] = 13 - s13 = stru.writeStr(format=self.format) - self.assertTrue(re.search('(?m)^shape +sphere, ', s13)) - stru13 = Structure() - stru13.readStr(s13) - self.assertEqual(13, stru13.pdffit['spdiameter']) - with open(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.readStr, - sbad, format=self.format) - return - - - def test_stepcut_parsing(self): - """check parsing of stepcut record from a file. - """ - stru = self.stru - stru.read(datafile('Ni-discus.stru'), self.format) - self.assertEqual(0, stru.pdffit['stepcut']) - snoshape = stru.writeStr(format=self.format) - self.assertTrue(not re.search('(?m)^shape', snoshape)) - # produce a string with non-zero stepcut - stru.pdffit['stepcut'] = 13 - s13 = stru.writeStr(format=self.format) - self.assertTrue(re.search('(?m)^shape +stepcut, ', s13)) - stru13 = Structure() - stru13.readStr(s13) - self.assertEqual(13, stru13.pdffit['stepcut']) - with open(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.readStr, - sbad, format=self.format) - return - - -# End of class TestP_discus - -# ---------------------------------------------------------------------------- - -if __name__ == '__main__': - unittest.main() diff --git a/src/diffpy/structure/tests/testp_pdffit.py b/src/diffpy/structure/tests/testp_pdffit.py deleted file mode 100644 index 56b9f0f7..00000000 --- a/src/diffpy/structure/tests/testp_pdffit.py +++ /dev/null @@ -1,240 +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 unittest -import re -import numpy - -from diffpy.structure.tests.testutils import datafile -from diffpy.structure import Structure, StructureFormatError - -# ---------------------------------------------------------------------------- - -class TestP_pdffit(unittest.TestCase): - """test Parser for PDFFit file format""" - - 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(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(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(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, - datafile('Ni-bad.stru'), self.format) - self.assertRaises(StructureFormatError, stru.read, - datafile('bucky.xyz'), self.format) - return - - - def test_writeStr_pdffit(self): - """check writing of normal xyz file""" - stru = self.stru - stru.read(datafile('Ni.stru'), self.format) - with open(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.writeStr(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(datafile('Ni.stru'), self.format) - self.stru[0].occupancy = 16e16 - s_s = self.stru.writeStr(self.format) - stru1 = Structure() - stru1.readStr(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(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.readStr(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.readStr, - s_s2, self.format) - return - - - def test_spdiameter_parsing(self): - """check parsing of spdiameter record from a file. - """ - stru = self.stru - stru.read(datafile('Ni.stru'), self.format) - self.assertEqual(0, stru.pdffit['spdiameter']) - snoshape = stru.writeStr(format=self.format) - self.assertTrue(not re.search('(?m)^shape', snoshape)) - # produce a string with non-zero spdiameter - stru.pdffit['spdiameter'] = 13 - s13 = stru.writeStr(format=self.format) - self.assertTrue(re.search('(?m)^shape +sphere, ', s13)) - stru13 = Structure() - stru13.readStr(s13) - self.assertEqual(13, stru13.pdffit['spdiameter']) - with open(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.readStr, - sbad, format=self.format) - return - - - def test_stepcut_parsing(self): - """check parsing of stepcut record from a file. - """ - stru = self.stru - stru.read(datafile('Ni.stru'), self.format) - self.assertEqual(0, stru.pdffit['stepcut']) - snoshape = stru.writeStr(format=self.format) - self.assertTrue(not re.search('(?m)^shape', snoshape)) - # produce a string with non-zero stepcut - stru.pdffit['stepcut'] = 13 - s13 = stru.writeStr(format=self.format) - self.assertTrue(re.search('(?m)^shape +stepcut, ', s13)) - stru13 = Structure() - stru13.readStr(s13) - self.assertEqual(13, stru13.pdffit['stepcut']) - with open(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.readStr, - sbad, format=self.format) - return - - -# End of class TestP_pdffit - -# ---------------------------------------------------------------------------- - -if __name__ == '__main__': - unittest.main() diff --git a/src/diffpy/structure/tests/testparsers.py b/src/diffpy/structure/tests/testparsers.py deleted file mode 100644 index 34cd038f..00000000 --- a/src/diffpy/structure/tests/testparsers.py +++ /dev/null @@ -1,294 +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 unittest -import os -import re -import tempfile -import numpy - -from diffpy.structure.tests.testutils import datafile -from diffpy.structure import Structure, StructureFormatError -from diffpy.structure import Lattice -from diffpy.structure import Atom - -# ---------------------------------------------------------------------------- - -class TestP_xyz(unittest.TestCase): - """test Parser for xyz file format""" - - 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(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, - datafile('bucky-bad1.xyz'), self.format) - self.assertRaises(StructureFormatError, stru.read, - datafile('bucky-bad2.xyz'), self.format) - self.assertRaises(StructureFormatError, stru.read, - datafile('bucky-plain.xyz'), self.format) - self.assertRaises(StructureFormatError, stru.read, - 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., 1., 1.]), - Atom('Cl', [3., 2., 1.]) - ] - s1 = stru.writeStr(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., 1., 1.]), - Atom('Cl', [3., 2., 1.]) - ] - 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""" - - 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(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, - datafile('bucky-plain-bad.xyz'), self.format) - return - - - def test_read_rawxyz(self): - """check reading of raw xyz file""" - stru = self.stru - stru.read(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(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, - datafile('hexagon-raw-bad.xyz'), self.format) - self.assertRaises(StructureFormatError, stru.read, - 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., 1., 1.])] - s1 = stru.writeStr(self.format) - s1 = re.sub('[ \t]+', ' ', s1) - s0 = "H 1 2 3\n" - # brutal raw version - stru[0].element = "" - s1 = stru.writeStr(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""" - - 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(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(datafile('CdSe_bulk.stru'), 'pdffit') - s = stru.writeStr(self.format) - # all lines should be 80 characters long - linelens = [len(l) for l in s.split('\n') if l != ""] - self.assertEqual(linelens, len(linelens)*[80]) - # now clean and re-read structure - stru = Structure() - stru.readStr(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""" - - 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(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(datafile('CdSe_bulk.stru'), 'pdffit') - s = stru.writeStr(self.format) - stru = Structure() - stru.readStr(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/src/diffpy/structure/tests/teststructure.py b/src/diffpy/structure/tests/teststructure.py deleted file mode 100644 index 5086f97d..00000000 --- a/src/diffpy/structure/tests/teststructure.py +++ /dev/null @@ -1,689 +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 - -from diffpy.structure.tests.testutils import datafile -from diffpy.structure import Structure -from diffpy.structure import Lattice -from diffpy.structure import Atom - -# useful variables -cdsefile = datafile('CdSe_bulk.stru') -teifile = datafile('TeI.cif') -pbtefile = datafile('PbTe.cif') - -# ---------------------------------------------------------------------------- - -class TestStructure(unittest.TestCase): - """test methods of Structure class""" - - _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) ) - if not self._loaded_structures: - self._loaded_structures.update([ - ('cdse', Structure(filename=cdsefile)), - ('tei', Structure(filename=teifile)), - ('pbte', Structure(filename=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=teifile) - self.assertRaises(ValueError, Structure, - lattice=Lattice(), filename=teifile) - self.assertRaises(ValueError, Structure, - title='test', filename=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(numpy.array_equal(pbte.xyz_cartn, pbte2.xyz_cartn)) - self.assertTrue(numpy.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=cdsefile) - cdse_str = cdse.writeStr('pdffit') - cdse2 = copy.copy(cdse) - self.assertEqual(cdse_str, cdse2.writeStr('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_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_distance(self): - """check Structure.distance() - """ - from math import sqrt - self.stru.assignUniqueLabels() - 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=cdsefile) - cdse.assignUniqueLabels() - 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(.5, .5, .5, 90, 90, 60) - stru.placeInLattice(new_lattice) - a0 = stru[0] - self.assertTrue(numpy.allclose(a0.xyz, [0.0, 0.0, 0.0])) - a1 = stru[1] - self.assertTrue(numpy.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(numpy.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(numpy.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=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 = (numpy.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.assignUniqueLabels() - 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(numpy.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(numpy.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=cdsefile) - total = stru + cdse - self.assertEqual(6, len(total)) - ta0 = total[0] - tam1 = total[-1] - self.assertEqual('C', ta0.element) - self.assertTrue(numpy.array_equal(stru[0].xyz, ta0.xyz)) - self.assertEqual('Se', tam1.element) - self.assertTrue(numpy.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=cdsefile) - stru += cdse - self.assertEqual(6, len(stru)) - self.assertEqual(lst, stru[:2].tolist()) - am1 = stru[-1] - self.assertEqual('Se', am1.element) - self.assertTrue(numpy.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=cdsefile) - cadmiums = cdse - cdse[2:] - self.assertEqual(2, len(cadmiums)) - self.assertEqual('Cd', cadmiums[0].element) - self.assertEqual('Cd', cadmiums[1].element) - self.assertTrue(numpy.array_equal(cdse[0].xyz, cadmiums[0].xyz)) - self.assertTrue(numpy.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=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=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(numpy.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=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(numpy.tile(els, 2).tolist(), cdse.element.tolist()) - self.assertTrue(numpy.array_equal(numpy.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(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__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(numpy.array_equal([1, 1, 1], stru.xyz[1])) - stru.xyz += 0.1 - self.assertTrue(numpy.array_equal([0.1, 0.1, 0.1], stru[0].xyz)) - self.assertTrue(numpy.array_equal([1.1, 1.1, 1.1], stru[1].xyz)) - stru.xyz = 0 - stru[1].xyz[:] = 1 - self.assertTrue(numpy.array_equal([0, 0, 0], stru[0].xyz)) - self.assertTrue(numpy.array_equal([1, 1, 1], stru[1].xyz)) - # verify noop when changing empty slice - xyz0 = numpy.copy(stru.xyz) - stru[1:1].xyz += 1 - self.assertTrue(numpy.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=cdsefile) - self.assertEqual(4 * [''], cdse.label.tolist()) - cdse.assignUniqueLabels() - 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(numpy.array_equal(numpy.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(numpy.allclose(6.461 / 2.0 * numpy.ones(3), - pbte.xyz_cartn[0])) - pbte.xyz_cartn += numpy.array([0.1, 0.2, 0.3]) * 6.461 - self.assertTrue(numpy.allclose([0.6, 0.7, 0.8], pbte[0].xyz)) - self.assertTrue(numpy.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(numpy.any(self.stru.anisotropy)) - tei = copy.copy(self.tei) - self.assertTrue(numpy.all(tei.anisotropy)) - tei.anisotropy = False - self.assertFalse(numpy.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 * -numpy.cos(numpy.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(numpy.any(stru.anisotropy)) - stru.U = numpy.identity(3) - self.assertEqual(2, len(set([id(a.U) for a in stru]))) - isou = stru.lattice.isotropicunit - self.assertTrue(numpy.array_equal(2 * [isou], stru.U)) - self.assertFalse(numpy.any(stru.anisotropy)) - stru.anisotropy = True - stru.U = numpy.identity(3) - self.assertTrue(numpy.array_equal(2 * [numpy.identity(3)], stru.U)) - self.assertTrue(numpy.all(stru.anisotropy)) - stru.U = 0 - self.assertTrue(numpy.all(stru.anisotropy)) - self.assertFalse(numpy.any(stru.U != 0.0)) - stru[1].U[:] = 1 - self.assertTrue(numpy.all(stru[0].U == 0.0)) - self.assertTrue(numpy.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(numpy.array_equal([0, 1.1], stru.U11)) - self.assertTrue(numpy.array_equal([0, 2.2], stru.U22)) - self.assertTrue(numpy.array_equal([0, 3.3], stru.U33)) - self.assertTrue(numpy.array_equal([0, 0.12], stru.U12)) - self.assertTrue(numpy.array_equal([0, 0.13], stru.U13)) - self.assertTrue(numpy.array_equal([0, 0.23], stru.U23)) - stru.U11 = stru.U22 = stru.U33 = stru.U12 = stru.U13 = stru.U23 = 0.0 - self.assertFalse(numpy.any(stru.U != 0.0)) - return - - - def test_Bisoequiv(self): - """check Structure.Bisoequiv - """ - utob = 8 * numpy.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 * numpy.pi**2 - self.assertTrue(numpy.allclose([0, 1.1], stru.B11)) - self.assertTrue(numpy.allclose([0, 2.2], stru.B22)) - self.assertTrue(numpy.allclose([0, 3.3], stru.B33)) - self.assertTrue(numpy.allclose([0, 0.12], stru.B12)) - self.assertTrue(numpy.allclose([0, 0.13], stru.B13)) - self.assertTrue(numpy.allclose([0, 0.23], stru.B23)) - stru.B11 = stru.B22 = stru.B33 = stru.B12 = stru.B13 = stru.B23 = 0.0 - self.assertFalse(numpy.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 - -# ---------------------------------------------------------------------------- - -if __name__ == '__main__': - unittest.main() diff --git a/src/diffpy/structure/tests/testsymmetryutilities.py b/src/diffpy/structure/tests/testsymmetryutilities.py deleted file mode 100644 index d607ed97..00000000 --- a/src/diffpy/structure/tests/testsymmetryutilities.py +++ /dev/null @@ -1,532 +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 sys -import re -import unittest -import numpy - -from diffpy.structure.spacegroups import GetSpaceGroup -from diffpy.structure.symmetryutilities import (isSpaceGroupLatPar, - expandPosition, pruneFormulaDictionary, isconstantFormula, - GeneratorSite, ExpandAsymmetricUnit, SymmetryConstraints) -from diffpy.structure.symmetryutilities import _Position2Tuple - -# ---------------------------------------------------------------------------- - -class TestRoutines(unittest.TestCase): - - def setUp(self): - return - - def tearDown(self): - return - - def test_isSpaceGroupLatPar(self): - """check isSpaceGroupLatPar() - """ - triclinic = GetSpaceGroup("P1") - monoclinic = GetSpaceGroup("P2") - orthorhombic = GetSpaceGroup("P222") - tetragonal = GetSpaceGroup("P4") - trigonal = GetSpaceGroup("P3") - hexagonal = GetSpaceGroup("P6") - cubic = GetSpaceGroup("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_sgtbx_spacegroup_aliases(self): - """check GetSpaceGroup for non-standard aliases from sgtbx. - """ - self.assertIs(GetSpaceGroup('Fm3m'), GetSpaceGroup(225)) - self.assertIs(GetSpaceGroup('Ia3d'), GetSpaceGroup('I a -3 d')) - return - - def test_expandPosition(self): - """check expandPosition() - """ - # ok again Ni example - fcc = GetSpaceGroup(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(l) for l 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_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 - -# 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 = GetSpaceGroup(117) - sg143 = GetSpaceGroup(143) - sg164 = GetSpaceGroup(164) - sg167h = GetSpaceGroup('H-3c') - sg167r = GetSpaceGroup('R-3c') - sg186 = GetSpaceGroup(186) - sg227 = GetSpaceGroup(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./3, 2./3, z]) - g143c = GeneratorSite(sg143, [2./3, 1./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./8]) - g227oa = GeneratorSite(sg227, 3*[1./8], sgoffset=3*[1./8]) - g227oc = GeneratorSite(sg227, [0, 0, 0], sgoffset=3*[1./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_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_positionFormula_sg209(self): - "check positionFormula at [x, 1-x, -x] site of the F432 space group." - sg209 = GetSpaceGroup('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_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_UFormula_g186c_eqxyz(self): - '''Check rotated U formulas at the symmetry positions of c-site in 186. - ''' - sg186 = GetSpaceGroup(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_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__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 = GetSpaceGroup(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 - -# End of class TestGeneratorSite - -# ---------------------------------------------------------------------------- - -class TestSymmetryConstraints(unittest.TestCase): - - def setUp(self): - return - - def tearDown(self): - return - - def test___init__(self): - """check SymmetryConstraints.__init__() - """ - sg225 = GetSpaceGroup(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 = GetSpaceGroup(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 = GetSpaceGroup(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 = GetSpaceGroup(1) - sg225 = GetSpaceGroup(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_UparValues(self): - """check SymmetryConstraints.UparValues() - """ - places = 12 - sg1 = GetSpaceGroup(1) - sg225 = GetSpaceGroup(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_UFormulas(self): -# """check SymmetryConstraints.UFormulas() -# """ -# return -# -# def test_UFormulasPruned(self): -# """check SymmetryConstraints.UFormulasPruned() -# """ -# return - -# End of class TestSymmetryConstraints - -# ---------------------------------------------------------------------------- - -if __name__ == '__main__': - unittest.main() diff --git a/src/diffpy/structure/tests/testutils.py b/src/diffpy/structure/tests/testutils.py deleted file mode 100644 index 572fc537..00000000 --- a/src/diffpy/structure/tests/testutils.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -############################################################################## -# -# diffpy.structure by DANSE Diffraction group -# Simon J. L. Billinge -# (c) 2010 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. -# -############################################################################## - -"""Helper routines for running other unit tests. -""" - -# helper functions - -def datafile(filename): - from pkg_resources import resource_filename - rv = resource_filename(__name__, "testdata/" + filename) - return rv diff --git a/src/diffpy/structure/utils.py b/src/diffpy/structure/utils.py index 33b83b20..1e1a6deb 100644 --- a/src/diffpy/structure/utils.py +++ b/src/diffpy/structure/utils.py @@ -12,27 +12,32 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## +"""Small shared functions.""" -"""Small shared functions. -""" +from collections.abc import Iterable as _Iterable -import six import numpy -if six.PY2: - from collections import Iterable as _Iterable -else: - from collections.abc import Iterable as _Iterable +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.""" + """``True`` if argument is iterable.""" rv = isinstance(obj, _Iterable) return rv def isfloat(s): - """True if argument can be converted to float""" + """``True`` if argument can be converted to float.""" try: float(s) return True @@ -41,43 +46,77 @@ def isfloat(s): return False +@deprecated(atomBareSymbol_deprecation_msg) def atomBareSymbol(smbl): - '''Remove atom type string stripped of isotope and ion charge symbols. - This removes blank and leading [0-9-] or trailing [1-9][+-] characters. + """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. - smbl -- atom type string such as "Cl-", "Ca2+" or "12-C". + 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. - Return bare element symbol. - ''' - rv = smbl.strip().lstrip('0123456789-').rstrip('123456789+-') + 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 _linkAtomAttribute(attrname, doc, toarray=numpy.array): - '''Create property wrapper that maps the specified atom attribute. + +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. + attributes from the owner `Structure` class. Parameters ---------- attrname : str - The string name of the Atom class attribute to be mapped. + The string name of the `Atom` class attribute to be mapped. doc : str The docstring for the property wrapper. - toarray : callable, optional + 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: @@ -85,9 +124,15 @@ def fset(self, value): v0 = getattr(self[0], attrname) # replace scalar values, but change array attributes in place if numpy.isscalar(v0): - setvalue = lambda a, v: setattr(a, attrname, v) + + def setvalue(a, v): + return setattr(a, attrname, v) + else: - setvalue = lambda a, v: setitem(getattr(a, attrname), _all, v) + + 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) @@ -96,5 +141,6 @@ def fset(self, value): 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 index d60b34c6..05a8d8ea 100644 --- a/src/diffpy/structure/version.py +++ b/src/diffpy/structure/version.py @@ -1,53 +1,26 @@ #!/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. +# (c) 2026 The Trustees of Columbia University in the City of New York. +# All rights reserved. # -# File coded by: Pavol Juhas +# File coded by: Chris Farrow, Pavol Juhas, Simon Billinge, Billinge Group members. # -# See AUTHORS.txt for a list of people who contributed. -# See LICENSE_DANSE.txt for license information. +# 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__.""" -""" -Definition of __version__, __date__, __timestamp__, __git_commit__. - -Notes ------ -Variable `__gitsha__` is deprecated as of version 3.0. -Use `__git_commit__` instead. -""" - -__all__ = ['__date__', '__git_commit__', '__timestamp__', '__version__'] - -import os.path - -from pkg_resources import resource_filename - - -# obtain version information from the version.cfg file -cp = dict(version='', date='', commit='', timestamp='0') -fcfg = resource_filename(__name__, 'version.cfg') -if not os.path.isfile(fcfg): # pragma: no cover - from warnings import warn - warn('Package metadata not found, execute "./setup.py egg_info".') - fcfg = os.devnull -with open(fcfg) as fp: - kwords = [[w.strip() for w in line.split(' = ', 1)] - for line in fp if line[:1].isalpha() and ' = ' in line] -assert all(w[0] in cp for w in kwords), "received unrecognized keyword" -cp.update(kwords) - -__version__ = cp['version'] -__date__ = cp['date'] -__git_commit__ = cp['commit'] -__timestamp__ = int(cp['timestamp']) +# We do not use the other three variables, but can be added back if needed. +# __all__ = ["__date__", "__git_commit__", "__timestamp__", "__version__"] -# TODO remove deprecated __gitsha__ in version 3.1. -__gitsha__ = __git_commit__ +# obtain version information +from importlib.metadata import PackageNotFoundError, version -del cp, fcfg, fp, kwords +try: + __version__ = version("diffpy.structure") +except PackageNotFoundError: + __version__ = "unknown" diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 00000000..5471acc1 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,29 @@ +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 new file mode 100644 index 00000000..2d2b4f5e --- /dev/null +++ b/tests/test_atom.py @@ -0,0 +1,305 @@ +#!/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 new file mode 100644 index 00000000..481f7670 --- /dev/null +++ b/tests/test_expansion.py @@ -0,0 +1,122 @@ +#!/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/src/diffpy/structure/tests/testlattice.py b/tests/test_lattice.py similarity index 51% rename from src/diffpy/structure/tests/testlattice.py rename to tests/test_lattice.py index 8a724ee8..c1cc80c8 100644 --- a/src/diffpy/structure/tests/testlattice.py +++ b/tests/test_lattice.py @@ -12,11 +12,10 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""Unit tests for Lattice class. -""" +"""Unit tests for Lattice class.""" import unittest + import numpy import numpy.linalg as numalg @@ -24,61 +23,84 @@ # ---------------------------------------------------------------------------- + class TestLattice(unittest.TestCase): - """test methods of Lattice class""" + """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) + """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.setLatBase(L0.cartesian([[1, 1, 0], [0, 1, 1], [1, 0, 1]])) + 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.abcABG(), baserot=L0.baserot) + 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""" + """Check calculation of standard unit cell vectors.""" + from math import cos, radians, sqrt + from numpy import dot - from math import radians, sqrt, cos - norm = lambda x : sqrt(sum([xi**2 for xi in x])) - cosd = lambda x : cos(radians(x)) + + 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) + 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. - ''' + """Check assignment to a, b, c, alpha, beta, gamma.""" lat = self.lattice lat.a = 2 lat.b = 4 @@ -91,81 +113,56 @@ def test_latpar_properties(self): self.assertTrue(numpy.array_equal(lat1.base, lat.base)) return - def test_readonly_properties(self): - '''Check that read-only properties are indeed such. - ''' + """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.assertRaises(AttributeError, setattr, lat, "unitvolume", 3.33) self.assertEqual(12, lat.volume) - self.assertRaises(AttributeError, setattr, - lat, 'volume', 3.33) + self.assertRaises(AttributeError, setattr, lat, "volume", 3.33) self.assertEqual(0.0, lat.ca) - self.assertRaises(AttributeError, setattr, - lat, 'ca', 3.33) + self.assertRaises(AttributeError, setattr, lat, "ca", 3.33) self.assertEqual(0.0, lat.cb) - self.assertRaises(AttributeError, setattr, - lat, 'cb', 3.33) + self.assertRaises(AttributeError, setattr, lat, "cb", 3.33) self.assertEqual(0.0, lat.cg) - self.assertRaises(AttributeError, setattr, - lat, 'cg', 3.33) + self.assertRaises(AttributeError, setattr, lat, "cg", 3.33) self.assertEqual(1.0, lat.sa) - self.assertRaises(AttributeError, setattr, - lat, 'sa', 3.33) + self.assertRaises(AttributeError, setattr, lat, "sa", 3.33) self.assertEqual(1.0, lat.sb) - self.assertRaises(AttributeError, setattr, - lat, 'sb', 3.33) + self.assertRaises(AttributeError, setattr, lat, "sb", 3.33) self.assertEqual(1.0, lat.sg) - self.assertRaises(AttributeError, setattr, - lat, 'sg', 3.33) + self.assertRaises(AttributeError, setattr, lat, "sg", 3.33) self.assertEqual(1.0, lat.ar) - self.assertRaises(AttributeError, setattr, - lat, 'ar', 3.33) + 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.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.assertRaises(AttributeError, setattr, lat, "alphar", 3.33) self.assertEqual(90.0, lat.betar) - self.assertRaises(AttributeError, setattr, - lat, 'betar', 3.33) + self.assertRaises(AttributeError, setattr, lat, "betar", 3.33) self.assertEqual(90.0, lat.gammar) - self.assertRaises(AttributeError, setattr, - lat, 'gammar', 3.33) + self.assertRaises(AttributeError, setattr, lat, "gammar", 3.33) self.assertEqual(0.0, lat.car) - self.assertRaises(AttributeError, setattr, - lat, 'car', 3.33) + self.assertRaises(AttributeError, setattr, lat, "car", 3.33) self.assertEqual(0.0, lat.cbr) - self.assertRaises(AttributeError, setattr, - lat, 'cbr', 3.33) + self.assertRaises(AttributeError, setattr, lat, "cbr", 3.33) self.assertEqual(0.0, lat.cgr) - self.assertRaises(AttributeError, setattr, - lat, 'cgr', 3.33) + self.assertRaises(AttributeError, setattr, lat, "cgr", 3.33) self.assertEqual(1.0, lat.sar) - self.assertRaises(AttributeError, setattr, - lat, 'sar', 3.33) + self.assertRaises(AttributeError, setattr, lat, "sar", 3.33) self.assertEqual(1.0, lat.sbr) - self.assertRaises(AttributeError, setattr, - lat, 'sbr', 3.33) + self.assertRaises(AttributeError, setattr, lat, "sbr", 3.33) self.assertEqual(1.0, lat.sgr) - self.assertRaises(AttributeError, setattr, - lat, 'sgr', 3.33) + 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]]) + """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) @@ -177,36 +174,73 @@ def test_setLatBase(self): self.assertAlmostEqual(detR0, 1.0, self.places) # try if rotation matrix works self.assertEqual(numpy.all(base == self.lattice.base), True) - self.lattice.setLatPar(alpha=44, beta=66, gamma=88) + self.lattice.set_latt_parms(alpha=44, beta=66, gamma=88) self.assertNotEqual(numpy.all(base == self.lattice.base), True) - self.lattice.setLatPar(alpha=60, beta=60, gamma=60) + 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]]) + 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.''' + """Check calculation of reciprocal lattice.""" r1 = self.lattice.reciprocal() - self.assertEqual((1, 1, 1, 90, 90, 90), r1.abcABG()) + 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.abcABG()) + 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.''' + """Check dot product of lattice vectors.""" L = self.lattice - L.setLatPar(gamma=120) + 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)) @@ -215,21 +249,19 @@ def test_dot(self): self.assertTrue(numpy.array_equal(5 * [-0.5], L.dot(va5, vb5[0]))) return - def test_norm(self): - '''check norm of a lattice vector.''' + """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.setLatPar(gamma=120) + 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.''' + """Check norm of a reciprocal vector.""" L = self.lattice - L.setLatPar(1, 1.5, 2.3, 80, 95, 115) + 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) @@ -237,11 +269,10 @@ def test_rnorm(self): self.assertTrue(numpy.allclose(5 * [r.norm(hkl)], L.rnorm(hkl5))) return - def test_dist(self): - '''check dist function for distance between lattice points.''' + """Check dist function for distance between lattice points.""" L = self.lattice - L.setLatPar(1, 1.5, 2.3, 80, 95, 115) + 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)) @@ -254,18 +285,17 @@ def test_dist(self): self.assertTrue(numpy.allclose(5 * [d0], L.dist(v5, u5))) return - def test_angle(self): - '''check angle calculation between lattice vectors.''' - from math import degrees, acos + """Check angle calculation between lattice vectors.""" + from math import acos, degrees + L = self.lattice - L.setLatPar(1, 1.5, 2.3, 80, 95, 115) + 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)))) + 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)) @@ -275,26 +305,23 @@ def test_angle(self): self.assertTrue(numpy.allclose(5 * [a0], L.angle(v5, u5))) return - - def test_repr(self): - """check string representation of this lattice""" + """Check string representation of this lattice.""" r = repr(self.lattice) self.assertEqual(r, "Lattice()") - self.lattice.setLatPar(1, 2, 3, 10, 20, 30) + 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.setLatBase(base) + 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__': +if __name__ == "__main__": unittest.main() diff --git a/tests/test_loadstructure.py b/tests/test_loadstructure.py new file mode 100644 index 00000000..ae6979ba --- /dev/null +++ b/tests/test_loadstructure.py @@ -0,0 +1,95 @@ +#!/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 new file mode 100644 index 00000000..5784ecfd --- /dev/null +++ b/tests/test_p_cif.py @@ -0,0 +1,502 @@ +#!/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 new file mode 100644 index 00000000..852acdfa --- /dev/null +++ b/tests/test_p_discus.py @@ -0,0 +1,149 @@ +#!/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 new file mode 100644 index 00000000..07bc6ca1 --- /dev/null +++ b/tests/test_p_pdffit.py @@ -0,0 +1,254 @@ +#!/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 new file mode 100644 index 00000000..548fbb78 --- /dev/null +++ b/tests/test_parsers.py @@ -0,0 +1,373 @@ +#!/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/src/diffpy/structure/tests/testspacegroups.py b/tests/test_spacegroups.py similarity index 50% rename from src/diffpy/structure/tests/testspacegroups.py rename to tests/test_spacegroups.py index 40c87927..de5fd69d 100644 --- a/src/diffpy/structure/tests/testspacegroups.py +++ b/tests/test_spacegroups.py @@ -12,43 +12,59 @@ # See LICENSE.txt for license information. # ############################################################################## - -"""Unit tests for diffpy.structure.spacegroups -""" +"""Unit tests for diffpy.structure.spacegroups.""" import unittest -from diffpy.structure.spacegroups import SpaceGroupList, _hashSymOpList -from diffpy.structure.spacegroups import GetSpaceGroup, FindSpaceGroup +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) + ("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(GetSpaceGroup(sgno), GetSpaceGroup(name)) + 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") @@ -62,10 +78,26 @@ def test_GetSpaceGroup(self): 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 = GetSpaceGroup(123) + sg123 = get_space_group(123) ops123 = list(sg123.iter_symops()) self.assertRaises(ValueError, FindSpaceGroup, []) self.assertRaises(ValueError, FindSpaceGroup, 2 * ops123) @@ -74,11 +106,24 @@ def test_FindSpaceGroup(self): self.assertIsNot(sg123, sg123r) self.assertIsNot(sg123.symop_list, sg123r.symop_list) self.assertEqual(ops123[::-1], sg123r.symop_list) - self.assertEqual(_hashSymOpList(sg123.symop_list), - _hashSymOpList(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" @@ -86,47 +131,48 @@ def test__hashSymOpList(self): 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(GetSpaceGroup(1)), - "SpaceGroup #1 (P1, Triclinic). Symmetry matrices: 1, point sym. matr.: 1" + repr(get_space_group(1)), + "SpaceGroup #1 (P1, Triclinic). Symmetry matrices: 1, point sym. matr.: 1", ) self.assertEqual( - repr(GetSpaceGroup(3)), - "SpaceGroup #3 (P2, Monoclinic). Symmetry matrices: 2, point sym. matr.: 2" + repr(get_space_group(3)), + "SpaceGroup #3 (P2, Monoclinic). Symmetry matrices: 2, point sym. matr.: 2", ) self.assertEqual( - repr(GetSpaceGroup(16)), - ( - "SpaceGroup #16 (P222, Orthorhombic). Symmetry matrices: 4, point sym. " - "matr.: 4" - ) + repr(get_space_group(16)), + ("SpaceGroup #16 (P222, Orthorhombic). Symmetry matrices: 4, point sym. " "matr.: 4"), ) self.assertEqual( - repr(GetSpaceGroup(75)), - "SpaceGroup #75 (P4, Tetragonal). Symmetry matrices: 4, point sym. matr.: 4" + repr(get_space_group(75)), + "SpaceGroup #75 (P4, Tetragonal). Symmetry matrices: 4, point sym. matr.: 4", ) self.assertEqual( - repr(GetSpaceGroup(143)), - "SpaceGroup #143 (P3, Trigonal). Symmetry matrices: 3, point sym. matr.: 3" + repr(get_space_group(143)), + "SpaceGroup #143 (P3, Trigonal). Symmetry matrices: 3, point sym. matr.: 3", ) self.assertEqual( - repr(GetSpaceGroup(168)), - "SpaceGroup #168 (P6, Hexagonal). Symmetry matrices: 6, point sym. matr.: 6" + repr(get_space_group(168)), + "SpaceGroup #168 (P6, Hexagonal). Symmetry matrices: 6, point sym. matr.: 6", ) self.assertEqual( - repr(GetSpaceGroup(229)), - ( - "SpaceGroup #229 (Im-3m, Cubic). Symmetry matrices: 96, point sym. " - "matr.: 48" - ) + 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__': +if __name__ == "__main__": unittest.main() diff --git a/tests/test_structure.py b/tests/test_structure.py new file mode 100644 index 00000000..39591bc1 --- /dev/null +++ b/tests/test_structure.py @@ -0,0 +1,957 @@ +#!/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/src/diffpy/structure/tests/testsupercell.py b/tests/test_supercell.py similarity index 61% rename from src/diffpy/structure/tests/testsupercell.py rename to tests/test_supercell.py index 52a563e2..1b476c46 100644 --- a/src/diffpy/structure/tests/testsupercell.py +++ b/tests/test_supercell.py @@ -12,86 +12,78 @@ # See LICENSE_DANSE.txt for license information. # ############################################################################## - -"""Unit tests for supercell.py -""" - +"""Unit tests for supercell.py.""" import unittest -from diffpy.structure.tests.testutils import datafile +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 = datafile("CdSe_bulk.stru") + cdsefile = self.datafile("CdSe_bulk.stru") TestSuperCell.stru_cdse = Structure(filename=cdsefile) if TestSuperCell.stru_ni is None: - nifile = datafile("Ni.stru") + 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)) + """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. - """ + """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.abcABG()[:3] - a1, b2, c3 = ni_123.lattice.abcABG()[: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) + 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) + 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. - """ + """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 = 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__': +if __name__ == "__main__": unittest.main() diff --git a/tests/test_symmetryutilities.py b/tests/test_symmetryutilities.py new file mode 100644 index 00000000..c5b37fc8 --- /dev/null +++ b/tests/test_symmetryutilities.py @@ -0,0 +1,1288 @@ +#!/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/src/diffpy/structure/tests/debug.py b/tests/test_utils.py similarity index 50% rename from src/diffpy/structure/tests/debug.py rename to tests/test_utils.py index 221091de..0c89ae09 100644 --- a/src/diffpy/structure/tests/debug.py +++ b/tests/test_utils.py @@ -12,19 +12,26 @@ # See LICENSE.txt for license information. # ############################################################################## +"""Test for Structure utilities.""" +import pytest -""" -Convenience module for debugging the unit tests using +from diffpy.structure.utils import atom_bare_symbol, atomBareSymbol -python -m diffpy.structure.tests.debug -Exceptions raised by failed tests or other errors are not caught. -""" +def test_atomBareSymbol(): + assert atomBareSymbol("Cl-") == "Cl" + assert atomBareSymbol("Ca2+") == "Ca" + assert atomBareSymbol("12-C") == "C" -if __name__ == '__main__': - import sys - from diffpy.structure.tests import testsuite - pattern = sys.argv[1] if len(sys.argv) > 1 else '' - suite = testsuite(pattern) - suite.debug() +@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 new file mode 100644 index 00000000..5d55a864 --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,10 @@ +"""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/src/diffpy/structure/tests/testdata/BubbleRaftShort.xcfg b/tests/testdata/BubbleRaftShort.xcfg similarity index 100% rename from src/diffpy/structure/tests/testdata/BubbleRaftShort.xcfg rename to tests/testdata/BubbleRaftShort.xcfg diff --git a/src/diffpy/structure/tests/testdata/CdSe_bulk.stru b/tests/testdata/CdSe_bulk.stru similarity index 98% rename from src/diffpy/structure/tests/testdata/CdSe_bulk.stru rename to tests/testdata/CdSe_bulk.stru index 8ad56e85..dbd3179c 100644 --- a/src/diffpy/structure/tests/testdata/CdSe_bulk.stru +++ b/tests/testdata/CdSe_bulk.stru @@ -2,11 +2,11 @@ title Cell structure file of CdSe #186 format pdffit scale 0.846685 sharp 0.366927, 0.591251, 3.700000 -spcgr P63mc +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 +atoms CD 0.33340001 0.66670001 0.00000000 1.0000 0.00000000 0.00000000 0.00000000 0.0000 0.01303035 0.01303035 0.01401959 diff --git a/src/diffpy/structure/tests/testdata/LiCl-bad.cif b/tests/testdata/LiCl-bad.cif similarity index 92% rename from src/diffpy/structure/tests/testdata/LiCl-bad.cif rename to tests/testdata/LiCl-bad.cif index e1a30c3c..4c6f6f83 100644 --- a/src/diffpy/structure/tests/testdata/LiCl-bad.cif +++ b/tests/testdata/LiCl-bad.cif @@ -2,15 +2,15 @@ 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 +_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). ' @@ -229,4 +229,3 @@ loop_ _eof #### End of Crystallographic Information File #### - diff --git a/src/diffpy/structure/tests/testdata/Ni-bad.stru b/tests/testdata/Ni-bad.stru similarity index 98% rename from src/diffpy/structure/tests/testdata/Ni-bad.stru rename to tests/testdata/Ni-bad.stru index f7b5469c..766ca134 100644 --- a/src/diffpy/structure/tests/testdata/Ni-bad.stru +++ b/tests/testdata/Ni-bad.stru @@ -2,11 +2,11 @@ title structure Ni FCC format pdffit scale 1.000000 sharp 0.000000, 0.000000, 1.000000, 0.000000 -spcgr Fm-3m +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 +atoms NI 0.00000000 0.00000000 0.00000000 1.0000 0.00000000 0.00000000 0.00000000 0.0000 0.00126651 0.00126651 0.00126651 diff --git a/src/diffpy/structure/tests/testdata/Ni-discus.stru b/tests/testdata/Ni-discus.stru similarity index 93% rename from src/diffpy/structure/tests/testdata/Ni-discus.stru rename to tests/testdata/Ni-discus.stru index 8d8e64c7..3e5fab07 100644 --- a/src/diffpy/structure/tests/testdata/Ni-discus.stru +++ b/tests/testdata/Ni-discus.stru @@ -1,8 +1,8 @@ title structure Ni FCC -spcgr Fm-3m +spcgr Fm-3m cell 3.520000, 3.520000, 3.520000, 90.000000, 90.000000, 90.000000 ncell 1, 1, 1, 4 -atoms +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 diff --git a/src/diffpy/structure/tests/testdata/Ni.stru b/tests/testdata/Ni.stru similarity index 98% rename from src/diffpy/structure/tests/testdata/Ni.stru rename to tests/testdata/Ni.stru index 5d39b959..e13f2693 100644 --- a/src/diffpy/structure/tests/testdata/Ni.stru +++ b/tests/testdata/Ni.stru @@ -2,11 +2,11 @@ title structure Ni FCC format pdffit scale 1.000000 sharp 0.000000, 0.000000, 1.000000, 0.000000 -spcgr Fm-3m +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 +atoms NI 0.00000000 0.00000000 0.00000000 1.0000 0.00000000 0.00000000 0.00000000 0.0000 0.00126651 0.00126651 0.00126651 diff --git a/src/diffpy/structure/tests/testdata/Ni_prim123.stru b/tests/testdata/Ni_prim123.stru similarity index 100% rename from src/diffpy/structure/tests/testdata/Ni_prim123.stru rename to tests/testdata/Ni_prim123.stru diff --git a/tests/testdata/Ni_ref.cif b/tests/testdata/Ni_ref.cif new file mode 100644 index 00000000..858dd3c6 --- /dev/null +++ b/tests/testdata/Ni_ref.cif @@ -0,0 +1,20 @@ +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/src/diffpy/structure/tests/testdata/PbTe.cif b/tests/testdata/PbTe.cif similarity index 100% rename from src/diffpy/structure/tests/testdata/PbTe.cif rename to tests/testdata/PbTe.cif diff --git a/src/diffpy/structure/tests/testdata/TeI-unkocc.cif b/tests/testdata/TeI-unkocc.cif similarity index 100% rename from src/diffpy/structure/tests/testdata/TeI-unkocc.cif rename to tests/testdata/TeI-unkocc.cif diff --git a/src/diffpy/structure/tests/testdata/TeI.cif b/tests/testdata/TeI.cif similarity index 100% rename from src/diffpy/structure/tests/testdata/TeI.cif rename to tests/testdata/TeI.cif diff --git a/src/diffpy/structure/tests/testdata/ZnSb_RT_Q28X_VM_20_fxiso.rstr b/tests/testdata/ZnSb_RT_Q28X_VM_20_fxiso.rstr similarity index 100% rename from src/diffpy/structure/tests/testdata/ZnSb_RT_Q28X_VM_20_fxiso.rstr rename to tests/testdata/ZnSb_RT_Q28X_VM_20_fxiso.rstr diff --git a/src/diffpy/structure/tests/testdata/arginine.pdb b/tests/testdata/arginine.pdb similarity index 76% rename from src/diffpy/structure/tests/testdata/arginine.pdb rename to tests/testdata/arginine.pdb index c0a13ae8..008c09ce 100644 --- a/src/diffpy/structure/tests/testdata/arginine.pdb +++ b/tests/testdata/arginine.pdb @@ -1,28 +1,28 @@ -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 +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/src/diffpy/structure/tests/testdata/badspacegroup.cif b/tests/testdata/badspacegroup.cif similarity index 100% rename from src/diffpy/structure/tests/testdata/badspacegroup.cif rename to tests/testdata/badspacegroup.cif diff --git a/src/diffpy/structure/tests/testdata/bucky-bad1.xyz b/tests/testdata/bucky-bad1.xyz similarity index 100% rename from src/diffpy/structure/tests/testdata/bucky-bad1.xyz rename to tests/testdata/bucky-bad1.xyz diff --git a/src/diffpy/structure/tests/testdata/bucky-bad2.xyz b/tests/testdata/bucky-bad2.xyz similarity index 99% rename from src/diffpy/structure/tests/testdata/bucky-bad2.xyz rename to tests/testdata/bucky-bad2.xyz index e08b94d6..5f4012bf 100644 --- a/src/diffpy/structure/tests/testdata/bucky-bad2.xyz +++ b/tests/testdata/bucky-bad2.xyz @@ -60,5 +60,3 @@ bucky-ball C 1.95470 -1.42020 -2.57930 C 1.57570 -2.58660 -1.82130 C 2.33370 -2.58660 -0.59480 - - diff --git a/src/diffpy/structure/tests/testdata/bucky-plain-bad.xyz b/tests/testdata/bucky-plain-bad.xyz similarity index 100% rename from src/diffpy/structure/tests/testdata/bucky-plain-bad.xyz rename to tests/testdata/bucky-plain-bad.xyz diff --git a/src/diffpy/structure/tests/testdata/bucky-plain.xyz b/tests/testdata/bucky-plain.xyz similarity index 100% rename from src/diffpy/structure/tests/testdata/bucky-plain.xyz rename to tests/testdata/bucky-plain.xyz diff --git a/src/diffpy/structure/tests/testdata/bucky-raw.xyz b/tests/testdata/bucky-raw.xyz similarity index 100% rename from src/diffpy/structure/tests/testdata/bucky-raw.xyz rename to tests/testdata/bucky-raw.xyz diff --git a/src/diffpy/structure/tests/testdata/bucky.xyz b/tests/testdata/bucky.xyz similarity index 99% rename from src/diffpy/structure/tests/testdata/bucky.xyz rename to tests/testdata/bucky.xyz index fc75501a..539793b5 100644 --- a/src/diffpy/structure/tests/testdata/bucky.xyz +++ b/tests/testdata/bucky.xyz @@ -63,5 +63,3 @@ bucky-ball C 1.95470 -1.42020 -2.57930 C 1.57570 -2.58660 -1.82130 C 2.33370 -2.58660 -0.59480 - - diff --git a/src/diffpy/structure/tests/testdata/curlybrackets.cif b/tests/testdata/curlybrackets.cif similarity index 100% rename from src/diffpy/structure/tests/testdata/curlybrackets.cif rename to tests/testdata/curlybrackets.cif diff --git a/src/diffpy/structure/tests/testdata/customsg.cif b/tests/testdata/customsg.cif similarity index 100% rename from src/diffpy/structure/tests/testdata/customsg.cif rename to tests/testdata/customsg.cif diff --git a/src/diffpy/structure/tests/testdata/graphite.cif b/tests/testdata/graphite.cif similarity index 100% rename from src/diffpy/structure/tests/testdata/graphite.cif rename to tests/testdata/graphite.cif diff --git a/src/diffpy/structure/tests/testdata/hexagon-raw-bad.xyz b/tests/testdata/hexagon-raw-bad.xyz similarity index 100% rename from src/diffpy/structure/tests/testdata/hexagon-raw-bad.xyz rename to tests/testdata/hexagon-raw-bad.xyz diff --git a/src/diffpy/structure/tests/testdata/hexagon-raw.xy b/tests/testdata/hexagon-raw.xy similarity index 100% rename from src/diffpy/structure/tests/testdata/hexagon-raw.xy rename to tests/testdata/hexagon-raw.xy diff --git a/src/diffpy/structure/tests/testdata/hexagon-raw.xyz b/tests/testdata/hexagon-raw.xyz similarity index 100% rename from src/diffpy/structure/tests/testdata/hexagon-raw.xyz rename to tests/testdata/hexagon-raw.xyz diff --git a/src/diffpy/structure/tests/testdata/nosites.cif b/tests/testdata/nosites.cif similarity index 100% rename from src/diffpy/structure/tests/testdata/nosites.cif rename to tests/testdata/nosites.cif