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