(self, structure, record, results, out_name)
| 367 | } |
| 368 | |
| 369 | def save_result(self, structure, record, results, out_name): |
| 370 | sampled_coord = results["sampled_coord"] |
| 371 | pad_mask = results["pad_mask"] |
| 372 | plddt = results["plddts"] |
| 373 | |
| 374 | save_paths = [] |
| 375 | for i in range(sampled_coord.shape[0]): |
| 376 | sampled_coord_i = sampled_coord[i] |
| 377 | pad_mask_i = pad_mask[i] |
| 378 | plddt_i = plddt[i] if plddt is not None else None |
| 379 | out_name_i = f"{out_name}_sampled_{i}" |
| 380 | # save the generated structure |
| 381 | structure_save = process_structure( |
| 382 | structure, sampled_coord_i, pad_mask_i, record, backend=self.backend |
| 383 | ) |
| 384 | save_structure( |
| 385 | structure_save, |
| 386 | self.prediction_dir, |
| 387 | out_name_i, |
| 388 | output_format="mmcif", |
| 389 | plddts=plddt_i, |
| 390 | ) |
| 391 | save_paths.append(self.prediction_dir / f"{out_name_i}.cif") |
| 392 | return save_paths |
nothing calls this directly
no test coverage detected