atomict 0.2.4__py3-none-any.whl → 1.2.4.1__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 +1 -1
- atomict/cli/commands/adsorbate.py +4 -4
- atomict/cli/commands/traj.py +57 -0
- atomict/cli/core/client.py +16 -0
- atomict/cli/main.py +16 -10
- atomict/io/cif.py +18 -5
- atomict/io/fhiaims.py +1 -1
- atomict/io/json.py +1 -1
- atomict/simulation/defect.py +24 -0
- atomict/simulation/ea.py +63 -10
- atomict/simulation/fhi_aims.py +5 -2
- atomict/simulation/md.py +32 -0
- atomict/simulation/mlrelax.py +22 -4
- atomict/simulation/sqs.py +19 -5
- atomict/simulation/utils.py +3 -3
- atomict/user/workspace.py +2 -6
- atomict/utils/fhiaims/geometry.py +1 -1
- atomict/utils/traj.py +0 -0
- {atomict-0.2.4.dist-info → atomict-1.2.4.1.dist-info}/METADATA +21 -16
- {atomict-0.2.4.dist-info → atomict-1.2.4.1.dist-info}/RECORD +24 -20
- {atomict-0.2.4.dist-info → atomict-1.2.4.1.dist-info}/WHEEL +1 -1
- atomict-1.2.4.1.dist-info/entry_points.txt +2 -0
- atomict-0.2.4.dist-info/entry_points.txt +0 -2
- {atomict-0.2.4.dist-info → atomict-1.2.4.1.dist-info/licenses}/LICENSE +0 -0
- {atomict-0.2.4.dist-info → atomict-1.2.4.1.dist-info}/top_level.txt +0 -0
atomict/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "
|
|
1
|
+
__version__ = "1.2.4.1"
|
|
@@ -116,8 +116,8 @@ def create(
|
|
|
116
116
|
Create a new adsorbate.
|
|
117
117
|
|
|
118
118
|
Examples:
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
tess adsorbate create --smiles "CC(=O)O" --binding-indices 1 --binding-indices 2
|
|
120
|
+
tess adsorbate create --ase-atoms "Atoms(...)" --reaction-string "A + B -> C"
|
|
121
121
|
"""
|
|
122
122
|
client = get_client()
|
|
123
123
|
|
|
@@ -155,8 +155,8 @@ def update(
|
|
|
155
155
|
Update an existing adsorbate.
|
|
156
156
|
|
|
157
157
|
Examples:
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
tess adsorbate update 123 --smiles "CC(=O)O" --binding-indices 1 --binding-indices 2
|
|
159
|
+
tess adsorbate update 456 --ase-atoms "Atoms(...)" --reaction-string "A + B -> C"
|
|
160
160
|
"""
|
|
161
161
|
client = get_client()
|
|
162
162
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import click
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
|
|
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
|
+
@click.group()
|
|
14
|
+
def traj():
|
|
15
|
+
"""Operations on trajectory files."""
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@traj.command()
|
|
20
|
+
@click.argument('file_path', type=click.Path(exists=True))
|
|
21
|
+
@click.option('-s', '--step', type=int, required=True, help='Subsample every Nth frame')
|
|
22
|
+
def subsample(file_path, step):
|
|
23
|
+
"""Subsample a trajectory file by taking every Nth frame.
|
|
24
|
+
|
|
25
|
+
The output will be saved as {original_filename}_subsampled_{step}.traj
|
|
26
|
+
"""
|
|
27
|
+
if step <= 0:
|
|
28
|
+
click.echo("Error: Step must be a positive integer")
|
|
29
|
+
return
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
# Parse the input file path
|
|
33
|
+
input_path = Path(file_path)
|
|
34
|
+
|
|
35
|
+
# Read all frames from the trajectory file
|
|
36
|
+
atoms_list = read(file_path, index=":")
|
|
37
|
+
|
|
38
|
+
# Subsample the frames with the given step
|
|
39
|
+
subsampled_atoms = atoms_list[::step]
|
|
40
|
+
|
|
41
|
+
if not subsampled_atoms:
|
|
42
|
+
click.echo("Warning: No frames were selected with the given step size")
|
|
43
|
+
return
|
|
44
|
+
|
|
45
|
+
# Create output filename
|
|
46
|
+
stem = input_path.stem
|
|
47
|
+
output_file = input_path.with_name(f"{stem}_subsampled_{step}.traj")
|
|
48
|
+
|
|
49
|
+
# Write the subsampled trajectory
|
|
50
|
+
write(str(output_file), subsampled_atoms)
|
|
51
|
+
|
|
52
|
+
click.echo(f"Successfully subsampled trajectory with step {step}")
|
|
53
|
+
click.echo(f"Wrote {len(subsampled_atoms)} frames to {output_file}")
|
|
54
|
+
click.echo(f"Original trajectory had {len(atoms_list)} frames")
|
|
55
|
+
|
|
56
|
+
except Exception as e:
|
|
57
|
+
click.echo(f"Error processing trajectory file: {str(e)}")
|
atomict/cli/core/client.py
CHANGED
|
@@ -4,6 +4,7 @@ import os
|
|
|
4
4
|
import sys
|
|
5
5
|
from functools import wraps
|
|
6
6
|
from typing import Any, Dict, Iterator, List, Optional, Union
|
|
7
|
+
from urllib.parse import urlparse
|
|
7
8
|
|
|
8
9
|
import httpx
|
|
9
10
|
from rich.console import Console
|
|
@@ -35,6 +36,21 @@ def handle_connection_errors(func):
|
|
|
35
36
|
class APIClient:
|
|
36
37
|
def __init__(self, config: Config = None, base_url: str = "https://api.atomictessellator.com"):
|
|
37
38
|
self.base_url = os.getenv("AT_SERVER", base_url)
|
|
39
|
+
|
|
40
|
+
try:
|
|
41
|
+
parsed_url = urlparse(self.base_url)
|
|
42
|
+
if not all([parsed_url.scheme in ('http', 'https'), parsed_url.netloc]):
|
|
43
|
+
console.print(
|
|
44
|
+
f"[red]Invalid URL format: {self.base_url}[/red]"
|
|
45
|
+
)
|
|
46
|
+
console.print(
|
|
47
|
+
"[yellow]AT_SERVER URL must start with http:// or https:// and include a valid domain.[/yellow]"
|
|
48
|
+
)
|
|
49
|
+
sys.exit(1)
|
|
50
|
+
except Exception as e:
|
|
51
|
+
console.print(f"[red]URL validation error: {str(e)}[/red]")
|
|
52
|
+
sys.exit(1)
|
|
53
|
+
|
|
38
54
|
self.params = {"limit": 20}
|
|
39
55
|
self.client = httpx.Client(base_url=self.base_url, timeout=30.0)
|
|
40
56
|
self.username = None
|
atomict/cli/main.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# cli/main.py
|
|
2
2
|
import logging
|
|
3
3
|
import os
|
|
4
|
+
import sys
|
|
4
5
|
|
|
5
6
|
import click
|
|
6
7
|
from rich.console import Console
|
|
@@ -9,7 +10,7 @@ from atomict.__version__ import __version__
|
|
|
9
10
|
from atomict.cli.commands import login, user
|
|
10
11
|
|
|
11
12
|
# Import command groups
|
|
12
|
-
from .commands import adsorbate, catalysis, k8s, project, task, upload
|
|
13
|
+
from .commands import adsorbate, catalysis, k8s, project, task, traj, upload
|
|
13
14
|
from .commands.exploration import soec, sqs
|
|
14
15
|
from .commands.simulation import fhiaims, kpoint, vibes
|
|
15
16
|
|
|
@@ -45,7 +46,7 @@ def setup_logging(verbose: bool):
|
|
|
45
46
|
@click.option(
|
|
46
47
|
"-v", "--verbose", is_flag=True, default=False, help="Enable verbose output"
|
|
47
48
|
)
|
|
48
|
-
@click.version_option(prog_name="
|
|
49
|
+
@click.version_option(prog_name="tess", version=__version__)
|
|
49
50
|
def cli(verbose: bool):
|
|
50
51
|
"""Atomic Tessellator CLI - Manage simulations and computational resources"""
|
|
51
52
|
setup_logging(verbose)
|
|
@@ -66,23 +67,23 @@ def completion(shell):
|
|
|
66
67
|
if shell == "bash":
|
|
67
68
|
completion_script = """
|
|
68
69
|
# Add to ~/.bashrc:
|
|
69
|
-
if
|
|
70
|
-
eval "$(
|
|
70
|
+
if tess --version > /dev/null 2>&1; then
|
|
71
|
+
eval "$(_TESS_COMPLETE=bash_source tess)"
|
|
71
72
|
fi
|
|
72
73
|
"""
|
|
73
74
|
elif shell == "zsh":
|
|
74
75
|
completion_script = """
|
|
75
76
|
# Add to ~/.zshrc:
|
|
76
|
-
if
|
|
77
|
-
eval "$(
|
|
77
|
+
if tess --version > /dev/null 2>&1; then
|
|
78
|
+
eval "$(_TESS_COMPLETE=zsh_source tess)"
|
|
78
79
|
fi
|
|
79
80
|
"""
|
|
80
81
|
elif shell == "fish":
|
|
81
82
|
completion_script = """
|
|
82
83
|
# Add to ~/.config/fish/config.fish:
|
|
83
|
-
if
|
|
84
|
-
eval
|
|
85
|
-
|
|
84
|
+
if type -q tess
|
|
85
|
+
eval (env _TESS_COMPLETE=fish_source tess)
|
|
86
|
+
end
|
|
86
87
|
"""
|
|
87
88
|
click.echo(f"# Shell completion for {shell}")
|
|
88
89
|
click.echo(completion_script.strip())
|
|
@@ -106,6 +107,7 @@ cli.add_command(kpoint.kpoint_group)
|
|
|
106
107
|
cli.add_command(catalysis.catalysis_group) # WIP
|
|
107
108
|
cli.add_command(sqs.sqs_group)
|
|
108
109
|
cli.add_command(soec.soecexploration_group)
|
|
110
|
+
cli.add_command(traj.traj)
|
|
109
111
|
cli.add_command(user.user_group)
|
|
110
112
|
cli.add_command(login._login)
|
|
111
113
|
cli.add_command(vibes.vibes_group)
|
|
@@ -123,7 +125,11 @@ cli.add_command(vibes.vibes_group)
|
|
|
123
125
|
|
|
124
126
|
|
|
125
127
|
def main():
|
|
126
|
-
|
|
128
|
+
try:
|
|
129
|
+
cli()
|
|
130
|
+
except Exception as exc:
|
|
131
|
+
Console().print(f"[red]Error: {str(exc)}. Exiting...[/red]")
|
|
132
|
+
sys.exit(1)
|
|
127
133
|
|
|
128
134
|
|
|
129
135
|
if __name__ == "__main__":
|
atomict/io/cif.py
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
|
|
3
2
|
try:
|
|
4
3
|
import ase.io
|
|
5
4
|
import spglib
|
|
5
|
+
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
|
|
6
|
+
from pymatgen.core import Structure
|
|
6
7
|
except ImportError:
|
|
7
8
|
raise ImportError(
|
|
8
|
-
"The 'ase'
|
|
9
|
-
"To install the optional
|
|
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]`"
|
|
10
11
|
)
|
|
11
12
|
|
|
12
13
|
|
|
@@ -117,7 +118,17 @@ class CIFAnalyzer:
|
|
|
117
118
|
for letter in set(dataset.wyckoffs)
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
# Convert ASE atoms to pymatgen Structure for SpacegroupAnalyzer
|
|
122
|
+
lattice = self.atoms.get_cell()
|
|
123
|
+
species = self.atoms.get_chemical_symbols()
|
|
124
|
+
coords = self.atoms.get_scaled_positions()
|
|
125
|
+
structure = Structure(lattice, species, coords)
|
|
126
|
+
|
|
127
|
+
# Now use SpacegroupAnalyzer with the pymatgen Structure
|
|
128
|
+
analyzer = SpacegroupAnalyzer(structure)
|
|
129
|
+
bravais = analyzer.get_lattice_type()
|
|
130
|
+
|
|
131
|
+
symmetry_info = {
|
|
121
132
|
'symmetry': {
|
|
122
133
|
'space_group_number': dataset.number,
|
|
123
134
|
'space_group_international': dataset.international,
|
|
@@ -129,9 +140,11 @@ class CIFAnalyzer:
|
|
|
129
140
|
'transformation_matrix': dataset.transformation_matrix.tolist(),
|
|
130
141
|
'origin_shift': dataset.origin_shift.tolist(),
|
|
131
142
|
'asymmetric_unit_atoms': len(unique_equiv),
|
|
132
|
-
'wyckoff_multiplicities': wyckoff_multiplicities
|
|
143
|
+
'wyckoff_multiplicities': wyckoff_multiplicities,
|
|
144
|
+
'bravais_lattice': bravais
|
|
133
145
|
}
|
|
134
146
|
}
|
|
147
|
+
return symmetry_info
|
|
135
148
|
except Exception as e:
|
|
136
149
|
logging.warning(f'Could not determine symmetry information: {str(e)}')
|
|
137
150
|
|
atomict/io/fhiaims.py
CHANGED
|
@@ -4,7 +4,7 @@ try:
|
|
|
4
4
|
except ImportError:
|
|
5
5
|
raise ImportError(
|
|
6
6
|
"The 'ase' package is required for FHI-aims operations. "
|
|
7
|
-
"To install the optional
|
|
7
|
+
"To install the optional dependencies such as ase, spglib, pymatgen, use `pip install atomict[utils]`"
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
|
atomict/io/json.py
CHANGED
|
@@ -7,7 +7,7 @@ try:
|
|
|
7
7
|
except ImportError:
|
|
8
8
|
raise ImportError(
|
|
9
9
|
"The 'ase' package is required for JSON operations with Atoms objects. "
|
|
10
|
-
"To install the optional
|
|
10
|
+
"To install the optional dependencies such as ase, spglib, pymatgen, use `pip install atomict[utils]`"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from atomict.api import get, post
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def get_defect_exploration(exploration_id: str):
|
|
5
|
+
return get(f"api/defect-exploration/{exploration_id}/")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def get_defect_exploration_file(file_id: str):
|
|
9
|
+
return get(f"api/defect-exploration-file/{file_id}/")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def create_defect_exploration(data: dict):
|
|
13
|
+
return post("api/defect-exploration/", data)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def create_defect_exploration_file(data: dict):
|
|
17
|
+
return post("api/defect-exploration-file/", data)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def associate_user_upload_with_defect_exploration(user_upload_id: str, exploration_id: str):
|
|
21
|
+
return post(
|
|
22
|
+
"api/defect-exploration-file/",
|
|
23
|
+
payload={"user_upload_id": user_upload_id, "analysis_id": exploration_id},
|
|
24
|
+
)
|
atomict/simulation/ea.py
CHANGED
|
@@ -1,24 +1,77 @@
|
|
|
1
1
|
from atomict.api import get, post
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
def get_ea_exploration(exploration_id: str):
|
|
5
|
-
|
|
4
|
+
def get_ea_exploration(exploration_id: str, **params):
|
|
5
|
+
"""
|
|
6
|
+
Get EA exploration
|
|
7
|
+
|
|
8
|
+
Args:
|
|
9
|
+
exploration_id: str - The ID of the exploration
|
|
10
|
+
**params: Additional GET parameters to pass to the API
|
|
11
|
+
"""
|
|
12
|
+
query_string = '&'.join(f"{k}={v}" for k, v in params.items())
|
|
13
|
+
base_url = f"api/ea-exploration/{exploration_id}/"
|
|
14
|
+
url = f"{base_url}?{query_string}" if query_string else base_url
|
|
15
|
+
return get(url)
|
|
6
16
|
|
|
7
17
|
|
|
8
|
-
def get_ea_exploration_sample(sample_id: str):
|
|
9
|
-
|
|
18
|
+
def get_ea_exploration_sample(sample_id: str, **params):
|
|
19
|
+
"""
|
|
20
|
+
Get EA exploration sample
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
sample_id: str - The ID of the sample
|
|
24
|
+
**params: Additional GET parameters to pass to the API
|
|
25
|
+
"""
|
|
26
|
+
query_string = '&'.join(f"{k}={v}" for k, v in params.items())
|
|
27
|
+
base_url = f"api/ea-exploration-sample/{sample_id}/"
|
|
28
|
+
url = f"{base_url}?{query_string}" if query_string else base_url
|
|
29
|
+
return get(url)
|
|
10
30
|
|
|
11
31
|
|
|
12
|
-
def get_ea_exploration_samples(exploration_id: str):
|
|
13
|
-
|
|
32
|
+
def get_ea_exploration_samples(exploration_id: str, **params):
|
|
33
|
+
"""
|
|
34
|
+
Get EA exploration samples
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
exploration_id: str - The ID of the exploration
|
|
38
|
+
**params: Additional GET parameters to pass to the API
|
|
39
|
+
"""
|
|
40
|
+
# Start with the required exploration parameter
|
|
41
|
+
query_params = params.copy()
|
|
42
|
+
query_params['exploration'] = exploration_id
|
|
43
|
+
|
|
44
|
+
query_string = '&'.join(f"{k}={v}" for k, v in query_params.items())
|
|
45
|
+
url = f"api/ea-exploration-sample/?{query_string}"
|
|
46
|
+
return get(url)
|
|
14
47
|
|
|
15
48
|
|
|
16
|
-
def get_ea_exploration_analysis(analysis_id: str):
|
|
17
|
-
|
|
49
|
+
def get_ea_exploration_analysis(analysis_id: str, **params):
|
|
50
|
+
"""
|
|
51
|
+
Get EA exploration analysis
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
analysis_id: str - The ID of the analysis
|
|
55
|
+
**params: Additional GET parameters to pass to the API
|
|
56
|
+
"""
|
|
57
|
+
query_string = '&'.join(f"{k}={v}" for k, v in params.items())
|
|
58
|
+
base_url = f"api/ea-exploration-analysis/{analysis_id}/"
|
|
59
|
+
url = f"{base_url}?{query_string}" if query_string else base_url
|
|
60
|
+
return get(url)
|
|
18
61
|
|
|
19
62
|
|
|
20
|
-
def get_ea_exploration_analysis_file(analysis_file_id: str):
|
|
21
|
-
|
|
63
|
+
def get_ea_exploration_analysis_file(analysis_file_id: str, **params):
|
|
64
|
+
"""
|
|
65
|
+
Get EA exploration analysis file
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
analysis_file_id: str - The ID of the analysis file
|
|
69
|
+
**params: Additional GET parameters to pass to the API
|
|
70
|
+
"""
|
|
71
|
+
query_string = '&'.join(f"{k}={v}" for k, v in params.items())
|
|
72
|
+
base_url = f"api/ea-exploration-analysis-file/{analysis_file_id}/"
|
|
73
|
+
url = f"{base_url}?{query_string}" if query_string else base_url
|
|
74
|
+
return get(url)
|
|
22
75
|
|
|
23
76
|
|
|
24
77
|
def associate_user_upload_with_ea_exploration(user_upload_id: str, analysis_id: str):
|
atomict/simulation/fhi_aims.py
CHANGED
|
@@ -35,11 +35,14 @@ def create_simulation(
|
|
|
35
35
|
return result
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
def get_simulation(simulation_id: str):
|
|
38
|
+
def get_simulation(simulation_id: str, **params):
|
|
39
39
|
"""
|
|
40
40
|
Get a FHI aims simulation
|
|
41
41
|
"""
|
|
42
|
-
|
|
42
|
+
query_string = '&'.join(f"{k}={v}" for k, v in params.items())
|
|
43
|
+
base_url = f"api/fhiaims-simulation/{simulation_id}/"
|
|
44
|
+
url = f"{base_url}?{query_string}" if query_string else base_url
|
|
45
|
+
result = get(url)
|
|
43
46
|
return result
|
|
44
47
|
|
|
45
48
|
|
atomict/simulation/md.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
from atomict.api import get, post, delete
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def get_md_simulation(simulation_id: str):
|
|
5
|
+
return get(f"api/md/{simulation_id}/")
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def get_md_simulation_file(file_id: str):
|
|
9
|
+
return get(f"api/md-file/{file_id}/")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def create_md_simulation(data: dict):
|
|
13
|
+
return post("api/md/", data)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def create_md_simulation_file(data: dict):
|
|
17
|
+
return post("api/md-file/", data)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def associate_user_upload_with_md_simulation(user_upload_id: str, simulation_id: str):
|
|
21
|
+
return post(
|
|
22
|
+
"api/md-file/",
|
|
23
|
+
payload={"user_upload_id": user_upload_id, "md_id": simulation_id},
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def delete_md_simulation(simulation_id: str):
|
|
28
|
+
return delete(f"api/md/{simulation_id}/")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def delete_md_simulation_file(file_id: str):
|
|
32
|
+
return delete(f"api/md-file/{file_id}/")
|
atomict/simulation/mlrelax.py
CHANGED
|
@@ -5,13 +5,26 @@ COMPUTATION_TYPE_SINGLE_POINT = 1
|
|
|
5
5
|
|
|
6
6
|
MODEL_ORB_D3_V2 = 0
|
|
7
7
|
MODEL_MATTERSIM_1_0_0_5M = 1
|
|
8
|
+
MODEL_ORB_V3_CONSERVATIVE = 2
|
|
9
|
+
MODEL_ESEN_30M_OAM = 3
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
def get_mlrelax(id: str):
|
|
12
|
+
def get_mlrelax(id: str, **params):
|
|
11
13
|
"""
|
|
12
14
|
Get MLRelaxation
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
id: str - The ID of the MLRelaxation
|
|
18
|
+
**params: Additional GET parameters to pass to the API
|
|
13
19
|
"""
|
|
14
|
-
|
|
20
|
+
# Build query string from parameters
|
|
21
|
+
query_string = '&'.join(f"{k}={v}" for k, v in params.items())
|
|
22
|
+
base_url = f"api/mlrelax/{id}/"
|
|
23
|
+
|
|
24
|
+
# Add query string if we have parameters
|
|
25
|
+
url = f"{base_url}?{query_string}" if query_string else base_url
|
|
26
|
+
|
|
27
|
+
result = get(url)
|
|
15
28
|
return result
|
|
16
29
|
|
|
17
30
|
|
|
@@ -52,9 +65,14 @@ def create_mlrelaxation(
|
|
|
52
65
|
"Invalid computation type. Please use COMPUTATION_TYPE_RELAXATION (0) or COMPUTATION_TYPE_SINGLE_POINT (1)."
|
|
53
66
|
)
|
|
54
67
|
|
|
55
|
-
if model not in [
|
|
68
|
+
if model not in [
|
|
69
|
+
MODEL_ORB_D3_V2,
|
|
70
|
+
MODEL_MATTERSIM_1_0_0_5M,
|
|
71
|
+
MODEL_ORB_V3_CONSERVATIVE,
|
|
72
|
+
MODEL_ESEN_30M_OAM,
|
|
73
|
+
]:
|
|
56
74
|
raise ValueError(
|
|
57
|
-
"Invalid model. Please use MODEL_ORB_D3_V2 (0)
|
|
75
|
+
"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)."
|
|
58
76
|
)
|
|
59
77
|
|
|
60
78
|
payload = {
|
atomict/simulation/sqs.py
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
from atomict.api import get, post
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
def get_simulation(simulation_id: str, full: bool = False):
|
|
4
|
+
def get_simulation(simulation_id: str, full: bool = False, **params):
|
|
5
5
|
"""
|
|
6
6
|
Get a SQS simulation
|
|
7
|
+
|
|
8
|
+
Args:
|
|
9
|
+
simulation_id: str - The ID of the simulation
|
|
10
|
+
full: bool - Whether to get the full simulation details (default: False)
|
|
11
|
+
**params: Additional GET parameters to pass to the API
|
|
7
12
|
"""
|
|
13
|
+
# Start with any additional parameters
|
|
14
|
+
query_params = params.copy()
|
|
15
|
+
|
|
8
16
|
if full:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
query_params['full'] = 'true'
|
|
18
|
+
|
|
19
|
+
# Build query string
|
|
20
|
+
query_string = '&'.join(f"{k}={v}" for k, v in query_params.items())
|
|
21
|
+
base_url = f"api/sqs-exploration/{simulation_id}/"
|
|
22
|
+
|
|
23
|
+
# Add query string if we have parameters
|
|
24
|
+
url = f"{base_url}?{query_string}" if query_string else base_url
|
|
25
|
+
|
|
26
|
+
result = get(url)
|
|
13
27
|
return result
|
|
14
28
|
|
|
15
29
|
|
atomict/simulation/utils.py
CHANGED
|
@@ -4,7 +4,7 @@ try:
|
|
|
4
4
|
except ImportError:
|
|
5
5
|
raise ImportError(
|
|
6
6
|
"The 'ase' package is required for JSON operations with Atoms objects. "
|
|
7
|
-
"To install the optional
|
|
7
|
+
"To install the optional dependencies such as ase, spglib, pymatgen, use `pip install atomict[utils]`"
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
import logging
|
|
@@ -29,7 +29,7 @@ def fetch_relaxed_geometry(sim: dict, workbench_dir: str) -> Atoms:
|
|
|
29
29
|
"""
|
|
30
30
|
|
|
31
31
|
if sim["starting_structure"]:
|
|
32
|
-
previous_simulation = fhi_get_simulation(sim["starting_structure"]["id"])
|
|
32
|
+
previous_simulation = fhi_get_simulation(sim["starting_structure"]["id"], include_ht=True)
|
|
33
33
|
logging.info(f"Previous simulation: {previous_simulation['id']}")
|
|
34
34
|
files = fhi_get_simulation_files(previous_simulation["id"])
|
|
35
35
|
|
|
@@ -52,7 +52,7 @@ def fetch_relaxed_geometry(sim: dict, workbench_dir: str) -> Atoms:
|
|
|
52
52
|
|
|
53
53
|
elif sim["starting_structure_mlrelax"]:
|
|
54
54
|
|
|
55
|
-
previous_mlrelax = get_mlrelax(sim["starting_structure_mlrelax"]["id"])
|
|
55
|
+
previous_mlrelax = get_mlrelax(sim["starting_structure_mlrelax"]["id"], include_ht=True)
|
|
56
56
|
logging.info(f"Previous MLRelaxation: {previous_mlrelax['id']}")
|
|
57
57
|
files = get_mlrelax_files(previous_mlrelax["id"])
|
|
58
58
|
|
atomict/user/workspace.py
CHANGED
|
@@ -73,9 +73,7 @@ def upload_workspace(
|
|
|
73
73
|
uploaded_size = 0
|
|
74
74
|
last_update_percent = starting_percent
|
|
75
75
|
|
|
76
|
-
update_task_status(
|
|
77
|
-
sim["task"]["id"],
|
|
78
|
-
TaskStatus.RUNNING,
|
|
76
|
+
update_task_status(sim["task"]["id"],
|
|
79
77
|
percent=last_update_percent,
|
|
80
78
|
progress_indeterminate=False,
|
|
81
79
|
)
|
|
@@ -106,7 +104,5 @@ def upload_workspace(
|
|
|
106
104
|
|
|
107
105
|
# Update status if at least 2% has changed
|
|
108
106
|
if current_percent - last_update_percent >= 2:
|
|
109
|
-
update_task_status(
|
|
110
|
-
sim["task"]["id"], TaskStatus.RUNNING, percent=current_percent
|
|
111
|
-
)
|
|
107
|
+
update_task_status(sim["task"]["id"], percent=current_percent)
|
|
112
108
|
last_update_percent = current_percent
|
|
@@ -8,7 +8,7 @@ try:
|
|
|
8
8
|
except ImportError:
|
|
9
9
|
raise ImportError(
|
|
10
10
|
"The 'ase' package is required for JSON operations with Atoms objects. "
|
|
11
|
-
"To install the optional
|
|
11
|
+
"To install the optional dependencies such as ase, spglib, pymatgen, use `pip install atomict[utils]`"
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
from atomict.io.fhiaims import read_aims_output
|
atomict/utils/traj.py
ADDED
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: atomict
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.2.4.1
|
|
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
|
|
@@ -25,12 +25,14 @@ Requires-Dist: rich~=13.0
|
|
|
25
25
|
Provides-Extra: utils
|
|
26
26
|
Requires-Dist: ase==3.23.0; extra == "utils"
|
|
27
27
|
Requires-Dist: spglib==2.5.0; extra == "utils"
|
|
28
|
+
Requires-Dist: pymatgen==2025.3.10; extra == "utils"
|
|
28
29
|
Provides-Extra: dev
|
|
29
30
|
Requires-Dist: pytest~=8.0; extra == "dev"
|
|
30
31
|
Requires-Dist: black; extra == "dev"
|
|
31
32
|
Requires-Dist: isort; extra == "dev"
|
|
32
33
|
Requires-Dist: mypy; extra == "dev"
|
|
33
34
|
Requires-Dist: flake8; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
34
36
|
|
|
35
37
|
# Atomic Tessellator - CLI package
|
|
36
38
|
|
|
@@ -40,6 +42,9 @@ pip install atomict
|
|
|
40
42
|
|
|
41
43
|
# install utils package with scientific extensions (ase, spglib)
|
|
42
44
|
pip install atomict[utils]
|
|
45
|
+
|
|
46
|
+
# ", with a git url
|
|
47
|
+
pip install git+https://github.com/AtomicTessellator/atomic_cli#egg=atomict[utils]
|
|
43
48
|
```
|
|
44
49
|
|
|
45
50
|
## Installation for devs
|
|
@@ -57,53 +62,53 @@ export AT_DEBUG=enabled
|
|
|
57
62
|
|
|
58
63
|
## Get a list of available commands
|
|
59
64
|
|
|
60
|
-
```$
|
|
65
|
+
```$ tess```
|
|
61
66
|
|
|
62
67
|

|
|
63
68
|
|
|
64
|
-
You can get help for each command with `
|
|
69
|
+
You can get help for each command with `tess <command> --help`. This will print the command-specific help and options.
|
|
65
70
|
## Log in and store authentication token
|
|
66
71
|
|
|
67
|
-
```$
|
|
72
|
+
```$ tess login```
|
|
68
73
|
|
|
69
74
|
This will prompt you for your username and password.
|
|
70
75
|
|
|
71
76
|
|
|
72
77
|
## Get a list of available projects
|
|
73
78
|
|
|
74
|
-
```$
|
|
79
|
+
```$ tess project get```
|
|
75
80
|
|
|
76
|
-

|
|
77
82
|
|
|
78
83
|
|
|
79
84
|
## Get a list of adsorbates
|
|
80
85
|
|
|
81
|
-
```$
|
|
86
|
+
```$ tess adsorbate get```
|
|
82
87
|
|
|
83
|
-

|
|
84
89
|
|
|
85
90
|
## Search objects for substrings
|
|
86
91
|
|
|
87
|
-
```$
|
|
92
|
+
```$ tess adsorbate get --search NH3```
|
|
88
93
|
|
|
89
|
-

|
|
90
95
|
|
|
91
96
|
## Get a list of tasks
|
|
92
97
|
|
|
93
|
-
```$
|
|
98
|
+
```$ tess task get```
|
|
94
99
|
|
|
95
|
-

|
|
96
101
|
|
|
97
102
|
## Get tasks with a specific status
|
|
98
103
|
|
|
99
|
-
```$
|
|
104
|
+
```$ tess task get --status completed```
|
|
100
105
|
|
|
101
|
-

|
|
102
107
|
|
|
103
108
|
## Configuration
|
|
104
109
|
|
|
105
110
|
Tab completion is available. Run the hidden command:
|
|
106
111
|
|
|
107
|
-
```
|
|
112
|
+
```tess completion```
|
|
108
113
|
|
|
109
114
|
This will print out the instructions for enabling tab completion for your shell.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
atomict/__init__.py,sha256=nMXg9GFsk8gCcyBnh1MAeUPvo4Zcuv3sdwGHZrxfpPE,36
|
|
2
|
-
atomict/__version__.py,sha256=
|
|
2
|
+
atomict/__version__.py,sha256=CwdymiCvn9caJ29it2klLl2oWmgubdehI907gG9jqDE,23
|
|
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=
|
|
9
|
-
atomict/cli/commands/adsorbate.py,sha256=
|
|
8
|
+
atomict/cli/main.py,sha256=rGU0b-HjG0BQ_mERSKbjU3U9N7vlcLXI1oFOFGnQumY,4216
|
|
9
|
+
atomict/cli/commands/adsorbate.py,sha256=jbF7Hl8fAo_DvEsfHlIQ76C5TQqAjbhol5VGQiUUOFE,5806
|
|
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
|
|
12
12
|
atomict/cli/commands/common.py,sha256=NG8hiLxUGtk-fW5uVs30nKqVciireghoczT7YsGoR1w,1630
|
|
@@ -17,6 +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/traj.py,sha256=iRCqHarrUkY9NTot9ZthkUcLAml_uB7vL3gvNngHJP8,1808
|
|
20
21
|
atomict/cli/commands/upload.py,sha256=enIR6Vp0OUglm94Ka9p0XR5qI1hEU_8b69gKjJRAqJ8,2811
|
|
21
22
|
atomict/cli/commands/user.py,sha256=7jja2At19hrMoTaRx7PrAZRS0C48BJjIN9WEmzN7Xxc,6486
|
|
22
23
|
atomict/cli/commands/exploration/__init__.py,sha256=LTuDJsRPL62w-YYXx-X_GgsuD2Dovj74h-G5tTw5DaE,169
|
|
@@ -27,7 +28,7 @@ atomict/cli/commands/simulation/catalysis.py,sha256=cmQDdy-c6fF7jVjieKSOZOK5Wv9L
|
|
|
27
28
|
atomict/cli/commands/simulation/fhiaims.py,sha256=iUddj5W98gflQOkLo7FD8y7kpdtaLZQFw8LEYVha6f0,9180
|
|
28
29
|
atomict/cli/commands/simulation/kpoint.py,sha256=1M6Pqd27JI_5us8673rpyB_20lsRtDp_9ZY4KpwfYeE,12393
|
|
29
30
|
atomict/cli/commands/simulation/vibes.py,sha256=lfGtKAE6wXhcv3pp6cW76sNHsnoAALVATVMTUX6vZbM,5410
|
|
30
|
-
atomict/cli/core/client.py,sha256=
|
|
31
|
+
atomict/cli/core/client.py,sha256=AcvhupCr3vAnjAjhaxTsrD-IH1B6XctgSpDxVtxhOxc,8224
|
|
31
32
|
atomict/cli/core/config.py,sha256=MHQGo59yt3839-r1-3IXqOrN5DNLxMeQ2QBJRSbFONA,1378
|
|
32
33
|
atomict/cli/core/utils.py,sha256=J8hh1F1vKERnj8JpWSmc2-UHiwFSJfCCnCjDL3-xm4E,941
|
|
33
34
|
atomict/infra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -36,9 +37,9 @@ atomict/infra/distwork/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
36
37
|
atomict/infra/distwork/environment.py,sha256=joydS9wA2pgWafXh_Wqgg95InaxhsusohaeWc9IOgwA,909
|
|
37
38
|
atomict/infra/distwork/task.py,sha256=RsTpIyI43qisD8mwobnDFGq3bUDWMi1WtZzk5cRO40M,1121
|
|
38
39
|
atomict/io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
|
-
atomict/io/cif.py,sha256=
|
|
40
|
-
atomict/io/fhiaims.py,sha256=
|
|
41
|
-
atomict/io/json.py,sha256=
|
|
40
|
+
atomict/io/cif.py,sha256=o7oe6alug5ais2QnJhv88X7sAbZSbTkEWhHa-4Dkw1E,6040
|
|
41
|
+
atomict/io/fhiaims.py,sha256=4Z5oImjZuP-k8AudrMrXqvsO0IHajDy__h5NmLr1LGY,1197
|
|
42
|
+
atomict/io/json.py,sha256=fsJeazri0IfcG8TrvJv-1MZb12adMkUC2S28u-9Hdw4,755
|
|
42
43
|
atomict/io/utils.py,sha256=ncA8XchNN3lJT8EhJK6tLJE9TvmHmPlxizTnY5ASvEc,272
|
|
43
44
|
atomict/ml/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
45
|
atomict/ml/model.py,sha256=Ug6IyRNNQ5_SHnQabFHnCCAGTHa9jxrRAUAkBsdcjgo,279
|
|
@@ -55,24 +56,27 @@ atomict/simulation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
55
56
|
atomict/simulation/cantera.py,sha256=u9TTa_Zm9CPNSln4V06tyJspr3NiCCCZPW6guuOlb5o,858
|
|
56
57
|
atomict/simulation/catalysis.py,sha256=NT7r1qPoYWxVcWQHuAaYWBOprLbZukZLezBHxqIIzRM,565
|
|
57
58
|
atomict/simulation/counterfactual.py,sha256=8-Kf4wGxPvImDr0j2grmBLLwFQ4JpjhBBxIksIwblIQ,708
|
|
58
|
-
atomict/simulation/
|
|
59
|
-
atomict/simulation/
|
|
59
|
+
atomict/simulation/defect.py,sha256=uvYLR_Ng0PFV9A_EE_EgB2SK8jqUpJtvuwLKL02Am3c,691
|
|
60
|
+
atomict/simulation/ea.py,sha256=bYvYnw59F7QCuV-airnX0Wu8fqZHKlsdywgoK7pwNso,3610
|
|
61
|
+
atomict/simulation/fhi_aims.py,sha256=w-tiPvPWWubolcZxaM2QLxOoSYmKIYVx8ohLZavhzig,1887
|
|
60
62
|
atomict/simulation/kpoint.py,sha256=8Dc1F9xqubK1HBCQa7GeRtIhs28302sRnuUK0Rns9Q4,1739
|
|
61
63
|
atomict/simulation/mattergen.py,sha256=ybzJy0nwIAZhG8IIuhlmi-_J6lLyci3aVo35h2ni_w0,488
|
|
62
|
-
atomict/simulation/
|
|
64
|
+
atomict/simulation/md.py,sha256=C32Sh2sv9PQ1lyGaWYFmG5evKk3Jqw0wel2ml4uPnJw,770
|
|
65
|
+
atomict/simulation/mlrelax.py,sha256=kSuZES7p2Bu_q7F5CpYalBdzPXN4_L6tT14FVInJcxw,2684
|
|
63
66
|
atomict/simulation/phonon.py,sha256=_0lPjYv2nbuL2O7DRzLE9-oPNAemagcoD6R6Tu2W4V4,333
|
|
64
67
|
atomict/simulation/qe.py,sha256=p46YiHj_HIiqxrQGs-SBuGoWk5zUiHahXIRcyjdEq3c,1702
|
|
65
|
-
atomict/simulation/sqs.py,sha256=
|
|
66
|
-
atomict/simulation/utils.py,sha256=
|
|
68
|
+
atomict/simulation/sqs.py,sha256=1neQRVUy21R_UVusML6ocz6RVwxGUVh81CMr2TljGbw,1132
|
|
69
|
+
atomict/simulation/utils.py,sha256=Kik1yFrWQW4BxDlCBjstkXMrIKrQSOURi4BsvM00uHU,3289
|
|
67
70
|
atomict/user/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
68
71
|
atomict/user/files.py,sha256=8xGPkISOIiFYsYr26k8OqGE3G7q096zdtV6uy6YTtVU,875
|
|
69
|
-
atomict/user/workspace.py,sha256=
|
|
72
|
+
atomict/user/workspace.py,sha256=qH-iF8kLj7Zpj646NFF_G3d4_P22jQjw5une-ZBiBak,3923
|
|
70
73
|
atomict/utils/tenacity.py,sha256=phc6YPEk7idqiFFeHeK-ngiAaqVOZFYp8S7dX1k-YXc,998
|
|
74
|
+
atomict/utils/traj.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
75
|
atomict/utils/fhiaims/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
|
-
atomict/utils/fhiaims/geometry.py,sha256=
|
|
73
|
-
atomict-
|
|
74
|
-
atomict-
|
|
75
|
-
atomict-
|
|
76
|
-
atomict-
|
|
77
|
-
atomict-
|
|
78
|
-
atomict-
|
|
76
|
+
atomict/utils/fhiaims/geometry.py,sha256=3Ap6gO7UsLFXBl9Ohv8Vmfpvwu0fohpzgdxOFGg6Tmc,2281
|
|
77
|
+
atomict-1.2.4.1.dist-info/licenses/LICENSE,sha256=fzvTkxUzi2u1cea_aRtmg5_mRk6ZyLWJJRr49K28qKg,1075
|
|
78
|
+
atomict-1.2.4.1.dist-info/METADATA,sha256=J0Pw2eoDlLt4zJCXcH0piTEQW_6gxxzQn28f7k4H23s,3047
|
|
79
|
+
atomict-1.2.4.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
80
|
+
atomict-1.2.4.1.dist-info/entry_points.txt,sha256=PozguIUgJUHgS65PSZBHNPUiwYGDwXa4vLZ7hde3aq8,47
|
|
81
|
+
atomict-1.2.4.1.dist-info/top_level.txt,sha256=CCo525YmAj7ZbToMmQcVKQ-JiIiFKiq3GmhIYCG2gaM,8
|
|
82
|
+
atomict-1.2.4.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|