CoCalc Public Filesplip / test-plip.ipynbOpen with one click!
Author: Harald Schilly
Views : 64
Compute Environment: Ubuntu 18.04 (Deprecated)

PLIP, locally installed

Python 2, Ubuntu Linux Kernel

Notes about setting up PLIP in a CoCalc project

  1. create terminal file
  2. mkdir plip and cd plip
  3. open ~/.bashrc and then at the bottom: alias plip='~/pliptool/plip/plipcmd' and export PYTHONPATH=~/pliptool:${PYTHONPATH}
  4. run "ctrl-d" and hit return in the terminal to restart your session with the new bashrc configuration
  5. mkdir ~/plip/1vsn and then cd ~/plip/1vsn (instead of that tmp dir!)
  6. but errors ???
In [1]:
import sys import os
In [2]:
sys.path.insert(0, os.path.expanduser('~/pliptool'))
In [ ]:
cd ~/plip
wget wget http://files.rcsb.org/download/1EVE.pdb
In [5]:
! ls -l ~/plip
total 198 -rw-r--r-- 1 user user 435456 Apr 17 13:10 1EVE.pdb drwxr-xr-x 2 user user 2 Apr 17 12:51 1vsn -rw-r--r-- 1 user user 0 Apr 17 12:57 plip-cocalc.md -rw-r--r-- 1 user user 11629 Apr 17 13:10 test-plip.ipynb
In [3]:
from plip.modules.preparation import PDBComplex my_mol = PDBComplex() my_mol.load_pdb(os.path.expanduser('~/plip/1EVE.pdb')) # Load the PDB file into PLIP class print my_mol # Shows name of structure and ligand binding sites my_bsid = 'E20:A:2001' # Unique binding site identifier (HetID:Chain:Position) my_mol.analyze() my_interactions = my_mol.interaction_sets[my_bsid] # Contains all interaction data # Now print numbers of all residues taking part in pi-stacking print [pistack.resnr for pistack in s.pistacking] # Prints [84, 129]
TypeErrorTraceback (most recent call last) <ipython-input-3-b5d766d7fab9> in <module>() ----> 1 from plip.modules.preparation import PDBComplex 2 3 my_mol = PDBComplex() 4 my_mol.load_pdb(os.path.expanduser('~/plip/1EVE.pdb')) # Load the PDB file into PLIP class 5 print my_mol # Shows name of structure and ligand binding sites /home/user/pliptool/plip/modules/preparation.py in <module>() 11 12 # Own modules ---> 13 from .detection import * 14 from .supplemental import * 15 from . import config /home/user/pliptool/plip/modules/detection.py in <module>() 10 11 # Own modules ---> 12 from .supplemental import * 13 from . import config 14 /home/user/pliptool/plip/modules/supplemental.py in <module>() 25 # External libraries 26 import pybel ---> 27 from pybel import * 28 from openbabel import * 29 import numpy as np TypeError: Item in ``from list'' not a string

the cmd startup content

In [3]:
# Compatibility from __future__ import print_function from __future__ import absolute_import # Own modules from plip.modules.preparation import * from plip.modules.plipremote import VisualizerData from plip.modules.report import StructureReport,__version__ from plip.modules import config from plip.modules.mp import parallel_fn from plip.modules.webservices import check_pdb_status, fetch_pdb # Python standard library import sys import argparse from argparse import ArgumentParser import time import multiprocessing import json # External libraries import lxml.etree as et
TypeErrorTraceback (most recent call last) <ipython-input-3-6928ff32bc35> in <module>() 4 5 # Own modules ----> 6 from plip.modules.preparation import * 7 from plip.modules.plipremote import VisualizerData 8 from plip.modules.report import StructureReport,__version__ /home/user/pliptool/plip/modules/preparation.py in <module>() 11 12 # Own modules ---> 13 from .detection import * 14 from .supplemental import * 15 from . import config /home/user/pliptool/plip/modules/detection.py in <module>() 10 11 # Own modules ---> 12 from .supplemental import * 13 from . import config 14 /home/user/pliptool/plip/modules/supplemental.py in <module>() 25 # External libraries 26 import pybel ---> 27 from pybel import * 28 from openbabel import * 29 import numpy as np TypeError: Item in ``from list'' not a string
In [5]:
import pybel import openbabel