boltz-vsynthes 0.0.13__tar.gz → 0.0.14__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 (127) hide show
  1. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/PKG-INFO +1 -1
  2. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/pyproject.toml +1 -1
  3. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/utils/sdf_to_pre_affinity_npz.py +108 -99
  4. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz_vsynthes.egg-info/PKG-INFO +1 -1
  5. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz_vsynthes.egg-info/SOURCES.txt +0 -1
  6. boltz_vsynthes-0.0.13/setup.py +0 -10
  7. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/LICENSE +0 -0
  8. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/README.md +0 -0
  9. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/setup.cfg +0 -0
  10. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/__init__.py +0 -0
  11. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/__init__.py +0 -0
  12. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/const.py +0 -0
  13. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/crop/__init__.py +0 -0
  14. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/crop/affinity.py +0 -0
  15. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/crop/boltz.py +0 -0
  16. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/crop/cropper.py +0 -0
  17. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/feature/__init__.py +0 -0
  18. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/feature/featurizer.py +0 -0
  19. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/feature/featurizerv2.py +0 -0
  20. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/feature/symmetry.py +0 -0
  21. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/__init__.py +0 -0
  22. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/dynamic/__init__.py +0 -0
  23. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/dynamic/date.py +0 -0
  24. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/dynamic/filter.py +0 -0
  25. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/dynamic/max_residues.py +0 -0
  26. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/dynamic/resolution.py +0 -0
  27. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/dynamic/size.py +0 -0
  28. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/dynamic/subset.py +0 -0
  29. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/static/__init__.py +0 -0
  30. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/static/filter.py +0 -0
  31. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/static/ligand.py +0 -0
  32. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/filter/static/polymer.py +0 -0
  33. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/module/__init__.py +0 -0
  34. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/module/inference.py +0 -0
  35. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/module/inferencev2.py +0 -0
  36. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/module/training.py +0 -0
  37. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/module/trainingv2.py +0 -0
  38. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/mol.py +0 -0
  39. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/msa/__init__.py +0 -0
  40. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/msa/mmseqs2.py +0 -0
  41. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/pad.py +0 -0
  42. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/__init__.py +0 -0
  43. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/a3m.py +0 -0
  44. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/csv.py +0 -0
  45. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/fasta.py +0 -0
  46. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/mmcif.py +0 -0
  47. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/mmcif_with_constraints.py +0 -0
  48. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/pdb.py +0 -0
  49. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/pdb_download.py +0 -0
  50. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/schema.py +0 -0
  51. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/sdf.py +0 -0
  52. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/parse/yaml.py +0 -0
  53. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/sample/__init__.py +0 -0
  54. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/sample/cluster.py +0 -0
  55. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/sample/distillation.py +0 -0
  56. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/sample/random.py +0 -0
  57. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/sample/sampler.py +0 -0
  58. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/tokenize/__init__.py +0 -0
  59. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/tokenize/boltz.py +0 -0
  60. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/tokenize/boltz2.py +0 -0
  61. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/tokenize/tokenizer.py +0 -0
  62. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/types.py +0 -0
  63. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/write/__init__.py +0 -0
  64. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/write/mmcif.py +0 -0
  65. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/write/pdb.py +0 -0
  66. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/write/utils.py +0 -0
  67. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/data/write/writer.py +0 -0
  68. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/main.py +0 -0
  69. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/__init__.py +0 -0
  70. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/__init__.py +0 -0
  71. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/attention.py +0 -0
  72. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/attentionv2.py +0 -0
  73. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/confidence_utils.py +0 -0
  74. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/dropout.py +0 -0
  75. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/initialize.py +0 -0
  76. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/outer_product_mean.py +0 -0
  77. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/pair_averaging.py +0 -0
  78. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/pairformer.py +0 -0
  79. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/relative.py +0 -0
  80. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/transition.py +0 -0
  81. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/triangular_attention/__init__.py +0 -0
  82. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/triangular_attention/attention.py +0 -0
  83. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/triangular_attention/primitives.py +0 -0
  84. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/triangular_attention/utils.py +0 -0
  85. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/layers/triangular_mult.py +0 -0
  86. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/__init__.py +0 -0
  87. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/bfactor.py +0 -0
  88. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/confidence.py +0 -0
  89. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/confidencev2.py +0 -0
  90. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/diffusion.py +0 -0
  91. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/diffusionv2.py +0 -0
  92. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/distogram.py +0 -0
  93. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/distogramv2.py +0 -0
  94. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/loss/validation.py +0 -0
  95. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/models/__init__.py +0 -0
  96. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/models/boltz1.py +0 -0
  97. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/models/boltz2.py +0 -0
  98. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/__init__.py +0 -0
  99. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/affinity.py +0 -0
  100. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/confidence.py +0 -0
  101. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/confidence_utils.py +0 -0
  102. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/confidencev2.py +0 -0
  103. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/diffusion.py +0 -0
  104. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/diffusion_conditioning.py +0 -0
  105. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/diffusionv2.py +0 -0
  106. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/encoders.py +0 -0
  107. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/encodersv2.py +0 -0
  108. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/transformers.py +0 -0
  109. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/transformersv2.py +0 -0
  110. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/trunk.py +0 -0
  111. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/trunkv2.py +0 -0
  112. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/modules/utils.py +0 -0
  113. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/optim/__init__.py +0 -0
  114. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/optim/ema.py +0 -0
  115. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/optim/scheduler.py +0 -0
  116. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/potentials/__init__.py +0 -0
  117. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/potentials/potentials.py +0 -0
  118. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/model/potentials/schedules.py +0 -0
  119. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/utils/sdf_splitter.py +0 -0
  120. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz/utils/yaml_generator.py +0 -0
  121. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz_vsynthes.egg-info/dependency_links.txt +0 -0
  122. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz_vsynthes.egg-info/entry_points.txt +0 -0
  123. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz_vsynthes.egg-info/requires.txt +0 -0
  124. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/src/boltz_vsynthes.egg-info/top_level.txt +0 -0
  125. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/tests/test_kernels.py +0 -0
  126. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/tests/test_regression.py +0 -0
  127. {boltz_vsynthes-0.0.13 → boltz_vsynthes-0.0.14}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boltz-vsynthes
3
- Version: 0.0.13
3
+ Version: 0.0.14
4
4
  Summary: Boltz for VSYNTHES
5
5
  Requires-Python: <3.13,>=3.10
6
6
  Description-Content-Type: text/markdown
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "boltz-vsynthes"
7
- version = "0.0.13"
7
+ version = "0.0.14"
8
8
  requires-python = ">=3.10,<3.13"
9
9
  description = "Boltz for VSYNTHES"
10
10
  readme = "README.md"
@@ -1076,41 +1076,41 @@ def predict( # noqa: C901, PLR0915, PLR0912
1076
1076
  ),
1077
1077
  )
1078
1078
 
1079
- # # Set up trainer
1080
- # strategy = "auto"
1081
- # if (isinstance(devices, int) and devices > 1) or (
1082
- # isinstance(devices, list) and len(devices) > 1
1083
- # ):
1084
- # start_method = "fork" if platform.system() != "win32" else "spawn"
1085
- # strategy = DDPStrategy(start_method=start_method)
1086
- # if len(filtered_manifest.records) < devices:
1087
- # msg = (
1088
- # "Number of requested devices is greater "
1089
- # "than the number of predictions, taking the minimum."
1090
- # )
1091
- # click.echo(msg)
1092
- # if isinstance(devices, list):
1093
- # devices = devices[: max(1, len(filtered_manifest.records))]
1094
- # else:
1095
- # devices = max(1, min(len(filtered_manifest.records), devices))
1096
-
1097
- # # Set up model parameters
1098
- # if model == "boltz2":
1099
- # diffusion_params = Boltz2DiffusionParams()
1100
- # step_scale = 1.5 if step_scale is None else step_scale
1101
- # diffusion_params.step_scale = step_scale
1102
- # pairformer_args = PairformerArgsV2()
1103
- # else:
1104
- # diffusion_params = BoltzDiffusionParams()
1105
- # step_scale = 1.638 if step_scale is None else step_scale
1106
- # diffusion_params.step_scale = step_scale
1107
- # pairformer_args = PairformerArgs()
1108
-
1109
- # msa_args = MSAModuleArgs(
1110
- # subsample_msa=subsample_msa,
1111
- # num_subsampled_msa=num_subsampled_msa,
1112
- # use_paired_feature=model == "boltz2",
1113
- # )
1079
+ # Set up trainer
1080
+ strategy = "auto"
1081
+ if (isinstance(devices, int) and devices > 1) or (
1082
+ isinstance(devices, list) and len(devices) > 1
1083
+ ):
1084
+ start_method = "fork" if platform.system() != "win32" else "spawn"
1085
+ strategy = DDPStrategy(start_method=start_method)
1086
+ if len(filtered_manifest.records) < devices:
1087
+ msg = (
1088
+ "Number of requested devices is greater "
1089
+ "than the number of predictions, taking the minimum."
1090
+ )
1091
+ click.echo(msg)
1092
+ if isinstance(devices, list):
1093
+ devices = devices[: max(1, len(filtered_manifest.records))]
1094
+ else:
1095
+ devices = max(1, min(len(filtered_manifest.records), devices))
1096
+
1097
+ # Set up model parameters
1098
+ if model == "boltz2":
1099
+ diffusion_params = Boltz2DiffusionParams()
1100
+ step_scale = 1.5 if step_scale is None else step_scale
1101
+ diffusion_params.step_scale = step_scale
1102
+ pairformer_args = PairformerArgsV2()
1103
+ else:
1104
+ diffusion_params = BoltzDiffusionParams()
1105
+ step_scale = 1.638 if step_scale is None else step_scale
1106
+ diffusion_params.step_scale = step_scale
1107
+ pairformer_args = PairformerArgs()
1108
+
1109
+ msa_args = MSAModuleArgs(
1110
+ subsample_msa=subsample_msa,
1111
+ num_subsampled_msa=num_subsampled_msa,
1112
+ use_paired_feature=model == "boltz2",
1113
+ )
1114
1114
 
1115
1115
  # # Create prediction writer
1116
1116
  # pred_writer = BoltzWriter(
@@ -1200,77 +1200,86 @@ def predict( # noqa: C901, PLR0915, PLR0912
1200
1200
  # return_predictions=False,
1201
1201
  # )
1202
1202
 
1203
- # # Check if affinity predictions are needed
1204
- # if any(r.affinity for r in manifest.records):
1205
- # # Print header
1206
- # click.echo("\nPredicting property: affinity\n")
1203
+ # Check if affinity predictions are needed
1204
+ if any(r.affinity for r in manifest.records):
1205
+ # Print header
1206
+ click.echo("\nPredicting property: affinity\n")
1207
1207
 
1208
- # # Validate inputs
1209
- # manifest_filtered = filter_inputs_affinity(
1210
- # manifest=manifest,
1211
- # outdir=out_dir,
1212
- # override=override,
1213
- # )
1214
- # if not manifest_filtered.records:
1215
- # click.echo("Found existing affinity predictions for all inputs, skipping.")
1216
- # return
1217
-
1218
- # msg = f"Running affinity prediction for {len(manifest_filtered.records)} input"
1219
- # msg += "s." if len(manifest_filtered.records) > 1 else "."
1220
- # click.echo(msg)
1208
+ # Validate inputs
1209
+ manifest_filtered = filter_inputs_affinity(
1210
+ manifest=manifest,
1211
+ outdir=out_dir,
1212
+ override=override,
1213
+ )
1214
+ if not manifest_filtered.records:
1215
+ click.echo("Found existing affinity predictions for all inputs, skipping.")
1216
+ return
1221
1217
 
1222
- # pred_writer = BoltzAffinityWriter(
1223
- # data_dir=processed.targets_dir,
1224
- # output_dir=out_dir / "predictions",
1225
- # )
1218
+ msg = f"Running affinity prediction for {len(manifest_filtered.records)} input"
1219
+ msg += "s." if len(manifest_filtered.records) > 1 else "."
1220
+ click.echo(msg)
1226
1221
 
1227
- # data_module = Boltz2InferenceDataModule(
1228
- # manifest=manifest_filtered,
1229
- # target_dir=out_dir / "predictions",
1230
- # msa_dir=processed.msa_dir,
1231
- # mol_dir=mol_dir,
1232
- # num_workers=num_workers,
1233
- # constraints_dir=processed.constraints_dir,
1234
- # template_dir=processed.template_dir,
1235
- # extra_mols_dir=processed.extra_mols_dir,
1236
- # override_method="other",
1237
- # affinity=True,
1238
- # )
1222
+ pred_writer = BoltzAffinityWriter(
1223
+ data_dir=processed.targets_dir,
1224
+ output_dir=out_dir / "predictions",
1225
+ )
1239
1226
 
1240
- # predict_affinity_args = {
1241
- # "recycling_steps": 5,
1242
- # "sampling_steps": sampling_steps_affinity,
1243
- # "diffusion_samples": diffusion_samples_affinity,
1244
- # "max_parallel_samples": 1,
1245
- # "write_confidence_summary": False,
1246
- # "write_full_pae": False,
1247
- # "write_full_pde": False,
1248
- # }
1227
+ trainer = Trainer(
1228
+ default_root_dir=out_dir,
1229
+ strategy=strategy,
1230
+ callbacks=[pred_writer],
1231
+ accelerator=accelerator,
1232
+ devices=devices,
1233
+ precision=32 if model == "boltz1" else "bf16-mixed",
1234
+ )
1249
1235
 
1250
- # # Load affinity model
1251
- # if affinity_checkpoint is None:
1252
- # affinity_checkpoint = cache / "boltz2_aff.ckpt"
1236
+ data_module = Boltz2InferenceDataModule(
1237
+ manifest=manifest_filtered,
1238
+ target_dir=out_dir / "predictions",
1239
+ msa_dir=processed.msa_dir,
1240
+ mol_dir=mol_dir,
1241
+ num_workers=num_workers,
1242
+ constraints_dir=processed.constraints_dir,
1243
+ template_dir=processed.template_dir,
1244
+ extra_mols_dir=processed.extra_mols_dir,
1245
+ override_method="other",
1246
+ affinity=True,
1247
+ )
1253
1248
 
1254
- # model_module = Boltz2.load_from_checkpoint(
1255
- # affinity_checkpoint,
1256
- # strict=True,
1257
- # predict_args=predict_affinity_args,
1258
- # map_location="cpu",
1259
- # diffusion_process_args=asdict(diffusion_params),
1260
- # ema=False,
1261
- # pairformer_args=asdict(pairformer_args),
1262
- # msa_args=asdict(msa_args),
1263
- # steering_args={"fk_steering": False, "guidance_update": False},
1264
- # affinity_mw_correction=affinity_mw_correction,
1265
- # )
1266
- # model_module.eval()
1249
+ predict_affinity_args = {
1250
+ "recycling_steps": 5,
1251
+ "sampling_steps": sampling_steps_affinity,
1252
+ "diffusion_samples": diffusion_samples_affinity,
1253
+ "max_parallel_samples": 1,
1254
+ "write_confidence_summary": False,
1255
+ "write_full_pae": False,
1256
+ "write_full_pde": False,
1257
+ }
1258
+
1259
+ # Load affinity model
1260
+ if affinity_checkpoint is None:
1261
+ affinity_checkpoint = cache / "boltz2_aff.ckpt"
1262
+
1263
+ model_module = Boltz2.load_from_checkpoint(
1264
+ affinity_checkpoint,
1265
+ strict=True,
1266
+ predict_args=predict_affinity_args,
1267
+ map_location="cpu",
1268
+ diffusion_process_args=asdict(diffusion_params),
1269
+ ema=False,
1270
+ pairformer_args=asdict(pairformer_args),
1271
+ msa_args=asdict(msa_args),
1272
+ steering_args={"fk_steering": False, "guidance_update": False},
1273
+ affinity_mw_correction=affinity_mw_correction,
1274
+ )
1275
+ model_module.eval()
1267
1276
 
1268
- # trainer.callbacks[0] = pred_writer
1269
- # trainer.predict(
1270
- # model_module,
1271
- # datamodule=data_module,
1272
- # return_predictions=False,
1273
- # )
1277
+ trainer.callbacks[0] = pred_writer
1278
+ trainer.predict(
1279
+ model_module,
1280
+ datamodule=data_module,
1281
+ return_predictions=False,
1282
+ )
1274
1283
 
1275
1284
 
1276
1285
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boltz-vsynthes
3
- Version: 0.0.13
3
+ Version: 0.0.14
4
4
  Summary: Boltz for VSYNTHES
5
5
  Requires-Python: <3.13,>=3.10
6
6
  Description-Content-Type: text/markdown
@@ -1,7 +1,6 @@
1
1
  LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
- setup.py
5
4
  src/boltz/__init__.py
6
5
  src/boltz/main.py
7
6
  src/boltz/data/__init__.py
@@ -1,10 +0,0 @@
1
- from setuptools import setup, find_packages
2
-
3
- setup(
4
- # ... existing setup args ...
5
- entry_points={
6
- 'console_scripts': [
7
- 'boltz-sdf-to-pre-affinity=boltz.utils.sdf_to_pre_affinity_npz:main',
8
- ],
9
- },
10
- )
File without changes