boltz-vsynthes 1.0.13__py3-none-any.whl → 1.0.15__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.
@@ -1015,14 +1015,39 @@ def parse_boltz_schema( # noqa: C901, PLR0915, PLR0912
1015
1015
 
1016
1016
  # Get sequence
1017
1017
  if entity_type in {"protein", "dna", "rna"}:
1018
- seq = str(item[entity_type]["sequence"])
1018
+ if "sequence" in item[entity_type]:
1019
+ seq = str(item[entity_type]["sequence"])
1020
+ elif "pdb" in item[entity_type]:
1021
+ # Handle PDB file
1022
+ pdb_path = Path(item[entity_type]["pdb"])
1023
+ if len(pdb_path.stem) == 4 and pdb_path.stem.isalnum():
1024
+ # This is a PDB ID
1025
+ from boltz.data.parse.pdb_download import parse_pdb_id
1026
+ target = parse_pdb_id(pdb_path.stem, ccd, mol_dir, pdb_path.parent)
1027
+ else:
1028
+ # This is a PDB file
1029
+ from boltz.data.parse.pdb import parse_pdb
1030
+ target = parse_pdb(pdb_path, ccd, mol_dir)
1031
+ # Get sequence from the first chain
1032
+ seq = target.sequences[0]
1033
+ else:
1034
+ msg = f"Protein must have either 'sequence' or 'pdb' field: {item}"
1035
+ raise ValueError(msg)
1019
1036
  elif entity_type == "ligand":
1020
- assert "smiles" in item[entity_type] or "ccd" in item[entity_type]
1021
- assert "smiles" not in item[entity_type] or "ccd" not in item[entity_type]
1022
1037
  if "smiles" in item[entity_type]:
1023
1038
  seq = str(item[entity_type]["smiles"])
1024
- else:
1039
+ elif "sdf" in item[entity_type]:
1040
+ # Handle SDF file
1041
+ sdf_path = Path(item[entity_type]["sdf"])
1042
+ from boltz.data.parse.sdf import parse_sdf
1043
+ target = parse_sdf(sdf_path, ccd, mol_dir)
1044
+ # Get sequence from the first ligand
1045
+ seq = target.sequences[0]
1046
+ elif "ccd" in item[entity_type]:
1025
1047
  seq = str(item[entity_type]["ccd"])
1048
+ else:
1049
+ msg = f"Ligand must have 'smiles', 'sdf', or 'ccd' field: {item}"
1050
+ raise ValueError(msg)
1026
1051
 
1027
1052
  # Group items by entity
1028
1053
  items_to_group.setdefault((entity_type, seq), []).append(item)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boltz-vsynthes
3
- Version: 1.0.13
3
+ Version: 1.0.15
4
4
  Summary: Boltz for VSYNTHES
5
5
  Requires-Python: <3.13,>=3.10
6
6
  Description-Content-Type: text/markdown
@@ -40,7 +40,7 @@ boltz/data/parse/mmcif.py,sha256=25kEXCkx-OuaawAs7cdz0fxdRu5_CCO0AV00u84PrjQ,368
40
40
  boltz/data/parse/mmcif_with_constraints.py,sha256=WHYZckSqUwu-Nb9vmVmxHmC7uxwVrF7AVUeVKsc5wGQ,51473
41
41
  boltz/data/parse/pdb.py,sha256=o2gGGVDxLaKhqPaZjuwfY6gdIyu4iUxczmkvDnEnNls,1808
42
42
  boltz/data/parse/pdb_download.py,sha256=FJTX7qHKJ_sBRcHg1PLKlqy6gVuluPDAWOAuYKI4-gM,2931
43
- boltz/data/parse/schema.py,sha256=gnHZBy0Io2Ecrw3KAD1lE1-cKnWL4ypKUI3EmeV5FDQ,59566
43
+ boltz/data/parse/schema.py,sha256=uKv1toawysagqi7wnl1njCDrQKM1tNCNDxvcNc6VXK0,60801
44
44
  boltz/data/parse/sdf.py,sha256=myFA3bL6MkdPdMFfZHotxJ8yNMGpsc_u6w06YFadeiw,1364
45
45
  boltz/data/parse/yaml.py,sha256=GRFRMtDD4PQ4PIpA_S1jj0vRaEu2LlZd_g4rN1zUrNo,1505
46
46
  boltz/data/sample/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -107,9 +107,9 @@ boltz/model/optim/scheduler.py,sha256=nB4jz0CZ4pR4n08LQngExL_pNycIdYI8AXVoHPnZWQ
107
107
  boltz/model/potentials/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
108
  boltz/model/potentials/potentials.py,sha256=vev8Vjfs-ML1hyrdv_R8DynG4wSFahJ6nzPWp7CYQqw,17507
109
109
  boltz/model/potentials/schedules.py,sha256=m7XJjfuF9uTX3bR9VisXv1rvzJjxiD8PobXRpcBBu1c,968
110
- boltz_vsynthes-1.0.13.dist-info/licenses/LICENSE,sha256=8GZ_1eZsUeG6jdqgJJxtciWzADfgLEV4LY8sKUOsJhc,1102
111
- boltz_vsynthes-1.0.13.dist-info/METADATA,sha256=je-ztyLYkzUg01SEVp3stDGEawY9FsUzCQ2Kbp3cdYM,7171
112
- boltz_vsynthes-1.0.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
113
- boltz_vsynthes-1.0.13.dist-info/entry_points.txt,sha256=n5a5I35ntu9lmyr16oZgHPFY0b0YxjiixY7m7nbMTLc,41
114
- boltz_vsynthes-1.0.13.dist-info/top_level.txt,sha256=MgU3Jfb-ctWm07YGMts68PMjSh9v26D0gfG3dFRmVFA,6
115
- boltz_vsynthes-1.0.13.dist-info/RECORD,,
110
+ boltz_vsynthes-1.0.15.dist-info/licenses/LICENSE,sha256=8GZ_1eZsUeG6jdqgJJxtciWzADfgLEV4LY8sKUOsJhc,1102
111
+ boltz_vsynthes-1.0.15.dist-info/METADATA,sha256=dZV2p_UkKrGC3QZh40tY3ZEYLO7MylqdH77xA5pSe9I,7171
112
+ boltz_vsynthes-1.0.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
113
+ boltz_vsynthes-1.0.15.dist-info/entry_points.txt,sha256=n5a5I35ntu9lmyr16oZgHPFY0b0YxjiixY7m7nbMTLc,41
114
+ boltz_vsynthes-1.0.15.dist-info/top_level.txt,sha256=MgU3Jfb-ctWm07YGMts68PMjSh9v26D0gfG3dFRmVFA,6
115
+ boltz_vsynthes-1.0.15.dist-info/RECORD,,