boltzjobs


Nameboltzjobs JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryModule for defining molecular components, modifications, and job configurations for Boltz-2
upload_time2025-10-10 14:41:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords boltz-2 yaml bioinformatics molecular biology protein modeling structural biology
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # boltzjobs

`boltzjobs` is a Python package designed to streamline the process of creating YAML input files for [Boltz-2](https://github.com/jwohlwend/boltz).

It provides an intuitive, object-oriented interface for defining molecular sequences, constraints, and templates, and generates a correctly formatted YAML file.

## Features

- Define **protein**, **DNA**, and **RNA chains** with support for residue modifications.
- Add **ligands** using either CCD codes or SMILES strings.
- Specify geometric **constraints**, including bonds, contacts, and binding pockets.
- Define mmCIF or PDB files as **structural templates**.
- Request property calculations, such as **binding affinity**.

## Installation

```bash
pip install git+https://github.com/ugSUBMARINE/boltzjobs.git
```

## Usage

The `Job` class is the main entry point for building a Boltz-2 input file. You can create a job, add different molecular components, and then write the final configuration to a YAML file.

```python
from boltzjobs import Job

# 1. Create a new job
job = Job(name="Herceptin-HER2_complex_design")

# 2. Add molecular components
# Add a protein chain (HER2)
her2_chain = job.add_protein_chain(sequence="MELAALCRWGLLLALLPPGAASTQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVVQGNLELTYLPTNASLSFLQDIQEVQGYVLIAHNQVRQVPLQRLRIVRGTQLFEDNYALAVLDNGDPLNNTTPVTGASPGGLRELQLRSLTEILKGGVLIQRNPQLCYQDTILWKDIFHKNNQLALTLIDTNRSR", ids="A")

# Add a second protein chain (Herceptin heavy chain)
herceptin_h = job.add_protein_chain(sequence="EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVARIYPTNGYTRYADSVKGRFTISADTSKNTAYLQMNSLRAEDTAVYYCSRWGGDGFYAMDYWGQGTLVTVSS", ids="H")

# Add a ligand using a SMILES string
# The library automatically handles single-quoting the SMILES string in the YAML output
job.add_ligand(smiles="CC(=O)N[C@@H](C)C(=O)O", ids="L")

# 3. Define constraints and properties
# Define a binding pocket for the ligand, specifying contact residues on chain A
pocket = job.add_pocket(binder="L", max_distance=6.0)
pocket.add_contact_token("A", 8)
pocket.add_contact_token("A", 12)

# Request an affinity calculation for the ligand
job.request_affinity(binder="L")

# 4. Add structural templates
job.add_template(cif="templates/1n8z.cif", chain_id="A")

# 5. Write the final YAML file
# The output will be correctly formatted for Boltz-2.
job.write_yaml("boltz_input.yaml")

print("Successfully generated boltz_input.yaml")
print("-" * 20)
print(job) # You can also print the job object for a summary
```

This will generate a `boltz_input.yaml` file with the following content:

```yaml
version: 1
sequences:
  - protein:
      id: A
      sequence: MELAALCRWGLLLALLPPGAASTQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVVQGNLELTYLPTNASLSFLQDIQEVQGYVLIAHNQVRQVPLQRLRIVRGTQLFEDNYALAVLDNGDPLNNTTPVTGASPGGLRELQLRSLTEILKGGVLIQRNPQLCYQDTILWKDIFHKNNQLALTLIDTNRSR
  - protein:
      id: H
      sequence: EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVARIYPTNGYTRYADSVKGRFTISADTSKNTAYLQMNSLRAEDTAVYYCSRWGGDGFYAMDYWGQGTLVTVSS
  - ligand:
      id: L
      smiles: 'CC(=O)N[C@@H](C)C(=O)O'
constraints:
  - pocket:
      binder: L
      contacts: [[A, 8], [A, 12]]
      max_distance: 6.0
templates:
  - cif: templates/1n8z.cif
    chain_id: A
properties:
  - affinity:
      binder: L
```

## License

This project is licensed under the MIT License.

## References

- [Boltz-2 GitHub Repository](https://github.com/jwohlwend/boltz)
- [Boltz-2 Input File Schema Documentation](https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "boltzjobs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "Karl Gruber <gammaturn@gmail.com>",
    "keywords": "Boltz-2, YAML, bioinformatics, molecular biology, protein modeling, structural biology",
    "author": null,
    "author_email": "Karl Gruber <gammaturn@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "# boltzjobs\n\n`boltzjobs` is a Python package designed to streamline the process of creating YAML input files for [Boltz-2](https://github.com/jwohlwend/boltz).\n\nIt provides an intuitive, object-oriented interface for defining molecular sequences, constraints, and templates, and generates a correctly formatted YAML file.\n\n## Features\n\n- Define **protein**, **DNA**, and **RNA chains** with support for residue modifications.\n- Add **ligands** using either CCD codes or SMILES strings.\n- Specify geometric **constraints**, including bonds, contacts, and binding pockets.\n- Define mmCIF or PDB files as **structural templates**.\n- Request property calculations, such as **binding affinity**.\n\n## Installation\n\n```bash\npip install git+https://github.com/ugSUBMARINE/boltzjobs.git\n```\n\n## Usage\n\nThe `Job` class is the main entry point for building a Boltz-2 input file. You can create a job, add different molecular components, and then write the final configuration to a YAML file.\n\n```python\nfrom boltzjobs import Job\n\n# 1. Create a new job\njob = Job(name=\"Herceptin-HER2_complex_design\")\n\n# 2. Add molecular components\n# Add a protein chain (HER2)\nher2_chain = job.add_protein_chain(sequence=\"MELAALCRWGLLLALLPPGAASTQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVVQGNLELTYLPTNASLSFLQDIQEVQGYVLIAHNQVRQVPLQRLRIVRGTQLFEDNYALAVLDNGDPLNNTTPVTGASPGGLRELQLRSLTEILKGGVLIQRNPQLCYQDTILWKDIFHKNNQLALTLIDTNRSR\", ids=\"A\")\n\n# Add a second protein chain (Herceptin heavy chain)\nherceptin_h = job.add_protein_chain(sequence=\"EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVARIYPTNGYTRYADSVKGRFTISADTSKNTAYLQMNSLRAEDTAVYYCSRWGGDGFYAMDYWGQGTLVTVSS\", ids=\"H\")\n\n# Add a ligand using a SMILES string\n# The library automatically handles single-quoting the SMILES string in the YAML output\njob.add_ligand(smiles=\"CC(=O)N[C@@H](C)C(=O)O\", ids=\"L\")\n\n# 3. Define constraints and properties\n# Define a binding pocket for the ligand, specifying contact residues on chain A\npocket = job.add_pocket(binder=\"L\", max_distance=6.0)\npocket.add_contact_token(\"A\", 8)\npocket.add_contact_token(\"A\", 12)\n\n# Request an affinity calculation for the ligand\njob.request_affinity(binder=\"L\")\n\n# 4. Add structural templates\njob.add_template(cif=\"templates/1n8z.cif\", chain_id=\"A\")\n\n# 5. Write the final YAML file\n# The output will be correctly formatted for Boltz-2.\njob.write_yaml(\"boltz_input.yaml\")\n\nprint(\"Successfully generated boltz_input.yaml\")\nprint(\"-\" * 20)\nprint(job) # You can also print the job object for a summary\n```\n\nThis will generate a `boltz_input.yaml` file with the following content:\n\n```yaml\nversion: 1\nsequences:\n  - protein:\n      id: A\n      sequence: MELAALCRWGLLLALLPPGAASTQVCTGTDMKLRLPASPETHLDMLRHLYQGCQVVQGNLELTYLPTNASLSFLQDIQEVQGYVLIAHNQVRQVPLQRLRIVRGTQLFEDNYALAVLDNGDPLNNTTPVTGASPGGLRELQLRSLTEILKGGVLIQRNPQLCYQDTILWKDIFHKNNQLALTLIDTNRSR\n  - protein:\n      id: H\n      sequence: EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVARIYPTNGYTRYADSVKGRFTISADTSKNTAYLQMNSLRAEDTAVYYCSRWGGDGFYAMDYWGQGTLVTVSS\n  - ligand:\n      id: L\n      smiles: 'CC(=O)N[C@@H](C)C(=O)O'\nconstraints:\n  - pocket:\n      binder: L\n      contacts: [[A, 8], [A, 12]]\n      max_distance: 6.0\ntemplates:\n  - cif: templates/1n8z.cif\n    chain_id: A\nproperties:\n  - affinity:\n      binder: L\n```\n\n## License\n\nThis project is licensed under the MIT License.\n\n## References\n\n- [Boltz-2 GitHub Repository](https://github.com/jwohlwend/boltz)\n- [Boltz-2 Input File Schema Documentation](https://github.com/jwohlwend/boltz/blob/main/docs/prediction.md)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Module for defining molecular components, modifications, and job configurations for Boltz-2",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/ugSUBMARINE/boltzjobs/issues",
        "Changelog": "https://github.com/ugSUBMARINE/boltzjobs/releases",
        "Documentation": "https://github.com/ugSUBMARINE/boltzjobs#readme",
        "Homepage": "https://github.com/ugSUBMARINE/boltzjobs",
        "Repository": "https://github.com/ugSUBMARINE/boltzjobs.git"
    },
    "split_keywords": [
        "boltz-2",
        " yaml",
        " bioinformatics",
        " molecular biology",
        " protein modeling",
        " structural biology"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "899ef6a7c6863eeab4b6a1fbdd2e937c04d0f1f9e15a49cb2cb4cc3067378046",
                "md5": "58a22594634a659d0d6860fb9bc4c130",
                "sha256": "04fcf4267b16935edefb37f7bdf2c26f4c1c8666e6f979b9f4f79112ed42e6a8"
            },
            "downloads": -1,
            "filename": "boltzjobs-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "58a22594634a659d0d6860fb9bc4c130",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 14676,
            "upload_time": "2025-10-10T14:41:24",
            "upload_time_iso_8601": "2025-10-10T14:41:24.107214Z",
            "url": "https://files.pythonhosted.org/packages/89/9e/f6a7c6863eeab4b6a1fbdd2e937c04d0f1f9e15a49cb2cb4cc3067378046/boltzjobs-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-10 14:41:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ugSUBMARINE",
    "github_project": "boltzjobs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "boltzjobs"
}
        
Elapsed time: 1.54488s