Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel processing doesn't work when generating training datasets using get_3d_lmdb.py #176

Open
congffu opened this issue Nov 9, 2023 · 0 comments

Comments

@congffu
Copy link

congffu commented Nov 9, 2023

Hi authors,

Thanks for the great work. I ran into some issues when following the readme of Uni-Mol+ to generate the training dataset. And I hope to get some advice on that.

When I run python ../get_3d_lmdb.py train, it needs to take ~250 hrs (according to tqdm) to finish the dataset generation (number of CPU cores on our machine is 112). Then I used 10 molecules to test the speed and I found the speed of sequential processing and parallel processing is about the same. Then I narrow it down to the function rdkit_3d_gen (shown below), which blocks the speed up in multiprocessing.

def rdkit_3d_gen(smile, seed):
    mol = read_smiles(smile)
    AllChem.EmbedMolecule(mol, randomSeed=seed, maxAttempts=1000)
    mol = rdkit_mmff(mol)
    pos = mol.GetConformer().GetPositions()
    return mol

If I comment out AllChem.EmbedMolecule(mol, randomSeed=seed, maxAttempts=1000), the speed of parallel processing can become normal.

I appreciate it if any suggestions on how to fix this issue. Looking forward to hearing from you.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant