Coder Social home page Coder Social logo

hysonlab / protein_redesign Goto Github PK

View Code? Open in Web Editor NEW
37.0 4.0 5.0 860 KB

Complex-based Ligand-Binding Proteins Redesign by Equivariant Diffusion-based Generative Models

Home Page: https://www.biorxiv.org/content/10.1101/2024.04.17.589997v2.full.pdf

License: MIT License

Python 100.00%
diffusion-models equivariant-network ligand-binding protein protein-design protein-representation-learning

protein_redesign's People

Contributors

hytruongson avatar ndnng avatar thanhduy1842001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

protein_redesign's Issues

PyTorch-Lightning Incompatibility Issue

Creating the env from the yaml file makes it so that the versions of pytorch and pytorch lightning are incompatible, giving the error: undefined symbol: iJIT_NotifyEvent. I was able to manually edit to switch to pytorch 1.7.1, but that caused issues of its own. Sorry if a solution to this is in the works.

Traceback (most recent call last):
  File "/home/ubuntu/Protein_Redesign/generate.py", line 11, in <module>
    import pytorch_lightning as pl
  File "/home/ubuntu/miniconda3/envs/ProteinReDiff/lib/python3.9/site-packages/pytorch_lightning/__init__.py", line 34, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
  File "/home/ubuntu/miniconda3/envs/ProteinReDiff/lib/python3.9/site-packages/pytorch_lightning/callbacks/__init__.py", line 14, in <module>
    from pytorch_lightning.callbacks.callback import Callback
  File "/home/ubuntu/miniconda3/envs/ProteinReDiff/lib/python3.9/site-packages/pytorch_lightning/callbacks/callback.py", line 21, in <module>
    from torch import Tensor
  File "/home/ubuntu/miniconda3/envs/ProteinReDiff/lib/python3.9/site-packages/torch/__init__.py", line 202, in <module>
    from torch._C import *  # noqa: F403
ImportError: /home/ubuntu/miniconda3/envs/ProteinReDiff/lib/python3.9/site-packages/torch/lib/libtorch_cpu.so: undefined symbol: iJIT_NotifyEvent

ModuleNotFoundError: No module named 'dpl'

~/Protein_Redesign$ python generate.py     --ckpt_path "checkpoints/ProteinReDiff_v1.ckpt"     --output_dir "workdir/generate/example_ProteinReDiff"     --protein "LSEQLKHCNGILKELLSKKHAAYAWPFYKPVDASALGLHDYHDIIKHPMDLSTVKRKMENRDYRDAQEFAADVRLMFSNCYKYNPPDHDVVAMARKLQDVFEFRYAKMPD"     --ligand "Cc1ccc2c(c1c3cc(cc4c3nc([nH]4)C5CC5)c6c(noc6C)C)cccn2"     --num_samples 8
Traceback (most recent call last):
  File "/home/ubuntu/Protein_Redesign/generate.py", line 16, in <module>
    from dpl.data import RepeatDataset, collate_fn, ligand_to_data, protein_to_data
ModuleNotFoundError: No module named 'dpl'

It looks like the the conda environment setup doesn't include dpl. I've tried to clone the DPL repo directly and use the directory inside there, but that doesn't seem to be the same one as expected in this repo. Would be great if there's a way to fix this installation.

residue_esm_tokens is not defined

Error:
g: Starting from v1.9.0,tensorboardXhas been removed as a dependency of thepytorch_lightningpackage, due to potential conflicts with other packages in the ML ecosystem. For this reason,logger=Truewill useCSVLoggeras the default logger, unless thetensorboardortensorboardXpackages are found. Pleasepip install lightning[extra]or one of them to enable TensorBoard support by default "Starting from v1.9.0,tensorboardXhas been removed as a dependency of thepytorch_lightning`"
Missing logger folder: workdir/inference/example_ProteinReDiff/gen5/lightning_logs
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
Predicting DataLoader 0: 0%| | 0/3 [00:00<?, ?it/s]Using cache found in /home/ubuntu/.cache/torch/hub/facebookresearch_esm_main

File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/trainer/call.py", line 38, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 938, in _predict_impl
results = self._run(model, ckpt_path=self.ckpt_path)
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1112, in _run
results = self._run_stage()
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1190, in _run_stage
return self._run_predict()
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1244, in _run_predict
return self.predict_loop.run()
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/loops/loop.py", line 199, in run
self.advance(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/loops/dataloader/prediction_loop.py", line 101, in advance
dataloader_iter, self.current_dataloader_idx, dl_max_batches, self.num_dataloaders
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/loops/loop.py", line 199, in run
self.advance(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/loops/epoch/prediction_epoch_loop.py", line 100, in advance
self._predict_step(batch, batch_idx, dataloader_idx)
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/loops/epoch/prediction_epoch_loop.py", line 129, in _predict_step
predictions = self.trainer._call_strategy_hook("predict_step", *step_kwargs.values())
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 1494, in _call_strategy_hook
output = fn(*args, **kwargs)
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/pytorch_lightning/strategies/strategy.py", line 408, in predict_step
return self.model.predict_step(*args, **kwargs)
File "/home/ubuntu/BOLTPRO/Chirag/Protein_Redesign/ProteinReDiff/model.py", line 251, in predict_step
x, seq_t = self.sample(batch)
File "/home/ubuntu/anaconda3/envs/pr_design/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/ubuntu/BOLTPRO/Chirag/Protein_Redesign/ProteinReDiff/model.py", line 387, in sample
batch = self.prepare_batch(batch)
File "/home/ubuntu/BOLTPRO/Chirag/Protein_Redesign/ProteinReDiff/model.py", line 443, in prepare_batch
residue_esm_tokens = batch["residue_esm_tokens"]
KeyError: 'residue_esm_tokens'
Predicting DataLoader 0: 0%| | 0/3 [00:11<?, ?it/s]
`

There is n attribute of "residue_esm_tokens" in the object "batch"
Please mention the python version as well the dependencies version you are using because it is working in other deprecated version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.