FlowMol icon indicating copy to clipboard operation
FlowMol copied to clipboard

need help in building environment

Open Atomu2014 opened this issue 9 months ago • 4 comments

Hi,

Thanks for releasing the code. You new paper looks really promising!

I am now a TA in a graduate level course and I'm using your code for demo. However, I got some enviroment issues with your build_env.sh.

for this line mamba install -c conda-forge rdkit=2023.09.4=py310hb79e901_0 pystow einops -y

there is an error Image

i tried to specify the version of icu=75.1 and cairo=1.18.0, but this conflict with libboost Image

then i changed the version of icu=73.2, and this time sdl3 requires icu=75.1 Image

i don't know to resolve the depency, and I will appreciate if you can help!

Thanks

Atomu2014 avatar Mar 26 '25 15:03 Atomu2014

Hi,

I tried a quick fix (change to python=3.11.0) and now successfully built the enviroment. I can run test.py in this environment, but I'm not sure this will work with other scripts. Can you confirm py3.11 is ok?

  1. change requires-python = ">=3.10,<3.12" in pyproject.toml
  2. mamba create -n flowmol python=3.11.0
  3. change build_env.sh as following:
#!/bin/bash
set -e # this will stop the script on first error

# get the name of the current conda environment
ENV_NAME=$(basename "$CONDA_PREFIX")

# print the name of the current conda environment to the terminal
echo "Building flowmol into the environment '$ENV_NAME'"

mamba install pytorch=2.2.0 pytorch-cuda=12.1 -c pytorch -c nvidia -y
mamba install pytorch-cluster=1.6.3 pytorch-scatter=2.1.2=py311_torch_2.2.0_cu121 -c pyg -y
mamba install -c dglteam/label/cu121 dgl=2.0.0.cu121=py311_0 -y
mamba install -c conda-forge pytorch-lightning=2.1.3=pyhd8ed1ab_0 -y
mamba install -c conda-forge rdkit=2023.09.4 pystow einops -y

pip install wandb useful_rdkit_utils py3Dmol --no-input
pip install -e ./

Atomu2014 avatar Mar 26 '25 16:03 Atomu2014

Hi there, so glad you to hear you want to use FlowMol for a class demo!

I'm able to recreate your error from a fresh mamba environment with python 3.10 pinned. I would prefer to find a way to fix this issue that doesn't involve changing the python version (as this requires changing many more installed packages). Presumably this error is occurring because some package install command in build_env.sh relies on default version lookup behavior and this default versioning has changed since I originally wrote the script. I'm looking into this and haven't found a fix yet but, I'll keep you posted.

Thanks for bringing this up and thanks for using FlowMol!

Dunni3 avatar Mar 26 '25 18:03 Dunni3

And to answer your question, I don't know if there would be performance effects loading the existing checkpoints and running inference in python 3.11. It's probably fine. Especially for an educational exercise. But the only way to know would be to test it.

Dunni3 avatar Mar 26 '25 18:03 Dunni3

Really appreciate your consistent effort in this work. I read your new paper yesterday and get shocked by CTMC results.

Atomu2014 avatar Mar 26 '25 19:03 Atomu2014

The FlowMol environment, as designed, depends on python 3.10. I have not had luck trying to rebuild it with python 3.11, but I have put that much time into it. The notebook breaks, at least in part, because the default python version in colab environments was updated from 3.10 to 3.11. I'm just going to stop supporting this colab notebook. Its going to take some effort to figure out how to build the flowmol environment in colab notebooks that is stable over the long term. Maybe one day when I have more free time. For now, users will have to build the environment themselves following the instructions in the readme to run the demo jupyter notebook locally. I'm about to release a new version of FlowMol - FlowMol3 - and the main branch will be updated to reflect this new information in the next day or so.

Also with FlowMol3 I'm providing an environment.yml file that you can use to build the flowmol environment that should be less error prone than the current build_env.sh script

Dunni3 avatar Aug 18 '25 05:08 Dunni3