boltz-vsynthes 1.0.6__py3-none-any.whl → 1.0.7__py3-none-any.whl

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.
@@ -1008,7 +1008,7 @@ def parse_boltz_schema( # noqa: C901, PLR0915, PLR0912
1008
1008
 
1009
1009
  # Keep track of ligand IDs
1010
1010
  ligand_id = 1
1011
- ligand_id_map = {} # Maps user-provided IDs to internal LIG1, LIG2, etc.
1011
+ ligand_id_map = {}
1012
1012
 
1013
1013
  # Parse sequences
1014
1014
  for item in schema["sequences"]:
@@ -1067,6 +1067,9 @@ def parse_boltz_schema( # noqa: C901, PLR0915, PLR0912
1067
1067
  ligand_id += 1
1068
1068
  else:
1069
1069
  seq = str(item[entity_type]["ccd"])
1070
+ # For CCD ligands, use the CCD code as the internal ID
1071
+ for id in entity_id:
1072
+ ligand_id_map[id] = seq
1070
1073
 
1071
1074
  # Group items by entity
1072
1075
  items_to_group.setdefault((entity_type, seq), []).append(item)
@@ -1080,12 +1083,48 @@ def parse_boltz_schema( # noqa: C901, PLR0915, PLR0912
1080
1083
  # Check if any affinity ligand is present
1081
1084
  affinity_ligands = set()
1082
1085
  properties = schema.get("properties", [])
1086
+
1087
+ # Get all ligands
1088
+ ligands = []
1089
+ for item in schema["sequences"]:
1090
+ entity_type = list(item.keys())[0]
1091
+ if entity_type == "ligand":
1092
+ entity_id = item[entity_type]["id"]
1093
+ entity_id = [entity_id] if isinstance(entity_id, str) else entity_id
1094
+ ligands.extend(entity_id)
1095
+
1096
+ # Get user-specified binders
1097
+ specified_binders = set()
1083
1098
  for prop in properties:
1084
1099
  if "affinity" in prop:
1085
1100
  binder = prop["affinity"]["binder"]
1086
- if binder in ligand_id_map:
1087
- binder = ligand_id_map[binder] # Convert to internal LIG1, LIG2, etc.
1088
- affinity_ligands.add(binder)
1101
+ specified_binders.add(binder)
1102
+
1103
+ # If no binders specified, use all proteins
1104
+ if not specified_binders:
1105
+ for item in schema["sequences"]:
1106
+ entity_type = list(item.keys())[0]
1107
+ if entity_type == "protein":
1108
+ entity_id = item[entity_type]["id"]
1109
+ entity_id = [entity_id] if isinstance(entity_id, str) else entity_id
1110
+ specified_binders.update(entity_id)
1111
+
1112
+ # Generate protein-ligand pairs for specified binders
1113
+ new_properties = []
1114
+ for binder in specified_binders:
1115
+ for ligand in ligands:
1116
+ if ligand in ligand_id_map:
1117
+ ligand = ligand_id_map[ligand] # Convert to internal LIG1, LIG2, etc.
1118
+ affinity_ligands.add(ligand)
1119
+ new_properties.append({
1120
+ "affinity": {
1121
+ "binder": binder,
1122
+ "ligand": ligand
1123
+ }
1124
+ })
1125
+
1126
+ # Update schema with generated properties
1127
+ schema["properties"] = new_properties
1089
1128
 
1090
1129
  # Parse each group
1091
1130
  chains = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boltz-vsynthes
3
- Version: 1.0.6
3
+ Version: 1.0.7
4
4
  Summary: Boltz for V-Synthes
5
5
  Requires-Python: <3.13,>=3.10
6
6
  Description-Content-Type: text/markdown
@@ -38,7 +38,7 @@ boltz/data/parse/csv.py,sha256=Hcq8rJW2njczahEr8jfd_o-zxLaNSgJ3YIoC9srIqpw,2518
38
38
  boltz/data/parse/fasta.py,sha256=taI4s_CqPtyF0XaLJAsVAJHCL0GXm2g1g8Qeccdxikk,3906
39
39
  boltz/data/parse/mmcif.py,sha256=25kEXCkx-OuaawAs7cdz0fxdRu5_CCO0AV00u84PrjQ,36822
40
40
  boltz/data/parse/mmcif_with_constraints.py,sha256=WHYZckSqUwu-Nb9vmVmxHmC7uxwVrF7AVUeVKsc5wGQ,51473
41
- boltz/data/parse/schema.py,sha256=dE4Cew9JrU4rifyZmFHQM2jglwJq7xHcxtA_-wSxj3w,41995
41
+ boltz/data/parse/schema.py,sha256=DvMwh1Brn4ELzBuLEk89fdYv4XBx5bX3Fq2_TMeZ-08,43352
42
42
  boltz/data/parse/yaml.py,sha256=GRFRMtDD4PQ4PIpA_S1jj0vRaEu2LlZd_g4rN1zUrNo,1505
43
43
  boltz/data/sample/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  boltz/data/sample/cluster.py,sha256=9Sx8qP7zGZOAyEspwYFtCTbGTBZnuN-zfCKFbbA_6oI,8175
@@ -104,9 +104,9 @@ boltz/model/optim/scheduler.py,sha256=nB4jz0CZ4pR4n08LQngExL_pNycIdYI8AXVoHPnZWQ
104
104
  boltz/model/potentials/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
105
105
  boltz/model/potentials/potentials.py,sha256=vev8Vjfs-ML1hyrdv_R8DynG4wSFahJ6nzPWp7CYQqw,17507
106
106
  boltz/model/potentials/schedules.py,sha256=m7XJjfuF9uTX3bR9VisXv1rvzJjxiD8PobXRpcBBu1c,968
107
- boltz_vsynthes-1.0.6.dist-info/licenses/LICENSE,sha256=8GZ_1eZsUeG6jdqgJJxtciWzADfgLEV4LY8sKUOsJhc,1102
108
- boltz_vsynthes-1.0.6.dist-info/METADATA,sha256=wfKFFAABcO0tFOYgorKiqdUMwzUnFFUYcDy12CwxF1g,7171
109
- boltz_vsynthes-1.0.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
110
- boltz_vsynthes-1.0.6.dist-info/entry_points.txt,sha256=n5a5I35ntu9lmyr16oZgHPFY0b0YxjiixY7m7nbMTLc,41
111
- boltz_vsynthes-1.0.6.dist-info/top_level.txt,sha256=MgU3Jfb-ctWm07YGMts68PMjSh9v26D0gfG3dFRmVFA,6
112
- boltz_vsynthes-1.0.6.dist-info/RECORD,,
107
+ boltz_vsynthes-1.0.7.dist-info/licenses/LICENSE,sha256=8GZ_1eZsUeG6jdqgJJxtciWzADfgLEV4LY8sKUOsJhc,1102
108
+ boltz_vsynthes-1.0.7.dist-info/METADATA,sha256=AQB7KiKkpIvaBZ2aMiTw1wfHE8_Vm_4D7cbJMN80J2U,7171
109
+ boltz_vsynthes-1.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
110
+ boltz_vsynthes-1.0.7.dist-info/entry_points.txt,sha256=n5a5I35ntu9lmyr16oZgHPFY0b0YxjiixY7m7nbMTLc,41
111
+ boltz_vsynthes-1.0.7.dist-info/top_level.txt,sha256=MgU3Jfb-ctWm07YGMts68PMjSh9v26D0gfG3dFRmVFA,6
112
+ boltz_vsynthes-1.0.7.dist-info/RECORD,,