Skip to content

nvmolkit.embedMolecules does not generate a conformer for every molecule in the set #202

@Yannlefrancois

Description

@Yannlefrancois

Hi,
i'm using nvmolkit to embeded conformation in a large amount of molecule, i'm trying my current code on a small subset of molecule and i see that it only embeded comformation in part of the molecules.

here is my code

import nvmolkit.embedMolecules as embed
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import AllChem

    suppl=Chem.MultithreadedSmilesMolSupplier(f"{arg.temp_file_dir}/{file}", "\t", 0, 1, True, True,numWriterThreads=48)
    
    
    # create the list in advance to avoid unecessary memory requirement upon list expension using append

    mol_list=[None for i in range(arg.batch_size)]
    mol_id=[None for i in range(arg.batch_size)]
    mol_counter=-1
    for mol_1 in suppl:
        mol_counter+=1
        if mol_1 is not None:
            try:
                mol_list[mol_counter]=Chem.rdmolops.AddHs(mol_1)
                mol_id[mol_counter]=mol_1.GetProp(arg.property_name)
            except :
                pass
    


        params = Chem.rdDistGeom.ETKDG()
        params.useRandomCoords = True
        hardware_opts = HardwareOptions(
        preprocessingThreads=48,
        batchSize=-1,
        batchesPerGpu=-1,
        gpuIds=[0, 1])
        embed.EmbedMolecules(mol_list, params, confsPerMolecule=1, hardwareOptions=hardware_opts)

and if i check with mol.GetNumConformers() a non negligable amount as 0 500 out of 100000

is there anything that could explain that ?

rdkit version = 2026.03.1

nvmolkit 0.5.0

best
yann

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

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