File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,27 @@ class AseStructureTaskDoc(StructureMetadata):
232
232
233
233
tags : list [str ] | None = Field (None , description = "List of tags for the task." )
234
234
235
+ @classmethod
236
+ def from_ase_task_doc (
237
+ cls , ase_task_doc : AseTaskDoc , ** task_document_kwargs
238
+ ) -> AseStructureTaskDoc :
239
+ """Create an AseStructureTaskDoc for a task that has ASE-compatible outputs.
240
+
241
+ Parameters
242
+ ----------
243
+ ase_task_doc : AseTaskDoc
244
+ Task doc for the calculation
245
+ task_document_kwargs : dict
246
+ Additional keyword args passed to :obj:`.AseStructureTaskDoc()`.
247
+ """
248
+ task_document_kwargs .update (
249
+ {k : getattr (ase_task_doc , k ) for k in _task_doc_translation_keys },
250
+ structure = ase_task_doc .mol_or_struct ,
251
+ )
252
+ return cls .from_structure (
253
+ meta_structure = ase_task_doc .mol_or_struct , ** task_document_kwargs
254
+ )
255
+
235
256
236
257
class AseMoleculeTaskDoc (MoleculeMetadata ):
237
258
"""Document containing information on molecule manipulation using ASE."""
You can’t perform that action at this time.
0 commit comments