File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -174,20 +174,18 @@ def make( # type: ignore[override]
174174 if len (list (os .scandir (mcsqs_dir ))) == 0 :
175175 mcsqs_dir .unlink ()
176176
177- return SQSTask .from_structure (
177+ sqs_structures = None
178+ sqs_scores = None
179+ if isinstance (sqs_structs , list ) and len (sqs_structs ) > 1 :
180+ sqs_structures = [entry ["structure" ] for entry in sqs_structs [1 :]]
181+ sqs_scores = [entry ["objective_function" ] for entry in sqs_structs [1 :]]
182+
183+ return SQSTask (
178184 transformation = self .transformation ,
179185 input_structure = structure ,
180186 final_structure = best_sqs ,
181187 final_objective = best_objective ,
182- sqs_structures = (
183- [entry ["structure" ] for entry in sqs_structs [1 :]]
184- if len (sqs_structs ) > 1
185- else None
186- ),
187- sqs_scores = (
188- [entry ["objective_function" ] for entry in sqs_structs [1 :]]
189- if len (sqs_structs ) > 1
190- else None
191- ),
188+ sqs_structures = sqs_structures ,
189+ sqs_scores = sqs_scores ,
192190 sqs_method = self .transformation .sqs_method ,
193191 )
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class TransformTask(BaseModel):
2626 description = "The transformation applied to a structure."
2727 )
2828
29- final_strcture : Structure = Field (
29+ final_structure : Structure = Field (
3030 description = "The structure after the transformation."
3131 )
3232
You can’t perform that action at this time.
0 commit comments