MolecularAI / REINVENT4

AI molecular design tool for de novo design, scaffold hopping, R-group replacement, linker design and molecule optimization.
Apache License 2.0
314 stars 76 forks source link

Update from 4.0 to 4.4 broke everything #134

Closed ruslankotl closed 2 days ago

ruslankotl commented 3 days ago

I have had problems with getting new version to work. I have installed a fresh version of REINVENT into a new folder, and my previous REINVENT 4 runs cannot be started with the old config files. One of the errors I observed was

ModuleNotFoundError: No module named 'reinvent.models.meta_data'

In addition, attempts to run a molecular optimisation using a pubchem mol2mol prior led to its tokeniser throwing an exception:

  File "/home/rk582/miniconda3/envs/reinvent4/lib/python3.10/site-packages/reinvent/models/mol2mol/dataset/dataset.py", line 25, in __init__
    enc = self._vocabulary.encode(tokenized)
AttributeError: 'dict' object has no attribute 'encode'

This is a very disappointing behaviour and I was wondering if there was a way to fix it.

halx commented 2 days ago

Hi,

many thanks for your interest in REINVENT and welcome to the community!

I am sorry to hear that you are having difficulties installing the software. However, I would need considerably more information and what went wrong (full output of stack traces) and how you actually have installed REINVENT. I have just done a fresh install of 4.4.22 myself and cannot reproduce what you report.

Many thanks, Hannes.

ruslankotl commented 2 days ago

Hi Hannes,

Deleting the folder, cleaning conda cache, and reinstalling did the trick, thanks!

halx commented 2 days ago

Can you let me know what you did before? This would be helpful in avoiding the same problem for others. I suspect you had some leftover files in the directory.

ruslankotl commented 2 days ago

There were quite a few things going on:

  1. I had custom components specified
  2. To distribute those within the group, I forked the 4.0 repository and added the components directly into reinvent_plugins/components
  3. As a result, updating to 4.4 led to several merge conflicts
  4. I also kept some useful scripts for automated config generation in the REINVENT folder, but I suspect adding them to .gitignore will solve the problem later on.

Thanks a lot for finally adding the PubChem Mol2Mol prior

halx commented 2 days ago

Ok, I would keep the components separately. That's the whole idea of the plugin mechanism.