autogeom 0.0.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.
- autogeom-0.0.1/LICENSE +21 -0
- autogeom-0.0.1/PKG-INFO +110 -0
- autogeom-0.0.1/README.md +90 -0
- autogeom-0.0.1/pyproject.toml +104 -0
- autogeom-0.0.1/pyproject.toml.orig +102 -0
- autogeom-0.0.1/src/autogeom/__init__.py +114 -0
- autogeom-0.0.1/src/autogeom/_convert.py +207 -0
- autogeom-0.0.1/src/autogeom/_geometry.py +440 -0
- autogeom-0.0.1/src/autogeom/_measure.py +461 -0
- autogeom-0.0.1/src/autogeom/_trajectory.py +144 -0
- autogeom-0.0.1/src/autogeom/_transform.py +312 -0
- autogeom-0.0.1/src/autogeom/_view.py +220 -0
- autogeom-0.0.1/src/autogeom/element.py +254 -0
- autogeom-0.0.1/src/autogeom/elements-data.json +1418 -0
- autogeom-0.0.1/src/autogeom/exc.py +13 -0
- autogeom-0.0.1/src/autogeom/rd.py +623 -0
- autogeom-0.0.1/src/autogeom/types.py +50 -0
- autogeom-0.0.1/src/autogeom/units.py +6 -0
autogeom-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Andreas V. Copan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
autogeom-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: autogeom
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Author: Andreas V. Copan, Troy N. Smith
|
|
5
|
+
Author-email: Andreas V. Copan <avcopan@uga.edu>, Troy N. Smith <troy.smith@uga.edu>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: numpy>=2.2
|
|
9
|
+
Requires-Dist: pint>=0.24
|
|
10
|
+
Requires-Dist: py3dmol>=2.5
|
|
11
|
+
Requires-Dist: pydantic>=2.9
|
|
12
|
+
Requires-Dist: pyparsing>=3.3.2
|
|
13
|
+
Requires-Dist: rdkit>=2025.3.3
|
|
14
|
+
Requires-Dist: scipy>=1.15
|
|
15
|
+
Requires-Dist: xyzrender>=0.3.8
|
|
16
|
+
Requires-Python: >=3.13
|
|
17
|
+
Project-URL: Repository, https://github.com/avcopan/autogeom
|
|
18
|
+
Project-URL: Documentation, https://avcopan.github.io/autogeom/
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# autogeom
|
|
22
|
+
|
|
23
|
+
[](https://opensource.org/licenses/MIT)
|
|
24
|
+
[](https://pixi.sh)
|
|
25
|
+
[](https://github.com/astral-sh/ruff)
|
|
26
|
+
[](https://github.com/astral-sh/ty)
|
|
27
|
+
[](https://github.com/copier-org/copier)
|
|
28
|
+
|
|
29
|
+
autogeom is a Python library for 3D molecular structures. It centers on a single `Geometry` model (atomic symbols, Cartesian coordinates, charge, and spin) and the functions that operate on it: xyz I/O, measurements, transformations, alignment, 3D visualization, and conversions to and from InChI, SMILES, and RDKit.
|
|
30
|
+
|
|
31
|
+
See the [documentation](https://avcopan.github.io/autogeom/) for the user guide and API reference.
|
|
32
|
+
|
|
33
|
+
autogeom continues the `Geometry` part of [automol](https://github.com/avcopan/automol) 0.0.31 under a new name. See the [changelog](https://github.com/avcopan/autogeom/blob/main/CHANGELOG.md) for what changed.
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
autogeom requires Python 3.13 or later.
|
|
38
|
+
With [Pixi](https://pixi.sh), add it from the [`avcopan/automech`](https://prefix.dev/channels/avcopan/automech) channel on prefix.dev:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pixi workspace channel add https://repo.prefix.dev/avcopan/automech
|
|
42
|
+
pixi add autogeom
|
|
43
|
+
pixi add --pypi xyzrender # optional: only on PyPI, needed for render_svg/render_gif
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Or install it from PyPI, which includes xyzrender:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install autogeom # or: uv add autogeom
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For local development, see [Contributing](https://github.com/avcopan/autogeom/blob/main/CONTRIBUTING.md).
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
Everything is imported from the package root.
|
|
57
|
+
|
|
58
|
+
### Geometry
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
import autogeom
|
|
62
|
+
from autogeom import Geometry
|
|
63
|
+
|
|
64
|
+
water = Geometry(
|
|
65
|
+
symbols=["O", "H", "H"],
|
|
66
|
+
coordinates=[[0.0, 0.0, 0.0], [0.0, 0.0, 0.96], [0.93, 0.0, -0.24]],
|
|
67
|
+
charge=0,
|
|
68
|
+
spin=0,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
com = autogeom.center_of_mass(water)
|
|
72
|
+
angle = autogeom.angle(water, [1, 0, 2], degrees=True)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### InChI, SMILES, and RDKit
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
autogeom.inchi(water) # "InChI=1S/H2O/h1H2"
|
|
79
|
+
autogeom.smiles(water) # "O"
|
|
80
|
+
autogeom.formula(water) # "H2O"
|
|
81
|
+
|
|
82
|
+
ethanol = autogeom.from_smiles("CCO") # embeds 3D coordinates
|
|
83
|
+
mol = autogeom.rdkit_mol(ethanol) # rdkit.Chem.Mol
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Visualization
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from autogeom import View
|
|
90
|
+
|
|
91
|
+
# Visualization (e.g. in a Jupyter notebook)
|
|
92
|
+
view = View()
|
|
93
|
+
view.add_geometry(water, label=True)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
In a notebook, a `Geometry` also displays itself as a 3D view.
|
|
97
|
+
|
|
98
|
+
See the [documentation](https://avcopan.github.io/autogeom/) for more on geometries, conversions, and visualization.
|
|
99
|
+
|
|
100
|
+
## Contributing
|
|
101
|
+
|
|
102
|
+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. See [Contributing](https://github.com/avcopan/autogeom/blob/main/CONTRIBUTING.md) for the design rules and workflow.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
This project is licensed under the [MIT License](https://github.com/avcopan/autogeom/blob/main/LICENSE).
|
|
107
|
+
|
|
108
|
+
## Credits
|
|
109
|
+
|
|
110
|
+
This package was created with [copier](https://copier.readthedocs.io/) and the [avcopan/copier-pixi-python](https://github.com/avcopan/copier-pixi-python) project template.
|
autogeom-0.0.1/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# autogeom
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
|
+
[](https://pixi.sh)
|
|
5
|
+
[](https://github.com/astral-sh/ruff)
|
|
6
|
+
[](https://github.com/astral-sh/ty)
|
|
7
|
+
[](https://github.com/copier-org/copier)
|
|
8
|
+
|
|
9
|
+
autogeom is a Python library for 3D molecular structures. It centers on a single `Geometry` model (atomic symbols, Cartesian coordinates, charge, and spin) and the functions that operate on it: xyz I/O, measurements, transformations, alignment, 3D visualization, and conversions to and from InChI, SMILES, and RDKit.
|
|
10
|
+
|
|
11
|
+
See the [documentation](https://avcopan.github.io/autogeom/) for the user guide and API reference.
|
|
12
|
+
|
|
13
|
+
autogeom continues the `Geometry` part of [automol](https://github.com/avcopan/automol) 0.0.31 under a new name. See the [changelog](https://github.com/avcopan/autogeom/blob/main/CHANGELOG.md) for what changed.
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
autogeom requires Python 3.13 or later.
|
|
18
|
+
With [Pixi](https://pixi.sh), add it from the [`avcopan/automech`](https://prefix.dev/channels/avcopan/automech) channel on prefix.dev:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pixi workspace channel add https://repo.prefix.dev/avcopan/automech
|
|
22
|
+
pixi add autogeom
|
|
23
|
+
pixi add --pypi xyzrender # optional: only on PyPI, needed for render_svg/render_gif
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or install it from PyPI, which includes xyzrender:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install autogeom # or: uv add autogeom
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
For local development, see [Contributing](https://github.com/avcopan/autogeom/blob/main/CONTRIBUTING.md).
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
Everything is imported from the package root.
|
|
37
|
+
|
|
38
|
+
### Geometry
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
import autogeom
|
|
42
|
+
from autogeom import Geometry
|
|
43
|
+
|
|
44
|
+
water = Geometry(
|
|
45
|
+
symbols=["O", "H", "H"],
|
|
46
|
+
coordinates=[[0.0, 0.0, 0.0], [0.0, 0.0, 0.96], [0.93, 0.0, -0.24]],
|
|
47
|
+
charge=0,
|
|
48
|
+
spin=0,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
com = autogeom.center_of_mass(water)
|
|
52
|
+
angle = autogeom.angle(water, [1, 0, 2], degrees=True)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### InChI, SMILES, and RDKit
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
autogeom.inchi(water) # "InChI=1S/H2O/h1H2"
|
|
59
|
+
autogeom.smiles(water) # "O"
|
|
60
|
+
autogeom.formula(water) # "H2O"
|
|
61
|
+
|
|
62
|
+
ethanol = autogeom.from_smiles("CCO") # embeds 3D coordinates
|
|
63
|
+
mol = autogeom.rdkit_mol(ethanol) # rdkit.Chem.Mol
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Visualization
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
from autogeom import View
|
|
70
|
+
|
|
71
|
+
# Visualization (e.g. in a Jupyter notebook)
|
|
72
|
+
view = View()
|
|
73
|
+
view.add_geometry(water, label=True)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
In a notebook, a `Geometry` also displays itself as a 3D view.
|
|
77
|
+
|
|
78
|
+
See the [documentation](https://avcopan.github.io/autogeom/) for more on geometries, conversions, and visualization.
|
|
79
|
+
|
|
80
|
+
## Contributing
|
|
81
|
+
|
|
82
|
+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. See [Contributing](https://github.com/avcopan/autogeom/blob/main/CONTRIBUTING.md) for the design rules and workflow.
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
This project is licensed under the [MIT License](https://github.com/avcopan/autogeom/blob/main/LICENSE).
|
|
87
|
+
|
|
88
|
+
## Credits
|
|
89
|
+
|
|
90
|
+
This package was created with [copier](https://copier.readthedocs.io/) and the [avcopan/copier-pixi-python](https://github.com/avcopan/copier-pixi-python) project template.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "autogeom"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
readme = "README.md"
|
|
5
|
+
license = "MIT"
|
|
6
|
+
license-files = ["LICENSE"]
|
|
7
|
+
dependencies = [
|
|
8
|
+
"numpy>=2.2",
|
|
9
|
+
"pint>=0.24",
|
|
10
|
+
"py3dmol>=2.5",
|
|
11
|
+
"pydantic>=2.9",
|
|
12
|
+
"pyparsing>=3.3.2",
|
|
13
|
+
"rdkit>=2025.3.3",
|
|
14
|
+
"scipy>=1.15",
|
|
15
|
+
"xyzrender>=0.3.8",
|
|
16
|
+
]
|
|
17
|
+
requires-python = ">= 3.13"
|
|
18
|
+
|
|
19
|
+
[[project.authors]]
|
|
20
|
+
name = "Andreas V. Copan"
|
|
21
|
+
email = "avcopan@uga.edu"
|
|
22
|
+
|
|
23
|
+
[[project.authors]]
|
|
24
|
+
name = "Troy N. Smith"
|
|
25
|
+
email = "troy.smith@uga.edu"
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Repository = "https://github.com/avcopan/autogeom"
|
|
29
|
+
Documentation = "https://avcopan.github.io/autogeom/"
|
|
30
|
+
|
|
31
|
+
[build-system]
|
|
32
|
+
build-backend = "uv_build"
|
|
33
|
+
requires = ["uv_build"]
|
|
34
|
+
|
|
35
|
+
[tool.ruff]
|
|
36
|
+
extend-exclude = [".claude"]
|
|
37
|
+
|
|
38
|
+
[tool.ruff.lint]
|
|
39
|
+
select = ["ALL"]
|
|
40
|
+
ignore = [
|
|
41
|
+
"COM812",
|
|
42
|
+
"TID252",
|
|
43
|
+
"D203",
|
|
44
|
+
"D213",
|
|
45
|
+
"CPY001",
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
[tool.ruff.lint.per-file-ignores]
|
|
49
|
+
"tests/**.py" = [
|
|
50
|
+
"S101",
|
|
51
|
+
"PLR2004",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
[tool.ruff.lint.pydocstyle]
|
|
55
|
+
convention = "google"
|
|
56
|
+
|
|
57
|
+
[tool.ty.environment]
|
|
58
|
+
python = ".pixi/envs/test/bin/python"
|
|
59
|
+
|
|
60
|
+
[tool.ty.src]
|
|
61
|
+
include = [
|
|
62
|
+
"src",
|
|
63
|
+
"tests",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
[tool.importlinter]
|
|
67
|
+
root_package = "autogeom"
|
|
68
|
+
|
|
69
|
+
[[tool.importlinter.contracts]]
|
|
70
|
+
name = "Module Layering"
|
|
71
|
+
type = "layers"
|
|
72
|
+
layers = [
|
|
73
|
+
"autogeom._view | autogeom._convert",
|
|
74
|
+
"autogeom._transform",
|
|
75
|
+
"autogeom._measure",
|
|
76
|
+
"autogeom._trajectory",
|
|
77
|
+
"autogeom._geometry",
|
|
78
|
+
"autogeom.rd",
|
|
79
|
+
"autogeom.element | autogeom.types | autogeom.units",
|
|
80
|
+
"autogeom.exc",
|
|
81
|
+
]
|
|
82
|
+
ignore_imports = ["autogeom._geometry -> autogeom._view"]
|
|
83
|
+
|
|
84
|
+
[tool.pytest.ini_options]
|
|
85
|
+
testpaths = [
|
|
86
|
+
"tests",
|
|
87
|
+
"src",
|
|
88
|
+
]
|
|
89
|
+
addopts = [
|
|
90
|
+
"--doctest-modules",
|
|
91
|
+
"--cov=autogeom",
|
|
92
|
+
"--cov-report=term-missing",
|
|
93
|
+
"--cov-report=html",
|
|
94
|
+
]
|
|
95
|
+
doctest_optionflags = "NORMALIZE_WHITESPACE"
|
|
96
|
+
|
|
97
|
+
[tool.coverage.run]
|
|
98
|
+
branch = true
|
|
99
|
+
source = ["autogeom"]
|
|
100
|
+
|
|
101
|
+
[tool.coverage.report]
|
|
102
|
+
show_missing = true
|
|
103
|
+
skip_covered = true
|
|
104
|
+
fail_under = 80
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "autogeom"
|
|
3
|
+
version = "0.0.1"
|
|
4
|
+
readme = "README.md" # the PyPI page
|
|
5
|
+
license = "MIT"
|
|
6
|
+
license-files = ["LICENSE"]
|
|
7
|
+
authors = [
|
|
8
|
+
{name = "Andreas V. Copan", email = "avcopan@uga.edu"},
|
|
9
|
+
{name = "Troy N. Smith", email = "troy.smith@uga.edu"},
|
|
10
|
+
]
|
|
11
|
+
dependencies = [
|
|
12
|
+
"numpy>=2.2",
|
|
13
|
+
"pint>=0.24",
|
|
14
|
+
"py3dmol>=2.5",
|
|
15
|
+
"pydantic>=2.9",
|
|
16
|
+
"pyparsing>=3.3.2",
|
|
17
|
+
"rdkit>=2025.3.3", # earlier releases fail to embed allenes (C=C=C)
|
|
18
|
+
"scipy>=1.15",
|
|
19
|
+
"xyzrender>=0.3.8",
|
|
20
|
+
]
|
|
21
|
+
requires-python = ">= 3.13"
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Repository = "https://github.com/avcopan/autogeom"
|
|
25
|
+
Documentation = "https://avcopan.github.io/autogeom/"
|
|
26
|
+
|
|
27
|
+
[build-system]
|
|
28
|
+
build-backend = "uv_build"
|
|
29
|
+
requires = ["uv_build"]
|
|
30
|
+
|
|
31
|
+
# Ruff configurations
|
|
32
|
+
[tool.ruff]
|
|
33
|
+
extend-exclude = [".claude"] # vendored agent skills
|
|
34
|
+
|
|
35
|
+
[tool.ruff.lint]
|
|
36
|
+
select = ["ALL"]
|
|
37
|
+
ignore = [
|
|
38
|
+
"COM812", # missing trailing comma (handled by format)
|
|
39
|
+
"TID252", # relative import
|
|
40
|
+
"D203", # conflict: incorrect blank line before class (uses D211 instead)
|
|
41
|
+
"D213", # conflict: multi-line summary second line (uses D212 instead)
|
|
42
|
+
"CPY001", # copyright notice
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[tool.ruff.lint.per-file-ignores]
|
|
46
|
+
"tests/**.py" = ["S101", "PLR2004"] # assert, magic values
|
|
47
|
+
|
|
48
|
+
[tool.ruff.lint.pydocstyle]
|
|
49
|
+
convention = "google"
|
|
50
|
+
|
|
51
|
+
# Ty configurations
|
|
52
|
+
[tool.ty.environment]
|
|
53
|
+
python = ".pixi/envs/test/bin/python"
|
|
54
|
+
|
|
55
|
+
[tool.ty.src]
|
|
56
|
+
include = [
|
|
57
|
+
"src",
|
|
58
|
+
"tests",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
# Import-linter configurations
|
|
62
|
+
[tool.importlinter]
|
|
63
|
+
root_package = "autogeom"
|
|
64
|
+
|
|
65
|
+
[[tool.importlinter.contracts]]
|
|
66
|
+
name = "Module Layering"
|
|
67
|
+
type = "layers"
|
|
68
|
+
layers = [
|
|
69
|
+
"autogeom._view | autogeom._convert",
|
|
70
|
+
"autogeom._transform",
|
|
71
|
+
"autogeom._measure",
|
|
72
|
+
"autogeom._trajectory",
|
|
73
|
+
"autogeom._geometry",
|
|
74
|
+
"autogeom.rd",
|
|
75
|
+
"autogeom.element | autogeom.types | autogeom.units",
|
|
76
|
+
"autogeom.exc",
|
|
77
|
+
]
|
|
78
|
+
ignore_imports = [
|
|
79
|
+
# `Geometry._repr_html_` imports `view` lazily to render itself in Jupyter
|
|
80
|
+
"autogeom._geometry -> autogeom._view",
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
# Pytest configurations
|
|
84
|
+
[tool.pytest.ini_options]
|
|
85
|
+
testpaths = ["tests", "src"]
|
|
86
|
+
addopts = [
|
|
87
|
+
"--doctest-modules",
|
|
88
|
+
"--cov=autogeom",
|
|
89
|
+
"--cov-report=term-missing",
|
|
90
|
+
"--cov-report=html",
|
|
91
|
+
]
|
|
92
|
+
doctest_optionflags = "NORMALIZE_WHITESPACE"
|
|
93
|
+
|
|
94
|
+
# Pytest-cov configurations
|
|
95
|
+
[tool.coverage.run]
|
|
96
|
+
branch = true
|
|
97
|
+
source = ["autogeom"]
|
|
98
|
+
|
|
99
|
+
[tool.coverage.report]
|
|
100
|
+
show_missing = true
|
|
101
|
+
skip_covered = true
|
|
102
|
+
fail_under = 80
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"""Molecular geometries: the `Geometry` model and the functions that operate on it."""
|
|
2
|
+
|
|
3
|
+
__version__ = "0.0.1"
|
|
4
|
+
|
|
5
|
+
from . import element, rd, types
|
|
6
|
+
from ._convert import (
|
|
7
|
+
formula,
|
|
8
|
+
from_inchi,
|
|
9
|
+
from_rdkit_mol,
|
|
10
|
+
from_smiles,
|
|
11
|
+
inchi,
|
|
12
|
+
rdkit_mol,
|
|
13
|
+
smiles,
|
|
14
|
+
)
|
|
15
|
+
from ._geometry import (
|
|
16
|
+
Geometry,
|
|
17
|
+
from_xyz_block,
|
|
18
|
+
from_xyz_file,
|
|
19
|
+
join,
|
|
20
|
+
remove_atoms,
|
|
21
|
+
select_atoms,
|
|
22
|
+
xyz_block,
|
|
23
|
+
xyz_file,
|
|
24
|
+
)
|
|
25
|
+
from ._measure import (
|
|
26
|
+
adjacency_matrix,
|
|
27
|
+
angle,
|
|
28
|
+
angles,
|
|
29
|
+
bonds,
|
|
30
|
+
center_of_mass,
|
|
31
|
+
dihedral,
|
|
32
|
+
dihedrals,
|
|
33
|
+
distance,
|
|
34
|
+
distance_keys,
|
|
35
|
+
distance_matrix,
|
|
36
|
+
inertia_tensor,
|
|
37
|
+
inertial_frame_rotation,
|
|
38
|
+
principal_axes,
|
|
39
|
+
)
|
|
40
|
+
from ._trajectory import (
|
|
41
|
+
from_xyz_trajectory_block,
|
|
42
|
+
from_xyz_trajectory_file,
|
|
43
|
+
xyz_trajectory_block,
|
|
44
|
+
xyz_trajectory_comments,
|
|
45
|
+
xyz_trajectory_file,
|
|
46
|
+
)
|
|
47
|
+
from ._transform import (
|
|
48
|
+
alignment_rotation,
|
|
49
|
+
axis_alignment_rotation,
|
|
50
|
+
center,
|
|
51
|
+
reflect,
|
|
52
|
+
rotate,
|
|
53
|
+
translate,
|
|
54
|
+
twist,
|
|
55
|
+
twist_angle,
|
|
56
|
+
)
|
|
57
|
+
from ._view import View, render_gif, render_svg, view
|
|
58
|
+
from .exc import ElementNotFoundError, GeometryConversionError, XYZFormatError
|
|
59
|
+
from .units import ureg
|
|
60
|
+
|
|
61
|
+
__all__ = [
|
|
62
|
+
"ElementNotFoundError",
|
|
63
|
+
"Geometry",
|
|
64
|
+
"GeometryConversionError",
|
|
65
|
+
"View",
|
|
66
|
+
"XYZFormatError",
|
|
67
|
+
"adjacency_matrix",
|
|
68
|
+
"alignment_rotation",
|
|
69
|
+
"angle",
|
|
70
|
+
"angles",
|
|
71
|
+
"axis_alignment_rotation",
|
|
72
|
+
"bonds",
|
|
73
|
+
"center",
|
|
74
|
+
"center_of_mass",
|
|
75
|
+
"dihedral",
|
|
76
|
+
"dihedrals",
|
|
77
|
+
"distance",
|
|
78
|
+
"distance_keys",
|
|
79
|
+
"distance_matrix",
|
|
80
|
+
"element",
|
|
81
|
+
"formula",
|
|
82
|
+
"from_inchi",
|
|
83
|
+
"from_rdkit_mol",
|
|
84
|
+
"from_smiles",
|
|
85
|
+
"from_xyz_block",
|
|
86
|
+
"from_xyz_file",
|
|
87
|
+
"from_xyz_trajectory_block",
|
|
88
|
+
"from_xyz_trajectory_file",
|
|
89
|
+
"inchi",
|
|
90
|
+
"inertia_tensor",
|
|
91
|
+
"inertial_frame_rotation",
|
|
92
|
+
"join",
|
|
93
|
+
"principal_axes",
|
|
94
|
+
"rd",
|
|
95
|
+
"rdkit_mol",
|
|
96
|
+
"reflect",
|
|
97
|
+
"remove_atoms",
|
|
98
|
+
"render_gif",
|
|
99
|
+
"render_svg",
|
|
100
|
+
"rotate",
|
|
101
|
+
"select_atoms",
|
|
102
|
+
"smiles",
|
|
103
|
+
"translate",
|
|
104
|
+
"twist",
|
|
105
|
+
"twist_angle",
|
|
106
|
+
"types",
|
|
107
|
+
"ureg",
|
|
108
|
+
"view",
|
|
109
|
+
"xyz_block",
|
|
110
|
+
"xyz_file",
|
|
111
|
+
"xyz_trajectory_block",
|
|
112
|
+
"xyz_trajectory_comments",
|
|
113
|
+
"xyz_trajectory_file",
|
|
114
|
+
]
|