atomict 1.2.15__tar.gz → 1.2.17__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 (97) hide show
  1. {atomict-1.2.15 → atomict-1.2.17}/PKG-INFO +6 -2
  2. {atomict-1.2.15 → atomict-1.2.17}/README.md +5 -1
  3. atomict-1.2.17/atomict/__version__.py +1 -0
  4. {atomict-1.2.15 → atomict-1.2.17}/atomict/ase/atatoms.py +1 -1
  5. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/simulation/kpoint.py +1 -1
  6. atomict-1.2.17/atomict/cli/commands/token.py +18 -0
  7. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/traj.py +7 -8
  8. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/core/client.py +3 -0
  9. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/ext/custom_classes.py +12 -0
  10. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/main.py +2 -1
  11. atomict-1.2.17/atomict/infra/__init__.py +3 -0
  12. {atomict-1.2.15 → atomict-1.2.17}/atomict/infra/distwork/task.py +14 -9
  13. {atomict-1.2.15 → atomict-1.2.17}/atomict/io/msgpack.py +5 -5
  14. {atomict-1.2.15 → atomict-1.2.17}/atomict/io/trajectory.py +1 -1
  15. {atomict-1.2.15 → atomict-1.2.17}/atomict/project/project.py +1 -2
  16. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/mlrelax.py +8 -9
  17. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/qe.py +1 -1
  18. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/utils.py +3 -3
  19. {atomict-1.2.15 → atomict-1.2.17}/atomict/user/files.py +11 -8
  20. {atomict-1.2.15 → atomict-1.2.17}/atomict/user/workspace.py +1 -1
  21. {atomict-1.2.15 → atomict-1.2.17}/atomict.egg-info/PKG-INFO +6 -2
  22. {atomict-1.2.15 → atomict-1.2.17}/atomict.egg-info/SOURCES.txt +1 -0
  23. atomict-1.2.15/atomict/__version__.py +0 -1
  24. atomict-1.2.15/atomict/utils/fhiaims/__init__.py +0 -0
  25. {atomict-1.2.15 → atomict-1.2.17}/LICENSE +0 -0
  26. {atomict-1.2.15 → atomict-1.2.17}/atomict/__init__.py +0 -0
  27. {atomict-1.2.15 → atomict-1.2.17}/atomict/api.py +0 -0
  28. {atomict-1.2.15 → atomict-1.2.17}/atomict/auth.py +0 -0
  29. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/__init__.py +0 -0
  30. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/adsorbate.py +0 -0
  31. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/ai_assist.py +0 -0
  32. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/catalysis.py +0 -0
  33. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/common.py +0 -0
  34. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/exploration/__init__.py +0 -0
  35. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/exploration/soec.py +0 -0
  36. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/exploration/sqs.py +0 -0
  37. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/helpers.py +0 -0
  38. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/k8s.py +0 -0
  39. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/login.py +0 -0
  40. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/organization.py +0 -0
  41. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/project.py +0 -0
  42. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/simulation/__init__.py +0 -0
  43. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/simulation/catalysis.py +0 -0
  44. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/simulation/fhiaims.py +0 -0
  45. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/simulation/vibes.py +0 -0
  46. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/simulation.py +0 -0
  47. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/task.py +0 -0
  48. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/upload.py +0 -0
  49. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/commands/user.py +0 -0
  50. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/core/config.py +0 -0
  51. {atomict-1.2.15 → atomict-1.2.17}/atomict/cli/core/utils.py +0 -0
  52. {atomict-1.2.15 → atomict-1.2.17}/atomict/env.py +0 -0
  53. {atomict-1.2.15 → atomict-1.2.17}/atomict/exceptions.py +0 -0
  54. {atomict-1.2.15/atomict/infra → atomict-1.2.17/atomict/infra/distwork}/__init__.py +0 -0
  55. {atomict-1.2.15 → atomict-1.2.17}/atomict/infra/distwork/environment.py +0 -0
  56. {atomict-1.2.15 → atomict-1.2.17}/atomict/infra/logging.py +0 -0
  57. {atomict-1.2.15/atomict/infra/distwork → atomict-1.2.17/atomict/io}/__init__.py +0 -0
  58. {atomict-1.2.15 → atomict-1.2.17}/atomict/io/cif.py +0 -0
  59. {atomict-1.2.15 → atomict-1.2.17}/atomict/io/fhiaims.py +0 -0
  60. {atomict-1.2.15 → atomict-1.2.17}/atomict/io/utils.py +0 -0
  61. {atomict-1.2.15/atomict/io → atomict-1.2.17/atomict/ml}/__init__.py +0 -0
  62. {atomict-1.2.15 → atomict-1.2.17}/atomict/ml/model.py +0 -0
  63. {atomict-1.2.15 → atomict-1.2.17}/atomict/project/__init__.py +0 -0
  64. {atomict-1.2.15 → atomict-1.2.17}/atomict/project/link.py +0 -0
  65. {atomict-1.2.15 → atomict-1.2.17}/atomict/project/note.py +0 -0
  66. {atomict-1.2.15 → atomict-1.2.17}/atomict/project/tags.py +0 -0
  67. {atomict-1.2.15 → atomict-1.2.17}/atomict/project/workbench.py +0 -0
  68. {atomict-1.2.15/atomict/ml → atomict-1.2.17/atomict/reality}/__init__.py +0 -0
  69. {atomict-1.2.15 → atomict-1.2.17}/atomict/reality/oqmd.py +0 -0
  70. {atomict-1.2.15 → atomict-1.2.17}/atomict/reality/slabs.py +0 -0
  71. {atomict-1.2.15/atomict/reality → atomict-1.2.17/atomict/simulation}/__init__.py +0 -0
  72. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/cantera.py +0 -0
  73. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/catalysis.py +0 -0
  74. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/counterfactual.py +0 -0
  75. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/defect.py +0 -0
  76. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/ea.py +0 -0
  77. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/fhi_aims.py +0 -0
  78. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/impact.py +0 -0
  79. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/kpoint.py +0 -0
  80. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/mattergen.py +0 -0
  81. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/md.py +0 -0
  82. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/models.py +0 -0
  83. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/phonon.py +0 -0
  84. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/sh.py +0 -0
  85. {atomict-1.2.15 → atomict-1.2.17}/atomict/simulation/sqs.py +0 -0
  86. {atomict-1.2.15/atomict/simulation → atomict-1.2.17/atomict/user}/__init__.py +0 -0
  87. {atomict-1.2.15/atomict/user → atomict-1.2.17/atomict/utils/fhiaims}/__init__.py +0 -0
  88. {atomict-1.2.15 → atomict-1.2.17}/atomict/utils/fhiaims/geometry.py +0 -0
  89. {atomict-1.2.15 → atomict-1.2.17}/atomict/utils/tenacity.py +0 -0
  90. {atomict-1.2.15 → atomict-1.2.17}/atomict/utils/traj.py +0 -0
  91. {atomict-1.2.15 → atomict-1.2.17}/atomict.egg-info/dependency_links.txt +0 -0
  92. {atomict-1.2.15 → atomict-1.2.17}/atomict.egg-info/entry_points.txt +0 -0
  93. {atomict-1.2.15 → atomict-1.2.17}/atomict.egg-info/requires.txt +0 -0
  94. {atomict-1.2.15 → atomict-1.2.17}/atomict.egg-info/top_level.txt +0 -0
  95. {atomict-1.2.15 → atomict-1.2.17}/pyproject.toml +0 -0
  96. {atomict-1.2.15 → atomict-1.2.17}/requirements.txt +0 -0
  97. {atomict-1.2.15 → atomict-1.2.17}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atomict
3
- Version: 1.2.15
3
+ Version: 1.2.17
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
@@ -71,7 +71,7 @@ export AT_DEBUG=enabled
71
71
 
72
72
  ```$ tess```
73
73
 
74
- ![Alt text](img/at.png?raw=true "at")
74
+ ![Alt text](img/tess.png?raw=true "tess")
75
75
 
76
76
  You can get help for each command with `tess <command> --help`. This will print the command-specific help and options.
77
77
  ## Log in and store authentication token
@@ -80,6 +80,10 @@ You can get help for each command with `tess <command> --help`. This will print
80
80
 
81
81
  This will prompt you for your username and password.
82
82
 
83
+ ```$ tess token```
84
+
85
+ This command prints out your current token.
86
+
83
87
 
84
88
  ## Get a list of available projects
85
89
 
@@ -32,7 +32,7 @@ export AT_DEBUG=enabled
32
32
 
33
33
  ```$ tess```
34
34
 
35
- ![Alt text](img/at.png?raw=true "at")
35
+ ![Alt text](img/tess.png?raw=true "tess")
36
36
 
37
37
  You can get help for each command with `tess <command> --help`. This will print the command-specific help and options.
38
38
  ## Log in and store authentication token
@@ -41,6 +41,10 @@ You can get help for each command with `tess <command> --help`. This will print
41
41
 
42
42
  This will prompt you for your username and password.
43
43
 
44
+ ```$ tess token```
45
+
46
+ This command prints out your current token.
47
+
44
48
 
45
49
  ## Get a list of available projects
46
50
 
@@ -0,0 +1 @@
1
+ __version__ = "1.2.17"
@@ -22,7 +22,7 @@ handler = logging.StreamHandler(sys.stdout)
22
22
  formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
23
23
  handler.setFormatter(formatter)
24
24
  logger.addHandler(handler)
25
- logger.setLevel(logging.INFO)
25
+ logger.setLevel(logging.ERROR)
26
26
 
27
27
 
28
28
  class ATAtomsError(Exception):
@@ -356,7 +356,7 @@ def get_analysis(
356
356
 
357
357
  @kpoint_group.command()
358
358
  @click.argument("analysis")
359
- @click.option("--exploration", required=True, help="Exploration UUID")
359
+ @click.option("--exploration", required=True, help="Exploration ID")
360
360
  def create_analysis(exploration: str, analysis: str):
361
361
  """Create a new K-point analysis. Takes JSON analysis data as main argument."""
362
362
  client = get_client()
@@ -0,0 +1,18 @@
1
+ import click
2
+ from rich.console import Console
3
+
4
+ from ..core.config import Config, CONFIG_FILE
5
+
6
+
7
+ @click.command(name="token",
8
+ help="Display the current authentication token if it exists.")
9
+ def _token():
10
+ config = Config()
11
+ console = Console()
12
+
13
+ if config.token:
14
+ console.print(f"[green]Current token:[/green] {config.token}")
15
+ else:
16
+ console.print("[yellow]No authentication token found.[/yellow]")
17
+ console.print(f"[yellow]Please run 'tess login' to authenticate and save a token to {CONFIG_FILE}[/yellow]")
18
+
@@ -2,14 +2,6 @@ import click
2
2
  from pathlib import Path
3
3
 
4
4
 
5
- try:
6
- from ase.io import read, write
7
- from ase.io.trajectory import TrajectoryWriter
8
- except ImportError:
9
- click.echo("Error: ASE modules not found. Please install with 'pip install atomict[utils]'")
10
- raise
11
-
12
-
13
5
  @click.group()
14
6
  def traj():
15
7
  """Operations on trajectory files."""
@@ -24,6 +16,13 @@ def subsample(file_path, step):
24
16
 
25
17
  The output will be saved as {original_filename}_subsampled_{step}.traj
26
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
25
+
27
26
  if step <= 0:
28
27
  click.echo("Error: Step must be a positive integer")
29
28
  return
@@ -127,6 +127,9 @@ class APIClient:
127
127
  "[red]Server error. Please try again later or contact support.[/red]"
128
128
  )
129
129
 
130
+ console.print(
131
+ "[yellow]For help, join the Atomic Tessellator discord community: https://discord.com/invite/atomictessellator[/yellow]"
132
+ )
130
133
  logger.debug(f"Server error response: {error_data}")
131
134
  sys.exit(1)
132
135
 
@@ -1,4 +1,5 @@
1
1
  import click
2
+ from rich.console import Console
2
3
 
3
4
 
4
5
  class DefaultCommandGroup(click.Group):
@@ -32,3 +33,14 @@ class DefaultCommandGroup(click.Group):
32
33
  # command did not parse, assume it is the default command
33
34
  args.insert(0, self.default_command)
34
35
  return super(DefaultCommandGroup, self).resolve_command(ctx, args)
36
+
37
+ def get_help(self, ctx):
38
+ """Override help formatting to add additional resources section."""
39
+ help_text = super().get_help(ctx)
40
+
41
+ # Add additional resources section with extra spacing
42
+ additional_resources = "\n\nAdditional Resources:\n"
43
+ additional_resources += " To get help join the Atomic Tessellator discord community at this link:\n"
44
+ additional_resources += " https://discord.com/invite/atomictessellator\n"
45
+
46
+ return help_text + additional_resources
@@ -7,7 +7,7 @@ import click
7
7
  from rich.console import Console
8
8
 
9
9
  from atomict.__version__ import __version__
10
- from atomict.cli.commands import login, user
10
+ from atomict.cli.commands import login, token, user
11
11
  from atomict.cli.ext.custom_classes import DefaultCommandGroup
12
12
 
13
13
  try:
@@ -219,6 +219,7 @@ cli.add_command(soec.soecexploration_group)
219
219
  cli.add_command(traj.traj)
220
220
  cli.add_command(user.user_group)
221
221
  cli.add_command(login._login)
222
+ cli.add_command(token._token)
222
223
  cli.add_command(vibes.vibes_group)
223
224
 
224
225
 
@@ -0,0 +1,3 @@
1
+ from atomict.infra.distwork.task import SimulationAction
2
+
3
+ __all__ = ["SimulationAction"]
@@ -4,6 +4,11 @@ from atomict.api import get, patch
4
4
  from atomict.exceptions import UserTaskAbortException
5
5
 
6
6
 
7
+ class SimulationAction(Enum):
8
+ SAVE_DRAFT = "DRAFT"
9
+ LAUNCH = "LAUNCH"
10
+
11
+
7
12
  class TaskStatus(Enum):
8
13
  DRAFT = 0
9
14
  READY = 1
@@ -14,22 +19,22 @@ class TaskStatus(Enum):
14
19
  USER_ABORTED = 6
15
20
 
16
21
 
17
- def get_task(task_uuid: str):
18
- return get(f"api/tasks/{task_uuid}/")
22
+ def get_task(task_id: str):
23
+ return get(f"api/tasks/{task_id}/")
19
24
 
20
25
 
21
- def task_should_abort(task_uuid: str) -> bool:
22
- task = get_task(task_uuid)
26
+ def task_should_abort(task_id: str) -> bool:
27
+ task = get_task(task_id)
23
28
  return task["user_aborted_flag"]
24
29
 
25
30
 
26
- def except_on_user_abort(task_uuid: str):
27
- if task_should_abort(task_uuid):
28
- raise UserTaskAbortException(f"User aborted task {task_uuid}")
31
+ def except_on_user_abort(task_id: str):
32
+ if task_should_abort(task_id):
33
+ raise UserTaskAbortException(f"User aborted task {task_id}")
29
34
 
30
35
 
31
36
  def update_task_status(
32
- task_uuid: str, status: TaskStatus = None, error_msg: str = None, percent: int = None, progress_indeterminate: bool = None
37
+ task_id: str, status: TaskStatus = None, error_msg: str = None, percent: int = None, progress_indeterminate: bool = None
33
38
  ):
34
39
  payload = {}
35
40
 
@@ -45,5 +50,5 @@ def update_task_status(
45
50
  if progress_indeterminate is not None:
46
51
  payload["progress_indeterminate"] = progress_indeterminate
47
52
 
48
- res = patch(f"api/tasks/{task_uuid}/", payload=payload)
53
+ res = patch(f"api/tasks/{task_id}/", payload=payload)
49
54
  return res
@@ -211,7 +211,7 @@ def dict_to_atoms(data):
211
211
  from ase.constraints import dict2constraint
212
212
  from ase.calculators.singlepoint import SinglePointCalculator
213
213
  except ImportError:
214
- raise ImportError("You need to install with `pip install atomict[tools]` to use msgpack I/O")
214
+ raise ImportError("You need to install with `pip install atomict[utils]` to use msgpack I/O")
215
215
 
216
216
  n_frames = data['n_frames']
217
217
  atoms_list = []
@@ -341,7 +341,7 @@ def load_msgpack(filename: str, strict_map_key: bool = True) -> Union['ase.Atoms
341
341
  import msgpack
342
342
  import msgpack_numpy as m
343
343
  except ImportError:
344
- raise ImportError("You need to install with `pip install atomict[tools]` to use msgpack I/O")
344
+ raise ImportError("You need to install with `pip install atomict[utils]` to use msgpack I/O")
345
345
 
346
346
  # Enable numpy array deserialization
347
347
  m.patch()
@@ -365,7 +365,7 @@ def save_msgpack(atoms: Union['ase.Atoms', List['ase.Atoms']], filename: str):
365
365
  import msgpack_numpy as m
366
366
  from ase import Atoms
367
367
  except ImportError:
368
- raise ImportError("You need to install with `pip install atomict[tools]` to use msgpack I/O")
368
+ raise ImportError("You need to install with `pip install atomict[utils]` to use msgpack I/O")
369
369
 
370
370
  # Enable numpy array serialization
371
371
  m.patch()
@@ -403,7 +403,7 @@ def save_msgpack_trajectory(atoms: Union['ase.Atoms', List['ase.Atoms']], filena
403
403
  import msgpack_numpy as m
404
404
  from ase import Atoms
405
405
  except ImportError:
406
- raise ImportError("You need to install with `pip install atomict[tools]` to use msgpack I/O")
406
+ raise ImportError("You need to install with `pip install atomict[utils]` to use msgpack I/O")
407
407
 
408
408
  # Enable numpy array serialization
409
409
  m.patch()
@@ -453,7 +453,7 @@ def load_msgpack_trajectory(filename: str, strict_map_key: bool = True) -> Tuple
453
453
  import msgpack
454
454
  import msgpack_numpy as m
455
455
  except ImportError:
456
- raise ImportError("You need to install with `pip install atomict[tools]` to use msgpack I/O")
456
+ raise ImportError("You need to install with `pip install atomict[utils]` to use msgpack I/O")
457
457
 
458
458
  # Enable numpy array deserialization
459
459
  m.patch()
@@ -103,7 +103,7 @@ class TrajectoryWriter:
103
103
  import msgpack
104
104
  import msgpack_numpy as m
105
105
  except ImportError:
106
- raise ImportError("You need to install with `pip install atomict[tools]` to use msgpack I/O")
106
+ raise ImportError("You need to install with `pip install atomict[utils]` to use msgpack I/O")
107
107
 
108
108
  # Enable numpy array serialization
109
109
  m.patch()
@@ -1,12 +1,11 @@
1
1
  from atomict.api import delete, get, post
2
2
 
3
3
 
4
- def create_project(name: str, description: str = None, thumbnail_smiles: str = None) -> dict:
4
+ def create_project(name: str, description: str = None) -> dict:
5
5
 
6
6
  payload = {
7
7
  "name": name,
8
8
  "description_html": description,
9
- "thumbnail_smiles": thumbnail_smiles,
10
9
  }
11
10
 
12
11
  response = post(
@@ -1,5 +1,6 @@
1
1
  from atomict.api import get, post
2
- from atomict.simulation.models import MODEL_ORB_D3_V2, MODEL_MATTERSIM_1_0_0_5M, MODEL_ORB_V3_CONSERVATIVE, MODEL_ESEN_30M_OAM
2
+ from atomict.infra.distwork.task import SimulationAction
3
+ from atomict.simulation.models import MODEL_ORB_V3_CONSERVATIVE, MODEL_ESEN_30M_OAM
3
4
 
4
5
  COMPUTATION_TYPE_RELAXATION = 0
5
6
  COMPUTATION_TYPE_SINGLE_POINT = 1
@@ -38,37 +39,35 @@ def associate_user_upload_with_mlrelaxation(user_upload_id: str, mlrelax_id: str
38
39
  def create_mlrelaxation(
39
40
  project_id: str,
40
41
  source_geometry_id: str,
41
- action: str,
42
+ action: SimulationAction,
42
43
  name: str = None,
43
44
  description: str = None,
44
45
  computation_type: int = COMPUTATION_TYPE_RELAXATION,
45
46
  f_max: float = None,
46
- model: int = MODEL_ORB_D3_V2,
47
+ model: int = MODEL_ESEN_30M_OAM,
47
48
  extra_simulation_kwargs: dict = None,
48
49
  ):
49
50
  """
50
51
  Create a MLRelaxation
51
52
  """
52
53
 
53
- if action not in ["DRAFT", "LAUNCH"]:
54
- raise ValueError("Action must be 'DRAFT' or 'LAUNCH'")
54
+ if action not in [SimulationAction.SAVE_DRAFT, SimulationAction.LAUNCH]:
55
+ raise ValueError("Action must be 'SimulationAction.SAVE_DRAFT' or 'SimulationAction.LAUNCH'")
55
56
 
56
57
  if computation_type not in [
57
58
  COMPUTATION_TYPE_RELAXATION,
58
59
  COMPUTATION_TYPE_SINGLE_POINT,
59
60
  ]:
60
61
  raise ValueError(
61
- "Invalid computation type. Please use COMPUTATION_TYPE_RELAXATION (0) or COMPUTATION_TYPE_SINGLE_POINT (1)."
62
+ "Invalid computation type. Please use atomict.simulation.mlrelax.COMPUTATION_TYPE_RELAXATION or atomict.simulation.mlrelax.COMPUTATION_TYPE_SINGLE_POINT."
62
63
  )
63
64
 
64
65
  if model not in [
65
- MODEL_ORB_D3_V2,
66
- MODEL_MATTERSIM_1_0_0_5M,
67
66
  MODEL_ORB_V3_CONSERVATIVE,
68
67
  MODEL_ESEN_30M_OAM,
69
68
  ]:
70
69
  raise ValueError(
71
- "Invalid model. Please use MODEL_ORB_D3_V2 (0), MODEL_MATTERSIM_1_0_0_5M (1), MODEL_ORB_V3_CONSERVATIVE (2), or MODEL_ESEN_30M_OAM (3)."
70
+ "Invalid model. Please use atomict.simulation.models.MODEL_ORB_V3_CONSERVATIVE, or atomict.simulation.models.MODEL_ESEN_30M_OAM."
72
71
  )
73
72
 
74
73
  payload = {
@@ -70,5 +70,5 @@ def get_simulation_files(simulation_id: str):
70
70
  """
71
71
  Get the files associated with a Quantum Espresso simulation
72
72
  """
73
- result = get(f"api/qe-simulation-file/?simulation_uuid={simulation_id}")
73
+ result = get(f"api/qe-simulation-file/?simulation_id={simulation_id}")
74
74
  return result
@@ -25,7 +25,7 @@ def fetch_source_geometry(sim: dict, workbench_dir: str) -> Atoms:
25
25
 
26
26
  extension = sim["source_geometry"]["orig_name"].split(".")[-1]
27
27
 
28
- download_file(sim["source_geometry"]["uuid"], workbench_dir + f"/geometry.{extension}")
28
+ download_file(sim["source_geometry"]["id"], workbench_dir + f"/geometry.{extension}")
29
29
 
30
30
  if extension == "atraj":
31
31
  atoms, _ = load_msgpack_trajectory(workbench_dir + f"/geometry.{extension}")
@@ -103,11 +103,11 @@ def fetch_relaxed_geometry(sim: dict, workbench_dir: str) -> Atoms:
103
103
  return atoms
104
104
 
105
105
  elif sim.get("starting_structure_userupload"):
106
- logging.info(f"Previous UserUpload: {sim['starting_structure_userupload']['uuid']}")
106
+ logging.info(f"Previous UserUpload: {sim['starting_structure_userupload']['id']}")
107
107
 
108
108
  extension = sim["starting_structure_userupload"]["orig_name"].split(".")[-1]
109
109
 
110
- download_file(sim["starting_structure_userupload"]["uuid"], workbench_dir + f"/geometry.{extension}")
110
+ download_file(sim["starting_structure_userupload"]["id"], workbench_dir + f"/geometry.{extension}")
111
111
 
112
112
  if extension == "atraj":
113
113
  atoms, _ = load_msgpack_trajectory(workbench_dir + f"/geometry.{extension}")
@@ -3,22 +3,25 @@ import os
3
3
  from atomict.api import get, post
4
4
 
5
5
 
6
- def upload_single_file(full_path: str, file_name: str, project_uuid: str = None):
6
+ def upload_single_file(full_path: str, file_name: str = None, project_id: str = None):
7
7
 
8
- payload = {
9
- 'users_name': file_name
10
- }
8
+ payload = {}
11
9
 
12
- if project_uuid:
13
- payload['project_uuid'] = project_uuid
10
+ if file_name:
11
+ payload['users_name'] = file_name
12
+ else:
13
+ payload['users_name'] = os.path.basename(full_path)
14
+
15
+ if project_id:
16
+ payload['project_id'] = project_id
14
17
 
15
18
  with open(full_path, "rb") as f:
16
19
  result = post("user/file_upload/", files={file_name: f}, payload=payload)
17
20
  return result
18
21
 
19
22
 
20
- def download_file(user_upload_uuid: str, destination_path: str):
21
- content = get(f"user/file_upload_get/{user_upload_uuid}/")
23
+ def download_file(user_upload_id: str, destination_path: str):
24
+ content = get(f"user/file_upload_get/{user_upload_id}/")
22
25
 
23
26
  # Write the content to the destination path
24
27
  # if there's a directory path in the destination path, create the directory
@@ -40,7 +40,7 @@ def download_workspace(workspace_files, target_directory: str):
40
40
  )
41
41
 
42
42
  download_file(
43
- sim_file["user_upload"]["uuid"],
43
+ sim_file["user_upload"]["id"],
44
44
  f"{target_directory}/{sim_file['user_upload']['users_name']}",
45
45
  )
46
46
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: atomict
3
- Version: 1.2.15
3
+ Version: 1.2.17
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
@@ -71,7 +71,7 @@ export AT_DEBUG=enabled
71
71
 
72
72
  ```$ tess```
73
73
 
74
- ![Alt text](img/at.png?raw=true "at")
74
+ ![Alt text](img/tess.png?raw=true "tess")
75
75
 
76
76
  You can get help for each command with `tess <command> --help`. This will print the command-specific help and options.
77
77
  ## Log in and store authentication token
@@ -80,6 +80,10 @@ You can get help for each command with `tess <command> --help`. This will print
80
80
 
81
81
  This will prompt you for your username and password.
82
82
 
83
+ ```$ tess token```
84
+
85
+ This command prints out your current token.
86
+
83
87
 
84
88
  ## Get a list of available projects
85
89
 
@@ -28,6 +28,7 @@ atomict/cli/commands/organization.py
28
28
  atomict/cli/commands/project.py
29
29
  atomict/cli/commands/simulation.py
30
30
  atomict/cli/commands/task.py
31
+ atomict/cli/commands/token.py
31
32
  atomict/cli/commands/traj.py
32
33
  atomict/cli/commands/upload.py
33
34
  atomict/cli/commands/user.py
@@ -1 +0,0 @@
1
- __version__ = "1.2.15"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes