Skip to content

Commit

Permalink
check meeko prop in RDKitMolCreate.combine_mols()
Browse files Browse the repository at this point in the history
  • Loading branch information
diogomart committed Dec 26, 2023
1 parent 54a69c0 commit 9e8a7ad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions meeko/rdkit_mol_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,13 +367,15 @@ def combine_rdkit_mols(mol_list):
for mol in mol_list:
if mol is None:
continue
data = json.loads(mol.GetProp("meeko"))
clean_extend(props, data)
if mol.HasProp("meeko"):
data = json.loads(mol.GetProp("meeko"))
clean_extend(props, data)
if combined_mol is None: # first iteration
combined_mol = mol
else:
combined_mol = Chem.CombineMols(combined_mol, mol)
combined_mol.SetProp("meeko", json.dumps(props))
if len(props) > 0:
combined_mol.SetProp("meeko", json.dumps(props))
return combined_mol

@classmethod
Expand Down

0 comments on commit 9e8a7ad

Please sign in to comment.