This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import modal | |
| def download_boltz2(): | |
| from mosaic.models.boltz2 import Boltz2 | |
| Boltz2() | |
| ### Build modal image: install mosaic + deps and download boltz2 model. | |
| image = ( | |
| modal.Image.debian_slim(python_version="3.12") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ######### | |
| # | |
| # Low-hanging fruit: | |
| # 1. Epitope selection! E.g. using Pesto-style predictor or something simple (SASA + charge?) | |
| # 2. Cropping! Could be sped up by a factor of 5-10 by cropping the target properly | |
| # 3. Early stopping. Kill runs that are going poorly in early stages | |
| # 4. Filtering + ranking with more models | |
| # 5. Different design models, hyperparameter tuning etc. E.g. Boltz2 + templates | |
| # | |
| import modal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FunctionWrapperContextManager: | |
| def __init__(self, module, function_names, callback): | |
| """ | |
| Create a context manager that wraps multiple functions in a module. | |
| Calls to those functions are dispatched to a callback. | |
| Args: | |
| module (module): The module containing the functions to wrap | |
| function_names (list): List of function names to wrap |