diffpy.structure 3.3.0__tar.gz → 3.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/LICENSE.rst +1 -1
  2. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/PKG-INFO +13 -10
  3. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/README.rst +5 -3
  4. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/pyproject.toml +16 -6
  5. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/requirements/docs.txt +1 -0
  6. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/__init__.py +1 -10
  7. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/__init__.py +3 -5
  8. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/_legacy_importer.py +3 -3
  9. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/apps/__init__.py +1 -3
  10. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/apps/anyeye.py +4 -5
  11. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/apps/transtru.py +2 -2
  12. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/atom.py +10 -8
  13. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/expansion/__init__.py +0 -1
  14. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/expansion/makeellipsoid.py +1 -3
  15. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/expansion/shapeutils.py +1 -2
  16. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/expansion/supercell_mod.py +3 -5
  17. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/lattice.py +4 -3
  18. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/mmlibspacegroups.py +1 -2
  19. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/__init__.py +0 -1
  20. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/p_auto.py +8 -6
  21. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/p_cif.py +14 -9
  22. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/p_discus.py +4 -6
  23. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/p_pdb.py +2 -4
  24. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/p_pdffit.py +1 -3
  25. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/p_rawxyz.py +2 -3
  26. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/p_xcfg.py +4 -3
  27. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/p_xyz.py +4 -5
  28. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/parser_index_mod.py +0 -1
  29. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/parsers/structureparser.py +1 -3
  30. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/pdffitstructure.py +1 -3
  31. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/sgtbxspacegroups.py +3 -3
  32. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/spacegroupmod.py +6 -5
  33. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/spacegroups.py +5 -3
  34. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/structure.py +25 -20
  35. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/structureerrors.py +1 -3
  36. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/symmetryutilities.py +31 -21
  37. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/utils.py +3 -4
  38. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy/structure/version.py +3 -4
  39. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy.structure.egg-info/PKG-INFO +13 -10
  40. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy.structure.egg-info/SOURCES.txt +3 -3
  41. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_atom.py +3 -6
  42. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_lattice.py +12 -14
  43. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_loadstructure.py +9 -8
  44. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_p_cif.py +9 -10
  45. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_p_discus.py +7 -9
  46. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_p_pdffit.py +11 -13
  47. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_parsers.py +18 -20
  48. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_spacegroups.py +1 -3
  49. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_structure.py +41 -42
  50. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_supercell.py +4 -6
  51. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_symmetryutilities.py +19 -20
  52. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/test_version.py +4 -4
  53. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/AUTHORS.rst +0 -0
  54. /diffpy_structure-3.3.0/LICENSE_DANSE.rst → /diffpy_structure-3.3.1/LICENSE-DANSE.rst +0 -0
  55. /diffpy_structure-3.3.0/LICENSE_pymmlib.rst → /diffpy_structure-3.3.1/LICENSE-pymmlib.rst +0 -0
  56. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/MANIFEST.in +0 -0
  57. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/requirements/build.txt +0 -0
  58. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/requirements/conda.txt +0 -0
  59. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/requirements/pip.txt +0 -0
  60. /diffpy_structure-3.3.0/requirements/test.txt → /diffpy_structure-3.3.1/requirements/tests.txt +0 -0
  61. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/setup.cfg +0 -0
  62. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy.structure.egg-info/dependency_links.txt +0 -0
  63. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy.structure.egg-info/entry_points.txt +0 -0
  64. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy.structure.egg-info/requires.txt +0 -0
  65. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/src/diffpy.structure.egg-info/top_level.txt +0 -0
  66. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/conftest.py +0 -0
  67. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/BubbleRaftShort.xcfg +0 -0
  68. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/CdSe_bulk.stru +0 -0
  69. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/LiCl-bad.cif +0 -0
  70. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/Ni-bad.stru +0 -0
  71. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/Ni-discus.stru +0 -0
  72. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/Ni.stru +0 -0
  73. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/Ni_prim123.stru +0 -0
  74. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/Ni_ref.cif +0 -0
  75. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/PbTe.cif +0 -0
  76. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/TeI-unkocc.cif +0 -0
  77. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/TeI.cif +0 -0
  78. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/ZnSb_RT_Q28X_VM_20_fxiso.rstr +0 -0
  79. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/arginine.pdb +0 -0
  80. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/badspacegroup.cif +0 -0
  81. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/bucky-bad1.xyz +0 -0
  82. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/bucky-bad2.xyz +0 -0
  83. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/bucky-plain-bad.xyz +0 -0
  84. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/bucky-plain.xyz +0 -0
  85. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/bucky-raw.xyz +0 -0
  86. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/bucky.xyz +0 -0
  87. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/curlybrackets.cif +0 -0
  88. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/customsg.cif +0 -0
  89. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/graphite.cif +0 -0
  90. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/hexagon-raw-bad.xyz +0 -0
  91. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/hexagon-raw.xy +0 -0
  92. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/hexagon-raw.xyz +0 -0
  93. {diffpy_structure-3.3.0 → diffpy_structure-3.3.1}/tests/testdata/nosites.cif +0 -0
@@ -15,7 +15,7 @@ Copyright (c) 2014, Australian Synchrotron Research Program Inc., ("ASRP")
15
15
 
16
16
  Copyright (c) 2014-2019, Brookhaven Science Associates, Brookhaven National Laboratory
17
17
 
18
- Copyright (c) 2024, The Trustees of Columbia University in the City of New York.
18
+ Copyright (c) 2024-2025, The Trustees of Columbia University in the City of New York.
19
19
  All rights reserved.
20
20
 
21
21
  The "DiffPy-CMI" is distributed subject to the following license conditions:
@@ -1,12 +1,12 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: diffpy.structure
3
- Version: 3.3.0
3
+ Version: 3.3.1
4
4
  Summary: Crystal structure container and parsers for structure formats.
5
- Author-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
6
- Maintainer-email: "Simon J.L. Billinge group" <simon.billinge@gmail.com>
5
+ Author-email: Simon Billinge <sb2896@columbia.edu>
6
+ Maintainer-email: Simon Billinge <sb2896@columbia.edu>
7
7
  Project-URL: Homepage, https://github.com/diffpy/diffpy.structure/
8
8
  Project-URL: Issues, https://github.com/diffpy/diffpy.structure/issues/
9
- Keywords: diffpy,crystal structure data storage CIF PDB
9
+ Keywords: diffpy,crystal structure data storage,CIF,PDB
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
@@ -23,12 +23,13 @@ Classifier: Topic :: Scientific/Engineering :: Physics
23
23
  Classifier: Topic :: Scientific/Engineering :: Chemistry
24
24
  Requires-Python: <3.14,>=3.11
25
25
  Description-Content-Type: text/x-rst
26
+ License-File: LICENSE-DANSE.rst
27
+ License-File: LICENSE-pymmlib.rst
26
28
  License-File: LICENSE.rst
27
- License-File: LICENSE_DANSE.rst
28
- License-File: LICENSE_pymmlib.rst
29
29
  License-File: AUTHORS.rst
30
30
  Requires-Dist: numpy
31
31
  Requires-Dist: pycifrw
32
+ Dynamic: license-file
32
33
 
33
34
  |Icon| |title|_
34
35
  ===============
@@ -40,7 +41,7 @@ Requires-Dist: pycifrw
40
41
  :target: https://diffpy.github.io/diffpy.structure
41
42
  :height: 100px
42
43
 
43
- |PyPi| |Forge| |PythonVersion| |PR|
44
+ |PyPI| |Forge| |PythonVersion| |PR|
44
45
 
45
46
  |CI| |Codecov| |Black| |Tracking|
46
47
 
@@ -58,7 +59,7 @@ Requires-Dist: pycifrw
58
59
 
59
60
  .. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
60
61
 
61
- .. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.structure
62
+ .. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.structure
62
63
  :target: https://pypi.org/project/diffpy.structure/
63
64
 
64
65
  .. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.structure
@@ -164,7 +165,7 @@ trying to commit again.
164
165
 
165
166
  Improvements and fixes are always appreciated.
166
167
 
167
- Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.structure/blob/main/CODE_OF_CONDUCT.rst>`_.
168
+ Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.structure/blob/main/CODE-OF-CONDUCT.rst>`_.
168
169
 
169
170
  Acknowledgement
170
171
  ---------------
@@ -175,6 +176,8 @@ originate from the `pymmlib project <http://pymmlib.sourceforge.net>`_.
175
176
  Less common settings of space groups were generating using the
176
177
  `Computational Crystallography Toolbox <http://cctbx.sourceforge.net>`_.
177
178
 
179
+ ``diffpy.structure`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
180
+
178
181
  Contact
179
182
  -------
180
183
 
@@ -8,7 +8,7 @@
8
8
  :target: https://diffpy.github.io/diffpy.structure
9
9
  :height: 100px
10
10
 
11
- |PyPi| |Forge| |PythonVersion| |PR|
11
+ |PyPI| |Forge| |PythonVersion| |PR|
12
12
 
13
13
  |CI| |Codecov| |Black| |Tracking|
14
14
 
@@ -26,7 +26,7 @@
26
26
 
27
27
  .. |PR| image:: https://img.shields.io/badge/PR-Welcome-29ab47ff
28
28
 
29
- .. |PyPi| image:: https://img.shields.io/pypi/v/diffpy.structure
29
+ .. |PyPI| image:: https://img.shields.io/pypi/v/diffpy.structure
30
30
  :target: https://pypi.org/project/diffpy.structure/
31
31
 
32
32
  .. |PythonVersion| image:: https://img.shields.io/pypi/pyversions/diffpy.structure
@@ -132,7 +132,7 @@ trying to commit again.
132
132
 
133
133
  Improvements and fixes are always appreciated.
134
134
 
135
- Before contribuing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.structure/blob/main/CODE_OF_CONDUCT.rst>`_.
135
+ Before contributing, please read our `Code of Conduct <https://github.com/diffpy/diffpy.structure/blob/main/CODE-OF-CONDUCT.rst>`_.
136
136
 
137
137
  Acknowledgement
138
138
  ---------------
@@ -143,6 +143,8 @@ originate from the `pymmlib project <http://pymmlib.sourceforge.net>`_.
143
143
  Less common settings of space groups were generating using the
144
144
  `Computational Crystallography Toolbox <http://cctbx.sourceforge.net>`_.
145
145
 
146
+ ``diffpy.structure`` is built and maintained with `scikit-package <https://scikit-package.github.io/scikit-package/>`_.
147
+
146
148
  Contact
147
149
  -------
148
150
 
@@ -6,13 +6,13 @@ build-backend = "setuptools.build_meta"
6
6
  name = "diffpy.structure"
7
7
  dynamic=['version', 'dependencies']
8
8
  authors = [
9
- { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
9
+ { name="Simon Billinge", email="sb2896@columbia.edu" },
10
10
  ]
11
11
  maintainers = [
12
- { name="Simon J.L. Billinge group", email="simon.billinge@gmail.com" },
12
+ { name="Simon Billinge", email="sb2896@columbia.edu" },
13
13
  ]
14
14
  description = "Crystal structure container and parsers for structure formats."
15
- keywords = ['diffpy', 'crystal structure data storage CIF PDB']
15
+ keywords = ['diffpy', 'crystal structure data storage', 'CIF', 'PDB']
16
16
  readme = "README.rst"
17
17
  requires-python = ">=3.11, <3.14"
18
18
  classifiers = [
@@ -32,13 +32,13 @@ classifiers = [
32
32
  'Topic :: Scientific/Engineering :: Chemistry',
33
33
  ]
34
34
 
35
+ [project.scripts]
36
+ transtru = "diffpy.structure.apps.transtru:main"
37
+
35
38
  [project.urls]
36
39
  Homepage = "https://github.com/diffpy/diffpy.structure/"
37
40
  Issues = "https://github.com/diffpy/diffpy.structure/issues/"
38
41
 
39
- [project.scripts]
40
- transtru = "diffpy.structure.apps.transtru:main"
41
-
42
42
  [tool.setuptools-git-versioning]
43
43
  enabled = true
44
44
  template = "{tag}"
@@ -54,6 +54,16 @@ namespaces = false # to disable scanning PEP 420 namespaces (true by default)
54
54
  [tool.setuptools.dynamic]
55
55
  dependencies = {file = ["requirements/pip.txt"]}
56
56
 
57
+ [tool.codespell]
58
+ exclude-file = ".codespell/ignore_lines.txt"
59
+ ignore-words = ".codespell/ignore_words.txt"
60
+ skip = "*.cif,*.dat"
61
+
62
+ [tool.docformatter]
63
+ recursive = true
64
+ wrap-summaries = 72
65
+ wrap-descriptions = 72
66
+
57
67
  [tool.black]
58
68
  line-length = 115
59
69
  include = '\.pyi?$'
@@ -1,4 +1,5 @@
1
1
  sphinx
2
2
  sphinx_rtd_theme
3
+ sphinx-copybutton
3
4
  doctr
4
5
  m2r
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  ##############################################################################
3
3
  #
4
- # (c) 2024 The Trustees of Columbia University in the City of New York.
4
+ # (c) 2024-2025 The Trustees of Columbia University in the City of New York.
5
5
  # All rights reserved.
6
6
  #
7
7
  # File coded by: Billinge Group members and community contributors.
@@ -12,12 +12,3 @@
12
12
  # See LICENSE.rst for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """Blank namespace package for module diffpy."""
17
-
18
-
19
- from pkgutil import extend_path
20
-
21
- __path__ = extend_path(__path__, __name__)
22
-
23
- # End of file
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env python
2
2
  ##############################################################################
3
3
  #
4
- # (c) 2024 The Trustees of Columbia University in the City of New York.
4
+ # (c) 2024-2025 The Trustees of Columbia University in the City of New York.
5
5
  # All rights reserved.
6
6
  #
7
- # File coded by: Billinge Group members and community contributors.
7
+ # File coded by: Chris Farrow, Pavol Juhas, Simon Billinge, Billinge Group members.
8
8
  #
9
9
  # See GitHub contributions for a more detailed list of contributors.
10
10
  # https://github.com/diffpy/diffpy.structure/graphs/contributors
@@ -12,9 +12,7 @@
12
12
  # See LICENSE.rst for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """
17
- Crystal structure container and parsers for structure formats.
15
+ """Crystal structure container and parsers for structure formats.
18
16
 
19
17
  Classes related to the structure of materials:
20
18
  * Atom
@@ -12,9 +12,8 @@
12
12
  # See LICENSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """
17
- Support import of old camel-case module names with DeprecationWarning.
15
+ """Support import of old camel-case module names with
16
+ DeprecationWarning.
18
17
 
19
18
  The imported camel-case modules are aliases for the current module
20
19
  instances. Their `__name__` attributes are thus all in lower-case.
@@ -61,6 +60,7 @@ class FindRenamedStructureModule(importlib.abc.MetaPathFinder):
61
60
 
62
61
  class MapRenamedStructureModule(importlib.abc.Loader):
63
62
  """Loader for old camel-case module names.
63
+
64
64
  Import the current module and alias it under the old name.
65
65
  """
66
66
 
@@ -12,6 +12,4 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """Script applications that use the `diffpy.structure` package.
17
- """
15
+ """Script applications that use the `diffpy.structure` package."""
@@ -12,9 +12,7 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """
17
- Anyeye view structure file in atomeye.
15
+ """Anyeye view structure file in atomeye.
18
16
 
19
17
  Usage: ``anyeye [options] strufile``
20
18
 
@@ -65,7 +63,8 @@ pd = {
65
63
 
66
64
 
67
65
  def usage(style=None):
68
- """Show usage info, for ``style=="brief"`` show only first 2 lines."""
66
+ """Show usage info, for ``style=="brief"`` show only first 2
67
+ lines."""
69
68
  import os.path
70
69
 
71
70
  myname = os.path.basename(sys.argv[0])
@@ -175,7 +174,7 @@ def cleanUp(pd):
175
174
 
176
175
 
177
176
  def parseFormula(formula):
178
- """Parse chemical formula and return a list of elements"""
177
+ """Parse chemical formula and return a list of elements."""
179
178
  # remove all blanks
180
179
  formula = re.sub(r"\s", "", formula)
181
180
  if not re.match("^[A-Z]", formula):
@@ -12,7 +12,6 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
15
  """Translate structure file to different format.
17
16
 
18
17
  Usage: ``transtru INFMT..OUTFMT strufile``
@@ -44,7 +43,8 @@ from diffpy.structure.structureerrors import StructureFormatError
44
43
 
45
44
 
46
45
  def usage(style=None):
47
- """Show usage info, for ``style=="brief"`` show only first 2 lines."""
46
+ """Show usage info, for ``style=="brief"`` show only first 2
47
+ lines."""
48
48
  import os.path
49
49
 
50
50
  myname = os.path.basename(sys.argv[0])
@@ -12,10 +12,8 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """
17
- Provide class Atom for managing properties of an atom in structure model.
18
- """
15
+ """Provide class Atom for managing properties of an atom in structure
16
+ model."""
19
17
 
20
18
  import numpy
21
19
 
@@ -176,7 +174,8 @@ class Atom(object):
176
174
  return msd
177
175
 
178
176
  def msdCart(self, vc):
179
- """Calculate mean square displacement along the Cartesian vector.
177
+ """Calculate mean square displacement along the Cartesian
178
+ vector.
180
179
 
181
180
  Parameters
182
181
  ----------
@@ -252,7 +251,8 @@ class Atom(object):
252
251
 
253
252
  @property
254
253
  def xyz_cartn(self):
255
- """numpy.ndarray: Atom position in absolute Cartesian coordinates.
254
+ """numpy.ndarray: Atom position in absolute Cartesian
255
+ coordinates.
256
256
 
257
257
  This is computed from fractional coordinates `xyz` and the
258
258
  current `lattice` setup. Assignment to *xyz_cartn* or
@@ -301,7 +301,8 @@ class Atom(object):
301
301
 
302
302
  @property
303
303
  def U(self):
304
- """numpy.ndarray : The 3x3 matrix of anisotropic atomic displacements.
304
+ """numpy.ndarray : The 3x3 matrix of anisotropic atomic
305
+ displacements.
305
306
 
306
307
  For isotropic displacements (when `anisotropy` is ``False``)
307
308
  assignment to *U* uses only the first ``Unew[0, 0]`` element
@@ -537,7 +538,8 @@ class _AtomCartesianCoordinates(numpy.ndarray):
537
538
  return
538
539
 
539
540
  def __array_wrap__(self, out_arr, context=None, return_scalar=None):
540
- """Ensure math operations on this type yield standard numpy array."""
541
+ """Ensure math operations on this type yield standard numpy
542
+ array."""
541
543
  return out_arr.view(numpy.ndarray)
542
544
 
543
545
 
@@ -12,7 +12,6 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
15
  """Methods and classes for manipulating `Structure` instances.
17
16
 
18
17
  Package content:
@@ -12,7 +12,6 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
15
  """Make a spheroid nanoparticle from a template structure."""
17
16
 
18
17
  from math import ceil
@@ -42,8 +41,7 @@ def makeSphere(S, radius):
42
41
 
43
42
 
44
43
  def makeEllipsoid(S, a, b=None, c=None):
45
- """
46
- Cut a `Structure` out of another one.
44
+ """Cut a `Structure` out of another one.
47
45
 
48
46
  Parameters
49
47
  ----------
@@ -12,7 +12,6 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
15
  """Utilities for making shapes."""
17
16
 
18
17
 
@@ -33,7 +32,7 @@ def findCenter(S):
33
32
  """
34
33
  best = -1
35
34
  bestd = len(S)
36
- center = [0.5, 0.5, 0.5] # the cannonical center
35
+ center = [0.5, 0.5, 0.5] # the canonical center
37
36
 
38
37
  for i in range(len(S)):
39
38
  d = S.lattice.dist(S[i].xyz, center)
@@ -12,9 +12,8 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """This module contains functions for simple `Structure` manipulation.
17
- """
15
+ """This module contains functions for simple `Structure`
16
+ manipulation."""
18
17
 
19
18
  import numpy
20
19
 
@@ -22,8 +21,7 @@ from diffpy.structure import Atom, Structure
22
21
 
23
22
 
24
23
  def supercell(S, mno):
25
- """
26
- Perform supercell expansion for a `Structure`.
24
+ """Perform supercell expansion for a `Structure`.
27
25
 
28
26
  New `lattice` parameters are multiplied and fractional coordinates
29
27
  divided by corresponding multiplier. New `Atoms` are grouped with
@@ -12,9 +12,8 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """Class Lattice stores properties and provides simple operations in lattice
17
- coordinate system.
15
+ """Class Lattice stores properties and provides simple operations in
16
+ lattice coordinate system.
18
17
 
19
18
  Attributes
20
19
  ----------
@@ -442,6 +441,7 @@ class Lattice(object):
442
441
 
443
442
  def abcABG(self):
444
443
  """Return the cell parameters in the standard setting.
444
+
445
445
  Returns
446
446
  -------
447
447
  tuple :
@@ -452,6 +452,7 @@ class Lattice(object):
452
452
 
453
453
  def reciprocal(self):
454
454
  """Return the reciprocal lattice of the current lattice.
455
+
455
456
  Returns
456
457
  -------
457
458
  Lattice
@@ -3,8 +3,7 @@
3
3
  # This code is part of the PyMMLib distribution and governed by
4
4
  # its license.Please see the LICENSE_pymmlib file that should have been
5
5
  # included as part of this package.
6
- """Space groups defined as a part of the pymmlib.
7
- """
6
+ """Space groups defined as a part of the pymmlib."""
8
7
 
9
8
  from diffpy.structure.spacegroupmod import (
10
9
  Rot_mX_mXY_mZ,
@@ -12,7 +12,6 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
15
  """Conversion plugins for various structure formats.
17
16
 
18
17
  The recognized structure formats are defined by subclassing `StructureParser`,
@@ -12,7 +12,6 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
15
  """Parser for automatic file format detection.
17
16
 
18
17
  This Parser does not provide the the `toLines()` method.
@@ -54,6 +53,7 @@ class P_auto(StructureParser):
54
53
  # parseLines helpers
55
54
  def _getOrderedFormats(self):
56
55
  """Build a list of relevance ordered structure formats.
56
+
57
57
  This only works when `self.filename` has a known extension.
58
58
  """
59
59
  from diffpy.structure.parsers import inputFormats
@@ -77,7 +77,8 @@ class P_auto(StructureParser):
77
77
  return ofmts
78
78
 
79
79
  def parseLines(self, lines):
80
- """Detect format and create `Structure` instance from a list of lines.
80
+ """Detect format and create `Structure` instance from a list of
81
+ lines.
81
82
 
82
83
  Set format attribute to the detected file format.
83
84
 
@@ -119,7 +120,8 @@ class P_auto(StructureParser):
119
120
  return self._wrapParseMethod("parse", s)
120
121
 
121
122
  def parseFile(self, filename):
122
- """Detect format and create Structure instance from an existing file.
123
+ """Detect format and create Structure instance from an existing
124
+ file.
123
125
 
124
126
  Set format attribute to the detected file format.
125
127
 
@@ -144,9 +146,9 @@ class P_auto(StructureParser):
144
146
  return self._wrapParseMethod("parseFile", filename)
145
147
 
146
148
  def _wrapParseMethod(self, method, *args, **kwargs):
147
- """A helper evaluator method that try the specified parse method with
148
- each registered structure parser and return the first successful
149
- resul.
149
+ """A helper evaluator method that try the specified parse method
150
+ with each registered structure parser and return the first
151
+ successful result.
150
152
 
151
153
  Structure parsers that match structure file extension are
152
154
  tried first.
@@ -12,7 +12,6 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
15
  """Parser for basic CIF file format.
17
16
 
18
17
  Attributes
@@ -33,6 +32,7 @@ import sys
33
32
  from contextlib import contextmanager
34
33
 
35
34
  import numpy
35
+ from CifFile.yapps3_compiled_rt import YappsSyntaxError
36
36
 
37
37
  from diffpy.structure import Atom, Lattice, Structure
38
38
  from diffpy.structure.parsers import StructureParser
@@ -267,7 +267,8 @@ class P_cif(StructureParser):
267
267
  _tr_atom_site_aniso_B_23 = staticmethod(_tr_atom_site_aniso_B_23)
268
268
 
269
269
  def _get_atom_setters(cifloop):
270
- """Static method for finding translators of CifLoop items to data in `Atom` instance.
270
+ """Static method for finding translators of CifLoop items to
271
+ data in `Atom` instance.
271
272
 
272
273
  Parameters
273
274
  ----------
@@ -408,7 +409,7 @@ class P_cif(StructureParser):
408
409
  # stop after reading the first structure
409
410
  if self.stru is not None:
410
411
  break
411
- except (StarError, ValueError, IndexError) as err:
412
+ except (YappsSyntaxError, StarError, ValueError, IndexError) as err:
412
413
  exc_type, exc_value, exc_traceback = sys.exc_info()
413
414
  emsg = str(err).strip()
414
415
  e = StructureFormatError(emsg)
@@ -416,8 +417,8 @@ class P_cif(StructureParser):
416
417
  return self.stru
417
418
 
418
419
  def _parseCifBlock(self, blockname):
419
- """Translate CIF file block, skip blocks without `_atom_site_label`.
420
- Updates data members `stru`, `eau`.
420
+ """Translate CIF file block, skip blocks without
421
+ `_atom_site_label`. Updates data members `stru`, `eau`.
421
422
 
422
423
  Parameters
423
424
  ----------
@@ -505,7 +506,8 @@ class P_cif(StructureParser):
505
506
  return
506
507
 
507
508
  def _parse_atom_site_aniso_label(self, block):
508
- """Obtain value of anisotropic thermal displacements from a `CifBlock`.
509
+ """Obtain value of anisotropic thermal displacements from a
510
+ `CifBlock`.
509
511
 
510
512
  This method updates `U` members of `Atom` instances in `self.stru`.
511
513
  The `labelindex` dictionary has to be defined beforehand.
@@ -599,7 +601,8 @@ class P_cif(StructureParser):
599
601
  return
600
602
 
601
603
  def _expandAsymmetricUnit(self, block):
602
- """Perform symmetry expansion of `self.stru` using `self.spacegroup`.
604
+ """Perform symmetry expansion of `self.stru` using
605
+ `self.spacegroup`.
603
606
 
604
607
  This method updates data in `stru` and `eau`.
605
608
 
@@ -763,7 +766,8 @@ rx_float = re.compile(r"[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?")
763
766
 
764
767
 
765
768
  def leading_float(s, d=0.0):
766
- """Extract the first float from a string and ignore trailing characters.
769
+ """Extract the first float from a string and ignore trailing
770
+ characters.
767
771
 
768
772
  Useful for extracting values from "value(std)" syntax.
769
773
 
@@ -863,7 +867,8 @@ def getParser(eps=None):
863
867
 
864
868
  @contextmanager
865
869
  def _suppressCifParserOutput():
866
- """Context manager which suppresses diagnostic messages from CIF parser."""
870
+ """Context manager which suppresses diagnostic messages from CIF
871
+ parser."""
867
872
  from CifFile import yapps3_compiled_rt
868
873
 
869
874
  print_error = yapps3_compiled_rt.print_error
@@ -12,9 +12,7 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """Parser for DISCUS structure format
17
- """
15
+ """Parser for DISCUS structure format."""
18
16
 
19
17
  import sys
20
18
  from functools import reduce
@@ -25,8 +23,8 @@ from diffpy.structure.structureerrors import StructureFormatError
25
23
 
26
24
 
27
25
  class P_discus(StructureParser):
28
- """Parser for DISCUS structure format. The parser chokes
29
- on molecule and generator records.
26
+ """Parser for DISCUS structure format. The parser chokes on molecule
27
+ and generator records.
30
28
 
31
29
  Attributes
32
30
  ----------
@@ -274,7 +272,7 @@ class P_discus(StructureParser):
274
272
  Raises
275
273
  ------
276
274
  StructureFormatError
277
- Unkown record.
275
+ Unknown record.
278
276
  """
279
277
  self.ignored_lines.append(self.line)
280
278
  return
@@ -12,7 +12,6 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
15
  """Basic parser for PDB structure format.
17
16
 
18
17
  Note
@@ -281,9 +280,8 @@ class P_pdb(StructureParser):
281
280
  return lines
282
281
 
283
282
  def atomLines(self, stru, idx):
284
- """Build `ATOM` records and possibly `SIGATM`, `ANISOU` or `SIGUIJ` records
285
- for `structure` stru `atom` number aidx.
286
- """
283
+ """Build `ATOM` records and possibly `SIGATM`, `ANISOU` or
284
+ `SIGUIJ` records for `structure` stru `atom` number aidx."""
287
285
  lines = []
288
286
  a = stru[idx]
289
287
  ad = a.__dict__
@@ -12,9 +12,7 @@
12
12
  # See LICENSE_DANSE.txt for license information.
13
13
  #
14
14
  ##############################################################################
15
-
16
- """Parser for PDFfit structure format
17
- """
15
+ """Parser for PDFfit structure format."""
18
16
 
19
17
  import sys
20
18
  from functools import reduce