Skip to content
radical-collaborationPublic

About

Integrated Machine-learning for PRotEin Structures at Scale

Resources

Stars

7 stars

Watchers

5 watching

Forks

Repository files navigation

Integrated Machine-learning for PRotEin Structures at Scale (IMPRESS)

IMPRESS is a high-performance computational framework to enable the inverse design of proteins using foundation models such as ProteinMPNN, RFDiffusion3, and Boltz-2. It runs many asynchronous, adaptive protein-design pipelines concurrently on HPC resources through RADICAL AsyncFlow.

Documentation

IMPRESS Docs

Installation

git clone https://github.com/radical-collaboration/IMPRESS.git
cd IMPRESS
pip install .

HPC execution backends (Dragon, RADICAL-Pilot) come from rhapsody, which is installed separately:

pip install "rhapsody-py[dragon,telemetry]"

Example

import asyncio
from concurrent.futures import ThreadPoolExecutor

from radical.asyncflow import WorkflowEngine
from rhapsody.backends import ConcurrentExecutionBackend, DragonExecutionBackend

from impress import ImpressBasePipeline, ImpressManager, PipelineSetup


class MyPipeline(ImpressBasePipeline):
    def register_pipeline_tasks(self):
        @self.auto_register_task()
        async def design(*args, **kwargs):
            return "python3 design.py"

        @self.auto_register_task()
        async def fold(*args, **kwargs):
            return "python3 fold.py"

    async def run(self):
        await self.design()
        await self.fold()
        await self.run_adaptive_step(wait=True)


async def main() -> None:
    # The caller owns the engine: create it, hand it to the manager,
    # and shut it down when done.  Stages run on `compute`; the adaptive
    # callback runs on `local`, a thread pool, because it mutates the live
    # pipeline object.
    compute = await DragonExecutionBackend(name="compute")
    local = await ConcurrentExecutionBackend(ThreadPoolExecutor(), name="local")
    flow = await WorkflowEngine.create(backend=[compute, local])
    manager = ImpressManager(flow)

    # adaptive_fn must be a declared engine task; a bare function raises
    # TypeError in PipelineSetup.
    @flow.function_task(backend="local")
    async def adaptive_decision(pipeline: MyPipeline) -> None:
        # Inspect pipeline.state and optionally spawn a child pipeline:
        # pipeline.submit_child_pipeline_request({...})
        pass

    try:
        await manager.start(pipeline_setups=[
            PipelineSetup(name=f"p{i}", type=MyPipeline,
                          adaptive_fn=adaptive_decision)
            for i in range(1, 5)
        ])
    finally:
        await flow.shutdown()


if __name__ == "__main__":
    asyncio.run(main())

Complete, runnable workflows live under examples/: protein binding (ProteinMPNN + Boltz-2), small molecule binding (RFDiffusion3 + LigandMPNN + Rosetta + Boltz-2), and discontinuous scaffolds.

IMPRESS-A: autonomous campaigns

agent/ holds IMPRESS-A, an autonomous design agent that composes and runs workflows per cycle on the same AsyncFlow/rhapsody stack. It is a separate package (impress_a, Python >= 3.10) with its own install and its own dependency set, sharing this repository's CI, lint and documentation. Its reference documentation is published under IMPRESS-A and lives at docs/impress-a/; see also agent/README.md.

Resources

To learn more, please visit the IMPRESS documentation.

About

Integrated Machine-learning for PRotEin Structures at Scale

Resources

Stars

7 stars

Watchers

5 watching

Forks

Contributors

Languages