Skip to content

[nvMolKit] mmffOptimization / uffOptimization fail to import unless nvmolkit.types is imported first #210

@xinyu-dev

Description

@xinyu-dev

Summary

Importing nvmolkit.mmffOptimization or nvmolkit.uffOptimization as the first nvMolKit import fails with a Boost.Python converter error, unless nvmolkit.types (or embedMolecules) is imported first to register the BatchHardwareOptions converter. The failure is silent in the docs — a standalone MMFF/UFF import, as a user would naturally write, breaks.

Severity: High · Status: workaround verified; upstream open

Steps to reproduce

# fresh interpreter — first nvMolKit import:
from nvmolkit.mmffOptimization import MMFFOptimizeMoleculesConfs   # or nvmolkit.uffOptimization

Actual outcome

TypeError: No to_python converter found for C++ type: nvMolKit::BatchHardwareOptions

Expected outcome

nvmolkit.mmffOptimization / uffOptimization should import standalone without requiring a prior nvmolkit.types import.

Fix

Import nvmolkit.types (or embedMolecules) first — it registers the BatchHardwareOptions converter. Upstream: the MMFF/UFF modules should register/trigger that converter on their own import. The skill's MMFF recipe imports embedMolecules first, so it happens to work; a standalone MMFF/UFF import breaks with no warning.

Environment

A100 80GB PCIe (sm_80) · driver 565.57.01 · CUDA 12.6 · nvMolKit 0.5.0 @ 6f967ed · Python 3.12 · Linux x86_64.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions