Closed protbiochem closed 2 years ago
Hey @protbiochem, nice to hear you've been using DeeplyTough for a while. This output is actually a warning and doesn't indicate failure – its actually openbabel complaining about the PDB format. Is there an error message?
*** Open Babel Warning in PerceiveBondOrders Failed to kekulize aromatic bonds in OBMol::PerceiveBondOrders (title is /uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/datasets/custom/1a9t/1a9t_clean.pdb)
1 molecule converted
setting PYTHONHOME environment
adding gasteiger charges to peptide
ERROR:misc.utils:No module named 'mdtraj'
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 158, in htmd_featurizer
compute_channels()
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 145, in compute_channels
mol = htmdmol.Molecule(pdbqt_path)
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 237, in init
self.read(filename, **kwargs)
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 896, in read
from htmd.simlist import Sim, Frame
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/simlist.py", line 403, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 167, in htmd_featurizer
compute_channels()
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 145, in compute_channels
mol = htmdmol.Molecule(pdbqt_path)
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 237, in init
self.read(filename, **kwargs)
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 896, in read
from htmd.simlist import Sim, Frame
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/simlist.py", line 403, in
Hey @protbiochem, yep this is a common error so might be worth looking at other issues (#1 #4). This error indicates that the HTMD output files could not be found/generated, have you added --db_preprocessing 1
to the command line input as per the README
?
You could also check whether .npz
files are created in the file directory (if you delete existing ones, they should be recreated).
To me it seems like the issue has to do with openbabel not working, hence all the errors in the beginning. It seems to me that it can't read the PDB file. I've installed Deeplytough exactly as you indicated, with the only exception being I used conda to install openbabel instead of apt-get. Do you think this could have caused the problem?
Hey @protbiochem, that could be the case but it shouldn't be a problem to install conda
vs apt-get
. Usually the openbabel warnings are non-critical. Please try running with the db_preprocessing flag:
python $DEEPLYTOUGH/deeplytough/scripts/custom_evaluation.py --dataset_subdir 'custom' --output_dir $DEEPLYTOUGH/results --device 'cpu' --nworkers 4 --net $DEEPLYTOUGH/networks/deeplytough_toughm1_test.pth.tar --db_preprocessing 1
Even when I try that input, I get a very similar output as before
setting PYTHONHOME environment adding gasteiger charges to peptide Some components of HTMD are now deactivated. Update with 'conda update htmd -c acellera' Visit https://software.acellera.com for more information ERROR:misc.utils:Could not parse selection "protein". Is the selection a valid V MD atom selection? Traceback (most recent call last): File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learnin g_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 1 58, in htmd_featurizer compute_channels() File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learnin g_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 1 46, in compute_channels mol.filter('protein') # take only on-chain atoms File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/ python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 66 4, in filter s = self.atomselect(sel) File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/ python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 63 0, in atomselect occupancy=self.occupancy, bonds=self._getBonds(fileBonds, guessBonds)) File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/ python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/vmdparser.py", line 1 60, in vmdselection raise NameError('Could not parse selection "' + selection + '". Is the selec tion a valid VMD atom selection?') NameError: Could not parse selection "protein". Is the selection a valid VMD ato m selection?
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learnin g_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 1 67, in htmd_featurizer compute_channels() File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learnin g_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 1 46, in compute_channels mol.filter('protein') # take only on-chain atoms File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/ python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 66 4, in filter s = self.atomselect(sel) File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/ python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 63 0, in atomselect occupancy=self.occupancy, bonds=self._getBonds(fileBonds, guessBonds)) File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/ python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/vmdparser.py", line 1 60, in vmdselection raise NameError('Could not parse selection "' + selection + '". Is the selec tion a valid VMD atom selection?') NameError: Could not parse selection "protein". Is the selection a valid VMD ato m selection? INFO:misc.utils:Pre-processing /uufs/chpc.utah.edu/common/home/u1261874/storage/ Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/datasets/cu stom/1a9t/1a9t_clean.pdb with HTMD... setting PYTHONHOME environment adding gasteiger charges to peptide Some components of HTMD are now deactivated. Update with 'conda update htmd -c acellera' Visit https://software.acellera.com for more information 1 molecule converted setting PYTHONHOME environment adding gasteiger charges to peptide Some components of HTMD are now deactivated. Update with 'conda update htmd -c acellera' Visit https://software.acellera.com for more information ERROR:misc.utils:Could not parse selection "protein". Is the selection a valid VMD atom selection? Traceback (most recent call last): File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 158, in htmd_featurizer compute_channels() File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 146, in compute_channels mol.filter('protein') # take only on-chain atoms File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 664, in filter s = self.atomselect(sel) File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 630, in atomselect occupancy=self.occupancy, bonds=self._getBonds(fileBonds, guessBonds)) File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/vmdparser.py", line 160, in vmdselection raise NameError('Could not parse selection "' + selection + '". Is the selection a valid VMD atom selection?') NameError: Could not parse selection "protein". Is the selection a valid VMD atom selection?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 167, in htmd_featurizer
compute_channels()
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 146, in compute_channels
mol.filter('protein') # take only on-chain atoms
File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 664, in filter
s = self.atomselect(sel)
File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/molecule.py", line 630, in atomselect
occupancy=self.occupancy, bonds=self._getBonds(fileBonds, guessBonds))
File "/uufs/chpc.utah.edu/common/home/u1261874/anaconda3/envs/deeplytough/lib/python3.6/site-packages/htmd-0.0.0-py3.6.egg/htmd/molecule/vmdparser.py", line 160, in vmdselection
raise NameError('Could not parse selection "' + selection + '". Is the selection a valid VMD atom selection?')
NameError: Could not parse selection "protein". Is the selection a valid VMD atom selection?
Total number of parameters: 390512
VoxelNetwork(
(0): GatedBlock(
(gate_act): ScalarActivation()
(conv): SE3BNConvolution (SE3Kernel ([(8, 0)] -> [(16, 0), (16, 1), (16, 2), (16, 3), (48, 0)], size=7), eps=1e-05, momentum=0.1)
)
(1): GatedBlock(
(scalar_act): ScalarActivation()
(gate_act): ScalarActivation()
(conv): SE3BNConvolution (SE3Kernel ([(16, 0), (16, 1), (16, 2), (16, 3)] -> [(32, 0), (32, 1), (32, 2), (32, 3), (96, 0)], size=3), eps=1e-05, momentum=0.1)
)
(2): GatedBlock(
(scalar_act): ScalarActivation()
(gate_act): ScalarActivation()
(conv): SE3BNConvolution (SE3Kernel ([(32, 0), (32, 1), (32, 2), (32, 3)] -> [(48, 0), (48, 1), (48, 2), (48, 3), (144, 0)], size=3), eps=1e-05, momentum=0.1)
)
(3): GatedBlock(
(scalar_act): ScalarActivation()
(gate_act): ScalarActivation()
(conv): SE3BNConvolution (SE3Kernel ([(48, 0), (48, 1), (48, 2), (48, 3)] -> [(64, 0), (64, 1), (64, 2), (64, 3), (192, 0)], size=3), eps=1e-05, momentum=0.1)
)
(4): GatedBlock(
(conv): SE3BNConvolution (SE3Kernel ([(64, 0), (64, 1), (64, 2), (64, 3)] -> [(256, 0)], size=3), eps=1e-05, momentum=0.1)
)
(5): ReLU(inplace)
(6): BatchNorm3d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(7): Conv3d(256, 128, kernel_size=(1, 1, 1), stride=(1, 1, 1))
)
2it [00:00, 41.03it/s]
WARNING:root:HTMD featurization file not found: /uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/datasets/processed/htmd/custom/1a05B/1a05B.npz,corresponding pdb likely could not be parsed
WARNING:root:HTMD featurization file not found: /uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/datasets/processed/htmd/custom/1a9t/1a9t_clean.npz,corresponding pdb likely could not be parsed
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/scripts/custom_evaluation.py", line 69, in
Hey @protbiochem, thanks for the extended stack trace and apologies for the delay. This is much more clarifying.
"NameError: Could not parse selection "protein". Is the selection a valid VMD atom selection?"
.I am still working on a good solution, but to confirm the above you could:
pdbqt
files are created and can be loaded into pymol (this proves that openbabel is doing its job)line 146
in deeplytough/misc/utils.py
:
mol.filter('protein') # take only on-chain atom
This will be safe if there are no waters/metals/ligands in your input file.
Cheers, J.
Hey @protbiochem, I have opened a PR with fixes for your bug thanks for reporting: https://github.com/BenevolentAI/DeeplyTough/pull/14
If you want to try and run the code in the fork (https://github.com/JoshuaMeyers/DeeplyTough), I have updated misc/utils.py
with changes that should solve your issue along with the installation of the additional requirements in requirements.txt via pip.
I will merge on Sunday if I don't hear back. Thanks again
After reinstalling everything, it seemed to go much better, but still ended in an error, granted it was a different error here is the output from running the example dataset from the custom evaluation
HTMD: Logging setup failed
INFO:misc.utils:Pre-processing /uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/datasets/custom/1a05B/1a05B.pdb with HTMD...
setting PYTHONHOME environment
adding gasteiger charges to peptide
ERROR:misc.utils:numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 200, in htmd_featurizer
compute_channels()
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/misc/utils.py", line 164, in compute_channels
mol = htmdmol.Molecule(pdbqt_path)
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/lib/python3.7/site-packages/htmd-0.0.0-py3.7.egg/htmd/molecule/molecule.py", line 237, in init
self.read(filename, kwargs)
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/lib/python3.7/site-packages/htmd-0.0.0-py3.7.egg/htmd/molecule/molecule.py", line 896, in read
from htmd.simlist import Sim, Frame
File "/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/lib/python3.7/site-packages/htmd-0.0.0-py3.7.egg/htmd/simlist.py", line 403, in
Hey @protbiochem, glad to see a different issue. Could you try reinstalling numpy as per https://stackoverflow.com/questions/66060487/valueerror-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-exp
pip uninstall numpy
pip install numpy==1.19.2
Thank you for helping me. A different issue has arisen
python $DEEPLYTOUGH/deeplytough/scripts/custom_evaluation.py --dataset_subdir 'custom' --output_dir $DEEPLYTOUGH/results --device 'cpu' --nworkers 4 --db_preprocessing 1 --net $DEEPLYTOUGH/networks/deeplytough_toughm1_test.pth.tar
HTMD: Logging setup failed
Total number of parameters: 390512
VoxelNetwork(
(0): GatedBlock(
(gate_act): ScalarActivation()
(conv): SE3BNConvolution (SE3Kernel ([(8, 0)] -> [(16, 0), (16, 1), (16, 2), (16, 3), (48, 0)], size=7), eps=1e-05, momentum=0.1)
)
(1): GatedBlock(
(scalar_act): ScalarActivation()
(gate_act): ScalarActivation()
(conv): SE3BNConvolution (SE3Kernel ([(16, 0), (16, 1), (16, 2), (16, 3)] -> [(32, 0), (32, 1), (32, 2), (32, 3), (96, 0)], size=3), eps=1e-05, momentum=0.1)
)
(2): GatedBlock(
(scalar_act): ScalarActivation()
(gate_act): ScalarActivation()
(conv): SE3BNConvolution (SE3Kernel ([(32, 0), (32, 1), (32, 2), (32, 3)] -> [(48, 0), (48, 1), (48, 2), (48, 3), (144, 0)], size=3), eps=1e-05, momentum=0.1)
)
(3): GatedBlock(
(scalar_act): ScalarActivation()
(gate_act): ScalarActivation()
(conv): SE3BNConvolution (SE3Kernel ([(48, 0), (48, 1), (48, 2), (48, 3)] -> [(64, 0), (64, 1), (64, 2), (64, 3), (192, 0)], size=3), eps=1e-05, momentum=0.1)
)
(4): GatedBlock(
(conv): SE3BNConvolution (SE3Kernel ([(64, 0), (64, 1), (64, 2), (64, 3)] -> [(256, 0)], size=3), eps=1e-05, momentum=0.1)
)
(5): ReLU(inplace)
(6): BatchNorm3d(256, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
(7): Conv3d(256, 128, kernel_size=(1, 1, 1), stride=(1, 1, 1))
)
2it [00:00, 90.72it/s]
INFO:engine.datasets:Dataset size: 2
0%| | 0/1 [00:00<?, ?it/s]/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/envs/deeplytough/lib/python3.6/site-packages/torch/utils/checkpoint.py:21: UserWarning: None of the inputs have requires_grad=True. Gradients will be None
warnings.warn("None of the inputs have requires_grad=True. Gradients will be None")
/uufs/chpc.utah.edu/common/home/u1261874/software/pkg/miniconda3/envs/deeplytough/lib/python3.6/site-packages/torch/nn/functional.py:1332: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
100%|████████████████████████████████████████████████| 1/1 [00:13<00:00, 13.24s/it]
1it [00:00, 2015.52it/s]
Traceback (most recent call last):
File "/uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/deeplytough/scripts/custom_evaluation.py", line 69, in
Hey @byustudent, thanks for the message. This error is due to a known bug if you only have one pair in your input csv (the np.squeeze()
function removes too many dimensions from the 'scores'). I will try to get a fix for this but in the meantime the quick fix is to make sure you are at least comparing two pairs (it can be the same pair twice).
I've been using DeeplyTough for a while now, and recently our lab changed computers. I've been having issues with getting DeeplyTough to work on the new computer. I've been using the command python $DEEPLYTOUGH/deeplytough/scripts/custom_evaluation.py --dataset_subdir 'custom' --output_dir $DEEPLYTOUGH/results --device 'cpu' --nworkers 4 --net $DEEPLYTOUGH/networks/deeplytough_toughm1_test.pth.tar to initiate the comparison, and I've been using the sample dataset provided, but I can't seem to get it to work.
This is the output I've been getting
HTMD: Logging setup failed INFO:misc.utils:Pre-processing /uufs/chpc.utah.edu/common/home/u1261874/storage/Nathan/research/learning_programs/DeeplyTough_new/DeeplyTough-master/datasets/custom/1a05B/1a05B.pdb with HTMD... setting PYTHONHOME environment adding gasteiger charges to peptide
*** Open Babel Warning in parseAtomRecord WARNING: Problems reading a PDB file Problems reading a HETATM or ATOM record. According to the PDB specification, columns 77-78 should contain the element symbol of an atom. but OpenBabel found ' ' (atom 1)
*** Open Babel Warning in parseAtomRecord WARNING: Problems reading a PDB file Problems reading a HETATM or ATOM record. According to the PDB specification, columns 77-78 should contain the element symbol of an atom. but OpenBabel found ' ' (atom 2)
*** Open Babel Warning in parseAtomRecord WARNING: Problems reading a PDB file Problems reading a HETATM or ATOM record. According to the PDB specification, columns 77-78 should contain the element symbol of an atom. but OpenBabel found ' ' (atom 3)
*** Open Babel Warning in parseAtomRecord WARNING: Problems reading a PDB file Problems reading a HETATM or ATOM record. According to the PDB specification, columns 77-78 should contain the element symbol of an atom. but OpenBabel found ' ' (atom 4)
*** Open Babel Warning in parseAtomRecord WARNING: Problems reading a PDB file Problems reading a HETATM or ATOM record. According to the PDB specification, columns 77-78 should contain the element symbol of an atom. but OpenBabel found ' ' (atom 5)
*** Open Babel Warning in parseAtomRecord WARNING: Problems reading a PDB file Problems reading a HETATM or ATOM record. According to the PDB specification, columns 77-78 should contain the element symbol of an atom. but OpenBabel found ' ' (atom 6)
*** Open Babel Warning in parseAtomRecord WARNING: Problems reading a PDB file Problems reading a HETATM or ATOM record. According to the PDB specification, columns 77-78 should contain the element symbol of an atom.