atomict 1.2.23__tar.gz → 1.2.24__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 (102) hide show
  1. {atomict-1.2.23 → atomict-1.2.24}/PKG-INFO +9 -24
  2. {atomict-1.2.23 → atomict-1.2.24}/README.md +2 -17
  3. atomict-1.2.24/atomict/__version__.py +1 -0
  4. atomict-1.2.24/atomict/cli/commands/convert.py +100 -0
  5. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/traj.py +2 -6
  6. atomict-1.2.24/atomict/cli/main.py +117 -0
  7. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/cif.py +4 -10
  8. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/fhiaims.py +2 -8
  9. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/formats/atraj.py +5 -13
  10. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/formats/tess.py +195 -157
  11. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/formats/traj.py +3 -9
  12. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/utils.py +7 -8
  13. {atomict-1.2.23 → atomict-1.2.24}/atomict/utils/fhiaims/geometry.py +3 -10
  14. {atomict-1.2.23 → atomict-1.2.24}/atomict.egg-info/PKG-INFO +9 -24
  15. {atomict-1.2.23 → atomict-1.2.24}/atomict.egg-info/SOURCES.txt +1 -8
  16. {atomict-1.2.23 → atomict-1.2.24}/pyproject.toml +2 -2
  17. {atomict-1.2.23 → atomict-1.2.24}/requirements.txt +5 -0
  18. atomict-1.2.23/atomict/__version__.py +0 -1
  19. atomict-1.2.23/atomict/cli/commands/adsorbate.py +0 -183
  20. atomict-1.2.23/atomict/cli/commands/catalysis.py +0 -171
  21. atomict-1.2.23/atomict/cli/commands/simulation/__init__.py +0 -20
  22. atomict-1.2.23/atomict/cli/commands/simulation/catalysis.py +0 -223
  23. atomict-1.2.23/atomict/cli/commands/simulation/vibes.py +0 -161
  24. atomict-1.2.23/atomict/cli/commands/simulation.py +0 -176
  25. atomict-1.2.23/atomict/cli/ext/custom_classes.py +0 -46
  26. atomict-1.2.23/atomict/cli/main.py +0 -236
  27. atomict-1.2.23/atomict/simulation/catalysis.py +0 -20
  28. {atomict-1.2.23 → atomict-1.2.24}/LICENSE +0 -0
  29. {atomict-1.2.23 → atomict-1.2.24}/atomict/__init__.py +0 -0
  30. {atomict-1.2.23 → atomict-1.2.24}/atomict/api.py +0 -0
  31. {atomict-1.2.23 → atomict-1.2.24}/atomict/ase/atatoms.py +0 -0
  32. {atomict-1.2.23 → atomict-1.2.24}/atomict/auth.py +0 -0
  33. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/__init__.py +0 -0
  34. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/ai_assist.py +0 -0
  35. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/common.py +0 -0
  36. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/exploration/__init__.py +0 -0
  37. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/exploration/soec.py +0 -0
  38. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/exploration/sqs.py +0 -0
  39. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/helpers.py +0 -0
  40. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/k8s.py +0 -0
  41. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/login.py +0 -0
  42. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/organization.py +0 -0
  43. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/project.py +0 -0
  44. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/simulation/fhiaims.py +0 -0
  45. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/simulation/kpoint.py +0 -0
  46. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/task.py +0 -0
  47. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/token.py +0 -0
  48. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/upload.py +0 -0
  49. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/commands/user.py +0 -0
  50. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/core/client.py +0 -0
  51. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/core/config.py +0 -0
  52. {atomict-1.2.23 → atomict-1.2.24}/atomict/cli/core/utils.py +0 -0
  53. {atomict-1.2.23 → atomict-1.2.24}/atomict/env.py +0 -0
  54. {atomict-1.2.23 → atomict-1.2.24}/atomict/exceptions.py +0 -0
  55. {atomict-1.2.23 → atomict-1.2.24}/atomict/infra/__init__.py +0 -0
  56. {atomict-1.2.23 → atomict-1.2.24}/atomict/infra/distwork/__init__.py +0 -0
  57. {atomict-1.2.23 → atomict-1.2.24}/atomict/infra/distwork/environment.py +0 -0
  58. {atomict-1.2.23 → atomict-1.2.24}/atomict/infra/distwork/task.py +0 -0
  59. {atomict-1.2.23 → atomict-1.2.24}/atomict/infra/logging.py +0 -0
  60. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/__init__.py +0 -0
  61. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/atoms.py +0 -0
  62. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/formats/__init__.py +0 -0
  63. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/trajectory.py +0 -0
  64. {atomict-1.2.23 → atomict-1.2.24}/atomict/io/utils.py +0 -0
  65. {atomict-1.2.23 → atomict-1.2.24}/atomict/ml/__init__.py +0 -0
  66. {atomict-1.2.23 → atomict-1.2.24}/atomict/ml/model.py +0 -0
  67. {atomict-1.2.23 → atomict-1.2.24}/atomict/project/__init__.py +0 -0
  68. {atomict-1.2.23 → atomict-1.2.24}/atomict/project/link.py +0 -0
  69. {atomict-1.2.23 → atomict-1.2.24}/atomict/project/note.py +0 -0
  70. {atomict-1.2.23 → atomict-1.2.24}/atomict/project/project.py +0 -0
  71. {atomict-1.2.23 → atomict-1.2.24}/atomict/project/tags.py +0 -0
  72. {atomict-1.2.23 → atomict-1.2.24}/atomict/project/workbench.py +0 -0
  73. {atomict-1.2.23 → atomict-1.2.24}/atomict/reality/__init__.py +0 -0
  74. {atomict-1.2.23 → atomict-1.2.24}/atomict/reality/oqmd.py +0 -0
  75. {atomict-1.2.23 → atomict-1.2.24}/atomict/reality/slabs.py +0 -0
  76. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/__init__.py +0 -0
  77. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/cantera.py +0 -0
  78. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/counterfactual.py +0 -0
  79. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/defect.py +0 -0
  80. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/ea.py +0 -0
  81. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/fhi_aims.py +0 -0
  82. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/impact.py +0 -0
  83. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/kpoint.py +0 -0
  84. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/mattergen.py +0 -0
  85. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/md.py +0 -0
  86. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/mlrelax.py +0 -0
  87. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/models.py +0 -0
  88. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/phonon.py +0 -0
  89. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/qe.py +0 -0
  90. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/sh.py +0 -0
  91. {atomict-1.2.23 → atomict-1.2.24}/atomict/simulation/sqs.py +0 -0
  92. {atomict-1.2.23 → atomict-1.2.24}/atomict/user/__init__.py +0 -0
  93. {atomict-1.2.23 → atomict-1.2.24}/atomict/user/files.py +0 -0
  94. {atomict-1.2.23 → atomict-1.2.24}/atomict/user/workspace.py +0 -0
  95. {atomict-1.2.23 → atomict-1.2.24}/atomict/utils/fhiaims/__init__.py +0 -0
  96. {atomict-1.2.23 → atomict-1.2.24}/atomict/utils/tenacity.py +0 -0
  97. {atomict-1.2.23 → atomict-1.2.24}/atomict/utils/traj.py +0 -0
  98. {atomict-1.2.23 → atomict-1.2.24}/atomict.egg-info/dependency_links.txt +0 -0
  99. {atomict-1.2.23 → atomict-1.2.24}/atomict.egg-info/entry_points.txt +0 -0
  100. {atomict-1.2.23 → atomict-1.2.24}/atomict.egg-info/requires.txt +5 -5
  101. {atomict-1.2.23 → atomict-1.2.24}/atomict.egg-info/top_level.txt +0 -0
  102. {atomict-1.2.23 → atomict-1.2.24}/setup.cfg +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atomict
3
- Version: 1.2.23
3
+ Version: 1.2.24
4
4
  Summary: The client application for the https://atomictessellator.com/
5
5
  Author-email: Steven Anderson <steven@atomictessellator.com>, Alain Richardt <alain@atomictessellator.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/AtomicTessellator/atomic_cli
8
- Keywords: atomic,tessellator,cli,client,fhi-aims,kpoint,sqs,adsorbate
8
+ Keywords: atomic,tessellator,cli,client,fhi-aims,kpoint,sqs
9
9
  Classifier: Topic :: Scientific/Engineering :: Physics
10
10
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
11
11
  Classifier: Topic :: Scientific/Engineering :: Chemistry
@@ -22,14 +22,14 @@ Requires-Dist: tenacity~=9.0
22
22
  Requires-Dist: httpx
23
23
  Requires-Dist: click~=8.0
24
24
  Requires-Dist: rich~=13.0
25
+ Requires-Dist: ase>=3.23.0
26
+ Requires-Dist: spglib==2.5.0
27
+ Requires-Dist: pymatgen==2025.3.10
28
+ Requires-Dist: msgpack==1.1.0
29
+ Requires-Dist: msgpack_numpy==0.4.8
25
30
  Requires-Dist: deepdiff
26
31
  Requires-Dist: lz4
27
32
  Provides-Extra: utils
28
- Requires-Dist: ase>=3.23.0; extra == "utils"
29
- Requires-Dist: spglib==2.5.0; extra == "utils"
30
- Requires-Dist: pymatgen==2025.3.10; extra == "utils"
31
- Requires-Dist: msgpack==1.1.0; extra == "utils"
32
- Requires-Dist: msgpack_numpy==0.4.8; extra == "utils"
33
33
  Provides-Extra: dev
34
34
  Requires-Dist: pytest~=8.0; extra == "dev"
35
35
  Requires-Dist: black; extra == "dev"
@@ -44,11 +44,8 @@ Dynamic: license-file
44
44
  ```
45
45
  pip install atomict
46
46
 
47
- # install utils package with scientific extensions (ase, spglib)
48
- pip install atomict[utils]
49
-
50
47
  # ", with a git url
51
- pip install git+https://github.com/AtomicTessellator/atomic_cli#egg=atomict[utils]
48
+ pip install git+https://github.com/AtomicTessellator/atomic_cli#egg=atomict
52
49
 
53
50
  # Troubleshooting
54
51
  If pip install is not working, try:
@@ -57,6 +54,7 @@ pip install --upgrade setuptools pip wheel
57
54
 
58
55
  ## Installation for devs
59
56
  ```
57
+ # installs linting and formatting tools with some general defaults
60
58
  pip install -e ".[dev]"
61
59
  ```
62
60
 
@@ -92,19 +90,6 @@ This command prints out your current token.
92
90
 
93
91
  ![Alt text](img/at_project_get.png?raw=true "tess project get")
94
92
 
95
-
96
- ## Get a list of adsorbates
97
-
98
- ```$ tess adsorbate get```
99
-
100
- ![Alt text](img/at_adsorbate_get.png?raw=true "tess adsorbate get")
101
-
102
- ## Search objects for substrings
103
-
104
- ```$ tess adsorbate get --search NH3```
105
-
106
- ![Alt text](img/at_adsorbate_get_search.png?raw=true "tess adsorbate get --search")
107
-
108
93
  ## Get a list of tasks
109
94
 
110
95
  ```$ tess task get```
@@ -4,11 +4,8 @@
4
4
  ```
5
5
  pip install atomict
6
6
 
7
- # install utils package with scientific extensions (ase, spglib)
8
- pip install atomict[utils]
9
-
10
7
  # ", with a git url
11
- pip install git+https://github.com/AtomicTessellator/atomic_cli#egg=atomict[utils]
8
+ pip install git+https://github.com/AtomicTessellator/atomic_cli#egg=atomict
12
9
 
13
10
  # Troubleshooting
14
11
  If pip install is not working, try:
@@ -17,6 +14,7 @@ pip install --upgrade setuptools pip wheel
17
14
 
18
15
  ## Installation for devs
19
16
  ```
17
+ # installs linting and formatting tools with some general defaults
20
18
  pip install -e ".[dev]"
21
19
  ```
22
20
 
@@ -52,19 +50,6 @@ This command prints out your current token.
52
50
 
53
51
  ![Alt text](img/at_project_get.png?raw=true "tess project get")
54
52
 
55
-
56
- ## Get a list of adsorbates
57
-
58
- ```$ tess adsorbate get```
59
-
60
- ![Alt text](img/at_adsorbate_get.png?raw=true "tess adsorbate get")
61
-
62
- ## Search objects for substrings
63
-
64
- ```$ tess adsorbate get --search NH3```
65
-
66
- ![Alt text](img/at_adsorbate_get_search.png?raw=true "tess adsorbate get --search")
67
-
68
53
  ## Get a list of tasks
69
54
 
70
55
  ```$ tess task get```
@@ -0,0 +1 @@
1
+ __version__ = "1.2.24"
@@ -0,0 +1,100 @@
1
+ import os
2
+ import logging
3
+ import click
4
+ from rich.console import Console
5
+ from ase.io import read, write
6
+ from ase.io.formats import UnknownFileTypeError
7
+ from atomict.io.formats.atraj import read_atraj, write_atraj
8
+ from atomict.io.formats.tess import read_tess, write_tess
9
+
10
+ console = Console()
11
+
12
+ @click.command()
13
+ @click.argument("input_file", required=True)
14
+ @click.argument("output_file", required=True)
15
+ def convert(input_file: str, output_file: str):
16
+ """Convert atomic structure files between supported formats (e.g. .xyz, .cif, .traj)."""
17
+ RW_FORMATS = [
18
+ 'abinit-in', 'aims', 'bundletrajectory', 'castep-cell', 'castep-geom',
19
+ 'castep-md', 'cfg', 'cif', 'crystal', 'cube', 'db', 'dftb', 'dlp4',
20
+ 'dmol-arc', 'dmol-car', 'dmol-incoor', 'eon', 'espresso-in', 'extxyz',
21
+ 'gaussian-in', 'gen', 'gpumd', 'gromacs', 'gromos', 'json', 'jsv',
22
+ 'lammps-data', 'magres', 'mustem', 'mysql', 'netcdftrajectory', 'nwchem-in',
23
+ 'onetep-in', 'postgresql', 'prismatic', 'proteindatabank', 'res',
24
+ 'rmc6f', 'struct', 'sys', 'traj', 'turbomole', 'v-sim', 'vasp',
25
+ 'vasp-xdatcar', 'xsd', 'xsf', 'xtd', 'xyz'
26
+ ]
27
+
28
+ try:
29
+ input_ext = os.path.splitext(input_file)[1].lower()[1:]
30
+ output_ext = os.path.splitext(output_file)[1].lower()[1:]
31
+
32
+ if not os.path.exists(input_file):
33
+ console.print(f"[red]Error: Input file '{input_file}' not found.[/red]")
34
+ return
35
+
36
+ traj_msgpack_formats = ["atraj", "tess"]
37
+
38
+ def _is_supported(ext: str) -> bool:
39
+ return (
40
+ ext in RW_FORMATS
41
+ or ext in traj_msgpack_formats
42
+ )
43
+
44
+ def _print_supported_error(ext: str, action: str) -> None:
45
+ console.print(f"[red]Error: Format '{ext}' is not supported for {action}.[/red]")
46
+ console.print("[yellow]Supported read/write formats include:[/yellow]")
47
+ for i in range(0, len(RW_FORMATS), 5):
48
+ console.print("[yellow] " + ", ".join(RW_FORMATS[i:i+5]) + "[/yellow]")
49
+ console.print("[yellow]Special formats: atm (msgpack), atraj (msgpack trajectory), tess (msgpack trajectory)[/yellow]")
50
+
51
+ if not _is_supported(input_ext):
52
+ _print_supported_error(input_ext, "reading")
53
+ return
54
+
55
+ if not _is_supported(output_ext):
56
+ _print_supported_error(output_ext, "writing")
57
+ return
58
+
59
+ try:
60
+ if input_ext == "atraj":
61
+ atoms, _ = read_atraj(input_file)
62
+ elif input_ext == "tess":
63
+ atoms, _ = read_tess(input_file)
64
+ else:
65
+ atoms = read(input_file, index=":")
66
+ except UnknownFileTypeError:
67
+ console.print(f"[red]Error: Unknown file type for input file '{input_file}'[/red]")
68
+ console.print(f"[yellow]The file extension '{input_ext}' is not recognized.[/yellow]")
69
+ console.print("[yellow]Make sure the file has the correct extension for its format.[/yellow]")
70
+ return
71
+ except Exception as e:
72
+ console.print(f"[red]Error reading input file '{input_file}': {str(e)}.[/red]")
73
+ console.print(f"[yellow]Make sure '{input_ext}' is a valid format and the file is not corrupted.[/yellow]")
74
+ return
75
+
76
+ try:
77
+ if output_ext == "atraj":
78
+ write_atraj(atoms, output_file)
79
+ elif output_ext == "tess":
80
+ write_tess(atoms, output_file)
81
+ else:
82
+ write(output_file, atoms)
83
+
84
+ console.print(f"[green]Successfully converted {input_file} to {output_file}[/green]")
85
+
86
+ except UnknownFileTypeError:
87
+ console.print(f"[red]Error: Unknown file type for output file '{output_file}'[/red]")
88
+ console.print(f"[yellow]The file extension '{output_ext}' is not recognized.[/yellow]")
89
+ console.print("[yellow]Make sure the file has the correct extension for its format.[/yellow]")
90
+ return
91
+ except Exception as e:
92
+ console.print(f"[red]Error writing output file '{output_file}': {str(e)}[/red]")
93
+ console.print(f"[yellow]Make sure '{output_ext}' is a valid format and you have write permissions.[/yellow]")
94
+ return
95
+
96
+ except Exception as e:
97
+ logging.debug(f"Conversion failed with error: {str(e)}", exc_info=True)
98
+ console.print(f"[red]Error during conversion: {str(e)}[/red]")
99
+ console.print("[yellow]Try running with --verbose for more detailed error information.[/yellow]")
100
+
@@ -16,12 +16,8 @@ def subsample(file_path, step):
16
16
 
17
17
  The output will be saved as {original_filename}_subsampled_{step}.traj
18
18
  """
19
- try:
20
- from ase.io import read, write
21
- from ase.io.trajectory import TrajectoryWriter
22
- except ImportError:
23
- click.echo("Error: ASE modules not found. Please install with 'pip install atomict[utils]'")
24
- raise
19
+ from ase.io import read, write
20
+ from ase.io.trajectory import TrajectoryWriter
25
21
 
26
22
  if step <= 0:
27
23
  click.echo("Error: Step must be a positive integer")
@@ -0,0 +1,117 @@
1
+ # cli/main.py
2
+ import logging
3
+ import os
4
+ import sys
5
+
6
+ import click
7
+ from rich.console import Console
8
+
9
+ from atomict.__version__ import __version__
10
+ from atomict.cli.commands import login, token, user
11
+ from .commands import k8s, project, task, traj, upload, convert
12
+ from .commands.exploration import soec, sqs
13
+ from .commands.simulation import fhiaims, kpoint
14
+
15
+
16
+ console = Console()
17
+
18
+
19
+ def setup_logging(verbose: bool):
20
+ """Configure logging based on verbose flag and AT_DEBUG env var"""
21
+ if os.getenv("AT_DEBUG") == "enabled":
22
+ logging.basicConfig(
23
+ level=logging.DEBUG,
24
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
25
+ handlers=[logging.StreamHandler(), logging.FileHandler("atomict.log")],
26
+ )
27
+ logging.getLogger("httpx").setLevel(logging.DEBUG)
28
+ logging.getLogger("httpcore").setLevel(logging.DEBUG)
29
+ logging.debug("Debug mode enabled via AT_DEBUG")
30
+ logging.debug(f'Python path: {os.getenv("PYTHONPATH")}')
31
+ logging.debug(f"Working directory: {os.getcwd()}")
32
+ else:
33
+ level = logging.DEBUG if verbose else logging.ERROR
34
+ logging.basicConfig(
35
+ level=level, format="%(asctime)s - %(levelname)s - %(message)s"
36
+ )
37
+
38
+
39
+ @click.group(invoke_without_command=True)
40
+ @click.option(
41
+ "-v", "--verbose", is_flag=True, default=False, help="Enable verbose output"
42
+ )
43
+ @click.version_option(prog_name="tess", version=__version__)
44
+ @click.pass_context
45
+ def cli(ctx, verbose: bool):
46
+ """Atomic Tessellator CLI - Manage simulations and computational resources
47
+ """
48
+ setup_logging(verbose)
49
+ if ctx.invoked_subcommand is None:
50
+ click.echo(ctx.get_help())
51
+
52
+
53
+ @cli.command(hidden=True)
54
+ @click.argument("shell", type=click.Choice(["bash", "zsh", "fish"]), required=False)
55
+ def completion(shell):
56
+ """Generate shell completion script"""
57
+ if shell is None:
58
+ shell = os.environ.get("SHELL", "")
59
+ shell = shell.split("/")[-1]
60
+ if shell not in ["bash", "zsh", "fish"]:
61
+ shell = "bash"
62
+
63
+ completion_script = None
64
+ if shell == "bash":
65
+ completion_script = """
66
+ # Add to ~/.bashrc:
67
+ if tess --version > /dev/null 2>&1; then
68
+ eval "$(_TESS_COMPLETE=bash_source tess)"
69
+ fi
70
+ """
71
+ elif shell == "zsh":
72
+ completion_script = """
73
+ # Add to ~/.zshrc:
74
+ if tess --version > /dev/null 2>&1; then
75
+ eval "$(_TESS_COMPLETE=zsh_source tess)"
76
+ fi
77
+ """
78
+ elif shell == "fish":
79
+ completion_script = """
80
+ # Add to ~/.config/fish/config.fish:
81
+ if type -q tess
82
+ eval (env _TESS_COMPLETE=fish_source tess)
83
+ end
84
+ """
85
+ click.echo(f"# Shell completion for {shell}")
86
+ click.echo((completion_script or "").strip())
87
+ click.echo(
88
+ "# Don't forget to source your rc file! `source ~/.bashrc` or `source ~/.zshrc` ..."
89
+ )
90
+
91
+
92
+ cli.add_command(completion)
93
+ cli.add_command(convert.convert)
94
+ cli.add_command(task.task_group)
95
+ cli.add_command(upload.upload_group)
96
+ cli.add_command(project.project_group)
97
+ cli.add_command(k8s.k8s_group)
98
+ cli.add_command(fhiaims.fhiaims_group)
99
+ cli.add_command(kpoint.kpoint_group)
100
+ cli.add_command(sqs.sqs_group)
101
+ cli.add_command(soec.soecexploration_group)
102
+ cli.add_command(traj.traj)
103
+ cli.add_command(user.user_group)
104
+ cli.add_command(login._login)
105
+ cli.add_command(token._token)
106
+
107
+
108
+ def main():
109
+ try:
110
+ cli()
111
+ except Exception as exc:
112
+ Console().print(f"[red]Error: {str(exc)}. Exiting...[/red]")
113
+ sys.exit(1)
114
+
115
+
116
+ if __name__ == "__main__":
117
+ main()
@@ -1,14 +1,8 @@
1
1
  import logging
2
- try:
3
- import ase.io
4
- import spglib
5
- from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
6
- from pymatgen.core import Structure
7
- except ImportError:
8
- raise ImportError(
9
- "The 'ase' package is required for FHI-aims operations. "
10
- "To install the optional dependencies such as ase, spglib, pymatgen, use `pip install atomict[utils]`"
11
- )
2
+ import ase.io
3
+ import spglib
4
+ from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
5
+ from pymatgen.core import Structure
12
6
 
13
7
 
14
8
  class CIFAnalyzer:
@@ -1,11 +1,5 @@
1
- try:
2
- from ase.io.aims import check_convergence, get_aims_out_chunks, get_header_chunk
3
- from ase.utils import reader
4
- except ImportError:
5
- raise ImportError(
6
- "The 'ase' package is required for FHI-aims operations. "
7
- "To install the optional dependencies such as ase, spglib, pymatgen, use `pip install atomict[utils]`"
8
- )
1
+ from ase.io.aims import check_convergence, get_aims_out_chunks, get_header_chunk
2
+ from ase.utils import reader
9
3
 
10
4
 
11
5
  # We have to write our own function because he read_aims_output function inside ASE only supports
@@ -9,13 +9,9 @@ def write_atraj(atoms: Union['ase.Atoms', List['ase.Atoms']], filename: str, met
9
9
  """Save atoms to a mpv1 file."""
10
10
 
11
11
  from atomict.io.atoms import atoms_to_dict
12
-
13
- try:
14
- import msgpack
15
- import msgpack_numpy as m
16
- from ase import Atoms
17
- except ImportError:
18
- raise ImportError("You need to install with `pip install atomict[utils]` to use the newer formats")
12
+ import msgpack
13
+ import msgpack_numpy as m
14
+ from ase import Atoms
19
15
 
20
16
  # Enable numpy array serialization
21
17
  m.patch()
@@ -47,12 +43,8 @@ def read_atraj(filename: str) -> Union['ase.Atoms', List['ase.Atoms']]:
47
43
 
48
44
  """Load atoms from a mpv1 file."""
49
45
  from atomict.io.atoms import dict_to_atoms
50
-
51
- try:
52
- import msgpack
53
- import msgpack_numpy as m
54
- except ImportError:
55
- raise ImportError("You need to install with `pip install atomict[utils]` to use the newer formats")
46
+ import msgpack
47
+ import msgpack_numpy as m
56
48
 
57
49
  # Enable numpy array deserialization
58
50
  m.patch()