atomict 0.1.4__py3-none-any.whl → 0.2.4__py3-none-any.whl

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.
atomict/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.4"
1
+ __version__ = "0.2.4"
@@ -53,8 +53,9 @@ def upload():
53
53
  @click.option("--limit", type=int, help="Number of results to return")
54
54
  @click.option("--type", "file_type", help="Filter by file type")
55
55
  @click.option("--json-output", is_flag=True, help="Output in JSON format")
56
- def list(limit: Optional[int], file_type: Optional[str], json_output: bool):
57
- """List uploaded files"""
56
+ @click.option("--all", "fetch_all", is_flag=True, help="Fetch all results")
57
+ def get(limit: Optional[int], file_type: Optional[str], json_output: bool = False, fetch_all: bool = False):
58
+ """Get uploaded files"""
58
59
  params = {}
59
60
  if limit:
60
61
  params["limit"] = limit
@@ -62,7 +63,11 @@ def list(limit: Optional[int], file_type: Optional[str], json_output: bool):
62
63
  params["type"] = file_type
63
64
 
64
65
  client = get_client()
65
- results = client.get_all("/api/user-upload/", params)
66
+
67
+ if fetch_all:
68
+ results = client.get_all("/api/user-upload/", params)
69
+ else:
70
+ results = client.get("/api/user-upload/", params)
66
71
 
67
72
  if json_output:
68
73
  console.print_json(data=results)
atomict/cli/main.py CHANGED
@@ -66,17 +66,23 @@ def completion(shell):
66
66
  if shell == "bash":
67
67
  completion_script = """
68
68
  # Add to ~/.bashrc:
69
- eval "$(_AT_COMPLETE=bash_source at)"
69
+ if at -v > /dev/null 2>&1; then
70
+ eval "$(_AT_COMPLETE=bash_source at)"
71
+ fi
70
72
  """
71
73
  elif shell == "zsh":
72
74
  completion_script = """
73
75
  # Add to ~/.zshrc:
74
- eval "$(_AT_COMPLETE=zsh_source at)"
76
+ if at -v > /dev/null 2>&1; then
77
+ eval "$(_AT_COMPLETE=zsh_source at)"
78
+ fi
75
79
  """
76
80
  elif shell == "fish":
77
81
  completion_script = """
78
82
  # Add to ~/.config/fish/config.fish:
79
- eval "$(_AT_COMPLETE=fish_source at)"
83
+ if at -v > /dev/null 2>&1; then
84
+ eval "$(_AT_COMPLETE=fish_source at)"
85
+ fi
80
86
  """
81
87
  click.echo(f"# Shell completion for {shell}")
82
88
  click.echo(completion_script.strip())
atomict/io/cif.py CHANGED
@@ -1,6 +1,13 @@
1
1
  import logging
2
- import ase.io
3
- import spglib
2
+
3
+ try:
4
+ import ase.io
5
+ import spglib
6
+ except ImportError:
7
+ raise ImportError(
8
+ "The 'ase' and 'spglib' packages are required for CIF operations. "
9
+ "To install the optional dependency, use atomict[utils]"
10
+ )
4
11
 
5
12
 
6
13
  class CIFAnalyzer:
atomict/io/fhiaims.py CHANGED
@@ -1,5 +1,11 @@
1
- from ase.io.aims import check_convergence, get_aims_out_chunks, get_header_chunk
2
- from ase.utils import reader
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 dependency, use atomict[utils]"
8
+ )
3
9
 
4
10
 
5
11
  # We have to write our own function because he read_aims_output function inside ASE only supports
atomict/io/json.py CHANGED
@@ -1,8 +1,14 @@
1
1
  import io
2
2
  import json
3
3
 
4
- from ase import Atoms
5
- from ase.io import read, write
4
+ try:
5
+ from ase import Atoms
6
+ from ase.io import read, write
7
+ except ImportError:
8
+ raise ImportError(
9
+ "The 'ase' package is required for JSON operations with Atoms objects. "
10
+ "To install the optional dependency, use atomict[utils]"
11
+ )
6
12
 
7
13
 
8
14
  def atoms_to_json(atoms: Atoms) -> str:
@@ -0,0 +1,20 @@
1
+ from atomict.api import get, post
2
+
3
+
4
+ def get_mattergen(id: str):
5
+ """
6
+ Get MatterGen
7
+ """
8
+ result = get(f"api/mattergen-exploration/{id}/")
9
+ return result
10
+
11
+
12
+ def associate_user_upload_with_mattergen(user_upload_id: str, exploration_id: str):
13
+ """
14
+ Associate a user upload with a MatterGen
15
+ """
16
+ result = post(
17
+ "api/mattergen-exploration-file/",
18
+ payload={"user_upload_id": user_upload_id, "exploration_id": exploration_id},
19
+ )
20
+ return result
@@ -1,5 +1,12 @@
1
- from ase import Atoms
2
- from ase.io import read
1
+ try:
2
+ from ase import Atoms
3
+ from ase.io import read
4
+ except ImportError:
5
+ raise ImportError(
6
+ "The 'ase' package is required for JSON operations with Atoms objects. "
7
+ "To install the optional dependency, use atomict[utils]"
8
+ )
9
+
3
10
  import logging
4
11
  import os
5
12
 
@@ -1,10 +1,18 @@
1
- from atomict.io.fhiaims import read_aims_output
2
- from ase import Atoms
3
- from ase.io import read
4
- from ase.io.formats import UnknownFileTypeError
5
1
  import os
6
2
  import logging
7
3
 
4
+ try:
5
+ from ase import Atoms
6
+ from ase.io import read
7
+ from ase.io.formats import UnknownFileTypeError
8
+ except ImportError:
9
+ raise ImportError(
10
+ "The 'ase' package is required for JSON operations with Atoms objects. "
11
+ "To install the optional dependency, use atomict[utils]"
12
+ )
13
+
14
+ from atomict.io.fhiaims import read_aims_output
15
+
8
16
 
9
17
  def read_final_geometry(workspace_dir: str, simulation_id: str):
10
18
  """Read the starting structure from the workspace directory
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: atomict
3
- Version: 0.1.4
3
+ Version: 0.2.4
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
@@ -18,12 +18,13 @@ Requires-Python: >=3.10
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
20
  Requires-Dist: requests
21
- Requires-Dist: ase>=3.23.0
22
21
  Requires-Dist: tenacity~=9.0
23
- Requires-Dist: spglib==2.5.0
24
22
  Requires-Dist: httpx
25
23
  Requires-Dist: click~=8.0
26
24
  Requires-Dist: rich~=13.0
25
+ Provides-Extra: utils
26
+ Requires-Dist: ase==3.23.0; extra == "utils"
27
+ Requires-Dist: spglib==2.5.0; extra == "utils"
27
28
  Provides-Extra: dev
28
29
  Requires-Dist: pytest~=8.0; extra == "dev"
29
30
  Requires-Dist: black; extra == "dev"
@@ -36,6 +37,9 @@ Requires-Dist: flake8; extra == "dev"
36
37
  ## Installation
37
38
  ```
38
39
  pip install atomict
40
+
41
+ # install utils package with scientific extensions (ase, spglib)
42
+ pip install atomict[utils]
39
43
  ```
40
44
 
41
45
  ## Installation for devs
@@ -1,11 +1,11 @@
1
1
  atomict/__init__.py,sha256=nMXg9GFsk8gCcyBnh1MAeUPvo4Zcuv3sdwGHZrxfpPE,36
2
- atomict/__version__.py,sha256=JMD28FXYHc_TM03visyUSd3UA9FZAaJMRStnfZoq50Y,21
2
+ atomict/__version__.py,sha256=k2uKAAzDEmm1BIVWeztFlHrCh9fq64H6szFcsXW7tvs,21
3
3
  atomict/api.py,sha256=k_vdCSaMk00Num6bYvPgz2fDC8ChrnT2cgJDftEoe3k,6595
4
4
  atomict/auth.py,sha256=yMEaxaSg44tSDxr4x-bjwjjn9zIsqw_bVoKd01Zd9LU,987
5
5
  atomict/env.py,sha256=RqK5SUfCDJ6aMGtCPhNmSrwsNZSjlGaDQYYk41oeBDc,2115
6
6
  atomict/exceptions.py,sha256=-PT-Bw-2SoPAME0ELXCXRBsU7tBOAbHTscnvnGRto-4,146
7
7
  atomict/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- atomict/cli/main.py,sha256=gL90uDCBlTwDm_7JaTofsox4MWk3IuU45xmasdvjuh8,3906
8
+ atomict/cli/main.py,sha256=V45MUC-29kgK1Bha4lBCiTZXQBOg-k58Ns3SAmk6CEY,4023
9
9
  atomict/cli/commands/adsorbate.py,sha256=f6R0R3fTWloyrnEBqXpnCZ_Axf2gwz9xPFk3K3MBjqA,5798
10
10
  atomict/cli/commands/ai_assist.py,sha256=IgZyoeL5mdwkcwxKWD7y0Enjus-wSlrYee-keyacOOY,3449
11
11
  atomict/cli/commands/catalysis.py,sha256=raBRBttv3R2ZQvZBnyIlnBXJyZbpISL_5_WWXHg3X_s,5502
@@ -17,7 +17,7 @@ atomict/cli/commands/organization.py,sha256=EIDpiue815jNi4mDyLCbHUGudNlB0RBPwWgr
17
17
  atomict/cli/commands/project.py,sha256=90JL5Q1KI-9kIlrxARMb7K9-S40daGj1jXml_lUokfU,28426
18
18
  atomict/cli/commands/simulation.py,sha256=ywh5pIKEC2B60G_gqb9ZcDhyZyKrcXaBxGXWw8TaQ7g,5357
19
19
  atomict/cli/commands/task.py,sha256=64SHXX9_qT9nv8_a65RuBTj3JW9v9B4OhtBeYXmTY2g,5423
20
- atomict/cli/commands/upload.py,sha256=Q6e2Jxj0D8D4oXG1nZnRmx0r6VeRckJ4fCFyDZG32EE,2609
20
+ atomict/cli/commands/upload.py,sha256=enIR6Vp0OUglm94Ka9p0XR5qI1hEU_8b69gKjJRAqJ8,2811
21
21
  atomict/cli/commands/user.py,sha256=7jja2At19hrMoTaRx7PrAZRS0C48BJjIN9WEmzN7Xxc,6486
22
22
  atomict/cli/commands/exploration/__init__.py,sha256=LTuDJsRPL62w-YYXx-X_GgsuD2Dovj74h-G5tTw5DaE,169
23
23
  atomict/cli/commands/exploration/soec.py,sha256=ZkKJKHz97OaswLS0hptyEquQyyATkfb8T6EI3ngkg68,18888
@@ -36,9 +36,9 @@ atomict/infra/distwork/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
36
36
  atomict/infra/distwork/environment.py,sha256=joydS9wA2pgWafXh_Wqgg95InaxhsusohaeWc9IOgwA,909
37
37
  atomict/infra/distwork/task.py,sha256=RsTpIyI43qisD8mwobnDFGq3bUDWMi1WtZzk5cRO40M,1121
38
38
  atomict/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- atomict/io/cif.py,sha256=SGil4k_6SmNUnu-dKWy9ox0odbXbL-zxvelyBZThmeg,5087
40
- atomict/io/fhiaims.py,sha256=Zh_HAsv6128acSwzSeTrGN1Ra1I_RvDwJsubRODovaY,958
41
- atomict/io/json.py,sha256=9IVFA5aHcD61eats5SajiFzvvpsXGgp4eCpnJaHFCoE,501
39
+ atomict/io/cif.py,sha256=5t7hTbwsady-8svxqjru0J7XQo4zytTrf-gUAi071Rk,5291
40
+ atomict/io/fhiaims.py,sha256=6phIqvZxBqdRnHc1kYqwD5-ucVJh6JdAv2KHeHxPZo8,1151
41
+ atomict/io/json.py,sha256=gi6jAc6V2WeMJNWpmYv4TkVjasfpw8mEW6UyItr01A0,709
42
42
  atomict/io/utils.py,sha256=ncA8XchNN3lJT8EhJK6tLJE9TvmHmPlxizTnY5ASvEc,272
43
43
  atomict/ml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  atomict/ml/model.py,sha256=Ug6IyRNNQ5_SHnQabFHnCCAGTHa9jxrRAUAkBsdcjgo,279
@@ -58,20 +58,21 @@ atomict/simulation/counterfactual.py,sha256=8-Kf4wGxPvImDr0j2grmBLLwFQ4JpjhBBxIk
58
58
  atomict/simulation/ea.py,sha256=K1XJxn2DKrju4YjiUffoukjhLh_xbE2E1t3P6AJnzTM,1837
59
59
  atomict/simulation/fhi_aims.py,sha256=IMSziMYttJGYKkrtbYOyTFEmxpFiTqpxyOUpm_imMl4,1722
60
60
  atomict/simulation/kpoint.py,sha256=8Dc1F9xqubK1HBCQa7GeRtIhs28302sRnuUK0Rns9Q4,1739
61
+ atomict/simulation/mattergen.py,sha256=ybzJy0nwIAZhG8IIuhlmi-_J6lLyci3aVo35h2ni_w0,488
61
62
  atomict/simulation/mlrelax.py,sha256=fg5Ftx_MafMcc4CoU_nr3jmMqzKB8QhcJTpoEYXpvPQ,2109
62
63
  atomict/simulation/phonon.py,sha256=_0lPjYv2nbuL2O7DRzLE9-oPNAemagcoD6R6Tu2W4V4,333
63
64
  atomict/simulation/qe.py,sha256=p46YiHj_HIiqxrQGs-SBuGoWk5zUiHahXIRcyjdEq3c,1702
64
65
  atomict/simulation/sqs.py,sha256=ZAJhQgA1_xUL05cOAM725kxTFijD4gYXU6QFhBJgNlo,635
65
- atomict/simulation/utils.py,sha256=O9-FgZ3Qz99ufJ99NaoUZ9cvs9dXZhtELAJF-EMxth0,3000
66
+ atomict/simulation/utils.py,sha256=TwKW44zX2p1H-hl5R7ORJCqa6hwseoHRlgZlUbYxILs,3209
66
67
  atomict/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
68
  atomict/user/files.py,sha256=8xGPkISOIiFYsYr26k8OqGE3G7q096zdtV6uy6YTtVU,875
68
69
  atomict/user/workspace.py,sha256=TIi1maH2piJRaWfs_Fcx4614Zr9F9okrqZD4PfY01tM,4018
69
70
  atomict/utils/tenacity.py,sha256=phc6YPEk7idqiFFeHeK-ngiAaqVOZFYp8S7dX1k-YXc,998
70
71
  atomict/utils/fhiaims/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
- atomict/utils/fhiaims/geometry.py,sha256=fIBsR9aqRbmg9U4kQIrSvczjuWYAxDXU3a15BWLAvvo,2021
72
- atomict-0.1.4.dist-info/LICENSE,sha256=fzvTkxUzi2u1cea_aRtmg5_mRk6ZyLWJJRr49K28qKg,1075
73
- atomict-0.1.4.dist-info/METADATA,sha256=q8cYbhIGfRLNLnn_0EjxygZlIoBr49p2XIaGO1nFPFk,2686
74
- atomict-0.1.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
75
- atomict-0.1.4.dist-info/entry_points.txt,sha256=1m0DSoQ_LbIneYtzkNO0I40oygfCjNHUmzNQatAJLow,45
76
- atomict-0.1.4.dist-info/top_level.txt,sha256=CCo525YmAj7ZbToMmQcVKQ-JiIiFKiq3GmhIYCG2gaM,8
77
- atomict-0.1.4.dist-info/RECORD,,
72
+ atomict/utils/fhiaims/geometry.py,sha256=BlA72FzogFlKBI-Kqt8hPxITpzLjSTXHC2FPIuvqMlU,2235
73
+ atomict-0.2.4.dist-info/LICENSE,sha256=fzvTkxUzi2u1cea_aRtmg5_mRk6ZyLWJJRr49K28qKg,1075
74
+ atomict-0.2.4.dist-info/METADATA,sha256=w3NDnaQBxa8um5_Q1mxwEZ9Hxnb31WEjUwL9lleOnGQ,2838
75
+ atomict-0.2.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
76
+ atomict-0.2.4.dist-info/entry_points.txt,sha256=1m0DSoQ_LbIneYtzkNO0I40oygfCjNHUmzNQatAJLow,45
77
+ atomict-0.2.4.dist-info/top_level.txt,sha256=CCo525YmAj7ZbToMmQcVKQ-JiIiFKiq3GmhIYCG2gaM,8
78
+ atomict-0.2.4.dist-info/RECORD,,