openprotein-python 0.12.1__tar.gz → 0.13.0__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 (205) hide show
  1. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/PKG-INFO +1 -1
  2. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/align/align.py +22 -3
  3. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/align/api.py +9 -1
  4. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/align/msa.py +1 -1
  5. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/align/schemas.py +18 -1
  6. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/base.py +17 -8
  7. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/design/schemas.py +16 -2
  8. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/api.py +11 -3
  9. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/embeddings.py +5 -2
  10. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/models.py +5 -2
  11. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/errors.py +17 -0
  12. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/api.py +91 -6
  13. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/common.py +15 -8
  14. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/future.py +153 -3
  15. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/jobs/api.py +12 -0
  16. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/jobs/futures.py +25 -23
  17. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/jobs/jobs.py +16 -3
  18. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/jobs/schemas.py +1 -0
  19. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/models/structure_generation.py +1 -1
  20. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/molecules/complex.py +55 -5
  21. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/molecules/template.py +15 -1
  22. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/predictor/models.py +2 -2
  23. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/predictor/prediction.py +1 -1
  24. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/predictor/validate.py +1 -1
  25. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/prompt/models.py +1 -1
  26. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/svd/api.py +12 -3
  27. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/svd/models.py +1 -1
  28. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/svd/svd.py +13 -2
  29. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/umap/api.py +11 -2
  30. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/umap/models.py +1 -1
  31. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/umap/umap.py +12 -3
  32. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/pyproject.toml +8 -0
  33. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/.gitignore +0 -0
  34. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/LICENSE.txt +0 -0
  35. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/README.md +0 -0
  36. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/__init__.py +0 -0
  37. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/_version.py +0 -0
  38. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/align/__init__.py +0 -0
  39. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/align/future.py +0 -0
  40. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/__init__.py +0 -0
  41. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/align.py +0 -0
  42. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/assaydata.py +0 -0
  43. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/deprecated/__init__.py +0 -0
  44. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/deprecated/design.py +0 -0
  45. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/deprecated/poet.py +0 -0
  46. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/deprecated/predict.py +0 -0
  47. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/deprecated/train.py +0 -0
  48. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/design.py +0 -0
  49. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/designer.py +0 -0
  50. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/embedding.py +0 -0
  51. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/error.py +0 -0
  52. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/fold.py +0 -0
  53. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/job.py +0 -0
  54. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/predict.py +0 -0
  55. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/predictor.py +0 -0
  56. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/prompt.py +0 -0
  57. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/svd.py +0 -0
  58. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/train.py +0 -0
  59. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/api/umap.py +0 -0
  60. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/__init__.py +0 -0
  61. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/deprecated.py +0 -0
  62. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/__init__.py +0 -0
  63. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/align/__init__.py +0 -0
  64. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/align/base.py +0 -0
  65. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/align/msa.py +0 -0
  66. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/align/prompt.py +0 -0
  67. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/assaydata.py +0 -0
  68. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/deprecated/__init__.py +0 -0
  69. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/deprecated/design.py +0 -0
  70. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/deprecated/poet.py +0 -0
  71. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/deprecated/predict.py +0 -0
  72. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/deprecated/train.py +0 -0
  73. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/design.py +0 -0
  74. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/designer.py +0 -0
  75. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/embeddings/__init__.py +0 -0
  76. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/embeddings/base.py +0 -0
  77. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/embeddings/esm.py +0 -0
  78. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/embeddings/future.py +0 -0
  79. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/embeddings/openprotein.py +0 -0
  80. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/embeddings/poet.py +0 -0
  81. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/embeddings/poet2.py +0 -0
  82. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/embeddings/test.py +0 -0
  83. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/fold/__init__.py +0 -0
  84. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/fold/alphafold2.py +0 -0
  85. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/fold/base.py +0 -0
  86. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/fold/boltz.py +0 -0
  87. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/fold/esmfold.py +0 -0
  88. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/fold/future.py +0 -0
  89. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/futures.py +0 -0
  90. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/predict.py +0 -0
  91. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/predictor/__init__.py +0 -0
  92. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/predictor/predict.py +0 -0
  93. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/predictor/predictor.py +0 -0
  94. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/predictor/validate.py +0 -0
  95. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/prompt.py +0 -0
  96. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/svd.py +0 -0
  97. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/train.py +0 -0
  98. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/models/umap.py +0 -0
  99. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/__init__.py +0 -0
  100. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/align.py +0 -0
  101. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/assaydata.py +0 -0
  102. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/deprecated/__init__.py +0 -0
  103. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/deprecated/design.py +0 -0
  104. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/deprecated/predict.py +0 -0
  105. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/deprecated/train.py +0 -0
  106. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/design.py +0 -0
  107. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/designer.py +0 -0
  108. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/embeddings.py +0 -0
  109. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/fold.py +0 -0
  110. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/job.py +0 -0
  111. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/predict.py +0 -0
  112. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/predictor.py +0 -0
  113. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/prompt.py +0 -0
  114. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/svd.py +0 -0
  115. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/train.py +0 -0
  116. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/app/services/umap.py +0 -0
  117. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/chains.py +0 -0
  118. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/common/__init__.py +0 -0
  119. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/common/features.py +0 -0
  120. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/common/model_metadata.py +0 -0
  121. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/common/reduction.py +0 -0
  122. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/common/residue_contants.py +0 -0
  123. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/config.py +0 -0
  124. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/csv.py +0 -0
  125. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/data/__init__.py +0 -0
  126. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/data/api.py +0 -0
  127. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/data/assaydataset.py +0 -0
  128. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/data/data.py +0 -0
  129. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/data/schemas.py +0 -0
  130. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/design/__init__.py +0 -0
  131. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/design/api.py +0 -0
  132. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/design/design.py +0 -0
  133. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/design/future.py +0 -0
  134. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/__init__.py +0 -0
  135. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/ablang.py +0 -0
  136. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/esm.py +0 -0
  137. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/future.py +0 -0
  138. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/openprotein.py +0 -0
  139. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/poet.py +0 -0
  140. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/poet2.py +0 -0
  141. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/embeddings/schemas.py +0 -0
  142. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fasta.py +0 -0
  143. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/__init__.py +0 -0
  144. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/alphafold2.py +0 -0
  145. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/boltz.py +0 -0
  146. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/complex.py +0 -0
  147. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/esmfold.py +0 -0
  148. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/fold.py +0 -0
  149. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/minifold.py +0 -0
  150. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/models.py +0 -0
  151. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/protenix.py +0 -0
  152. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/rosettafold3.py +0 -0
  153. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/fold/schemas.py +0 -0
  154. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/jobs/__init__.py +0 -0
  155. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/models/__init__.py +0 -0
  156. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/models/base.py +0 -0
  157. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/models/foundation/boltzgen.py +0 -0
  158. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/models/foundation/boltzgen_schema.py +0 -0
  159. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/models/foundation/proteinmpnn.py +0 -0
  160. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/models/foundation/rfdiffusion.py +0 -0
  161. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/models/models.py +0 -0
  162. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/molecules/__init__.py +0 -0
  163. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/molecules/chains.py +0 -0
  164. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/molecules/protein.py +0 -0
  165. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/molecules/structure.py +0 -0
  166. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/predictor/__init__.py +0 -0
  167. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/predictor/api.py +0 -0
  168. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/predictor/predictor.py +0 -0
  169. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/predictor/schemas.py +0 -0
  170. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/prompt/__init__.py +0 -0
  171. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/prompt/api.py +0 -0
  172. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/prompt/prompt.py +0 -0
  173. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/prompt/schemas.py +0 -0
  174. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/protein.py +0 -0
  175. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/scaffolds.py +0 -0
  176. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/__init__.py +0 -0
  177. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/align.py +0 -0
  178. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/assaydata.py +0 -0
  179. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/deprecated/__init__.py +0 -0
  180. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/deprecated/design.py +0 -0
  181. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/deprecated/poet.py +0 -0
  182. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/deprecated/predict.py +0 -0
  183. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/deprecated/train.py +0 -0
  184. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/design.py +0 -0
  185. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/designer.py +0 -0
  186. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/embeddings.py +0 -0
  187. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/features.py +0 -0
  188. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/fold.py +0 -0
  189. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/job.py +0 -0
  190. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/predict.py +0 -0
  191. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/predictor.py +0 -0
  192. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/prompt.py +0 -0
  193. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/svd.py +0 -0
  194. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/train.py +0 -0
  195. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/schemas/umap.py +0 -0
  196. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/svd/__init__.py +0 -0
  197. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/svd/schemas.py +0 -0
  198. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/umap/__init__.py +0 -0
  199. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/umap/schemas.py +0 -0
  200. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/utils/__init__.py +0 -0
  201. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/utils/chain_id.py +0 -0
  202. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/utils/cif.py +0 -0
  203. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/utils/numpy.py +0 -0
  204. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/utils/sequence.py +0 -0
  205. {openprotein_python-0.12.1 → openprotein_python-0.13.0}/openprotein/utils/uuid.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openprotein-python
3
- Version: 0.12.1
3
+ Version: 0.13.0
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
@@ -189,6 +189,7 @@ class AlignAPI:
189
189
  sequences: Sequence[bytes | str],
190
190
  names: Sequence[str] | None = None,
191
191
  scheme: AbNumberScheme = AbNumberScheme.CHOTHIA,
192
+ drop_minority_chains: bool = False,
192
193
  ) -> MSAFuture:
193
194
  """
194
195
  Align antibody sequences using `AbNumber`.
@@ -205,6 +206,10 @@ class AlignAPI:
205
206
  Optional list of sequence names, must be the same length as sequences if provided.
206
207
  scheme : AbNumberScheme, default=AbNumberScheme.CHOTHIA
207
208
  Antibody numbering scheme.
209
+ drop_minority_chains : bool, default=False
210
+ If True, drop sequences belonging to chain types that are in the
211
+ minority (e.g. heavy vs light) so the resulting alignment contains
212
+ only the dominant chain type.
208
213
 
209
214
  Returns
210
215
  -------
@@ -235,10 +240,15 @@ class AlignAPI:
235
240
  lines.append(sequence)
236
241
  content = b"\n".join(lines)
237
242
  stream = BytesIO(content)
238
- return self.abnumber_file(stream, scheme=scheme)
243
+ return self.abnumber_file(
244
+ stream, scheme=scheme, drop_minority_chains=drop_minority_chains
245
+ )
239
246
 
240
247
  def abnumber_file(
241
- self, file, scheme: AbNumberScheme = AbNumberScheme.CHOTHIA
248
+ self,
249
+ file,
250
+ scheme: AbNumberScheme = AbNumberScheme.CHOTHIA,
251
+ drop_minority_chains: bool = False,
242
252
  ) -> MSAFuture:
243
253
  """
244
254
  Align antibody sequences using `AbNumber`.
@@ -253,13 +263,22 @@ class AlignAPI:
253
263
  Sequences to align in FASTA or CSV format.
254
264
  scheme : AbNumberScheme, default=AbNumberScheme.CHOTHIA
255
265
  Antibody numbering scheme.
266
+ drop_minority_chains : bool, default=False
267
+ If True, drop sequences belonging to chain types that are in the
268
+ minority (e.g. heavy vs light) so the resulting alignment contains
269
+ only the dominant chain type.
256
270
 
257
271
  Returns
258
272
  -------
259
273
  MSAFuture
260
274
  Future object awaiting the contents of the MSA upload.
261
275
  """
262
- job = api.abnumber_post(self.session, file, scheme=scheme)
276
+ job = api.abnumber_post(
277
+ self.session,
278
+ file,
279
+ scheme=scheme,
280
+ drop_minority_chains=drop_minority_chains,
281
+ )
263
282
  return MSAFuture.create(session=self.session, job=job)
264
283
 
265
284
  def upload_msa(self, msa_file: BinaryIO) -> MSAFuture:
@@ -269,6 +269,7 @@ def abnumber_post(
269
269
  session: APISession,
270
270
  sequence_file: BinaryIO,
271
271
  scheme: AbNumberScheme | str = AbNumberScheme.IMGT,
272
+ drop_minority_chains: bool = False,
272
273
  ) -> Job:
273
274
  """
274
275
  Align antibody sequences using AbNumber.
@@ -284,6 +285,10 @@ def abnumber_post(
284
285
  Sequences to align in FASTA or CSV format.
285
286
  scheme : AbNumberScheme, optional
286
287
  Antibody numbering scheme. Default is IMGT.
288
+ drop_minority_chains : bool, optional
289
+ If True, drop sequences belonging to chain types that are in the
290
+ minority (e.g. heavy vs light) so the resulting alignment contains
291
+ only the dominant chain type. Default is False.
287
292
 
288
293
  Returns
289
294
  -------
@@ -297,7 +302,10 @@ def abnumber_post(
297
302
  raise InvalidParameterError(f"Antibody numbering {scheme} not recognized")
298
303
 
299
304
  files = {"file": sequence_file}
300
- params = {"scheme": scheme if isinstance(scheme, str) else scheme.value}
305
+ params = {
306
+ "scheme": scheme if isinstance(scheme, str) else scheme.value,
307
+ "drop_minority_chains": drop_minority_chains,
308
+ }
301
309
 
302
310
  response = session.post(endpoint, files=files, params=params)
303
311
  return Job.model_validate(response.json())
@@ -45,7 +45,7 @@ class MSAFuture(AlignFuture, Future):
45
45
  self.page_size = page_size
46
46
  self.msa_id = self.job.job_id
47
47
 
48
- def get(self, verbose: bool = False) -> Iterator[tuple[str, str]]:
48
+ def _get(self, verbose: bool = False) -> Iterator[tuple[str, str]]:
49
49
  """
50
50
  Retrieve the MSA of the job.
51
51
 
@@ -157,7 +157,24 @@ class AbNumberJob(MSAJob, Job):
157
157
 
158
158
 
159
159
  class AbNumberScheme(str, Enum):
160
- """Antibody numbering scheme."""
160
+ """
161
+ Antibody numbering scheme.
162
+
163
+ Attributes
164
+ ----------
165
+ IMGT : str
166
+ IMGT numbering scheme, a standardized system unifying numbering across
167
+ all immunoglobulin and T-cell receptor variable domains.
168
+ CHOTHIA : str
169
+ Chothia numbering scheme, based on the structural location of
170
+ canonical loops in antibody variable domains.
171
+ KABAT : str
172
+ Kabat numbering scheme, based on sequence variability across
173
+ antibody variable domains.
174
+ AHO : str
175
+ AHo numbering scheme, a structure-based unified numbering scheme
176
+ for antibody variable domains.
177
+ """
161
178
 
162
179
  IMGT = "imgt"
163
180
  CHOTHIA = "chothia"
@@ -8,8 +8,8 @@ import requests.auth
8
8
  from requests.adapters import HTTPAdapter
9
9
  from requests.packages.urllib3.util.retry import Retry # type: ignore
10
10
 
11
- import openprotein.config as config
12
- from openprotein.errors import APIError, AuthError, HTTPError
11
+ from openprotein._version import __version__
12
+ from openprotein.errors import AuthError, HTTPError
13
13
 
14
14
 
15
15
  class BearerAuth(requests.auth.AuthBase):
@@ -17,11 +17,19 @@ class BearerAuth(requests.auth.AuthBase):
17
17
  See https://stackoverflow.com/a/58055668
18
18
  """
19
19
 
20
- def __init__(self, token):
21
- self.token = token
20
+ def __init__(self, username, token):
21
+ self._username = username
22
+ self._token = token
23
+
24
+ @property
25
+ def token(self):
26
+ warnings.warn(
27
+ "DeprecationWarning: Accessing session.auth.token is deprecated and will throw an error in the future. Use session.auth._token if you need it."
28
+ )
29
+ return self._token
22
30
 
23
31
  def __call__(self, r):
24
- r.headers["Authorization"] = "Bearer " + self.token
32
+ r.headers["Authorization"] = "Bearer " + self._token
25
33
  return r
26
34
 
27
35
 
@@ -56,6 +64,7 @@ class APISession(requests.Session):
56
64
  )
57
65
  adapter = HTTPAdapter(max_retries=retry)
58
66
  self.mount("https://", adapter)
67
+ self.headers["User-Agent"] = f"openprotein-python/{__version__}"
59
68
  self.login(username, password)
60
69
 
61
70
  def post(self, url, data=None, json=None, **kwargs):
@@ -101,14 +110,14 @@ class APISession(requests.Session):
101
110
  except HTTPError as e:
102
111
  # if an error occured during auth, we raise an AuthError with reference to the HTTPError
103
112
  raise AuthError(
104
- f"Authentication failed. Please check your credentials and connection."
113
+ "Authentication failed. Please check your credentials and connection."
105
114
  ) from e
106
115
 
107
116
  result = response.json()
108
117
  token = result.get("access_token")
109
118
  if token is None:
110
119
  raise AuthError("Unable to authenticate with given credentials.")
111
- return BearerAuth(token)
120
+ return BearerAuth(username=username, token=token)
112
121
 
113
122
  def request(self, method: str, url: str, *args, **kwargs):
114
123
  full_url = urljoin(self.backend, url)
@@ -136,7 +145,7 @@ class APISession(requests.Session):
136
145
  return response
137
146
 
138
147
 
139
- def _total_size(o: Sequence | Mapping, seen=None):
148
+ def _total_size(o: Sequence | Mapping | object, seen=None):
140
149
  """Recursively finds size of objects including contents."""
141
150
  if seen is None:
142
151
  seen = set()
@@ -67,7 +67,14 @@ class Subcriterion(BaseModel):
67
67
  raise ValueError(
68
68
  f"Expected to chain only with criterion or subcriterion, got {type(other)}"
69
69
  )
70
- return Criterion([self] + others) # type: ignore - doesnt like Self
70
+ all_subcriteria = [self] + others
71
+ types = {sc.criterion_type for sc in all_subcriteria}
72
+ if len(types) > 1:
73
+ raise ValueError(
74
+ "Cannot AND model and n_mutations criteria in the same group. "
75
+ "Use | (OR) to put them in separate groups instead."
76
+ )
77
+ return Criterion(all_subcriteria) # type: ignore - doesnt like Self
71
78
 
72
79
  def __or__(self, other: "Subcriterion | Criterion | Any") -> "Criteria":
73
80
  """
@@ -332,7 +339,14 @@ class Criterion(RootModel):
332
339
  elif isinstance(other, Criterion):
333
340
  others = other.root
334
341
 
335
- return Criterion(self.root + others)
342
+ all_subcriteria = self.root + others
343
+ types = {sc.criterion_type for sc in all_subcriteria}
344
+ if len(types) > 1:
345
+ raise ValueError(
346
+ "Cannot AND model and n_mutations criteria in the same group. "
347
+ "Use | (OR) to put them in separate groups instead."
348
+ )
349
+ return Criterion(all_subcriteria)
336
350
 
337
351
  def __or__(self, other: "Criterion | Subcriterion") -> "Criteria":
338
352
  """
@@ -28,20 +28,28 @@ from .schemas import (
28
28
  PATH_PREFIX = "v1/embeddings"
29
29
 
30
30
 
31
- def list_models(session: APISession) -> list[str]:
31
+ def list_models(
32
+ session: APISession, verbose: bool = False
33
+ ) -> list[str] | list[ModelMetadata]:
32
34
  """
33
35
  List available embeddings models.
34
36
 
35
37
  Args:
36
38
  session (APISession): API session
39
+ verbose (bool): If True, return full ModelMetadata objects instead of model ID strings.
37
40
 
38
41
  Returns:
39
- list[str]: list of model names.
42
+ list[str] | list[ModelMetadata]: list of model names or metadata objects.
40
43
  """
41
44
 
42
45
  endpoint = PATH_PREFIX + "/models"
43
- response = session.get(endpoint)
46
+ params = {}
47
+ if verbose:
48
+ params["verbose"] = "true"
49
+ response = session.get(endpoint, params=params)
44
50
  result = response.json()
51
+ if verbose:
52
+ return TypeAdapter(list[ModelMetadata]).validate_python(result)
45
53
  return result
46
54
 
47
55
 
@@ -100,10 +100,13 @@ class EmbeddingsAPI:
100
100
  def list_models(self) -> list[EmbeddingModel]:
101
101
  """list models available for creating embeddings of your sequences"""
102
102
  models = []
103
- for model_id in api.list_models(self.session):
103
+ for metadata in api.list_models(self.session, verbose=True):
104
104
  models.append(
105
105
  EmbeddingModel.create(
106
- session=self.session, model_id=model_id, default=EmbeddingModel
106
+ session=self.session,
107
+ model_id=metadata.id,
108
+ default=EmbeddingModel,
109
+ metadata=metadata,
107
110
  )
108
111
  )
109
112
  return models
@@ -74,6 +74,7 @@ class EmbeddingModel:
74
74
  session: APISession,
75
75
  model_id: str,
76
76
  default: type["EmbeddingModel"] | None = None,
77
+ metadata: ModelMetadata | None = None,
77
78
  **kwargs,
78
79
  ):
79
80
  """
@@ -87,6 +88,8 @@ class EmbeddingModel:
87
88
  The model identifier.
88
89
  default : type variable of EmbeddingModel or None, optional
89
90
  Default EmbeddingModel subclass to use if no match is found.
91
+ metadata : ModelMetadata or None, optional
92
+ Pre-fetched metadata to avoid an extra API call.
90
93
  kwargs :
91
94
  Additional keyword arguments to pass to the model constructor.
92
95
 
@@ -106,11 +109,11 @@ class EmbeddingModel:
106
109
  # Find the EmbeddingModel class that matches the model_id
107
110
  for model_class in model_classes:
108
111
  if model_id in model_class.get_model():
109
- return model_class(session=session, model_id=model_id, **kwargs)
112
+ return model_class(session=session, model_id=model_id, metadata=metadata, **kwargs)
110
113
  # default to ProtembedModel
111
114
  if default is not None:
112
115
  try:
113
- return default(session=session, model_id=model_id, **kwargs)
116
+ return default(session=session, model_id=model_id, metadata=metadata, **kwargs)
114
117
  except:
115
118
  # continue to throw error as unsupported
116
119
  pass
@@ -72,6 +72,23 @@ class TimeoutException(Exception):
72
72
  super().__init__(self.message)
73
73
 
74
74
 
75
+ class JobFailedException(Exception):
76
+ """Raised when retrieving results from a job that has failed."""
77
+
78
+ def __init__(
79
+ self,
80
+ job_id: str,
81
+ failure_message: str | None = None,
82
+ ):
83
+ self.job_id = job_id
84
+ self.failure_message = failure_message
85
+ message = f"Job {job_id} failed"
86
+ if failure_message:
87
+ message = f"{message}: {failure_message}"
88
+ self.message = message
89
+ super().__init__(self.message)
90
+
91
+
75
92
  class DeprecationError(Exception):
76
93
  """DeprecationError used for flagging to the user to not use this interface anymore."""
77
94
 
@@ -140,7 +140,7 @@ def fold_get_extra_result(
140
140
  session: APISession,
141
141
  job_id: str,
142
142
  sequence_or_index: bytes | str | int,
143
- key: Literal["pae", "pde", "plddt", "ptm"],
143
+ key: Literal["pae", "pde", "plddt", "ptm", "ipae"],
144
144
  ) -> np.ndarray: ...
145
145
 
146
146
 
@@ -176,7 +176,15 @@ def fold_get_extra_result(
176
176
  job_id: str,
177
177
  sequence_or_index: bytes | str | int,
178
178
  key: Literal[
179
- "pae", "pde", "plddt", "ptm", "confidence", "affinity", "score", "metrics"
179
+ "pae",
180
+ "pde",
181
+ "plddt",
182
+ "ptm",
183
+ "ipae",
184
+ "confidence",
185
+ "affinity",
186
+ "score",
187
+ "metrics",
180
188
  ],
181
189
  ) -> "np.ndarray | list[dict] | dict | pd.DataFrame":
182
190
  """
@@ -190,15 +198,16 @@ def fold_get_extra_result(
190
198
  Job ID to retrieve results from.
191
199
  sequence_or_index : bytes or str or int
192
200
  Sequence to retrieve results for or its index in the job.
193
- key : {'pae', 'pde', 'plddt', 'ptm', 'confidence', 'affinity', 'score', 'metrics'}
194
- The type of result to retrieve.
201
+ key : {'pae', 'pde', 'plddt', 'ptm', 'ipae', 'confidence', 'affinity', 'score', 'metrics'}
202
+ The type of result to retrieve. ``ipae`` is a synthetic scalar per
203
+ unit (shape ``(1,)``) derived from ``pae`` and the chain layout.
195
204
 
196
205
  Returns
197
206
  -------
198
207
  numpy.ndarray or list of dict
199
- The result as a numpy array (for "pae", "pde", "plddt") or a list of dictionaries (for "confidence", "affinity").
208
+ The result as a numpy array (for "pae", "pde", "plddt", "ptm", "ipae") or a list of dictionaries (for "confidence", "affinity").
200
209
  """
201
- if key in {"pae", "pde", "plddt", "ptm"}:
210
+ if key in {"pae", "pde", "plddt", "ptm", "ipae"}:
202
211
 
203
212
  def formatter(response):
204
213
  return np.load(io.BytesIO(response.content))
@@ -226,6 +235,82 @@ def fold_get_extra_result(
226
235
  return output
227
236
 
228
237
 
238
+ @typing.overload
239
+ def fold_get_batch_extra_result(
240
+ session: APISession,
241
+ job_id: str,
242
+ key: Literal["pae", "pde", "plddt", "ptm", "ipae"],
243
+ ) -> np.ndarray: ...
244
+
245
+
246
+ @typing.overload
247
+ def fold_get_batch_extra_result(
248
+ session: APISession,
249
+ job_id: str,
250
+ key: Literal["confidence"],
251
+ ) -> list[list[dict] | None]: ...
252
+
253
+
254
+ @typing.overload
255
+ def fold_get_batch_extra_result(
256
+ session: APISession,
257
+ job_id: str,
258
+ key: Literal["affinity"],
259
+ ) -> list[dict | None]: ...
260
+
261
+
262
+ def fold_get_batch_extra_result(
263
+ session: APISession,
264
+ job_id: str,
265
+ key: Literal["pae", "pde", "plddt", "ptm", "ipae", "confidence", "affinity"],
266
+ ) -> "np.ndarray | list":
267
+ """
268
+ Fetch an extra result key stacked across every unit in a fold job.
269
+
270
+ Backed by a single server call to ``/v1/fold/{job_id}/results/{key}``
271
+ (not N per-unit calls). For ``.npy`` keys the server pads per-unit
272
+ arrays with NaN to the per-axis max shape and stacks along a new
273
+ leading dim; for ``.json`` keys it returns a length-``N`` array where
274
+ element ``i`` is unit ``i``'s parsed JSON (``None`` if that unit's
275
+ result was missing or failed to fetch).
276
+
277
+ Parameters
278
+ ----------
279
+ session : APISession
280
+ Session object for API communication.
281
+ job_id : str
282
+ Job ID to retrieve results from.
283
+ key : {'pae', 'pde', 'plddt', 'ptm', 'ipae', 'confidence', 'affinity'}
284
+ The type of result to retrieve. ``ipae`` returns shape ``[N]``.
285
+
286
+ Returns
287
+ -------
288
+ numpy.ndarray or list
289
+ ``np.ndarray`` of shape ``[N, ...]`` for npy keys; ``list`` of
290
+ length ``N`` for json keys (``confidence`` / ``affinity``), with
291
+ ``None`` entries for units whose per-unit result could not be
292
+ fetched.
293
+ """
294
+ if key in {"pae", "pde", "plddt", "ptm", "ipae"}:
295
+
296
+ def formatter(response):
297
+ return np.load(io.BytesIO(response.content))
298
+ elif key in {"confidence", "affinity"}:
299
+
300
+ def formatter(response):
301
+ return response.json()
302
+ else:
303
+ raise ValueError(f"Unexpected key: {key}")
304
+ endpoint = PATH_PREFIX + f"/{job_id}/results/{key}"
305
+ try:
306
+ response = session.get(endpoint)
307
+ except HTTPError as e:
308
+ if e.status_code == 400 and key == "affinity":
309
+ raise ValueError("affinity not found for request") from None
310
+ raise e
311
+ return formatter(response)
312
+
313
+
229
314
  def fold_models_post(
230
315
  session: APISession,
231
316
  model_id: str,
@@ -139,13 +139,19 @@ def resolve_templates(session: APISession, templates: Sequence[Template]) -> lis
139
139
  query=template.template
140
140
  )
141
141
 
142
- template_dict = {"query_id": struct_id_to_query_id[struct_id]}
142
+ template_dict: dict = {"query_id": struct_id_to_query_id[struct_id]}
143
143
  if template.mapping is not None:
144
144
  if isinstance(template.mapping, str):
145
145
  template_dict["chain_id"] = template.mapping
146
146
  else:
147
147
  template_dict["chain_id"] = list(template.mapping.values())
148
148
  template_dict["template_id"] = list(template.mapping.keys())
149
+ if template.index is not None:
150
+ template_dict["index"] = list(template.index)
151
+ if template.index_intervals is not None:
152
+ template_dict["index_intervals"] = [
153
+ [int(start), int(end)] for start, end in template.index_intervals
154
+ ]
149
155
  template_dicts.append(template_dict)
150
156
 
151
157
  return template_dicts
@@ -157,11 +163,14 @@ def serialize_input(session: APISession, complexes: list[Complex], needs_msa: bo
157
163
  msa_to_seed: dict[str, set[str]] = dict()
158
164
  for complex in complexes:
159
165
  _complex: list[dict[str, Any]] = []
160
- for chain_id, chain in complex.get_chains().items():
166
+ for chain_ids, chain in complex.get_id_groups():
167
+ id_field: str | list[str] = (
168
+ chain_ids[0] if len(chain_ids) == 1 else list(chain_ids)
169
+ )
161
170
  if isinstance(chain, Protein):
162
171
  # add the protein in the unified format
163
172
  p: dict = {
164
- "id": chain_id,
173
+ "id": id_field,
165
174
  "sequence": chain.sequence.decode(),
166
175
  }
167
176
  if needs_msa:
@@ -199,19 +208,17 @@ def serialize_input(session: APISession, complexes: list[Complex], needs_msa: bo
199
208
  p["msa_id"] = msa_id
200
209
  _complex.append({"protein": p})
201
210
  elif isinstance(chain, Ligand):
202
- ligand_payload = {
203
- "id": chain_id,
204
- }
211
+ ligand_payload: dict[str, Any] = {"id": id_field}
205
212
  if chain.smiles is not None:
206
213
  ligand_payload["smiles"] = chain.smiles
207
214
  if chain.ccd is not None:
208
215
  ligand_payload["ccd"] = chain.ccd
209
216
  _complex.append({"ligand": ligand_payload})
210
217
  elif isinstance(chain, DNA):
211
- d = {"id": chain_id, "sequence": chain.sequence}
218
+ d: dict[str, Any] = {"id": id_field, "sequence": chain.sequence}
212
219
  _complex.append({"dna": d})
213
220
  elif isinstance(chain, RNA):
214
- r = {"id": chain_id, "sequence": chain.sequence}
221
+ r: dict[str, Any] = {"id": id_field, "sequence": chain.sequence}
215
222
  _complex.append({"rna": r})
216
223
  else:
217
224
  raise ValueError(f"Unexpected chain type: {chain}")