zrqiao / NeuralPLexer

NeuralPLexer: State-specific protein-ligand complex structure prediction with a multi-scale deep generative model
https://doi.org/10.1038/s42256-024-00792-z
BSD 3-Clause Clear License
260 stars 68 forks source link

Unable to run inference #33

Open yipy0005 opened 5 months ago

yipy0005 commented 5 months ago

Hi, I was trying to run the following command neuralplexer-inference --task=batched_structure_sampling --input-receptor DERETWSGKVDFLLSVIGFAVDLANVWRFPYLCYKNGGGAFLVPYGIMLAVGGIPLFYMELALGQHNRKGAITCWGRLVPLFKGIGYAVVLIAFYVDFYYNVIIAWSLRFFFASFTNSLPWTSCNNIWNTPNCRPFEGHVEGFQSAASEYFNRYILELNRSEGIHDLGAIKWDMALCLLIVYLICYFSLWKGISTSGKVVWFTALFPYAVLLILLIRGLTLPGSFLGIQYYLTPNFSAIYKAEVWVDAATQVFFSLGPGFGVLLAYASYNKYHNNVYKDALLTSFINSATSFIAGFVIFSVLGYMAHTLGVRIEDVATEGPGLVFVVYPAAIATMPASTFWALIFFMMLATLGLDSSFGGSEAIITALSDEFPKIKRNRELFVAGLFSLYFVVGLASCTQGGFYFFHLLDRYAAGYSILVAVFFEAIAVSWIYGTNRFSEDIRDMIGFPPGRYWQVCWRFVAPIFLLFITVYGLIGYEPLTYADYVYPSWANALGWCIAGSSVVMIPAVAIFKLLSTPGSLRQRFTILTTPWRDQQ --input-ligand 41X_model_ed.sdf --out-path test_4xnx_41x --model-checkpoint ./complex_structure_prediction.ckpt --n-samples 16 --chunk-size 4 --num-steps=40 --sampler=langevin_simulated_annealing --cuda and I got the following error:

__init__.py 171 load
module = import_module(match.group('module'))

__init__.py 126 import_module
return _bootstrap._gcd_import(name[level:], package, level)

<frozen importlib._bootstrap> 1050 _gcd_import

<frozen importlib._bootstrap> 1027 _find_and_load

<frozen importlib._bootstrap> 1006 _find_and_load_unlocked

<frozen importlib._bootstrap> 688 _load_unlocked

<frozen importlib._bootstrap_external> 883 exec_module

<frozen importlib._bootstrap> 241 _call_with_frames_removed

inference.py 27 <module>
from neuralplexer.model.wrappers import NeuralPlexer

wrappers.py 8 <module>
from pytorch3d.ops import corresponding_points_alignment

__init__.py 7 <module>
from .ball_query import ball_query

ball_query.py 10 <module>
from pytorch3d import _C

ImportError:
/home/user/miniforge3/envs/neuralplexer_dev/lib/python3.10/site-packages/pytorch3d/_C.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN3c107WarningC1ENS_7variantIJNS0_11UserWarningENS0_18DeprecationWarningEEEERKNS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb
binbinbinv commented 5 months ago

我在之前也遇到过你的问题,请注意python,cuda,pytorch3d的版本匹配问题 @yipy0005

binbinbinv commented 5 months ago

You can solve this problem by find the suitable package of pytorch3d at https://anaconda.org/pytorch3d/pytorch3d/files @yipy0005

cyangNYU commented 5 months ago

You can solve this problem by find the suitable package of pytorch3d at https://anaconda.org/pytorch3d/pytorch3d/files @yipy0005

How to install a suitable package in linux command?

binbinbinv commented 5 months ago

You can solve this problem by find the suitable package of pytorch3d at https://anaconda.org/pytorch3d/pytorch3d/files @yipy0005

How to install a suitable package in linux command?

Plz check your version of python/cuda/torch, for example: linux-64/pytorch3d-0.7.5-py39_cu121_pyt210.tar.bz2 is suitable for the package below:

  1. python: 3.9
  2. cuda: 12.1
  3. torch: 2.1.0

you can run the command below to check the version of ①python python --version ②cuda nvcc -V ③torch pip list | grep torch

yipy0005 commented 5 months ago

I see, if I have the following:

Python: 3.10 Cuda: 11.5 Torch: 2.1.2

Which version of PyTorch3D should I getting?

Thank you for helping me on this, much appreciated! 😊

yipy0005 commented 5 months ago

I have managed to run inference by installing the appropriate pytorch3D, but when I run it with --cuda, I get RuntimeError: Not compiled with CUDA support.

Do I have to reinstall a certain python package?

binbinbinv commented 5 months ago

I have managed to run inference by installing the appropriate pytorch3D, but when I run it with --cuda, I get RuntimeError: Not compiled with CUDA support.

Do I have to reinstall a certain python package?

Sorry, I still can't run inference right now, if it's convenient for you, could you tell me what commands you used to install the environment, the more detailed the better, and then the pip list and conda list of the last installed environment, I'd like to try reinstalling the environment the way you did it。

binbinbinv commented 5 months ago

I am still struggling with the problem: https://github.com/zrqiao/NeuralPLexer/issues/34

yipy0005 commented 5 months ago

Sorry for the late reply, @binbinbinv! Here is what I did:

git clone git@github.com:zrqiao/NeuralPLexer.git cd NeuralPLexer make environment conda activate neuralplexer_dev make install axel -n 40 https://zenodo.org/records/10373581/files/neuralplexermodels_downstream_datasets_predictions.zip?download=1

Then, because my versions are as follows: Python: 3.10 Cuda: 11.5 Torch: 2.1.2

I went to https://anaconda.org/pytorch3d/pytorch3d/files and downloaded https://anaconda.org/pytorch3d/pytorch3d/0.7.5/download/linux-64/pytorch3d-0.7.5-py310_cu121_pyt210.tar.bz2.

Then I did conda install pytorch3d-0.7.5-py310_cu121_pyt210.tar.bz2.

After that, I am able to run inference without --cuda option.

Hope that helps! 😁

Best regards, Yew Mun