Open lamininA1 opened 8 months ago
Encountered the same issue. Could you check this plz!
That file should be created during the installation process. Depending on your cluster/machine settings, you might need install in editable mode:
pip3 install -e .
I've added that note to the README. Probably best to start with a fresh conda environment and fresh install.
Hey, first of all thanks for the code, it is very cool! I thought I would share my install instructions for anyone who wants to have a guide on how to install everything needed to run roshambo
, below is my instructions that worked for me (running on Linux machine with Ubuntu 22.04)
git clone https://github.com/molecularinformatics/roshambo.git
cd roshambo
conda create -n roshambo python=3.9
conda activate roshambo
conda install -c conda-forge boost-cpp boost cairo pandas pillow freetype cmake numpy eigen matplotlib
git clone https://github.com/rdkit/rdkit.git
cd rdkit
mkdir build
cd build
cmake -DPy_ENABLE_SHARED=1 -DRDK_INSTALL_INTREE=ON -DRDK_BUILD_AVALON_SUPPORT=ON -DRDK_BUILD_INCHI_SUPPORT=ON -DRDK_INSTALL_STATIC_LIBS=OFF -DRDK_BUILD_CPP_TESTS=ON -DRDK_BUILD_PYTHON_WRAPPERS=ON -DRDK_BUILD_YAEHMOP_SUPPORT=ON -DBoost_NO_SYSTEM_PATHS=ON -DRDK_BUILD_CAIRO_SUPPORT=ON -DRDK_BUILD_XYZ2MOL_SUPPORT=ON -DRDK_BUILD_FREESASA_SUPPORT=ON -DPYTHON_NUMPY_INCLUDE_PATH="$(python -c 'import numpy ; print(numpy.get_include())')" -DBOOST_ROOT="$CONDA_PREFIX" -DRDK_INSTALL_COMIC_FONTS=OFF -DINCHI_URL=https://rdkit.org/downloads/INCHI-1-SRC.zip ..
make -j4 install
cd ..
export RDBASE=`pwd`
export PYTHONPATH=$RDBASE
export LD_LIBRARY_PATH=$RDBASE/lib:$CONDA_PREFIX/lib
cd build
ctest -j4 –output-on-failure
cd ../../
export RDKIT_LIB_DIR=$RDBASE/lib
export RDKIT_INCLUDE_DIR=$RDBASE/Code
export RDKIT_DATA_DIR=$RDBASE/Data
export PYTHONPATH=$PYTHONPATH:$RDBASE
export CUDA_HOME=/path/to/your/cuda/installation
pip install -e .
pip install IPython pandas jupyter
Then running:
roshambo -h
Should give:
roshambo -h
usage: roshambo [-h] [--ignore_hs] [--n_confs N_CONFS] [--keep_mol] [--working_dir WORKING_DIR] [--name_prefix NAME_PREFIX] [--smiles_delimiter SMILES_DELIMITER]
[--gpu_id GPU_ID] [--volume_type {analytic,gaussian}] [--n N] [--proxy_cutoff PROXY_CUTOFF] [--epsilon EPSILON] [--res RES] [--margin MARGIN]
[--no_carbon_radii] [--color] [--fdef_path FDEF_PATH] [--sort_by SORT_BY] [--write_to_file] [--max_conformers MAX_CONFORMERS] [--filename FILENAME]
[--random_seed RANDOM_SEED] [--method {ETDG,ETKDG,ETKDGv2,ETKDGv3}] [--ff {UFF,MMFF94s,MMFF94s_noEstat}] [--opt_confs] [--calc_energy]
[--energy_iters ENERGY_ITERS] [--energy_cutoff ENERGY_CUTOFF] [--align_confs] [--rms_cutoff RMS_CUTOFF] [--num_threads NUM_THREADS]
ref_file dataset_files_pattern
Get similarity scores between a reference molecule and a dataset of molecules.
positional arguments:
ref_file Name of the reference molecule file.
dataset_files_pattern
File pattern to match the dataset molecule files.
optional arguments:
-h, --help show this help message and exit
--ignore_hs Ignore hydrogens.
--n_confs N_CONFS Number of conformers to generate.
--keep_mol Keep the original molecule in addition to the conformers.
--working_dir WORKING_DIR
Working directory.
--name_prefix NAME_PREFIX
Prefix to use for the molecule names if not found in the input files.
--smiles_delimiter SMILES_DELIMITER
Specify the delimiter for parsing SMILES. Use 'SPACE' for space, 'TAB' for tab, etc.
--gpu_id GPU_ID ID of the GPU to use for running PAPER.
--volume_type {analytic,gaussian}
The type of overlap volume calculation to use.
--n N The order of the analytic overlap volume calculation.
--proxy_cutoff PROXY_CUTOFF
The distance cutoff to use for the atoms to be considered neighbors.
--epsilon EPSILON The Gaussian cutoff to use in the analytic volume calculation.
--res RES The grid resolution to use for the Gaussian volume calculation.
--margin MARGIN The margin to add to the grid box size for the Gaussian volume calculation.
--no_carbon_radii Disable the use of carbon radii for the overlap calculations.
--color Calculate color scores in addition to shape scores.
--fdef_path FDEF_PATH
The file path to the feature definition file to use for the pharmacophore calculation.
--sort_by SORT_BY The score to sort the final results by.
--write_to_file Write the transformed molecules to a sdf file.
--max_conformers MAX_CONFORMERS
The maximum number of conformers to write for each molecule.
--filename FILENAME The name of the output file to write.
--random_seed RANDOM_SEED
Random seed for conformer generation.
--method {ETDG,ETKDG,ETKDGv2,ETKDGv3}
The method to use for conformer generation (ETDG, ETKDG, or ETKDGv2)
--ff {UFF,MMFF94s,MMFF94s_noEstat}
The force field to use for conformer generation (UFF, MMFF94s, or MMFF94s_noEstat)
--opt_confs Optimize the conformers.
--calc_energy Calculate the energy of the conformers.
--energy_iters ENERGY_ITERS
Number of iterations for energy calculation.
--energy_cutoff ENERGY_CUTOFF
Maximum energy difference (in kcal/mol) to keep a conformer after energy minimization.
--align_confs Align the conformers.
--rms_cutoff RMS_CUTOFF
RMSD cutoff for conformer clustering.
--num_threads NUM_THREADS
Number of threads to use for conformer generation.
I have tested roshambo
using the latest rdkit
version 2024.03.5
and the code appears to run fine. It might also be worth modfying the rdkit install link to point to this version of the rdkit install instructions.
I hope this helps! Thanks, Mike
N.B. Taka has also written a very nice blog post on your code :)
One other point of note - users may come across an error with numpy due to RDKit issues. If you come across and error like:
fatal error: numpy/arrayobject.h: No such file or directory...
You can resolve it by:
sudo ln -s /path/to/roshambo_conda_env/lib/ptyhon-3.9/dist-packages/numpy/core/include/numpy/ /usr/include/numpy
Thanks Mike for all of the above information! Seems very helpful to me, and I've updated the README accordingly :)
Hi MKCarter, I try to compile the program according to your installation guide. However, I met some issues:
/usr/bin/nvcc -I/usr/include -Ipaper -I/public/gkxiao/software/roshambo/rdkit/Code -I/public/gkxiao/software/anaconda3/envs/roshamde/python3.9 -c paper/transformTools.cu -o build/temp.linux-x86_64-cpython-39/paper/transformTools.o -O2 -I/public/gkxiao/software/roshambCode -DORIG_GLOBAL -DFAST_OVERLAP -DNO_DIV_ADDRESS -std=c++17 -Xcompiler -O2 -arch sm_50 -Xptxas -v --ptxas-options=-v -c --compiler-optio
ptxas info : 0 bytes gmem
g++ -pthread -B /public/gkxiao/software/anaconda3/envs/roshambo/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapvll -fPIC -O2 -isystem /public/gkxiao/software/anaconda3/envs/roshambo/include -fPIC -O2 -isystem /public/gkxiao/software/anaconda3/envs/ronclude -fPIC -I/usr/include -Ipaper -I/public/gkxiao/software/roshambo/rdkit/Code -I/public/gkxiao/software/anaconda3/envs/roshambo/includ3.9 -c roshambo/cpaper.cpp -o build/temp.linux-x86_64-cpython-39/roshambo/cpaper.o -I/public/gkxiao/software/roshambo/rdkit/Code -x cu -st-arch=sm_70 --ptxas-options=-v -c --compiler-options -fPIC
g++: warning: ‘-x cu’ after last input file has no effect
g++: error: unrecognized command-line option ‘-arch=sm_70’
g++: error: unrecognized command-line option ‘--ptxas-options=-v’
g++: error: unrecognized command-line option ‘--compiler-options’; did you mean ‘--completion=’?
error: command '/usr/bin/g++' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [136 lines of output]
/public/gkxiao/software/anaconda3/envs/roshambo/lib/python3.9/site-packages/setuptools/dist.py:452: SetuptoolsDeprecationWarning: Inva-separated options
Any suggestion?
Thank you very much.
Hi @gkxiao -
I think the g++ errors you are seeing are related to this issue - https://github.com/molecularinformatics/roshambo/issues/5#issuecomment-2375231641
If you modify the scripts suggested here, you should remove the g++
errors and be able to install roshambo
Let me know how it goes!
Hey @bmd-jpreiksa
This error is due to the original setup.py
script calling cuda flags for g++
- if you check out this comment https://github.com/molecularinformatics/roshambo/issues/5#issuecomment-2375231641, you should be able to copy the modified setup.py
script and cudaVolumeTypes.h
script (located in the paper folder) to install roshambo
- I think there is a PR request to update these, and add a dockerfile to the repo https://github.com/molecularinformatics/roshambo/pull/6 so hopefully these will be updated in the repo soon.
Let me know how it goes!
Hey, Ye. Right after posting this I have notice the post You referring to. I have changed the original files with recommendations and compilation was successful. Thank you anyways!
J.P
On Fri, 8 Nov 2024 at 14:55, Michael Carter @.***> wrote:
Hey @bmd-jpreiksa https://github.com/bmd-jpreiksa
This error is due to the original setup.py script calling cuda flags for g++ - if you check out this comment #5 (comment) https://github.com/molecularinformatics/roshambo/issues/5#issuecomment-2375231641, you should be able to copy the modified setup.py script and cudaVolumeTypes.h script (located in the paper folder) to install roshambo - I think there is a PR request to update these, and add a dockerfile to the repo #6 https://github.com/molecularinformatics/roshambo/pull/6 so hopefully these will be updated in the repo soon.
Let me know how it goes!
— Reply to this email directly, view it on GitHub https://github.com/molecularinformatics/roshambo/issues/3#issuecomment-2464690150, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBAMX4WF27RALDQWKL3DZDTZ7SYFZAVCNFSM6AAAAABEW7LP42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRUGY4TAMJVGA . You are receiving this because you were mentioned.Message ID: @.***>
Guys, I think you missing roshambo/cpaper.cpp file. Could you check this?