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 @@ -233,6 +233,27 @@ class AseStructureTaskDoc(StructureMetadata):
233233
234234 tags : Optional [list [str ]] = Field (None , description = "List of tags for the task." )
235235
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+
236257
237258class AseMoleculeTaskDoc (MoleculeMetadata ):
238259 """Document containing information on molecule manipulation using ASE."""
You can’t perform that action at this time.
0 commit comments