openprotein-python 0.8.11__tar.gz → 0.8.12__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/PKG-INFO +1 -1
  2. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/models/foundation/boltzgen.py +24 -8
  3. openprotein_python-0.8.12/openprotein/models/foundation/boltzgen_schema.py +389 -0
  4. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/.gitignore +0 -0
  5. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/LICENSE.txt +0 -0
  6. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/README.md +0 -0
  7. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/__init__.py +0 -0
  8. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/_version.py +0 -0
  9. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/align/__init__.py +0 -0
  10. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/align/align.py +0 -0
  11. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/align/api.py +0 -0
  12. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/align/future.py +0 -0
  13. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/align/msa.py +0 -0
  14. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/align/schemas.py +0 -0
  15. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/__init__.py +0 -0
  16. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/align.py +0 -0
  17. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/assaydata.py +0 -0
  18. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/deprecated/__init__.py +0 -0
  19. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/deprecated/design.py +0 -0
  20. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/deprecated/poet.py +0 -0
  21. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/deprecated/predict.py +0 -0
  22. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/deprecated/train.py +0 -0
  23. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/design.py +0 -0
  24. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/designer.py +0 -0
  25. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/embedding.py +0 -0
  26. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/error.py +0 -0
  27. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/fold.py +0 -0
  28. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/job.py +0 -0
  29. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/predict.py +0 -0
  30. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/predictor.py +0 -0
  31. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/prompt.py +0 -0
  32. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/svd.py +0 -0
  33. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/train.py +0 -0
  34. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/api/umap.py +0 -0
  35. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/__init__.py +0 -0
  36. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/deprecated.py +0 -0
  37. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/__init__.py +0 -0
  38. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/align/__init__.py +0 -0
  39. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/align/base.py +0 -0
  40. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/align/msa.py +0 -0
  41. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/align/prompt.py +0 -0
  42. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/assaydata.py +0 -0
  43. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/deprecated/__init__.py +0 -0
  44. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/deprecated/design.py +0 -0
  45. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/deprecated/poet.py +0 -0
  46. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/deprecated/predict.py +0 -0
  47. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/deprecated/train.py +0 -0
  48. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/design.py +0 -0
  49. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/designer.py +0 -0
  50. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/embeddings/__init__.py +0 -0
  51. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/embeddings/base.py +0 -0
  52. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/embeddings/esm.py +0 -0
  53. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/embeddings/future.py +0 -0
  54. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/embeddings/openprotein.py +0 -0
  55. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/embeddings/poet.py +0 -0
  56. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/embeddings/poet2.py +0 -0
  57. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/embeddings/test.py +0 -0
  58. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/fold/__init__.py +0 -0
  59. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/fold/alphafold2.py +0 -0
  60. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/fold/base.py +0 -0
  61. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/fold/boltz.py +0 -0
  62. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/fold/esmfold.py +0 -0
  63. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/fold/future.py +0 -0
  64. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/futures.py +0 -0
  65. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/predict.py +0 -0
  66. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/predictor/__init__.py +0 -0
  67. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/predictor/predict.py +0 -0
  68. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/predictor/predictor.py +0 -0
  69. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/predictor/validate.py +0 -0
  70. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/prompt.py +0 -0
  71. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/svd.py +0 -0
  72. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/train.py +0 -0
  73. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/models/umap.py +0 -0
  74. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/__init__.py +0 -0
  75. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/align.py +0 -0
  76. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/assaydata.py +0 -0
  77. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/deprecated/__init__.py +0 -0
  78. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/deprecated/design.py +0 -0
  79. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/deprecated/predict.py +0 -0
  80. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/deprecated/train.py +0 -0
  81. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/design.py +0 -0
  82. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/designer.py +0 -0
  83. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/embeddings.py +0 -0
  84. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/fold.py +0 -0
  85. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/job.py +0 -0
  86. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/predict.py +0 -0
  87. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/predictor.py +0 -0
  88. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/prompt.py +0 -0
  89. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/svd.py +0 -0
  90. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/train.py +0 -0
  91. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/app/services/umap.py +0 -0
  92. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/base.py +0 -0
  93. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/chains.py +0 -0
  94. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/common/__init__.py +0 -0
  95. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/common/features.py +0 -0
  96. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/common/model_metadata.py +0 -0
  97. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/common/reduction.py +0 -0
  98. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/config.py +0 -0
  99. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/csv.py +0 -0
  100. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/data/__init__.py +0 -0
  101. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/data/api.py +0 -0
  102. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/data/assaydataset.py +0 -0
  103. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/data/data.py +0 -0
  104. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/data/schemas.py +0 -0
  105. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/design/__init__.py +0 -0
  106. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/design/api.py +0 -0
  107. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/design/design.py +0 -0
  108. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/design/future.py +0 -0
  109. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/design/schemas.py +0 -0
  110. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/__init__.py +0 -0
  111. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/api.py +0 -0
  112. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/embeddings.py +0 -0
  113. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/esm.py +0 -0
  114. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/future.py +0 -0
  115. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/models.py +0 -0
  116. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/openprotein.py +0 -0
  117. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/poet.py +0 -0
  118. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/poet2.py +0 -0
  119. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/embeddings/schemas.py +0 -0
  120. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/errors.py +0 -0
  121. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fasta.py +0 -0
  122. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/__init__.py +0 -0
  123. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/alphafold2.py +0 -0
  124. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/api.py +0 -0
  125. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/boltz.py +0 -0
  126. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/complex.py +0 -0
  127. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/esmfold.py +0 -0
  128. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/fold.py +0 -0
  129. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/future.py +0 -0
  130. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/minifold.py +0 -0
  131. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/models.py +0 -0
  132. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/rosettafold3.py +0 -0
  133. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/fold/schemas.py +0 -0
  134. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/jobs/__init__.py +0 -0
  135. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/jobs/api.py +0 -0
  136. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/jobs/futures.py +0 -0
  137. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/jobs/jobs.py +0 -0
  138. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/jobs/schemas.py +0 -0
  139. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/models/__init__.py +0 -0
  140. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/models/base.py +0 -0
  141. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/models/foundation/proteinmpnn.py +0 -0
  142. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/models/foundation/rfdiffusion.py +0 -0
  143. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/models/models.py +0 -0
  144. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/predictor/__init__.py +0 -0
  145. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/predictor/api.py +0 -0
  146. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/predictor/models.py +0 -0
  147. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/predictor/prediction.py +0 -0
  148. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/predictor/predictor.py +0 -0
  149. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/predictor/schemas.py +0 -0
  150. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/predictor/validate.py +0 -0
  151. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/prompt/__init__.py +0 -0
  152. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/prompt/api.py +0 -0
  153. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/prompt/models.py +0 -0
  154. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/prompt/prompt.py +0 -0
  155. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/prompt/schemas.py +0 -0
  156. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/protein.py +0 -0
  157. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/__init__.py +0 -0
  158. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/align.py +0 -0
  159. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/assaydata.py +0 -0
  160. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/deprecated/__init__.py +0 -0
  161. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/deprecated/design.py +0 -0
  162. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/deprecated/poet.py +0 -0
  163. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/deprecated/predict.py +0 -0
  164. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/deprecated/train.py +0 -0
  165. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/design.py +0 -0
  166. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/designer.py +0 -0
  167. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/embeddings.py +0 -0
  168. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/features.py +0 -0
  169. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/fold.py +0 -0
  170. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/job.py +0 -0
  171. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/predict.py +0 -0
  172. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/predictor.py +0 -0
  173. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/prompt.py +0 -0
  174. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/svd.py +0 -0
  175. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/train.py +0 -0
  176. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/schemas/umap.py +0 -0
  177. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/svd/__init__.py +0 -0
  178. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/svd/api.py +0 -0
  179. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/svd/models.py +0 -0
  180. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/svd/schemas.py +0 -0
  181. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/svd/svd.py +0 -0
  182. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/umap/__init__.py +0 -0
  183. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/umap/api.py +0 -0
  184. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/umap/models.py +0 -0
  185. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/umap/schemas.py +0 -0
  186. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/umap/umap.py +0 -0
  187. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/openprotein/utils/uuid.py +0 -0
  188. {openprotein_python-0.8.11 → openprotein_python-0.8.12}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openprotein-python
3
- Version: 0.8.11
3
+ Version: 0.8.12
4
4
  Summary: OpenProtein Python interface.
5
5
  Author-email: Mark Gee <markgee@ne47.bio>, "Timothy Truong Jr." <ttruong@ne47.bio>, Tristan Bepler <tbepler@ne47.bio>
6
6
  License-Expression: MIT
@@ -11,6 +11,8 @@ from openprotein.jobs import Future, Job
11
11
  from openprotein.models.base import ProteinModel
12
12
  from openprotein.protein import Protein
13
13
 
14
+ from .boltzgen_schema import BoltzGenDesignSpec
15
+
14
16
 
15
17
  class BoltzGenRequest(BaseModel):
16
18
  "Specification for an BoltzGen request."
@@ -18,7 +20,7 @@ class BoltzGenRequest(BaseModel):
18
20
  n: int = 1
19
21
  # protein: Protein
20
22
  structure_text: str | None = None
21
- design_spec: dict[str, Any]
23
+ design_spec: BoltzGenDesignSpec | dict[str, Any]
22
24
  diffusion_batch_size: int | None = None
23
25
  step_scale: float | None = None
24
26
  noise_scale: float | None = None
@@ -120,7 +122,7 @@ class BoltzGenModel(ProteinModel):
120
122
 
121
123
  def generate(
122
124
  self,
123
- design_spec: dict[str, Any],
125
+ design_spec: BoltzGenDesignSpec | dict[str, Any],
124
126
  structure_file: str | bytes | BinaryIO | None = None,
125
127
  n: int = 1,
126
128
  diffusion_batch_size: int | None = None,
@@ -133,12 +135,22 @@ class BoltzGenModel(ProteinModel):
133
135
 
134
136
  Parameters
135
137
  ----------
136
- design_spec : dict[str, Any]
137
- The BoltzGen design specification to run. This is the Python representation
138
- of the BoltzGen yaml request specification.
139
- structure_file : BinaryIO, optional
140
- An input PDB file (as a file-like object) used for inpainting or other
141
- guided design tasks where parts of an existing structure are provided.
138
+ design_spec : BoltzGenDesignSpec | dict[str, Any]
139
+ The BoltzGen design specification to run. Can be a typed BoltzGenDesignSpec
140
+ object or a dict representing the BoltzGen yaml request specification.
141
+
142
+ Note: If the design_spec includes FileEntity objects with `path` fields,
143
+ those paths are placeholders. The actual structure file content must be
144
+ provided via the `structure_file` parameter below, as the platform backend
145
+ currently only accepts structure files this way.
146
+ structure_file : str | bytes | BinaryIO | None, optional
147
+ An input PDB/CIF file used for inpainting or other guided design tasks
148
+ where parts of an existing structure are provided. This parameter provides
149
+ the actual structure content that corresponds to any FileEntity `path`
150
+ fields in the design_spec. Can be:
151
+ - A file path (str) to read from
152
+ - Raw file content (bytes)
153
+ - A file-like object (BinaryIO)
142
154
  n : int, optional
143
155
  The number of unique design trajectories to run (default is 1).
144
156
  diffusion_batch_size : int, optional
@@ -163,6 +175,10 @@ class BoltzGenModel(ProteinModel):
163
175
  A future object that can be used to retrieve the results of the design
164
176
  job upon completion.
165
177
  """
178
+ # Validate design_spec if it's a dict
179
+ if isinstance(design_spec, dict):
180
+ design_spec = BoltzGenDesignSpec.model_validate(design_spec)
181
+
166
182
  request = BoltzGenRequest(
167
183
  n=n,
168
184
  design_spec=design_spec,
@@ -0,0 +1,389 @@
1
+ """Pydantic v2 schema for BoltzGen design specification."""
2
+
3
+ from typing import Literal
4
+
5
+ from pydantic import BaseModel, Field, field_validator, model_validator
6
+
7
+
8
+ # ============================================================================
9
+ # Entity Definitions
10
+ # ============================================================================
11
+
12
+
13
+ class ProteinEntity(BaseModel):
14
+ """
15
+ Protein entity specification.
16
+
17
+ Attributes
18
+ ----------
19
+ id : str or list[str]
20
+ Chain identifier(s) for the protein.
21
+ sequence : str
22
+ Protein sequence. Can include:
23
+ - Amino acid letters (A-Z)
24
+ - Design residues (numbers, e.g., "10" for 10 design residues)
25
+ - Ranges (e.g., "15..20" for random number between 15-20)
26
+ - Mixed patterns (e.g., "3..5C6C3" for variable design + fixed residues)
27
+ secondary_structure : str | None
28
+ Secondary structure specification. Defaults to None.
29
+ binding_types : str | dict | None
30
+ Binding type specification. Can be:
31
+ - String with characters: 'u' (unspecified), 'B' (binding), 'N' (not binding)
32
+ - Dict with 'binding' and/or 'not_binding' keys
33
+ cyclic : bool
34
+ Whether the protein is cyclic. Defaults to False.
35
+ """
36
+
37
+ id: str | list[str]
38
+ sequence: str
39
+ secondary_structure: str | None = None
40
+ binding_types: str | dict | None = None
41
+ cyclic: bool = False
42
+
43
+
44
+ class LigandEntity(BaseModel):
45
+ """
46
+ Ligand entity specification.
47
+
48
+ Attributes
49
+ ----------
50
+ id : str or list[str]
51
+ Chain identifier(s) for the ligand.
52
+ ccd : str | None
53
+ Chemical Component Dictionary identifier.
54
+ smiles : str | None
55
+ SMILES string representation of the ligand.
56
+ binding_types : str | dict | None
57
+ Binding type specification.
58
+ """
59
+
60
+ id: str | list[str]
61
+ ccd: str | None = None
62
+ smiles: str | None = None
63
+ binding_types: str | dict | None = None
64
+
65
+ @model_validator(mode="after")
66
+ def check_ccd_or_smiles(self):
67
+ """Ensure either ccd or smiles is provided."""
68
+ if self.ccd is None and self.smiles is None:
69
+ raise ValueError("Either 'ccd' or 'smiles' must be provided for ligand")
70
+ return self
71
+
72
+
73
+ class ChainInclude(BaseModel):
74
+ """
75
+ Chain inclusion specification.
76
+
77
+ Attributes
78
+ ----------
79
+ id : str
80
+ Chain identifier.
81
+ res_index : str | None
82
+ Residue index range (e.g., "10..16", "..5", "20..").
83
+ """
84
+
85
+ id: str
86
+ res_index: str | None = None
87
+
88
+
89
+ class ChainIncludeProximity(BaseModel):
90
+ """
91
+ Proximity-based chain inclusion.
92
+
93
+ Attributes
94
+ ----------
95
+ id : str
96
+ Chain identifier.
97
+ res_index : str
98
+ Residue index range.
99
+ radius : float
100
+ Radius in angstroms for proximity inclusion.
101
+ """
102
+
103
+ id: str
104
+ res_index: str
105
+ radius: float
106
+
107
+
108
+ class ChainBindingType(BaseModel):
109
+ """
110
+ Binding type specification for a chain.
111
+
112
+ Attributes
113
+ ----------
114
+ id : str
115
+ Chain identifier.
116
+ binding : str | None
117
+ Residue indices that are binding (e.g., "5..7,13").
118
+ not_binding : str | None
119
+ Residue indices that are not binding (e.g., "9..11" or "all").
120
+ """
121
+
122
+ id: str
123
+ binding: str | None = None
124
+ not_binding: str | None = None
125
+
126
+
127
+ class StructureGroup(BaseModel):
128
+ """
129
+ Structure group for visibility control.
130
+
131
+ Attributes
132
+ ----------
133
+ visibility : int
134
+ Visibility level (0, 1, 2, etc.).
135
+ id : str
136
+ Chain identifier or "all".
137
+ res_index : str | None
138
+ Residue index range.
139
+ """
140
+
141
+ visibility: int
142
+ id: str
143
+ res_index: str | None = None
144
+
145
+
146
+ class ChainDesign(BaseModel):
147
+ """
148
+ Design specification for a chain.
149
+
150
+ Attributes
151
+ ----------
152
+ id : str
153
+ Chain identifier.
154
+ res_index : str
155
+ Residue indices to design (e.g., "..4,20..27").
156
+ """
157
+
158
+ id: str
159
+ res_index: str
160
+
161
+
162
+ class ChainSecondaryStructure(BaseModel):
163
+ """
164
+ Secondary structure specification for a chain.
165
+
166
+ Attributes
167
+ ----------
168
+ id : str
169
+ Chain identifier.
170
+ loop : str | None
171
+ Residue indices for loop regions.
172
+ helix : str | None
173
+ Residue indices for helix regions.
174
+ sheet : str | None
175
+ Residue indices for sheet regions.
176
+ """
177
+
178
+ id: str
179
+ loop: str | None = None
180
+ helix: str | None = None
181
+ sheet: str | None = None
182
+
183
+
184
+ class DesignInsertion(BaseModel):
185
+ """
186
+ Design insertion specification.
187
+
188
+ Attributes
189
+ ----------
190
+ id : str
191
+ Chain identifier.
192
+ res_index : int
193
+ Residue index where insertion occurs (1-based).
194
+ num_residues : str | int
195
+ Number of residues to insert. Can be a range (e.g., "2..9") or fixed number.
196
+ secondary_structure : Literal["UNSPECIFIED", "LOOP", "HELIX", "SHEET"]
197
+ Secondary structure type for inserted residues.
198
+ """
199
+
200
+ id: str
201
+ res_index: int
202
+ num_residues: str | int
203
+ secondary_structure: Literal["UNSPECIFIED", "LOOP", "HELIX", "SHEET"] = (
204
+ "UNSPECIFIED"
205
+ )
206
+
207
+
208
+ class FileEntity(BaseModel):
209
+ """
210
+ File-based entity specification (e.g., PDB/CIF files).
211
+
212
+ Note
213
+ ----
214
+ When using the `generate()` method, the `path` field is overwritten by the
215
+ `structure_file` argument. The OpenProtein platform backend currently only
216
+ accepts structure files via the `structure_file` parameter, not as paths
217
+ in the design spec. The `path` field is included here for compatibility with
218
+ the BoltzGen YAML format, but will be replaced when submitting to the API.
219
+
220
+ Attributes
221
+ ----------
222
+ path : str
223
+ Path to the structure file. This is a placeholder that will be overwritten
224
+ by the `structure_file` argument when calling `generate()`. The actual
225
+ structure content must be provided via the `structure_file` parameter.
226
+ fuse : str | None
227
+ Chain ID to fuse with.
228
+ include : str | list[dict]
229
+ Chains or regions to include. Can be "all" or list of chain specifications.
230
+ exclude : list[dict] | None
231
+ Chains or regions to exclude.
232
+ include_proximity : list[dict] | None
233
+ Proximity-based inclusion specifications.
234
+ binding_types : list[dict] | None
235
+ Binding type specifications for chains.
236
+ structure_groups : list[dict] | None
237
+ Structure group specifications.
238
+ design : list[dict] | None
239
+ Design specifications for chains.
240
+ secondary_structure : list[dict] | None
241
+ Secondary structure specifications for chains.
242
+ design_insertions : list[dict] | None
243
+ Design insertion specifications.
244
+ """
245
+
246
+ path: str
247
+ fuse: str | None = None
248
+ include: str | list[dict] | None = None
249
+ exclude: list[dict] | None = None
250
+ include_proximity: list[dict] | None = None
251
+ binding_types: list[dict] | None = None
252
+ structure_groups: list[dict] | None = None
253
+ design: list[dict] | None = None
254
+ secondary_structure: list[dict] | None = None
255
+ design_insertions: list[dict] | None = None
256
+
257
+
258
+ class Entity(BaseModel):
259
+ """
260
+ Entity wrapper for different entity types.
261
+
262
+ Attributes
263
+ ----------
264
+ protein : ProteinEntity | None
265
+ Protein entity specification.
266
+ ligand : LigandEntity | None
267
+ Ligand entity specification.
268
+ file : FileEntity | None
269
+ File-based entity specification.
270
+ """
271
+
272
+ protein: ProteinEntity | None = None
273
+ ligand: LigandEntity | None = None
274
+ file: FileEntity | None = None
275
+
276
+ @model_validator(mode="after")
277
+ def check_exactly_one_entity(self):
278
+ """Ensure exactly one entity type is specified."""
279
+ entities = [self.protein, self.ligand, self.file]
280
+ if sum(x is not None for x in entities) != 1:
281
+ raise ValueError(
282
+ "Exactly one of 'protein', 'ligand', or 'file' must be specified"
283
+ )
284
+ return self
285
+
286
+
287
+ # ============================================================================
288
+ # Constraint Definitions
289
+ # ============================================================================
290
+
291
+
292
+ class BondConstraint(BaseModel):
293
+ """
294
+ Covalent bond constraint between two atoms.
295
+
296
+ Attributes
297
+ ----------
298
+ atom1 : list[str | int]
299
+ First atom specification: [CHAIN_ID, RES_IDX, ATOM_NAME].
300
+ atom2 : list[str | int]
301
+ Second atom specification: [CHAIN_ID, RES_IDX, ATOM_NAME].
302
+ """
303
+
304
+ atom1: list[str | int] = Field(..., min_length=3, max_length=3)
305
+ atom2: list[str | int] = Field(..., min_length=3, max_length=3)
306
+
307
+
308
+ class TotalLengthConstraint(BaseModel):
309
+ """
310
+ Total length constraint for the design.
311
+
312
+ Attributes
313
+ ----------
314
+ min : int | None
315
+ Minimum total length.
316
+ max : int | None
317
+ Maximum total length.
318
+ """
319
+
320
+ min: int | None = None
321
+ max: int | None = None
322
+
323
+
324
+ class Constraint(BaseModel):
325
+ """
326
+ Constraint wrapper for different constraint types.
327
+
328
+ Attributes
329
+ ----------
330
+ bond : BondConstraint | None
331
+ Bond constraint specification.
332
+ total_len : TotalLengthConstraint | None
333
+ Total length constraint specification.
334
+ """
335
+
336
+ bond: BondConstraint | None = None
337
+ total_len: TotalLengthConstraint | None = None
338
+
339
+ @model_validator(mode="after")
340
+ def check_at_least_one_constraint(self):
341
+ """Ensure at least one constraint type is specified."""
342
+ constraints = [self.bond, self.total_len]
343
+ if sum(x is not None for x in constraints) == 0:
344
+ raise ValueError("At least one constraint type must be specified")
345
+ return self
346
+
347
+
348
+ # ============================================================================
349
+ # Top-Level Design Spec
350
+ # ============================================================================
351
+
352
+
353
+ class BoltzGenDesignSpec(BaseModel):
354
+ """
355
+ Complete BoltzGen design specification.
356
+
357
+ This schema represents the full design specification for BoltzGen,
358
+ including entities (proteins, ligands, files) and constraints.
359
+
360
+ Attributes
361
+ ----------
362
+ entities : list[Entity]
363
+ List of entities in the design.
364
+ constraints : list[Constraint] | None
365
+ List of constraints for the design.
366
+
367
+ Examples
368
+ --------
369
+ >>> spec = BoltzGenDesignSpec(
370
+ ... entities=[
371
+ ... Entity(protein=ProteinEntity(id="A", sequence="ACDEFGHIKLMNPQRSTVWY")),
372
+ ... Entity(ligand=LigandEntity(id="B", ccd="ATP"))
373
+ ... ],
374
+ ... constraints=[
375
+ ... Constraint(bond=BondConstraint(atom1=["A", 10, "CA"], atom2=["B", 1, "O"]))
376
+ ... ]
377
+ ... )
378
+ """
379
+
380
+ entities: list[Entity]
381
+ constraints: list[Constraint] | None = None
382
+
383
+ @field_validator("entities")
384
+ @classmethod
385
+ def check_entities_not_empty(cls, v):
386
+ """Ensure at least one entity is provided."""
387
+ if not v:
388
+ raise ValueError("At least one entity must be specified")
389
+ return v