atomict 1.2.13__tar.gz → 1.2.15__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.
- {atomict-1.2.13 → atomict-1.2.15}/PKG-INFO +1 -1
- atomict-1.2.15/atomict/__version__.py +1 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/ase/atatoms.py +20 -5
- atomict-1.2.15/atomict/simulation/sh.py +28 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/utils.py +4 -4
- {atomict-1.2.13 → atomict-1.2.15}/atomict.egg-info/PKG-INFO +1 -1
- {atomict-1.2.13 → atomict-1.2.15}/atomict.egg-info/SOURCES.txt +1 -0
- atomict-1.2.13/atomict/__version__.py +0 -1
- {atomict-1.2.13 → atomict-1.2.15}/LICENSE +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/README.md +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/api.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/auth.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/adsorbate.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/ai_assist.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/catalysis.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/common.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/exploration/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/exploration/soec.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/exploration/sqs.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/helpers.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/k8s.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/login.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/organization.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/project.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/simulation/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/simulation/catalysis.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/simulation/fhiaims.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/simulation/kpoint.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/simulation/vibes.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/simulation.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/task.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/traj.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/upload.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/commands/user.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/core/client.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/core/config.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/core/utils.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/ext/custom_classes.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/cli/main.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/env.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/exceptions.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/infra/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/infra/distwork/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/infra/distwork/environment.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/infra/distwork/task.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/infra/logging.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/io/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/io/cif.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/io/fhiaims.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/io/msgpack.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/io/trajectory.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/io/utils.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/ml/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/ml/model.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/project/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/project/link.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/project/note.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/project/project.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/project/tags.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/project/workbench.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/reality/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/reality/oqmd.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/reality/slabs.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/cantera.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/catalysis.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/counterfactual.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/defect.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/ea.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/fhi_aims.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/impact.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/kpoint.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/mattergen.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/md.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/mlrelax.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/models.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/phonon.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/qe.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/simulation/sqs.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/user/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/user/files.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/user/workspace.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/utils/fhiaims/__init__.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/utils/fhiaims/geometry.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/utils/tenacity.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict/utils/traj.py +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict.egg-info/dependency_links.txt +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict.egg-info/entry_points.txt +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict.egg-info/requires.txt +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/atomict.egg-info/top_level.txt +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/pyproject.toml +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/requirements.txt +0 -0
- {atomict-1.2.13 → atomict-1.2.15}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: atomict
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.15
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.2.15"
|
|
@@ -78,20 +78,32 @@ class ATAtoms:
|
|
|
78
78
|
and tracks diffs between Atoms states. An ATAtoms run is a collection of diffs.
|
|
79
79
|
"""
|
|
80
80
|
|
|
81
|
-
def __init__(self,
|
|
82
|
-
|
|
81
|
+
def __init__(self,
|
|
82
|
+
atoms: Atoms,
|
|
83
|
+
project_id: Optional[str] = '',
|
|
84
|
+
simulation_id: Optional[str] = '',
|
|
85
|
+
batch_size: int = 20,
|
|
86
|
+
sync_interval: float = 10.0,
|
|
87
|
+
batch_diffs: bool = False,
|
|
88
|
+
is_result: bool = False):
|
|
83
89
|
"""
|
|
84
90
|
atoms: ASE Atoms object to wrap
|
|
91
|
+
project_id: ID of the project to associate with the atoms (env var AT_PROJECT_ID)
|
|
92
|
+
simulation_id: ID of simulation the object is being used in (env var AT_SIMULATION_ID)
|
|
85
93
|
batch_size: Number of diffs to accumulate before sending to server in a single request
|
|
86
94
|
sync_interval: Maximum time in seconds between syncs to server
|
|
87
|
-
project_id: ID of the project to associate with the atoms
|
|
88
95
|
batch_diffs: Whether to batch diffs
|
|
96
|
+
is_result: A (metadata) flag for indicating whether the object is the result of a simulation
|
|
89
97
|
"""
|
|
90
98
|
if not isinstance(atoms, Atoms):
|
|
91
99
|
raise TypeError(f"Expected ASE Atoms object, got {type(atoms).__name__}: {atoms}")
|
|
92
100
|
|
|
93
101
|
self._atoms = atoms
|
|
94
|
-
self._project_id = project_id
|
|
102
|
+
self._project_id = project_id or os.environ.get('AT_PROJECT_ID')
|
|
103
|
+
self._simulation_id = simulation_id or os.environ.get('AT_SIMULATION_ID')
|
|
104
|
+
if not self._project_id or not self._simulation_id:
|
|
105
|
+
raise ATAtomsInitializationError("ATAtoms requires project_id and simulation_id to be passed or set via environment variables (AT_PROJECT_ID, AT_SIMULATION_ID)")
|
|
106
|
+
|
|
95
107
|
self._object_id = str(uuid.uuid4())
|
|
96
108
|
self._batch_size = batch_size
|
|
97
109
|
self._sync_interval = sync_interval
|
|
@@ -103,6 +115,7 @@ class ATAtoms:
|
|
|
103
115
|
self._run_id = None
|
|
104
116
|
self._initialized = False
|
|
105
117
|
self._batch_diffs = batch_diffs
|
|
118
|
+
self._is_result = is_result
|
|
106
119
|
self._initial_state = self._get_current_state()
|
|
107
120
|
self._previous_state = self._serialize_state(self._initial_state)
|
|
108
121
|
self._structure_id = self._hash_state(self._previous_state)
|
|
@@ -183,7 +196,9 @@ class ATAtoms:
|
|
|
183
196
|
'metadata': json.dumps({
|
|
184
197
|
'created_by': 'ATAtoms',
|
|
185
198
|
'initial_structure_id': self._structure_id,
|
|
186
|
-
'timestamp': datetime.datetime.now().isoformat()
|
|
199
|
+
'timestamp': datetime.datetime.now().isoformat(),
|
|
200
|
+
'is_result': self._is_result,
|
|
201
|
+
'simulation_id': self._simulation_id
|
|
187
202
|
})
|
|
188
203
|
}
|
|
189
204
|
response = post(
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from atomict.api import get, post
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def get_sh(id: str, **params):
|
|
5
|
+
"""
|
|
6
|
+
Get SH
|
|
7
|
+
"""
|
|
8
|
+
result = get(f"api/encoding-task/{id}/", params=params)
|
|
9
|
+
return result
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def associate_user_upload_with_sh(user_upload_id: str, sh_id: str):
|
|
13
|
+
"""
|
|
14
|
+
Associate a user upload with a SH
|
|
15
|
+
"""
|
|
16
|
+
result = post(
|
|
17
|
+
"api/encoding-file/",
|
|
18
|
+
payload={"user_upload_id": user_upload_id, "encoding_id": sh_id},
|
|
19
|
+
)
|
|
20
|
+
return result
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_sh_files(sh_id: str):
|
|
24
|
+
"""
|
|
25
|
+
Get the files associated with a SH
|
|
26
|
+
"""
|
|
27
|
+
result = get(f"api/encoding-file/?encoding__id={sh_id}")
|
|
28
|
+
return result
|
|
@@ -21,7 +21,7 @@ from atomict.user.workspace import download_workspace
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
def fetch_source_geometry(sim: dict, workbench_dir: str) -> Atoms:
|
|
24
|
-
if sim
|
|
24
|
+
if sim.get("source_geometry"):
|
|
25
25
|
|
|
26
26
|
extension = sim["source_geometry"]["orig_name"].split(".")[-1]
|
|
27
27
|
|
|
@@ -49,7 +49,7 @@ def fetch_relaxed_geometry(sim: dict, workbench_dir: str) -> Atoms:
|
|
|
49
49
|
returns: Atoms object
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
-
if sim
|
|
52
|
+
if sim.get("starting_structure"):
|
|
53
53
|
previous_simulation = fhi_get_simulation(sim["starting_structure"]["id"], include_ht=True)
|
|
54
54
|
logging.info(f"Previous simulation: {previous_simulation['id']}")
|
|
55
55
|
files = fhi_get_simulation_files(previous_simulation["id"])
|
|
@@ -71,7 +71,7 @@ def fetch_relaxed_geometry(sim: dict, workbench_dir: str) -> Atoms:
|
|
|
71
71
|
|
|
72
72
|
return atoms[-1]
|
|
73
73
|
|
|
74
|
-
elif sim
|
|
74
|
+
elif sim.get("starting_structure_mlrelax"):
|
|
75
75
|
|
|
76
76
|
previous_mlrelax = get_mlrelax(sim["starting_structure_mlrelax"]["id"], include_ht=True)
|
|
77
77
|
logging.info(f"Previous MLRelaxation: {previous_mlrelax['id']}")
|
|
@@ -102,7 +102,7 @@ def fetch_relaxed_geometry(sim: dict, workbench_dir: str) -> Atoms:
|
|
|
102
102
|
else:
|
|
103
103
|
return atoms
|
|
104
104
|
|
|
105
|
-
elif sim
|
|
105
|
+
elif sim.get("starting_structure_userupload"):
|
|
106
106
|
logging.info(f"Previous UserUpload: {sim['starting_structure_userupload']['uuid']}")
|
|
107
107
|
|
|
108
108
|
extension = sim["starting_structure_userupload"]["orig_name"].split(".")[-1]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: atomict
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.15
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.2.13"
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|