Deep generative models of 3D grids for structure-based drug discovery

Overview

What is liGAN?

liGAN is a research codebase for training and evaluating deep generative models for de novo drug design based on 3D atomic density grids. It is based on libmolgrid and the gnina fork of caffe.

VAE paper - 2 minute talk

CVAE paper - 15 minute talk

Dependencies

  • numpy
  • pandas
  • scikit-image
  • openbabel
  • rdkit
  • molgrid
  • torch
  • protobuf
  • gnina version of caffe

Usage

You can use the scripts download_data.sh and download_weights.sh to download the test data and weights that were evaluated in the above papers.

The script generate.py is used to generate atomic density grids and molecular structures from a trained generative model.

Its basic usage can be seen in the scripts generate_vae.sh:

LIG_FILE=$1 # e.g. data/molport/0/102906000_8.sdf

python3 generate.py \
  --data_model_file models/data_48_0.5_molport.model \
  --gen_model_file models/vae.model \
  --gen_weights_file weights/gen_e_0.1_1_disc_x_10_0.molportFULL_rand_.0.0_gen_iter_100000.caffemodel \
  --rec_file data/molport/10gs_rec.pdb \
  --lig_file $LIG_FILE \
  --out_prefix VAE \
  --n_samples 10 \
  --fit_atoms \
  --dkoes_make_mol \
  --output_sdf \
  --output_dx \
  --gpu

And generate_cvae.sh:

REC_FILE=$1 # e.g. data/crossdock2020/PARP1_HUMAN_775_1012_0/2rd6_A_rec.pdb
LIG_FILE=$2 # e.g. data/crossdock2020/PARP1_HUMAN_775_1012_0/2rd6_A_rec_2rd6_78p_lig_tt_min.sdf

python3 generate.py \
  --data_model_file models/data_48_0.5_crossdock.model \
  --gen_model_file models/cvae.model \
  --gen_weights_file weights/lessskip_crossdocked_increased_1.lowrmsd.0_gen_iter_1500000.caffemodel \
  --rec_file $REC_FILE \
  --lig_file $LIG_FILE \
  --out_prefix CVAE \
  --n_samples 10 \
  --fit_atoms \
  --dkoes_make_mol \
  --output_sdf \
  --output_dx \
  --gpu

Both scripts can be run from the root directory of the repository.

Comments
  • model cannot be trained

    model cannot be trained

    When I attempted to train the code with train.py and the provided simple example it2_tt_0_lowrmsd_valid_mols_test0_1000.types and crossdock folder, the model froze in the dataloader next_batch part.

    Looking forward to your help!

    opened by yuanqidu 31
  • how to set the input for simple_fit.py and test_dkoes_simple_fit.py

    how to set the input for simple_fit.py and test_dkoes_simple_fit.py

    Hi, I am trying to use simple_fit.py and test_dkoes_simple_fit.py to obtain a molecules from a grid. I tried the following setting for the input path of sdf file: --for simple_fit.py, I used the exact same code and input a sdf file. if name == 'main':
    results = []

    print('Globbing input files')
    files = glob.glob('/home.local/Level_admin/yang/liGAN/1b3g_ligand.sdf')
    print (files)
    
    print('Starting to fit molecules')
    for (i,fname) in enumerate(files):
        print (i,fname)
        try:
            start = time.time()
            struct, fittime, loss, fixes, rmsd = fitmol(fname,25)
            mol,misses = make_mol(struct)
            mol = pybel.Molecule(mol)
            
            totaltime = time.time()-start
            ligname = os.path.split(fname)[1]    
    
            mol.write('sdf','output/fit_%s'%ligname,overwrite=True)
            print('{}/{}'.format(i+1, len(files)))        
        except Exception as e:
            print("Failed",fname,e)
    
    
    results = pd.DataFrame(results,columns=('lig','loss','fixes','fittime','totaltime','misses','rmsd'))
    results.to_csv('cntfixes.csv')
    
    sns.boxplot(data=results,x='misses',y='loss')
    plt.savefig('loss_by_misses_box.png')
    
    plt.hist(results.loss,bins=np.logspace(-6,1,8))
    plt.gca().set_xscale('log')
    plt.savefig('loss_hist.png')
    
    print('Low loss but nonzero misses, sorted by misses:')
    print(results[(results.loss < 0.1) & (results.misses > 0)].sort_values(by='misses'))
    
    print('Overall average loss:')
    print(np.mean(results.loss))
    
    plt.hist(results.fittime)
    plt.savefig('fit_time_hist.png')
    
    print('Average fit time and total time')
    print(np.mean(results.fittime))
    print(np.mean(results.totaltime))
    
    print('Undefined RMSD sorted by loss:')
    print(results[np.isinf(results.rmsd)].sort_values(by='loss'))
    
    print('All results sorted by loss:')
    print(results.sort_values(by='loss'))
    

    and got the following error: Failed /home.local/Level_admin/yang/liGAN/1b3g_ligand.sdf Invalid input dimensions in forward of Coords2Grid

    opened by yangxiufengsia 8
  • Aborted (core dumped) when generate molecules

    Aborted (core dumped) when generate molecules

    Hello, when I use generate.py config/generate.config. It appears a problem as follows, and i couldn't locate the problem. Do you have some advices?

    Setting random seed to 0
    Loading data
    Initializing generative model
    Loading generative model state
    Initializing atom fitter
    Initializing bond adder
    Initializing output writer
    Empty DataFrame
    Columns: []
    Index: []
    Starting to generate grids
    0 0 0 0
    Calling generator forward
      prior = 0
      stage2 = False
    Getting next batch of data
    Aborted (core dumped)
    
    opened by Matheo-Chang 7
  • what is your final KL loss value in your liGAN paper?

    what is your final KL loss value in your liGAN paper?

    Hi

    I obtained over 90% valid percentage of posterior sampling of liGAN, but I got 0% valid percentage from prior sampling of liGAN. My final KL loss is around 3, which i think it is already small. I want to ask what is your final KL loss in you liGAN paper? since this loss is not reported in your results. Thank you!

    opened by yangxiufengsia 6
  • where is the output for generated molecules and matrix?

    where is the output for generated molecules and matrix?

    I just installed ligan, and ran python3 generate.py config/generate.config

    everything is fine. I think I finished the run, now I am wondering where is the output files with generated molecules? do we have some post-analysis scripts available? like evaluation matrix and score for the generated molecules? Thanks,

    opened by sll513 4
  • Error when run cmake of libmogrid

    Error when run cmake of libmogrid

    Hi, when I run cmake of libmogrid, there is an error as below:

    cmake .. \
    	-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
    	-DOPENBABEL3_INCLUDE_DIR=$CONDA_PREFIX/include/openbabel3 \
    	-DOPENBABEL3_LIBRARIES=$CONDA_PREFIX/lib/libopenbabel.so \
    	-DZLIB_LIBRARY=$CONDA_PREFIX/lib/libz.so
    
    CMake Error at /NAS/lh/software/miniconda3/envs/LiGAN/share/cmake-3.24/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
      Could not find compiler set in environment variable CXX:
    
      /NAS/lh/software/miniconda3/bin/x86_64-conda-linux-gnu-c++.
    
    Call Stack (most recent call first):
      CMakeLists.txt:2 (project)
    
    
    CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_CUDA_COMPILER not set, after EnableLanguage
    -- Configuring incomplete, errors occurred!
    See also "/NAS/lh/software/liGAN/new/libmolgrid/build/CMakeFiles/CMakeOutput.log".
    

    I don't know how to solve it. Thanks!

    opened by lh12565 3
  • tests ValueError: File does not exist: data/test_pockets/xxx

    tests ValueError: File does not exist: data/test_pockets/xxx

    ERROR tests/test_generating.py::TestGenerator::test_generator_init[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types] - ValueError: Could not open ... ERROR tests/test_generating.py::TestGenerator::test_generator_init[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types] - ValueError: Could not open f... ERROR tests/test_generating.py::TestGenerator::test_gen_forward[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types] - ValueError: Could not open fil... ERROR tests/test_generating.py::TestGenerator::test_gen_forward[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types] - ValueError: Could not open file... ERROR tests/test_generating.py::TestGenerator::test_gen_forward2[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types] - ValueError: Could not open fi... ERROR tests/test_generating.py::TestGenerator::test_gen_forward2[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types] - ValueError: Could not open fil... ERROR tests/test_generating.py::TestGenerator::test_generate[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types] - ValueError: Could not open file d... ERROR tests/test_generating.py::TestGenerator::test_generate[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types] - ValueError: Could not open file da...

    opened by zyx5256 3
  • How to use PDB of Alphafold2 to drug discovery?

    How to use PDB of Alphafold2 to drug discovery?

    Hi @mattragoza I want to use pdb of alphafold2 to find molecules. Do I only need to change two parameters: data_root and data_file in config/generate.config? Is the 'crossdock2020' the default reference files? for example:

    data_root: data/ data_file: data/alphafold.pdb

    Thanks!

    opened by lh12565 3
  • Conflict between RDKIT and conda-molgrid

    Conflict between RDKIT and conda-molgrid

    Hi, I try to install molgrid using conda-molgrid. When I finished installing molgrid, there was an error installing RDKit:

    conda install -c conda-forge rdkit
    
    Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
    Collecting package metadata (repodata.json): done
    Solving environment: failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: /
    Found conflicts! Looking for incompatible packages.
    This can take several minutes.  Press CTRL-C to abort.                           | failed
    

    I try to install rdkit from source, but there is still an error:

    make[1]: *** [Code/GraphMol/CMakeFiles/graphmoltestChirality.dir/all] Error 2
    [ 61%] Linking CXX static library libRDKitDescriptors_static.a
    [ 61%] Built target Descriptors_static
    [ 61%] Linking CXX executable graphmolMolOpsTest
    /NAS/lh/software/miniconda3/envs/molgrid/bin/../lib/gcc/x86_64-conda-linux-gnu/9.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: warning: libboost_iostreams-mt.so.1.53.0, needed by /usr/local/lib/libmaeparser.so, not found (try using -rpath or -rpath-link)
    /NAS/lh/software/miniconda3/envs/molgrid/bin/../lib/gcc/x86_64-conda-linux-gnu/9.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: warning: libboost_regex-mt.so.1.53.0, needed by /usr/local/lib/libmaeparser.so, not found (try using -rpath or -rpath-link)
    /NAS/lh/software/miniconda3/envs/molgrid/bin/../lib/gcc/x86_64-conda-linux-gnu/9.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: ../../lib/libRDKitFileParsers.so.1.2022.09.1pre: undefined reference to `schrodinger::mae::Block::getIndexedBlock(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
    /NAS/lh/software/miniconda3/envs/molgrid/bin/../lib/gcc/x86_64-conda-linux-gnu/9.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: ../../lib/libRDKitDepictor.so.1.2022.09.1pre: undefined reference to `sketcherMinimizer::setTemplateFileDir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
    /NAS/lh/software/miniconda3/envs/molgrid/bin/../lib/gcc/x86_64-conda-linux-gnu/9.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: ../../lib/libRDKitFileParsers.so.1.2022.09.1pre: undefined reference to `schrodinger::mae::Reader::next(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
    collect2: error: ld returned 1 exit status
    make[2]: *** [Code/GraphMol/graphmolMolOpsTest] Error 1
    make[1]: *** [Code/GraphMol/CMakeFiles/graphmolMolOpsTest.dir/all] Error 2
    make: *** [all] Error 2
    
    opened by lh12565 3
  • "Aborted (core dumped)" error using tutorial for Generating molecules

    I tried to follow the tutorial for generating molecules: python3 generate.py config/generate.config I got the "Aborted (core dumped)" error after the output stopped at "Getting next batch of data" for a long while: image any thought? is this due to I donot have enough memory (I have 160GB for now)

    opened by sll513 3
  • Can not access to https://bits.csb.pitt.edu/files/ to download those files

    Can not access to https://bits.csb.pitt.edu/files/ to download those files

    Excuse me, there are some problems happend when I was attempt to use sh download_weights.sh to download the model`s weights. The web(https://bits.csb.pitt.edu) appears to be out of service resulting in the inability to download the required files. Would you please check it out ? Thanks !

    opened by Hovi123123 2
  • Get killed when running generate.py

    Get killed when running generate.py

    Hi,

    I found that the code will be killed when running genreate.py image

    I debugged the code and found that the code is killed in line 330 of atom_types.py file. image

    Could you please help me solve this problem?

    Thank you very much.

    opened by Layne-Huang 2
  • Get Stuck when runing generate.py

    Get Stuck when runing generate.py

    Hi, Thanks for your amazing work and code! I followed the instructions on the github page and try to run: python3 generate.py config/generate.config However, it stuck at here for a long time image How long does it take to finish the generation procedure typically? Thanks!

    opened by zaixizhang 2
  • Errors when run pytest tests

    Errors when run pytest tests

    Hi, @mattragoza I installed LiGAN successfully. But when I run pytest tests, there is a lot of errors occurred:

    .............
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <torch.nn.utils.spectral_norm.SpectralNorm object at 0x7f2c7c6d6070>
    module = Conv3d(18, 8, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))
    do_power_iteration = True
    
        def compute_weight(self, module: Module, do_power_iteration: bool) -> torch.Tensor:
            # NB: If `do_power_iteration` is set, the `u` and `v` vectors are
            #     updated in power iteration **in-place**. This is very important
            #     because in `DataParallel` forward, the vectors (being buffers) are
            #     broadcast from the parallelized module to each module replica,
            #     which is a new module object created on the fly. And each replica
            #     runs its own spectral norm power iteration. So simply assigning
            #     the updated vectors to the module this function runs on will cause
            #     the update to be lost forever. And the next time the parallelized
            #     module is replicated, the same randomly initialized vectors are
            #     broadcast and used!
            #
            #     Therefore, to make the change propagate back, we rely on two
            #     important behaviors (also enforced via tests):
            #       1. `DataParallel` doesn't clone storage if the broadcast tensor
            #          is already on correct device; and it makes sure that the
            #          parallelized module is already on `device[0]`.
            #       2. If the out tensor in `out=` kwarg has correct shape, it will
            #          just fill in the values.
            #     Therefore, since the same power iteration is performed on all
            #     devices, simply updating the tensors in-place will make sure that
            #     the module replica on `device[0]` will update the _u vector on the
            #     parallized module (by shared storage).
            #
            #    However, after we update `u` and `v` in-place, we need to **clone**
            #    them before using them to normalize the weight. This is to support
            #    backproping through two forward passes, e.g., the common pattern in
            #    GAN training: loss = D(real) - D(fake). Otherwise, engine will
            #    complain that variables needed to do backward for the first forward
            #    (i.e., the `u` and `v` vectors) are changed in the second forward.
            weight = getattr(module, self.name + '_orig')
            u = getattr(module, self.name + '_u')
            v = getattr(module, self.name + '_v')
            weight_mat = self.reshape_weight_to_matrix(weight)
        
            if do_power_iteration:
                with torch.no_grad():
                    for _ in range(self.n_power_iterations):
                        # Spectral norm of weight equals to `u^T W v`, where `u` and `v`
                        # are the first left and right singular vectors.
                        # This power iteration produces approximations of `u` and `v`.
    >                   v = normalize(torch.mv(weight_mat.t(), u), dim=0, eps=self.eps, out=v)
    E                   RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling `cublasSgemv(handle, op, m, n, &alpha, a, lda, x, incx, &beta, y, incy)`
    
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/utils/spectral_norm.py:84: RuntimeError
    ----------------------------- Captured stdout setup ------------------------------
    Loading data
    Initializing generative model and optimizer
    Initializing prior model and optimizer
    Initializing atom fitter and bond adder
    ------------------------------ Captured stdout call ------------------------------
    Saving generative model state to tests/output/TEST_VAE2_iter_0.gen_model_state
    Saving generative solver state to tests/output/TEST_VAE2_iter_0.gen_solver_state
    Saving prior model state to tests/output/TEST_VAE2_iter_0.prior_model_state
    Saving prior solver state to tests/output/TEST_VAE2_iter_0.prior_solver_state
    Writing training metrics to tests/output/TEST_VAE2.train_metrics
    Saving generative model state to tests/output/TEST_VAE2_iter_0.gen_model_state
    Saving generative solver state to tests/output/TEST_VAE2_iter_0.gen_solver_state
    Saving prior model state to tests/output/TEST_VAE2_iter_0.prior_model_state
    Saving prior solver state to tests/output/TEST_VAE2_iter_0.prior_solver_state
    ------------------------------ Captured stderr call ------------------------------
    ==============================
    *** Open Babel Warning  in PerceiveBondOrders
      Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders (title is data/crossdock2020/1A02_HUMAN_25_199_pep_0/1eez_A_rec.pdb)
    
    _____________ TestGenerativeSolver.test_solver_train_and_test[CVAE2] _____________
    
    self = <test_training.TestGenerativeSolver object at 0x7f2d6bd5b970>
    solver = CVAE2Solver(
      (gen_model): CVAE2(
        (input_encoder): GridEncoder(
          (level0): Conv3DBlock(
            (0): Conv3DR...tures=96, out_features=128, bias=True)
          (3): LeakyReLU(negative_slope=0.1)
        )
      )
      (loss_fn): LossFunction()
    )
    train_params = {'fit_interval': 0, 'max_iter': 10, 'n_test_batches': 1, 'norm_interval': 10, ...}
    
        def test_solver_train_and_test(self, solver, train_params):
        
            max_iter = train_params['max_iter']
            test_interval = train_params['test_interval']
            n_test_batches = train_params['n_test_batches']
        
            t0 = time.time()
    >       solver.train_and_test(**train_params)
    
    tests/test_training.py:534: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    ligan/training.py:37: in wrapper
        return method(self, *args, **kwargs)
    ligan/training.py:1163: in train_and_test
        self.test_models(n_batches=n_test_batches, fit_atoms=fit_atoms)
    ligan/training.py:1056: in test_models
        self.test_model(
    ligan/training.py:1023: in test_model
        loss, metrics = self.gen_forward(
    ligan/training.py:625: in gen_forward
        self.gen_model(
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/modules/module.py:1130: in _call_impl
        return forward_call(*input, **kwargs)
    ligan/models.py:1130: in forward
        (means, log_stds), _ = self.input_encoder(inputs)
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/modules/module.py:1130: in _call_impl
        return forward_call(*input, **kwargs)
    ligan/models.py:682: in forward
        outputs = f(inputs)
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/modules/module.py:1130: in _call_impl
        return forward_call(*input, **kwargs)
    ligan/models.py:364: in forward
        outputs = f(inputs)
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/modules/module.py:1130: in _call_impl
        return forward_call(*input, **kwargs)
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/modules/container.py:139: in forward
        input = module(input)
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/modules/module.py:1137: in _call_impl
        result = hook(self, input)
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/utils/spectral_norm.py:105: in __call__
        setattr(module, self.name, self.compute_weight(module, do_power_iteration=module.training))
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    self = <torch.nn.utils.spectral_norm.SpectralNorm object at 0x7f2c7c958760>
    module = Conv3d(36, 8, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1))
    do_power_iteration = True
    
        def compute_weight(self, module: Module, do_power_iteration: bool) -> torch.Tensor:
            # NB: If `do_power_iteration` is set, the `u` and `v` vectors are
            #     updated in power iteration **in-place**. This is very important
            #     because in `DataParallel` forward, the vectors (being buffers) are
            #     broadcast from the parallelized module to each module replica,
            #     which is a new module object created on the fly. And each replica
            #     runs its own spectral norm power iteration. So simply assigning
            #     the updated vectors to the module this function runs on will cause
            #     the update to be lost forever. And the next time the parallelized
            #     module is replicated, the same randomly initialized vectors are
            #     broadcast and used!
            #
            #     Therefore, to make the change propagate back, we rely on two
            #     important behaviors (also enforced via tests):
            #       1. `DataParallel` doesn't clone storage if the broadcast tensor
            #          is already on correct device; and it makes sure that the
            #          parallelized module is already on `device[0]`.
            #       2. If the out tensor in `out=` kwarg has correct shape, it will
            #          just fill in the values.
            #     Therefore, since the same power iteration is performed on all
            #     devices, simply updating the tensors in-place will make sure that
            #     the module replica on `device[0]` will update the _u vector on the
            #     parallized module (by shared storage).
            #
            #    However, after we update `u` and `v` in-place, we need to **clone**
            #    them before using them to normalize the weight. This is to support
            #    backproping through two forward passes, e.g., the common pattern in
            #    GAN training: loss = D(real) - D(fake). Otherwise, engine will
            #    complain that variables needed to do backward for the first forward
            #    (i.e., the `u` and `v` vectors) are changed in the second forward.
            weight = getattr(module, self.name + '_orig')
            u = getattr(module, self.name + '_u')
            v = getattr(module, self.name + '_v')
            weight_mat = self.reshape_weight_to_matrix(weight)
        
            if do_power_iteration:
                with torch.no_grad():
                    for _ in range(self.n_power_iterations):
                        # Spectral norm of weight equals to `u^T W v`, where `u` and `v`
                        # are the first left and right singular vectors.
                        # This power iteration produces approximations of `u` and `v`.
    >                   v = normalize(torch.mv(weight_mat.t(), u), dim=0, eps=self.eps, out=v)
    E                   RuntimeError: CUDA error: CUBLAS_STATUS_INVALID_VALUE when calling `cublasSgemv(handle, op, m, n, &alpha, a, lda, x, incx, &beta, y, incy)`
    
    ../../../miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/nn/utils/spectral_norm.py:84: RuntimeError
    ----------------------------- Captured stdout setup ------------------------------
    Loading data
    Initializing generative model and optimizer
    Initializing prior model and optimizer
    Initializing atom fitter and bond adder
    ------------------------------ Captured stdout call ------------------------------
    Saving generative model state to tests/output/TEST_CVAE2_iter_0.gen_model_state
    Saving generative solver state to tests/output/TEST_CVAE2_iter_0.gen_solver_state
    Saving prior model state to tests/output/TEST_CVAE2_iter_0.prior_model_state
    Saving prior solver state to tests/output/TEST_CVAE2_iter_0.prior_solver_state
    Writing training metrics to tests/output/TEST_CVAE2.train_metrics
    Saving generative model state to tests/output/TEST_CVAE2_iter_0.gen_model_state
    Saving generative solver state to tests/output/TEST_CVAE2_iter_0.gen_solver_state
    Saving prior model state to tests/output/TEST_CVAE2_iter_0.prior_model_state
    Saving prior solver state to tests/output/TEST_CVAE2_iter_0.prior_solver_state
    ------------------------------ Captured stderr call ------------------------------
    ==============================
    *** Open Babel Warning  in PerceiveBondOrders
      Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders (title is data/crossdock2020/1A02_HUMAN_25_199_pep_0/1eez_A_rec.pdb)
    
    ================================ warnings summary ================================
    tests/test_atom_fitting.py: 21 warnings
    tests/test_training.py: 112 warnings
      /NAS/lh/software/miniconda3/envs/LiGAN/lib/python3.9/site-packages/torch/cuda/memory.py:278: FutureWarning: torch.cuda.reset_max_memory_allocated now calls torch.cuda.reset_peak_memory_stats, which resets /all/ peak memory stats.
        warnings.warn(
    
    tests/test_atom_grids.py::TestAtomGrid::test_get_coords
      /NAS/lh/software/liGAN/new/LiGAN/./ligan/atom_grids.py:163: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
        idx = idx // dim
    
    tests/test_models.py::test_interpolate
      /NAS/lh/software/liGAN/new/LiGAN/tests/test_models.py:50: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor').
        start_idx = (interp_step + batch_idxs) // n_samples
    
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    ============================ short test summary info =============================
    FAILED tests/test_bond_adding.py::TestBondAdding::test_make_ob_mol[oadc-tests/input/benzene.sdf]
    FAILED tests/test_bond_adding.py::TestBondAdding::test_make_ob_mol[oadc-tests/input/neopentane.sdf]
    FAILED tests/test_bond_adding.py::TestBondAdding::test_make_ob_mol[oadc-tests/input/ATP.sdf]
    FAILED tests/test_bond_adding.py::TestBondAdding::test_make_ob_mol[oadc-tests/input/4fic_C_0UL.sdf]
    FAILED tests/test_data.py::TestMolDataset::test_benchmark[False] - ValueError: ...
    FAILED tests/test_data.py::TestMolDataset::test_benchmark[True] - AssertionErro...
    FAILED tests/test_models.py::TestConv3DReLU::test_forward_cuda[Conv3DReLU] - Ru...
    FAILED tests/test_models.py::TestConv3DReLU::test_forward_cuda[TConv3DReLU] - R...
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-c-1]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-c-2]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-c-4]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-r-1]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-r-2]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-r-4]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-d-1]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-d-2]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[Conv3DBlock-d-4]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-c-1]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-c-2]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-c-4]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-r-1]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-r-2]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-r-4]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-d-1]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-d-2]
    FAILED tests/test_models.py::TestConv3DBlock::test_forward_cuda[TConv3DBlock-d-4]
    FAILED tests/test_models.py::TestGridEncoder::test_enc1_forward - RuntimeError:...
    FAILED tests/test_models.py::TestGridEncoder::test_enc1_backward0 - RuntimeErro...
    FAILED tests/test_models.py::TestGridEncoder::test_enc1_backward1 - RuntimeErro...
    FAILED tests/test_models.py::TestGridEncoder::test_enc2_forward - RuntimeError:...
    FAILED tests/test_models.py::TestGridEncoder::test_enc2_backward0 - RuntimeErro...
    FAILED tests/test_models.py::TestGridEncoder::test_enc2_backward1 - RuntimeErro...
    FAILED tests/test_models.py::TestGridDecoder::test_forward - RuntimeError: CUDA...
    FAILED tests/test_models.py::TestGridDecoder::test_backward0 - RuntimeError: CU...
    FAILED tests/test_models.py::TestGridDecoder::test_backward1 - RuntimeError: CU...
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[AE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[AE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[CE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[CE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[VAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[VAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[CVAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[CVAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[GAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[GAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[CGAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[CGAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[VAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[VAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[CVAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_poster[CVAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[AE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[AE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[CE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[CE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[VAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[VAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[CVAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[CVAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[GAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[GAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[CGAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[CGAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[VAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[VAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[CVAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_forward_prior[CVAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[AE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[AE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[CE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[CE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[VAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[VAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[CVAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[CVAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[GAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[GAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[CGAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[CGAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[VAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[VAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[CVAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster0[CVAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[AE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[AE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[CE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[CE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[VAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[VAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[CVAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[CVAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[GAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[GAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[CGAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[CGAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[VAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[VAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[CVAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_poster1[CVAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[AE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[AE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[CE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[CE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[VAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[VAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[CVAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[CVAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[GAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[GAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[CGAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[CGAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[VAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[VAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[CVAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior0[CVAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[AE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[AE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[CE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[CE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[VAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[VAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[CVAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[CVAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[GAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[GAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[CGAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[CGAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[VAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[VAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[CVAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_backward_prior1[CVAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[AE-0-c-0] - ...
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[AE-1-c-0] - ...
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[CE-0-c-0] - ...
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[CE-1-c-0] - ...
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[VAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[VAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[CVAE-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[CVAE-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[GAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[GAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[CGAN-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[CGAN-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[VAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[VAE2-1-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[CVAE2-0-c-0]
    FAILED tests/test_models.py::TestGridGenerator::test_gen_benchmark[CVAE2-1-c-0]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster2[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_poster2[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior2[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_forward_prior2[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_real[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_real[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_real[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_real[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_poster[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_poster[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_prior[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_prior[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_prior[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_forward_prior[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_prior[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_prior[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_prior[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_prior[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_prior[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_prior[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster2[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_poster2[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_backward_prior2[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_real[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_real[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_real[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_real[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_poster[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_poster[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_prior[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_prior[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_prior[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_backward_prior[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_poster[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_poster[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_poster[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_poster[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_poster[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_poster[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_poster[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_poster[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_prior[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_prior[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_prior[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_prior[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_prior[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_gen_step_prior[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_real[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_real[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_real[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_real[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_poster[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_poster[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_prior[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_prior[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_prior[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_disc_step_prior[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[AE] - Ru...
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[CE] - Ru...
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[VAE] - R...
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[CVAE] - ...
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[GAN] - R...
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[CGAN] - ...
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[VAE2] - ...
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_state[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_disc[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_disc[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_disc[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_disc[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_gen_fit[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_test_models[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_gen[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_disc[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_disc[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_disc[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_disc[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_models_noup[CVAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[AE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[CE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[VAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[CVAE]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[GAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[CGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[VAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[CVAEGAN]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[VAE2]
    FAILED tests/test_training.py::TestGenerativeSolver::test_solver_train_and_test[CVAE2]
    ERROR tests/test_data.py::TestAtomGridData::test_data_init[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_init[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_find_real_mol[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_find_real_mol[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_forward[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_forward[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_split[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_split[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_no_transform - ValueError...
    ERROR tests/test_data.py::TestAtomGridData::test_data_rand_rotate - ValueError:...
    ERROR tests/test_data.py::TestAtomGridData::test_data_rand_translate - ValueErr...
    ERROR tests/test_data.py::TestAtomGridData::test_data_diff_cond_transform - Val...
    ERROR tests/test_data.py::TestAtomGridData::test_data_consecutive - ValueError:...
    ERROR tests/test_data.py::TestAtomGridData::test_data_benchmark[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_data.py::TestAtomGridData::test_data_benchmark[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ERROR tests/test_generating.py::TestGenerator::test_generator_init[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_generating.py::TestGenerator::test_generator_init[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ERROR tests/test_generating.py::TestGenerator::test_gen_forward[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_generating.py::TestGenerator::test_gen_forward[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ERROR tests/test_generating.py::TestGenerator::test_gen_forward2[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_generating.py::TestGenerator::test_gen_forward2[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ERROR tests/test_generating.py::TestGenerator::test_generate[data/test_pockets/AROK_MYCTU_1_176_0/fixed_input_1zyu_A_rec_mutants.types]
    ERROR tests/test_generating.py::TestGenerator::test_generate[data/test_pockets/AROK_MYCTU_1_176_0/fixed_cond_1zyu_A_rec_mutants.types]
    ====== 316 failed, 599 passed, 135 warnings, 23 errors in 210.03s (0:03:30) ======
    

    I don't know if it's a cuda issue. Thanks!

    opened by lh12565 12
  • change configuration file for prior (no lig) sampling

    change configuration file for prior (no lig) sampling

    I found that the default generate.config file provided is for posterior sampling (with ligand) https://github.com/mattragoza/LiGAN/blob/master/config/generate.config

    What parameter(s) I need to change for prior (no lig) sampling as input file I need to provide has ligand information? "prior"? "post_factor"? anything else? Thanks,

    a sample prior generate.config file is appreciated

    opened by sll513 1
  • AttributeError: type object 'object' has no attribute 'dtype'

    AttributeError: type object 'object' has no attribute 'dtype'

    Excuse me, when I use the command python3 generate.py config/generate.config. It appears a problem as follows: Traceback (most recent call last): File "generate.py", line 48, in main(sys.argv[1:]) File "generate.py", line 41, in main debug=args.debug, File "/da1/home/changhaoyu/liGAN/liGAN/generating.py", line 98, in init **output_kws, File "/da1/home/changhaoyu/liGAN/liGAN/generating.py", line 671, in init self.metrics = pd.DataFrame(columns=columns).set_index(columns) File "/home/changhaoyu/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/core/frame.py", line 392, in init mgr = init_dict(data, index, columns, dtype=dtype) File "/home/changhaoyu/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/core/internals/construction.py", line 196, in init_dict nan_dtype) File "/home/changhaoyu/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/core/dtypes/cast.py", line 1175, in construct_1d_arraylike_from_scalar dtype = dtype.dtype AttributeError: type object 'object' has no attribute 'dtype' How can I solve it?

    Originally posted by @Matheo-Chang in https://github.com/mattragoza/LiGAN/issues/36#issuecomment-1178787379

    opened by mattragoza 9
Owner
Matt Ragoza
PhD student, Intelligent Systems Program, Pitt SCI
Matt Ragoza
OOD Dataset Curator and Benchmark for AI-aided Drug Discovery

?? DrugOOD ?? : OOD Dataset Curator and Benchmark for AI Aided Drug Discovery This is the official implementation of the DrugOOD project, this is the

null 108 Dec 17, 2022
source code for https://arxiv.org/abs/2005.11248 "Accelerating Antimicrobial Discovery with Controllable Deep Generative Models and Molecular Dynamics"

Accelerating Antimicrobial Discovery with Controllable Deep Generative Models and Molecular Dynamics This work will be published in Nature Biomedical

International Business Machines 71 Nov 15, 2022
A Python framework for developing parallelized Computational Fluid Dynamics software to solve the hyperbolic 2D Euler equations on distributed, multi-block structured grids.

pyHype: Computational Fluid Dynamics in Python pyHype is a Python framework for developing parallelized Computational Fluid Dynamics software to solve

Mohamed Khalil 21 Nov 22, 2022
This is the repo for the paper `SumGNN: Multi-typed Drug Interaction Prediction via Efficient Knowledge Graph Summarization'. (published in Bioinformatics'21)

SumGNN: Multi-typed Drug Interaction Prediction via Efficient Knowledge Graph Summarization This is the code for our paper ``SumGNN: Multi-typed Drug

Yue Yu 58 Dec 21, 2022
Cancer Drug Response Prediction via a Hybrid Graph Convolutional Network

DeepCDR Cancer Drug Response Prediction via a Hybrid Graph Convolutional Network This work has been accepted to ECCB2020 and was also published in the

Qiao Liu 50 Dec 18, 2022
Multi-modal co-attention for drug-target interaction annotation and Its Application to SARS-CoV-2

CoaDTI Multi-modal co-attention for drug-target interaction annotation and Its Application to SARS-CoV-2 Abstract Environment The test was conducted i

Layne_Huang 7 Nov 14, 2022
The code for SAG-DTA: Prediction of Drug–Target Affinity Using Self-Attention Graph Network.

SAG-DTA The code is the implementation for the paper 'SAG-DTA: Prediction of Drug–Target Affinity Using Self-Attention Graph Network'. Requirements py

Shugang Zhang 7 Aug 2, 2022
This is the implementation of "SELF SUPERVISED REPRESENTATION LEARNING WITH DEEP CLUSTERING FOR ACOUSTIC UNIT DISCOVERY FROM RAW SPEECH" submitted to ICASSP 2022

CPC_DeepCluster This is the implementation of "SELF SUPERVISED REPRESENTATION LEARNING WITH DEEP CLUSTERING FOR ACOUSTIC UNIT DISCOVERY FROM RAW SPEEC

LEAP Lab 2 Sep 15, 2022
Minimal PyTorch implementation of Generative Latent Optimization from the paper "Optimizing the Latent Space of Generative Networks"

Minimal PyTorch implementation of Generative Latent Optimization This is a reimplementation of the paper Piotr Bojanowski, Armand Joulin, David Lopez-

Thomas Neumann 117 Nov 27, 2022
Deep generative modeling for time-stamped heterogeneous data, enabling high-fidelity models for a large variety of spatio-temporal domains.

Neural Spatio-Temporal Point Processes [arxiv] Ricky T. Q. Chen, Brandon Amos, Maximilian Nickel Abstract. We propose a new class of parameterizations

Facebook Research 75 Dec 19, 2022
Bayesian Image Reconstruction using Deep Generative Models

Bayesian Image Reconstruction using Deep Generative Models R. Marinescu, D. Moyer, P. Golland For technical inquiries, please create a Github issue. F

Razvan Valentin Marinescu 51 Nov 23, 2022
Official repository for the ICLR 2021 paper Evaluating the Disentanglement of Deep Generative Models with Manifold Topology

Official repository for the ICLR 2021 paper Evaluating the Disentanglement of Deep Generative Models with Manifold Topology Sharon Zhou, Eric Zelikman

Stanford Machine Learning Group 34 Nov 16, 2022
Finding an Unsupervised Image Segmenter in each of your Deep Generative Models

Finding an Unsupervised Image Segmenter in each of your Deep Generative Models Description Recent research has shown that numerous human-interpretable

Luke Melas-Kyriazi 61 Oct 17, 2022
DeepCAD: A Deep Generative Network for Computer-Aided Design Models

DeepCAD This repository provides source code for our paper: DeepCAD: A Deep Generative Network for Computer-Aided Design Models Rundi Wu, Chang Xiao,

Rundi Wu 85 Dec 31, 2022
TAug :: Time Series Data Augmentation using Deep Generative Models

TAug :: Time Series Data Augmentation using Deep Generative Models Note!!! The package is under development so be careful for using in production! Fea

null 35 Dec 6, 2022
A method that utilized Generative Adversarial Network (GAN) to interpret the black-box deep image classifier models by PyTorch.

A method that utilized Generative Adversarial Network (GAN) to interpret the black-box deep image classifier models by PyTorch.

Yunxia Zhao 3 Dec 29, 2022
MMGeneration is a powerful toolkit for generative models, based on PyTorch and MMCV.

Documentation: https://mmgeneration.readthedocs.io/ Introduction English | 简体中文 MMGeneration is a powerful toolkit for generative models, especially f

OpenMMLab 1.3k Dec 29, 2022
Generative Models for Graph-Based Protein Design

Graph-Based Protein Design This repo contains code for Generative Models for Graph-Based Protein Design by John Ingraham, Vikas Garg, Regina Barzilay

John Ingraham 159 Dec 15, 2022
Generative Autoregressive, Normalized Flows, VAEs, Score-based models (GANVAS)

GANVAS-models This is an implementation of various generative models. It contains implementations of the following: Autoregressive Models: PixelCNN, G

MRSAIL (Mini Robotics, Software & AI Lab) 6 Nov 26, 2022