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

No mol_fp module in _mp_decode.py #9

Closed
SejeongPark8354 opened this issue May 27, 2022 · 2 comments
Closed

No mol_fp module in _mp_decode.py #9

SejeongPark8354 opened this issue May 27, 2022 · 2 comments

Comments

@SejeongPark8354
Copy link

SejeongPark8354 commented May 27, 2022

I run optimize_ga.py for my molecule optimization.
But I got the error because no mol_fp module in _mp_decoe.py.

Traceback (most recent call last):
  File "/home/sejeong/codes/SynNet/scripts/optimize_ga.py", line 207, in <module>
    [decode.mol_fp(smi, args.radius, args.nbits) for smi in starting_smiles]
  File "/home/sejeong/codes/SynNet/scripts/optimize_ga.py", line 207, in <listcomp>
    [decode.mol_fp(smi, args.radius, args.nbits) for smi in starting_smiles]
AttributeError: module 'scripts._mp_decode' has no attribute 'mol_fp'

So, I changed the mol_fp to mol_fp function in predict_utils.py.

from syn_net.utils.predict_utils import mol_fp

            population = np.array(
                [mol_fp(smi, args.radius, args.nbits) for smi in starting_smiles]
            ) 

Then, I got the error like below.

Traceback (most recent call last):
  File "/home/sejeong/codes/SynNet/scripts/optimize_ga.py", line 210, in <module>
    population = population.reshape((population.shape[0], population.shape[2]))
IndexError: tuple index out of range

Can you help me with this error?

@rociomer
Copy link
Collaborator

Yes, I have just merged some changes that should fix this issue. The population array does not need to be reshaped here, so I just deleted that line and updated where mol_fp() is imported from.

@SejeongPark8354
Copy link
Author

SejeongPark8354 commented May 30, 2022

Thank you for your quick response.
After update the code related to mol_fp(), the previous error doesn't occur.
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

2 participants