1.5 Fix protein structure of tutorial cannot find "check_structure"
Closed this issue · 8 comments
Hi, could you please paste the result of the conda list
command in your shell terminal? It seems that the building block is not able to find the check_structure binary which should be installed in the conda environment. Could you also check that the command check_structure
is not found in your shell terminal, with the conda environment activated?
I have the conda environment biobb_MDsetup_tutorial activated and I have selected the corresponding Python kernel for this env.
check_structure
works as expected on the command line in ~/software/biobb_wf_md_setup/biobb_wf_md_setup/notebooks
,
~/software/biobb_wf_md_setup/biobb_wf_md_setup
, and
~/software/biobb_wf_md_setup
.
The returned command in the error message in the first message works on the command line:
check_structure -i 1AKI.pdb -o 1AKI_fixed.pdb --force_save fixside --fix ALL
I was able to read the 'fixed" pdb from the notebook and carry on with the remaining steps using gromacs 2019-2 installed via macports.
===============================================================================
= MDWeb structure checking utility v1.1 =
= A. Hospital, P. Andrio, J.L. Gelpi 2018-20 =
===============================================================================
Warning: sequence features only available in mmCIF format or with external fasta input
Structure 1AKI.pdb loaded
Title:
Experimental method: unknown
Resolution: 0.0 A
Num. models: 1
Num. chains: 1 (A: Protein)
Num. residues: 129
Num. residues with ins. codes: 0
Num. HETATM residues: 0
Num. ligands or modified residues: 0
Num. water mol.: 0
Num. atoms: 1001
Running fixside. Options: --fix ALL
No residues with missing or unknown side chain atoms found
Structure not modified, saving due to --force_save option
Final Num. models: 1
Final Num. chains: 1 (A: Protein)
Final Num. residues: 129
Final Num. residues with ins. codes: 0
Final Num. HETATM residues: 0
Final Num. ligands or modified residues: 0
Final Num. water mol.: 0
Final Num. atoms: 1001
Structure saved on 1AKI_fixed.pdb
The output file looks fine.
The list of conda envs is as follows:
# conda environments:
#
/Applications/PyMOL.app/Contents
/Users/blaine/.julia/conda/3
/Users/blaine/Library/r-miniconda
/Users/blaine/Library/r-miniconda/envs/r-reticulate
/Users/blaine/software/EMAN2
/Users/blaine/software/amber18/miniconda
base * /opt/anaconda
amber20 /opt/anaconda/envs/amber20
bayesian-modelling-tutorial /opt/anaconda/envs/bayesian-modelling-tutorial
biobb_MDsetup_tutorial /opt/anaconda/envs/biobb_MDsetup_tutorial
cctbx37 /opt/anaconda/envs/cctbx37
chemprop38 /opt/anaconda/envs/chemprop38
cling /opt/anaconda/envs/cling
dask-tutorial /opt/anaconda/envs/dask-tutorial
dc23py36 /opt/anaconda/envs/dc23py36
dc23py37 /opt/anaconda/envs/dc23py37
diffypy38 /opt/anaconda/envs/diffypy38
doepipeline /opt/anaconda/envs/doepipeline
gpflowopt36 /opt/anaconda/envs/gpflowopt36
jL37 /opt/anaconda/envs/jL37
labx /opt/anaconda/envs/labx
masif27 /opt/anaconda/envs/masif27
numpyro37 /opt/anaconda/envs/numpyro37
oepython /opt/anaconda/envs/oepython
pymc3_resources /opt/anaconda/envs/pymc3_resources
pymolconda /opt/anaconda/envs/pymolconda
pyropy37 /opt/anaconda/envs/pyropy37
tf2py37 /opt/anaconda/envs/tf2py37
xarray /opt/anaconda/envs/xarray
/opt/intel/intelpython3
Hello,
I'm Pau Andrio one of the developers of the Biobbs. First of all thank you for using our library, and reporting the problems.
We don't know why the check_structure command is not found but we have a theory right now, however we need more information:
The theory:
My suspicion is that in your terminal the command conda activate biobb_MDsetup_tutorial Has two main functions:
1st Change your Python executable to: /opt/anaconda/envs/biobb_wf_md_setup/bin/python
2nd Add the /opt/anaconda/envs/biobb_wf_md_setup/bin/ to your PATH env var
And its possible, that if the jupyter server is executed in a terminal where the environment is not activated and the kernel is changed inside the notebook using the menu Kernel -> Change Kernel, you are changing your Python executable but you are not adding environment bin directory to your PATH.
To test this theory, please open a new terminal:
#Activate the environment:
conda activate biobb_MDsetup_tutorial
#Inside the same terminal run the jupyter-notebook server:
jupyter-notebook ~/software/biobb_wf_md_setup/notebooks/biobb_MDsetup_tutorial.ipynb
#Check or change if needed the Kernel: menu Kernel -> Change Kernel
#Run this code in a new code cell: (please send us the output)
import os
print(os.environ.get('PATH'))
And finally run the rest of the workflow.
Hope this helps to solve your problem,
Regards,
Pau Andrio
Hi Pau,
Thank you for your help!
The output of print(os.environ.get('PATH'))
is as follows:
/opt/anaconda/envs/biobb_MDsetup_tutorial/bin:/opt/anaconda/condabin:/Users/blaine/.opam/default/bin:/Users/blaine/.nvm/versions/node/v12.19.0/bin:/Applications/phenix-1.19rc5-4047/build/bin:/Users/blaine/software/ccpem-1.5.0/bin:/Applications/arp_warp_8.0/bin/bin-x86_64-Darwin:/Applications/ccp4-7.1/etc:/Applications/ccp4-7.1/bin:/Users/blaine/software/amber18:/opt/local/bin:/Users/blaine/bin:/Users/blaine/Library/Python/3.7/bin:/Users/blaine/Library/Python/3.8/bin:/usr/local/bin:/Users/blaine/.julia/bin:/opt/local/include:/opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin:/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin:/opt/local/Library/Frameworks/Python.framework/Versions/3.6/bin:/opt/local/Library/Frameworks/Python.framework/Versions/3.5/bin:/opt/local/libexec/gnubin:/Users/blaine/ffx-1.0.0-beta/bin:/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/Library/Frameworks/R.framework/Libraries:/Applications/calibre.app/Contents/MacOS:/Applications/ccp4-7.1/lib:/Applications/ccp4-7.1:/usr/local/Cellar:/Users/blaine/ATSAS-3.0.2-0/bin:/usr/local/charmm/bin:/usr/local/go/bin:/Users/blaine/software/amber18/bin:/opt/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/blaine/.gem/ruby/2.3.0/bin:/Applications/ATSAS/bin:/Applications/ATSAS/lib:/Applications/ATSAS/share:/Users/software/prody/scripts:/Users/blaine/software/XDS:/Users/blaine/software/xdsme/bin/noarch:/usr/local:/Users/blaine/.cask/bin:/Users/blaine/software/doconce/bin:/Users/blaine/software/rna-pdb-tools/bin:/Users/blaine/software/dock6/bin:/Users/blaine/software/apache-maven-3.5.2/bin:/usr/local/bin/R:/Users/blaine/software/x3dna-v2.3/bin:/Users/blaine/software/curves+:/Users/blaine/software/rna-pdb-tools:/Users/blaine/software/dakota-6.11.0/bin:/Users/blaine/software/dakota-6.11.0/share/dakota/test:/Users/blaine/software/dakota-6.11.0/gui/Contents/MacOS:/Users/blaine/software/Judy-master:/Library/TeX/texbin:/Users/blaine/.gem/ruby/2.6.0/bin
Note that I had to run the following command to open the notebook.
jupyter-notebook /Users/blaine/software/biobb_wf_md_setup/biobb_wf_md_setup/notebooks/biobb_MDsetup_tutorial.ipynb```
`biobb_wf_md_setup` is nested inside of `notebook. biobb_wf_md_setup`.
I had downloaded it by `git clone`.
When I run `!which check_structure` in a cell, I get "check_structure not found"
The property `path_check_structure` in the method FixSideChain() seems to be misset.
The path to `check_structure` on my computer is
```bash
/opt/anaconda/envs/biobb_MDsetup_tutorial/bin/check_structure
Best regards,
Blaine
OK Right now I'm completely lost..
Could you please replace this cell:
# Check & Fix PDB
# Import module
from biobb_model.model.fix_side_chain import FixSideChain
# Create prop dict and inputs/outputs
fixed_pdb = pdbCode + '_fixed.pdb'
# Create and launch bb
FixSideChain(input_pdb_path=downloaded_pdb, output_pdb_path=fixed_pdb).launch()
By this other cell:
# Check & Fix PDB
# Import module
from biobb_model.model.fix_side_chain import FixSideChain
# Create prop dict and inputs/outputs
fixed_pdb = pdbCode + '_fixed.pdb'
prop = {
'check_structure_path': '/opt/anaconda/envs/biobb_MDsetup_tutorial/bin/check_structure'
}
# Create and launch bb
FixSideChain(input_pdb_path=downloaded_pdb, output_pdb_path=fixed_pdb, properties=prop).launch()
That should force the BB to use the correct path to check_structure.
Regards,
Pau Andrio
This issue is stale because it has been open for 30 days with no activity. If there is no more activity in the following 14 days it will be automatically closed.
This issue was closed because it has been inactive for 14 days since being marked as stale.