Skip to content

Commit c38b662

Browse files
committed
skip nones
1 parent 8361481 commit c38b662

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/plinder/data/utils/annotations/save_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def save_ligands(
3535
rdkit_mol = ligand_ost_ent_to_rdkit_mol(
3636
ligand_ost, smiles, num_unresolved_heavy_atoms or 0
3737
)
38+
if rdkit_mol is None:
39+
continue
3840
rdkit_mol.SetProp("_Name", chain)
3941
with Chem.SDWriter(str(Path(output_folder) / f"{chain}.sdf")) as w:
4042
w.write(rdkit_mol)

0 commit comments

Comments
 (0)