Skip to content

Commit

Permalink
fix:write sdf set prop key name err
Browse files Browse the repository at this point in the history
  • Loading branch information
dp-yuanyn committed Mar 9, 2024
1 parent 08a1a38 commit 5c37f63
Show file tree
Hide file tree
Showing 3 changed files with 290 additions and 1,332 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def main(args: dict):
batch_size=int(args["batch_size"]),
score_only=bool(args["score_only"]),
local_only=bool(args["local_only"]),
props_list=["fragInfo", "torsionInfo", "atomInfo"],
)
runner.save_results(save_dir=savedir)
end_time = time.time()
Expand Down
2 changes: 1 addition & 1 deletion unidock_tools/src/unidock_tools/utils/rdkit_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def set_properties(mol: Chem.Mol, properties: dict):
elif isinstance(value, float):
mol.SetDoubleProp(key, value)
else:
mol.SetProp(value, str(value))
mol.SetProp(key, str(value))

This comment has been minimized.

Copy link
@zhengh96

zhengh96 Mar 9, 2024

Contributor

what if mol is None?

except:
logging.warning(f"set property {key} err: {traceback.format_exc()}")

Expand Down
Loading

0 comments on commit 5c37f63

Please sign in to comment.