Skip to content

Commit c4422a1

Browse files
committed
Fix #16
1 parent 945c866 commit c4422a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/moldrug/fitness.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ def _vinadock(
340340
cmd_vina_str += f" --{constraint_type}"
341341
else:
342342
raise Exception("constraint_type only admit two possible values: score_only, local_only.")
343-
343+
if not isinstance(constraint_ref, Chem.rdchem.Mol):
344+
raise ValueError(f"Invalid constraint_ref = {constraint_ref}. MUST be of Chem.rdchem.Mol type")
344345
# Generate constrained conformer
345346
try:
346347
out_mol = constraintconf.generate_conformers(

0 commit comments

Comments
 (0)